X-Git-Url: http://deadsoftware.ru/gitweb?p=flatwaifu.git;a=blobdiff_plain;f=src%2Fgame.c;h=b540223a46028b5beaddaa4265a6722987b8f8aa;hp=8d14674c22ac3f1ebf2c88b1263c4ec4dfe5a8ad;hb=de05b18ef2a99168b0a1a8a921a4b18ec7023833;hpb=4402c26ec7a3554069c214a648de5130cce3493b 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; }