From 0587a828092758b3a262dd3bf16cb154bc3823ed Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 14 Dec 2014 12:22:34 +0000 Subject: [PATCH] Flood-it: fix key's control git-svn-id: svn://kolibrios.org@5230 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/games/flood-it/trunk/compile_eng.bat | 4 ++-- programs/games/flood-it/trunk/compile_rus.bat | 4 ++-- programs/games/flood-it/trunk/flood-it.c | 2 +- programs/games/flood-it/trunk/lib/kolibri.h | 20 +++++++++++++++---- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/programs/games/flood-it/trunk/compile_eng.bat b/programs/games/flood-it/trunk/compile_eng.bat index 941a7c90a..805fac4f5 100644 --- a/programs/games/flood-it/trunk/compile_eng.bat +++ b/programs/games/flood-it/trunk/compile_eng.bat @@ -1,7 +1,7 @@ del lang.h-- echo #define LANG_ENG 1 >lang.h-- -..\C--\C-- flood-it.c +C-- flood-it.c del flood-it! rename flood-it.com flood-it -..\C--\kpack flood-it +C--\kpack flood-it pause \ No newline at end of file diff --git a/programs/games/flood-it/trunk/compile_rus.bat b/programs/games/flood-it/trunk/compile_rus.bat index 04ffcdc4a..0d3ea0351 100644 --- a/programs/games/flood-it/trunk/compile_rus.bat +++ b/programs/games/flood-it/trunk/compile_rus.bat @@ -1,7 +1,7 @@ del lang.h-- echo #define LANG_RUS 1 >lang.h-- -..\C--\C-- flood-it.c +C-- flood-it.c del flood-it rename flood-it.com flood-it -..\C--\kpack flood-it +kpack flood-it pause \ No newline at end of file diff --git a/programs/games/flood-it/trunk/flood-it.c b/programs/games/flood-it/trunk/flood-it.c index 639c944b3..f06d3ddd4 100644 --- a/programs/games/flood-it/trunk/flood-it.c +++ b/programs/games/flood-it/trunk/flood-it.c @@ -1,4 +1,4 @@ -//Leency 06.10.2011, Flood-it! v2.4, GPL +//Leency 06.10.2011, Flood-it! v2.41, GPL #include "lib\kolibri.h" #include "lib\random.h" diff --git a/programs/games/flood-it/trunk/lib/kolibri.h b/programs/games/flood-it/trunk/lib/kolibri.h index 9e68ea207..9e1150792 100644 --- a/programs/games/flood-it/trunk/lib/kolibri.h +++ b/programs/games/flood-it/trunk/lib/kolibri.h @@ -68,10 +68,22 @@ inline fastcall dword WaitEvent(){ } -inline fastcall word GetKey(){ //Gluk fix - EAX = 2; // just read it key from buffer - $int 0x40 - EAX = EAX >> 8; +inline fastcall word GetKey() //+Gluk fix +{ + $push edx +GETKEY: + $mov eax,2 + $int 0x40 + $cmp eax,1 + $jne GETKEYI + $mov ah,dh + $jmp GETKEYII //jz? +GETKEYI: + $mov dh,ah + $jmp GETKEY +GETKEYII: + $pop edx + $shr eax,8 } inline fastcall word GetButtonID(){