mario the game: gui update

git-svn-id: svn://kolibrios.org@2752 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2012-06-07 13:13:15 +00:00
parent ad9e97b619
commit b00fc9a1f9

View File

@ -103,7 +103,7 @@ wait_for_event:
call draw_mario call draw_mario
mov eax,11 ; check if os wants to say something mov eax,11 ; check for event
int 0x40 int 0x40
cmp eax,1 cmp eax,1
jz red jz red
@ -124,7 +124,7 @@ wait_for_event:
key: key:
mov [mariomem],dword 0x0 mov [mariomem],dword 0x0
mov eax,2 ; ah <- key mov eax,2 ; ah <- key
int 0x40 int 0x40
@ -160,17 +160,20 @@ wait_for_event:
mov [velocity],dword 0x110 mov [velocity],dword 0x110
key4: key4:
mov eax,71 ;draw caption
mov ebx,1
jmp wait_for_event mov ecx,title
int 0x40
jmp sta ;draw field
;jmp wait_for_event
button: button:
mov eax,0xffffffff ; close this program mov eax,0xffffffff ; close this program
int 0x40 int 0x40
; end of program
load_graph: load_graph:
@ -529,7 +532,7 @@ mario_delay:
pusha pusha
mov eax,5 mov eax,5 ;pause
mov ebx,2 mov ebx,2
int 0x40 int 0x40
@ -545,9 +548,9 @@ draw_mario:
mov eax,[mariomem] mov eax,[mariomem]
cmp eax,[marioxy] cmp eax,[marioxy]
jnz dm1 jnz dm1
call mario_delay call mario_delay
popa popa
ret ret
@ -743,23 +746,8 @@ draw_window:
mov eax,0 ; define and draw window mov eax,0 ; define and draw window
mov ebx,80*65536+480+1 mov ebx,80*65536+480+1
mov ecx,20*65536+382 mov ecx,20*65536+382
mov edx,0x0000500f mov edx,0x5466AA88
mov esi,0x8066AA88 mov edi,title
mov edi,0x00559977
int 0x40
mov eax,dword 0x00000004
mov ebx,8*65536+8
mov ecx,dword 0x00cccccc
mov edx,text
mov esi,textlen-text
int 0x40
mov eax,8
mov ebx,(481-19)*65536+12 ; button start x & size
mov ecx,5*65536+12 ; button start y & size
mov edx,1 ; button number
mov esi,0x00229911 ; button color
int 0x40 int 0x40
mov eax,12 ; tell os about redraw end mov eax,12 ; tell os about redraw end
@ -773,15 +761,11 @@ draw_window:
; DATA SECTION ; DATA SECTION
filename: filename:
db 'MARIOALLBMP' db 'MARIOALLBMP'
text: title:
db 'SUPER MARIO - USE ARROW KEYS' db 'SUPER MARIO - USE ARROW KEYS', 0
textlen:
xx db 'x'
field: field: