X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame.c;h=b540223a46028b5beaddaa4265a6722987b8f8aa;hb=1958dd7b157ada64ba81c31fb89c26ee2e95dde4;hp=8d14674c22ac3f1ebf2c88b1263c4ec4dfe5a8ad;hpb=2bb81ea2565c3627c954b5c37326db89b0048472;p=flatwaifu.git diff --git a/src/game.c b/src/game.c index 8d14674..b540223 100644 --- a/src/game.c +++ b/src/game.c @@ -26,7 +26,6 @@ #include #include "files.h" #include "memory.h" -#include "keyb.h" #include "sound.h" #include "view.h" #include "bmap.h" @@ -47,8 +46,8 @@ #include "music.h" #include "a8.h" #include "error.h" +#include "input.h" -#include #define LT_DELAY 8 #define LT_HITTIME 6 @@ -273,8 +272,8 @@ void G_act (void) { if(g_st==GS_BVIDEO || g_st==GS_EVIDEO) { - if(!A8_nextframe() || lastkey==SDLK_ESCAPE) { - if(lastkey==SDLK_ESCAPE) lastkey=0; + if (!A8_nextframe() || lastkey == KEY_ESCAPE) { + if (lastkey == KEY_ESCAPE) lastkey = KEY_UNKNOWN; A8_close(); if(g_st==GS_BVIDEO) G_start(); else goto inter; @@ -311,10 +310,14 @@ void G_act (void) { set_trans(GS_TITLE); } #else - if(keys[SDLK_SPACE] || keys[SDLK_RETURN] || keys[SDLK_KP_ENTER])//if(keys[0x39] || keys[0x1C] || keys[0x9C]) - if(!G_beg_video()) G_start(); else { - g_st=GS_BVIDEO;F_freemus(); + if (I_pressed(KEY_SPACE) || I_pressed(KEY_RETURN) || I_pressed(KEY_KP_ENTER)) { + if (!G_beg_video()) { + G_start(); + } else { + g_st = GS_BVIDEO; + F_freemus(); } + } #endif return; }