buf2d examples clean code
git-svn-id: svn://kolibrios.org@9675 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -17,7 +17,7 @@ start:
|
||||
cmp eax,-1
|
||||
jz button.exit
|
||||
|
||||
mcall 40,0x27
|
||||
mcall SF_SET_EVENTS_MASK, 0x27
|
||||
stdcall [buf2d_create], buf_0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_line], buf_0, 110, 20, 125, 90, 0xffff00 ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_line], buf_0, 60, 120, 110, 20, 0xd000 ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
@@ -31,10 +31,8 @@ start:
|
||||
|
||||
;<3B> <20><> <20>ᯮ<EFBFBD>짮<EFBFBD><ECA7AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>㭪<EFBFBD><E3ADAA><EFBFBD> buf2d_create, ⮣<><E2AEA3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||
;<3B><><EFBFBD>諮<EFBFBD><E8ABAE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD> <><E1ABA5>騬<EFBFBD> <20><>ப<EFBFBD><E0AEAA><EFBFBD>:
|
||||
;xor ecx,ecx
|
||||
;xor eax,eax
|
||||
;mov cx,word[buf_1.size_x]
|
||||
;mov ax,word[buf_1.size_y]
|
||||
;movzx ecx,word[buf_1.size_x]
|
||||
;movzx eax,word[buf_1.size_y]
|
||||
;imul ecx,eax
|
||||
;imul ecx,3 ;ecx - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>쪮<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
;stdcall mem_copy, dword[buf_0],dword[buf_1],ecx
|
||||
@@ -52,7 +50,7 @@ red_win:
|
||||
|
||||
align 4
|
||||
still:
|
||||
mcall 10
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp al,1 ;<3B><><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
jz red_win
|
||||
cmp al,2
|
||||
@@ -64,21 +62,21 @@ still:
|
||||
align 4
|
||||
draw_window:
|
||||
pushad
|
||||
mcall 12,1
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
|
||||
;mov edx,0x32000000
|
||||
mov edx,0x33000000
|
||||
mcall 0,(50 shl 16)+330,(30 shl 16)+275,,,caption
|
||||
mcall SF_CREATE_WINDOW, (50 shl 16)+330,(30 shl 16)+275,,,caption
|
||||
|
||||
stdcall [buf2d_draw], buf_0
|
||||
|
||||
mcall 12,2
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
popad
|
||||
ret
|
||||
|
||||
align 4
|
||||
key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
|
||||
cmp ah,27 ;Esc
|
||||
je button.exit
|
||||
@@ -87,13 +85,13 @@ key:
|
||||
|
||||
align 4
|
||||
button:
|
||||
mcall 17 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
mcall SF_GET_BUTTON
|
||||
cmp ah,1
|
||||
jne still
|
||||
.exit:
|
||||
stdcall [buf2d_delete],buf_0 ;㤠<>塞 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
stdcall [buf2d_delete],buf_1 ;㤠<>塞 <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
mcall -1 ;<3B><>室 <20><> <20>ணࠬ<E0AEA3><E0A0AC>
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
|
||||
caption db 'Test buf2d library, [Esc] - exit',0
|
||||
|
||||
@@ -166,9 +164,6 @@ lib0_name db 'buf2d.obj',0
|
||||
i_end: ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
rb 1024
|
||||
stacktop:
|
||||
cur_dir_path:
|
||||
rb 4096
|
||||
library_path:
|
||||
rb 4096
|
||||
cur_dir_path rb 4096
|
||||
library_path rb 4096
|
||||
mem:
|
||||
|
||||
|
Reference in New Issue
Block a user