From 2fbe3a59eb7164a3b6e6e8406f22eee1ad1cf556 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Fri, 28 Aug 2015 21:07:54 +0000 Subject: [PATCH] msquare: update position of active square when decreasing field size to keep it inside, fixes #8 git-svn-id: svn://kolibrios.org@5777 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/games/MSquare/trunk/MSquare.asm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/programs/games/MSquare/trunk/MSquare.asm b/programs/games/MSquare/trunk/MSquare.asm index 5d013201c7..66a5cd1891 100644 --- a/programs/games/MSquare/trunk/MSquare.asm +++ b/programs/games/MSquare/trunk/MSquare.asm @@ -170,6 +170,15 @@ key: cmp [Difficult],min_dif je still dec [Difficult] + movzx eax, [Difficult] + cmp al, [X] + jae @f + mov [X], al +@@: + cmp al, [Y] + jae @f + mov [Y], al +@@: jmp redraw_all jmp still @@ -272,7 +281,7 @@ key: show_level: movzx ecx,[Difficult] - mcall 47,0x10000,,<205,5>,(0x50000000+Text_clr),Bckgrd_clr + mcall 47,0x80020000,,<205,5>,(0x50000000+Text_clr),Bckgrd_clr ret