MEGAMAZE - checking for "rolled up" window

git-svn-id: svn://kolibrios.org@2075 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2011-08-18 22:33:28 +00:00
parent 151c6a828b
commit 1b18609545
2 changed files with 22 additions and 9 deletions

View File

@ -0,0 +1,5 @@
@echo lang fix en >lang.inc
@fasm -m 16384 megamaze.asm megamaze
@erase lang.inc
@kpack megamaze
@pause

View File

@ -285,7 +285,7 @@ lev_next:
.ex: .ex:
pop eax pop eax
ret ret
;---------------------------------------------------------------------
; ********************************************* ; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ******** ; ******* WINDOW DEFINITIONS AND DRAW ********
; ********************************************* ; *********************************************
@ -300,11 +300,18 @@ draw_window:
imul ecx,[Ces] imul ecx,[Ces]
add ecx,10 shl 16+YFOFS+30 add ecx,10 shl 16+YFOFS+30
mcall 0,,,WNDCOLOR mcall 0,,,WNDCOLOR
mov esi,edx
push edx
mcall 4,<8,8>,0x10ffffff,header,header.size
pop esi
and esi,0xffffff and esi,0xffffff
mcall 9,prc_info,-1 mcall 9,prc_info,-1
mov ebx,[esp]
pop ebx pop ebx
mov eax,[prc_info+70] ;status of window
test eax,100b
jne .end
add ebx,XFOFS shl 16+XFOFS*2 add ebx,XFOFS shl 16+XFOFS*2
mcall 8,,<25,12>,2 mcall 8,,<25,12>,2
@ -313,7 +320,7 @@ draw_window:
add ebx,14 shl 16 add ebx,14 shl 16
inc edx inc edx
mcall mcall
mcall 4,<8,8>,0x10ffffff,header,header.size
mov ecx,ebp mov ecx,ebp
mov edx,game_names+4 mov edx,game_names+4
call get_mstr call get_mstr
@ -325,10 +332,11 @@ draw_window:
mcall 47,0x020001,levnum,,0x8000 mcall 47,0x020001,levnum,,0x8000
mcall 4,<XFOFS+3,43>,0x108000,next_msg,3 mcall 4,<XFOFS+3,43>,0x108000,next_msg,3
.end:
mcall 12,2 mcall 12,2
popa popa
ret ret
;---------------------------------------------------------------------
unpack_level: unpack_level:
mov ecx,[cell_count] mov ecx,[cell_count]
mov edi,field mov edi,field
@ -340,7 +348,7 @@ unpack_level:
stosw stosw
loop .lp loop .lp
ret ret
;---------------------------------------------------------------------
get_xy: get_xy:
; eax-coord ; eax-coord
; out: [lx]-[x+2][CS-4],[ly]-[y+2][CS-4] ; out: [lx]-[x+2][CS-4],[ly]-[y+2][CS-4]