2012-02-20 15:24:37 +01:00
|
|
|
|
use32
|
2018-10-31 15:09:14 +01:00
|
|
|
|
org 0
|
|
|
|
|
db 'MENUET01'
|
|
|
|
|
dd 1,start,i_end,mem,stacktop,0,sys_path
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
include '../../../macros.inc'
|
|
|
|
|
include '../../../proc32.inc'
|
2018-10-31 15:09:14 +01:00
|
|
|
|
include '../../../KOSfuncs.inc'
|
|
|
|
|
include '../../../load_img.inc'
|
2020-12-08 22:01:35 +01:00
|
|
|
|
include '../../../load_lib.mac'
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-11-04 01:22:27 +01:00
|
|
|
|
;include 'lang.inc'
|
2018-11-04 01:20:00 +01:00
|
|
|
|
|
2020-11-18 19:11:43 +01:00
|
|
|
|
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
|
|
|
|
hed db 'Life 18.11.20',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
run_file_70 FileInfoBlock
|
|
|
|
|
image_data dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20>㦥<EFBFBD> <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
ICONSIZE = 21
|
|
|
|
|
TBTNSIZE = ICONSIZE-2
|
|
|
|
|
|
|
|
|
|
IMAGE_TOOLBAR_ICON_SIZE equ ICONSIZE*ICONSIZE*3
|
2012-02-20 15:24:37 +01:00
|
|
|
|
image_data_toolbar dd 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
struct Cell
|
|
|
|
|
x dd ? ;+0
|
|
|
|
|
y dd ? ;+4
|
2018-10-31 15:09:14 +01:00
|
|
|
|
tc dd ? ;+8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> த<><E0AEA4><EFBFBD><EFBFBD><EFBFBD> <20>ᮡ<EFBFBD>
|
|
|
|
|
liv db ? ;+12 <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9> <20><><EFBFBD> <20><><EFBFBD>
|
|
|
|
|
so db ? ;+13 <20><> <20><>ᥤ<EFBFBD><E1A5A4>
|
2012-02-20 15:24:37 +01:00
|
|
|
|
ends
|
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
MAX_CELL equ 90000 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>⭮ 4
|
|
|
|
|
COL_MEM equ 64 ;<3B><> 梥⮢ <20><><EFBFBD> <20>⫨<EFBFBD><E2ABA8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
cell dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ࠬ<EFBFBD> <20>祥<EFBFBD>
|
|
|
|
|
memCell dd 0
|
|
|
|
|
CellColors dd 0
|
|
|
|
|
|
|
|
|
|
macro get_cell_offset reg,ind
|
|
|
|
|
{
|
|
|
|
|
mov reg,ind
|
|
|
|
|
imul reg,sizeof.Cell
|
|
|
|
|
add reg,dword[cell]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
er_oom db 0 ;<3B><> <20><><EFBFBD>砩 <20><><EFBFBD><EFBFBD><EFBFBD><E0AFA0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
tim_ch db 0 ;<3B><>⮬<EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD>᪨ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
poc_stop dd 1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Cor_x dd 0
|
|
|
|
|
Cor_y dd 0
|
|
|
|
|
tim dd 0 ;<3B>६<EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
b_sort dd 0 ;<3B>࠭<EFBFBD><E0A0AD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20>祥<EFBFBD>
|
|
|
|
|
osob dd 0 ;<3B><> <20>ᮡ<EFBFBD><E1AEA1>
|
|
|
|
|
zoom db 3 ;<3B><><EFBFBD><EFBFBD>⠡ <20><><EFBFBD><EFBFBD>
|
2018-11-04 01:20:00 +01:00
|
|
|
|
|
|
|
|
|
if lang eq ru
|
|
|
|
|
txt_zoom db ' <20><><EFBFBD><EFBFBD>⠡:',0
|
|
|
|
|
txt_gen db ' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:',0
|
|
|
|
|
txt_osob db ' <20>ᮡ<EFBFBD><E1AEA1>:',0
|
|
|
|
|
else
|
|
|
|
|
txt_zoom db ' Zoom:',0
|
|
|
|
|
txt_gen db 'Generation:',0
|
|
|
|
|
txt_osob db 'Population:',0
|
|
|
|
|
end if
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9> <20><><EFBFBD>ᨢ<EFBFBD> <20> 梥⠬<E6A2A5>
|
|
|
|
|
; col_pole - 梥<> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
; col_cell_n - 梥<> <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
|
|
|
|
; col_cell_o - 梥<> <20><><EFBFBD>ன <20>祩<EFBFBD><E7A5A9>
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_init_colors uses eax ebx ecx edx esi edi, col_pole:dword, col_cell_n:dword, col_cell_o:dword
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov esi,[CellColors]
|
|
|
|
|
mov ebx,[col_pole]
|
2020-11-16 08:55:40 +01:00
|
|
|
|
mov [esi],ebx
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2020-11-16 08:55:40 +01:00
|
|
|
|
lea edi,[esi+4*COL_MEM]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add esi,4
|
|
|
|
|
; esi - 㪠<><E3AAA0>⥫<EFBFBD> <20><> 1-<2D> <20>ࠤ<EFBFBD><E0A0A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<>
|
|
|
|
|
; edi - 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20>ࠤ<EFBFBD><E0A0A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[col_cell_n]
|
|
|
|
|
mov ebx,[col_cell_o]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2020-11-16 08:55:40 +01:00
|
|
|
|
mov [esi],eax
|
|
|
|
|
mov [edi],ebx
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;need save ecx edx
|
|
|
|
|
stdcall middle_colors, esi,edi
|
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;<3B>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD>⥫쭠<E2A5AB> <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD><EFBFBD><EFBFBD> <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD> 梥<><E6A2A5> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD>ᨢ
|
|
|
|
|
;input:
|
|
|
|
|
; eax - 梥<> <20><>砫<EFBFBD><E7A0AB><EFBFBD><EFBFBD>
|
|
|
|
|
; ebx - 梥<> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ecx, edx
|
|
|
|
|
align 4
|
|
|
|
|
proc middle_colors uses edi esi, i0:dword, i1:dword
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov esi,[i0]
|
|
|
|
|
mov edi,[i1]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;<3B><>। <20>맮<EFBFBD><EBA7AE><EFBFBD> <20>㭪樨
|
|
|
|
|
;dword[esi]=eax
|
|
|
|
|
;dword[edi]=ebx
|
|
|
|
|
sub edi,esi
|
|
|
|
|
shr edi,1
|
|
|
|
|
btr edi,1 ;<3B><><EFBFBD>㣫塞 <20><> 4-<2D>, <20>. <20>. <20>㦭<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>㣫<EFBFBD><E3A3AB><EFBFBD><EFBFBD> <20><><EFBFBD> - 㡨ࠥ<E3A1A8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2-<2D>)
|
|
|
|
|
add edi,esi
|
|
|
|
|
cmp edi,esi
|
|
|
|
|
je @f
|
|
|
|
|
push eax ebx
|
|
|
|
|
|
|
|
|
|
mov ecx,eax
|
|
|
|
|
mov edx,ebx
|
|
|
|
|
|
|
|
|
|
;<3B><>室<EFBFBD><E5AEA4> <20>।<EFBFBD><E0A5A4><EFBFBD> 梥<> <20><><EFBFBD><EFBFBD><EFBFBD> eax <20> ebx
|
|
|
|
|
and ebx,111111101111111011111110b ;㡨ࠥ<E3A1A8> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 梥<><E6A2A5><EFBFBD> r, g, b
|
|
|
|
|
and eax,111111101111111011111110b
|
|
|
|
|
add eax,ebx ;<3B>㬨<EFBFBD>㥬 梥<><E6A2A5> <20><> r, g, b
|
|
|
|
|
shr eax,1 ;<3B><><EFBFBD><EFBFBD><EFBFBD> <20><> 2
|
|
|
|
|
mov dword[edi],eax
|
|
|
|
|
|
|
|
|
|
;४<><E0A5AA>ᨢ<EFBFBD><E1A8A2><EFBFBD> <20>맮<EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>孥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
mov eax,ecx
|
|
|
|
|
stdcall middle_colors, [i0],edi
|
|
|
|
|
|
|
|
|
|
;४<><E0A5AA>ᨢ<EFBFBD><E1A8A2><EFBFBD> <20>맮<EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov eax,ebx
|
|
|
|
|
mov ebx,edx
|
|
|
|
|
stdcall middle_colors, edi,[i1]
|
|
|
|
|
|
|
|
|
|
pop ebx eax
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
2018-10-31 15:09:14 +01:00
|
|
|
|
proc pole_clear uses eax ecx edi
|
2012-02-20 15:24:37 +01:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov dword[tim],eax
|
|
|
|
|
mov dword[osob],eax
|
|
|
|
|
mov byte[tim_ch],al
|
|
|
|
|
mov dword[Cor_x],eax
|
|
|
|
|
mov dword[Cor_y],eax
|
|
|
|
|
mov dword[b_sort],eax
|
|
|
|
|
mov byte[er_oom],al
|
|
|
|
|
cld
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,(MAX_CELL*sizeof.Cell)/4
|
|
|
|
|
mov edi,[cell]
|
|
|
|
|
rep stosd ;memset(cell,0,sizeof(Cell)*MAX_CELL);
|
|
|
|
|
mov edi,[memCell]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ecx,MAX_CELL
|
|
|
|
|
@@:
|
|
|
|
|
stosd ;for(i=0;i<MAX_CELL;i++) memCell[i]=i;
|
|
|
|
|
inc eax
|
|
|
|
|
loop @b
|
|
|
|
|
ret
|
2018-10-31 15:09:14 +01:00
|
|
|
|
endp
|
2018-11-03 21:59:00 +01:00
|
|
|
|
|
2012-02-20 15:24:37 +01:00
|
|
|
|
align 4
|
|
|
|
|
proc pole_cell_creat, x:dword, y:dword, li:dword
|
|
|
|
|
pushad ;eax ebx ecx edx edi
|
|
|
|
|
|
|
|
|
|
; *** <20> <20><><EFBFBD>⪠ 㦥 <20>뫠 ᮧ<><E1AEA7><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall pole_cell_find, [x],[y]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
or eax,eax
|
|
|
|
|
jz @f ;if(i){
|
2012-02-20 15:24:37 +01:00
|
|
|
|
get_cell_offset ebx,eax
|
|
|
|
|
cmp dword[li],0
|
|
|
|
|
jne .else_if ;if(!li)
|
|
|
|
|
; <20> ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⪠
|
2018-11-03 21:59:00 +01:00
|
|
|
|
inc byte[ebx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .fun_e
|
|
|
|
|
.else_if: ;else if(!(cell[i].liv&1) ){
|
2018-11-03 21:59:00 +01:00
|
|
|
|
bt word[ebx+Cell.liv],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
; <20> ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⪠
|
|
|
|
|
; <20> ࠭<><E0A0AD><EFBFBD> <20><><EFBFBD>⪠ <20>뫠 ᮧ<><E1AEA7><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⮩
|
|
|
|
|
jae .creat_border_cells
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
; *** ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
|
|
|
|
; <20><>室<EFBFBD><E5AEA4> <20><><EFBFBD><EFBFBD><EFBFBD> <><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9> (i) <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edi,[memCell]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc dword[edi]
|
|
|
|
|
cmp dword[edi],MAX_CELL
|
|
|
|
|
jne @f
|
|
|
|
|
dec dword[edi]
|
|
|
|
|
mov byte[tim_ch],0
|
|
|
|
|
;... need call message: "eror out of memory" ...
|
|
|
|
|
;... <20>뢮<EFBFBD> ᮮ<>饭<EFBFBD><E9A5AD> <20><>९<EFBFBD><E0A5AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ...
|
|
|
|
|
mov byte[er_oom],0
|
|
|
|
|
jmp .fun_e ;return;
|
|
|
|
|
@@:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[edi]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shl eax,2
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add eax,[memCell] ;eax -> memCell[firstC]
|
|
|
|
|
get_cell_offset ebx,[eax]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[x]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov dword[ebx],ecx ;+0 = .x
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[y]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov dword[ebx+Cell.y],edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[tim]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov dword[ebx+Cell.tc],eax
|
|
|
|
|
mov byte[ebx+Cell.liv],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
cmp dword[li],0
|
|
|
|
|
jne @f
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov byte[ebx+Cell.so],1
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov byte[ebx+Cell.so],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
.creat_border_cells:
|
|
|
|
|
inc dword[osob]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
or byte[ebx+Cell.liv],1
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[x]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec ecx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[y]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec edx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
inc edx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
inc edx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
inc ecx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
sub edx,2
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
inc ecx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
inc edx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
inc edx
|
|
|
|
|
stdcall pole_cell_creat,ecx,edx,0
|
|
|
|
|
.fun_e:
|
|
|
|
|
popad ;edi edx ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;output:
|
|
|
|
|
; eax - index
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_cell_find, x:dword, y:dword
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[memCell]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword[eax],0
|
|
|
|
|
jne @f
|
|
|
|
|
xor eax,eax ;if(!fristC) return 0;
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
xor eax,eax ;fnd=0;
|
|
|
|
|
cmp dword[b_sort],0
|
|
|
|
|
je @f
|
|
|
|
|
stdcall pole_bin_find, [memCell], [x],[y], [b_sort] ;i=BinFind(memCell, x,y, b_sort);
|
|
|
|
|
cmp eax,0
|
|
|
|
|
je @f
|
|
|
|
|
shl eax,2
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add eax,[memCell]
|
|
|
|
|
mov eax,[eax] ;if(i) fnd=memCell[i];
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp eax,0
|
|
|
|
|
jne @f ;if(!fnd){ // <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ॢ<EFBFBD><E0A5A2>
|
|
|
|
|
push ebx ecx edx edi esi
|
|
|
|
|
;ebx -> i
|
|
|
|
|
;ecx -> firstC
|
|
|
|
|
;edx -> &memCell[i]
|
|
|
|
|
;edi -> cell[memCell[i]]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[memCell]
|
|
|
|
|
mov ebx,[b_sort]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edx,[ebx*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,ecx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[ecx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
.cycle_b: ;for(i=b_sort+1;i<=fristC;i++)
|
2012-03-23 18:24:30 +01:00
|
|
|
|
inc ebx
|
|
|
|
|
cmp ebx,ecx
|
|
|
|
|
jg .cycle_e
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,4
|
2018-10-31 15:09:14 +01:00
|
|
|
|
get_cell_offset edi,[edx]
|
|
|
|
|
mov esi,[x]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword[edi],esi ;+0 = .x
|
|
|
|
|
jne .if_e
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov esi,[y]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp dword[edi+Cell.y],esi
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jne .if_e
|
|
|
|
|
;if(cell[memCell[i]].x==x && cell[memCell[i]].y==y){
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[edx] ;fnd=memCell[i];
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .cycle_e ;break;
|
|
|
|
|
.if_e:
|
2012-03-23 18:24:30 +01:00
|
|
|
|
jmp .cycle_b
|
2012-02-20 15:24:37 +01:00
|
|
|
|
.cycle_e:
|
|
|
|
|
pop esi edi edx ecx ebx
|
|
|
|
|
@@:
|
|
|
|
|
.fun_e:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;output:
|
|
|
|
|
; eax - index
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_bin_find, mas:dword, fx:dword, fy:dword, k:dword
|
|
|
|
|
push ebx ecx edx edi
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ebx,1 ;ebx - <20><><EFBFBD>ᨬ<EFBFBD><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>冷<EFBFBD> <20><><EFBFBD> <20><>ॢ<EFBFBD>
|
|
|
|
|
@@:
|
|
|
|
|
cmp dword[k],ebx
|
|
|
|
|
jle @f ;while(k>por)
|
|
|
|
|
shl ebx,1 ;por<<=1;
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
|
|
|
|
cmp dword[k],ebx
|
|
|
|
|
jge @f ;if(k<por)
|
|
|
|
|
shr ebx,1 ;por>>=1;
|
|
|
|
|
@@:
|
|
|
|
|
mov ecx,ebx ;i=por;
|
|
|
|
|
|
|
|
|
|
;ecx -> i
|
|
|
|
|
;edi -> mas[i]
|
|
|
|
|
.cycle_b: ;do{
|
|
|
|
|
shr ebx,1 ;por>>=1;
|
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edi,[ecx*4]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add edi,[mas]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;if(compare_cells_mb(mas[i],fx,fy)){
|
|
|
|
|
stdcall pole_compare_cells_mb_coords, dword[edi],[fx],[fy]
|
|
|
|
|
cmp dl,0
|
|
|
|
|
je .if_u0_e
|
|
|
|
|
@@: ;while(i+por>k)
|
|
|
|
|
mov edx,ecx
|
|
|
|
|
add edx,ebx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
cmp edx,[k] ;i+por>k
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jle @f
|
|
|
|
|
shr ebx,1 ;por>>=1;
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
|
|
|
|
add ecx,ebx ;i+=por;
|
|
|
|
|
jmp .if_e
|
|
|
|
|
.if_u0_e:
|
|
|
|
|
;else if(compare_cells_bm(mas[i],fx,fy))i-=por;
|
|
|
|
|
stdcall pole_compare_cells_bm_coords, dword[edi],[fx],[fy]
|
|
|
|
|
cmp dl,0
|
|
|
|
|
je .if_u1_e
|
|
|
|
|
sub ecx,ebx
|
|
|
|
|
jmp .if_e
|
|
|
|
|
.if_u1_e:
|
|
|
|
|
;else { m=i; por=0; }
|
|
|
|
|
mov eax,ecx
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
.if_e:
|
|
|
|
|
cmp ebx,0
|
|
|
|
|
jne .cycle_b ;}while(por);
|
|
|
|
|
|
|
|
|
|
pop edi edx ecx ebx
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
;description:
|
|
|
|
|
; <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD>⥫쭠<E2A5AB> <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20>祥<EFBFBD><E7A5A5> <20><> <20><><EFBFBD>न<EFBFBD><E0A4A8>⠬
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;output:
|
|
|
|
|
; dl
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_compare_cells_bm_coords, i0:dword, fx:dword, fy:dword
|
|
|
|
|
push eax ebx ecx
|
|
|
|
|
get_cell_offset eax,[i0]
|
|
|
|
|
;eax -> cell[i0]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ebx,[fx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword[eax],ebx
|
|
|
|
|
jle @f
|
|
|
|
|
mov dl,1
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[fy]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp dword[eax+Cell.y],ecx
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jle @f
|
|
|
|
|
cmp dword[eax],ebx
|
|
|
|
|
jne @f
|
|
|
|
|
mov dl,1
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
xor dl,dl
|
|
|
|
|
.fun_e:
|
|
|
|
|
pop ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
;description:
|
|
|
|
|
; <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD>⥫쭠<E2A5AB> <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20>祥<EFBFBD><E7A5A5> <20><> <20><><EFBFBD>न<EFBFBD><E0A4A8>⠬
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;output:
|
|
|
|
|
; dl
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_compare_cells_mb_coords, i0:dword, fx:dword, fy:dword
|
|
|
|
|
push eax ebx ecx
|
|
|
|
|
get_cell_offset eax,[i0]
|
|
|
|
|
;eax -> cell[i0]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ebx,[fx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword[eax],ebx
|
|
|
|
|
jge @f
|
|
|
|
|
mov dl,1
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[fy]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp dword[eax+Cell.y],ecx
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jge @f
|
|
|
|
|
cmp dword[eax],ebx
|
|
|
|
|
jne @f
|
|
|
|
|
mov dl,1
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
xor dl,dl
|
|
|
|
|
.fun_e:
|
|
|
|
|
pop ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;output:
|
|
|
|
|
; dl
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_compare_cells_bm, i0:dword, i1:dword
|
|
|
|
|
push eax ebx ecx
|
|
|
|
|
get_cell_offset eax,[i0] ;eax -> cell[i0]
|
|
|
|
|
get_cell_offset ebx,[i1] ;ebx -> cell[i1]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[ebx] ;+0 = .x
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword[eax],ecx
|
|
|
|
|
jle @f ;x0>x1
|
|
|
|
|
mov dl,1
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
jne @f ;x0==x1
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov ecx,[ebx+Cell.y]
|
|
|
|
|
cmp dword[eax+Cell.y],ecx
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jle @f ;y0>y1
|
|
|
|
|
mov dl,1
|
|
|
|
|
jmp .fun_e
|
|
|
|
|
@@:
|
|
|
|
|
xor dl,dl
|
|
|
|
|
.fun_e:
|
|
|
|
|
pop ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
pole_paint:
|
|
|
|
|
pushad
|
|
|
|
|
;eax -> firstC
|
|
|
|
|
;ebx -> i
|
|
|
|
|
;ecx -> cell[memCell[i]]
|
|
|
|
|
;edx -> color
|
|
|
|
|
;edi -> coord_x
|
|
|
|
|
;esi -> coord_y
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[memCell]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword[eax],0
|
|
|
|
|
je .no_draw
|
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[eax]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ebx,1
|
|
|
|
|
|
|
|
|
|
;---
|
|
|
|
|
@@: ;while(i<b_sort && Cor_x+cell[memCell[i]].x<0)
|
2018-10-31 15:09:14 +01:00
|
|
|
|
cmp ebx,[b_sort]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jge @f ;<3B><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4> <20><> <20><>砫<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 横<><E6A8AA>
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea ecx,[ebx*4]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add ecx,[memCell]
|
|
|
|
|
get_cell_offset ecx,[ecx]
|
|
|
|
|
mov edx,[ecx] ;+0 = .x
|
|
|
|
|
add edx,[Cor_x]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp edx,0
|
|
|
|
|
jge @f ;<3B><><EFBFBD><EFBFBD>室<EFBFBD><E5AEA4> <20><> <20><>砫<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 横<><E6A8AA>
|
|
|
|
|
inc ebx ;i++; // <20><><EFBFBD> <20>ய<EFBFBD>᪠ <20>祥<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <><E1ABA5>
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp byte[zoom],2
|
|
|
|
|
jge .zoom2
|
|
|
|
|
@@: ;for(;i<=fristC;i++){
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea ecx,[ebx*4]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add ecx,[memCell]
|
|
|
|
|
get_cell_offset ecx,[ecx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;...
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edi,[Cor_x]
|
|
|
|
|
add edi,[ecx] ;+0 = .x
|
|
|
|
|
mov esi,[Cor_y]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
add esi,[ecx+Cell.y]
|
|
|
|
|
bt word[ecx+Cell.liv],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jc .cell_1
|
|
|
|
|
;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[CellColors]
|
|
|
|
|
mov edx,[edx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .cell_0
|
|
|
|
|
.cell_1:
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[tim]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc edx
|
2018-11-03 21:59:00 +01:00
|
|
|
|
sub edx,[ecx+Cell.tc]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp edx,COL_MEM
|
|
|
|
|
jle .in_color
|
|
|
|
|
mov edx,COL_MEM
|
|
|
|
|
.in_color:
|
|
|
|
|
shl edx,2
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add edx,[CellColors]
|
|
|
|
|
mov edx,[edx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
.cell_0:
|
|
|
|
|
stdcall [buf2d_set_pixel], buf_0, edi, esi, edx
|
|
|
|
|
;...
|
|
|
|
|
inc ebx
|
|
|
|
|
cmp ebx,eax
|
|
|
|
|
jle @b
|
|
|
|
|
|
|
|
|
|
jmp .no_draw
|
|
|
|
|
.zoom2:
|
|
|
|
|
|
|
|
|
|
@@: ;for(;i<=fristC;i++){
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea ecx,[ebx*4]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add ecx,[memCell]
|
|
|
|
|
get_cell_offset ecx,[ecx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov dl,byte[zoom] ;edx <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>ᥭ<EFBFBD><E1A5AD> zoom <20> 4 <20><><EFBFBD>⭮<EFBFBD> <20><>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edi,[ecx] ;+0 = .x
|
|
|
|
|
add edi,[Cor_x]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
imul edi,edx
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov esi,[ecx+Cell.y]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add esi,[Cor_y]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
imul esi,edx
|
2018-11-03 21:59:00 +01:00
|
|
|
|
bt word[ecx+Cell.liv],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jc .z2_cell_1
|
|
|
|
|
;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[CellColors]
|
|
|
|
|
mov edx,[edx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .z2_cell_0
|
|
|
|
|
.z2_cell_1:
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[tim]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc edx
|
2018-11-03 21:59:00 +01:00
|
|
|
|
sub edx,[ecx+Cell.tc]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp edx,COL_MEM
|
|
|
|
|
jle .z2_in_color
|
|
|
|
|
mov edx,COL_MEM
|
|
|
|
|
.z2_in_color:
|
|
|
|
|
shl edx,2
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add edx,[CellColors]
|
|
|
|
|
mov edx,[edx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
.z2_cell_0:
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom] ;ecx <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>ᥭ<EFBFBD><E1A5AD> zoom <20> 4 <20><><EFBFBD>⭮<EFBFBD> <20><>
|
|
|
|
|
;;;dec ecx
|
|
|
|
|
stdcall [buf2d_filled_rect_by_size], buf_0, edi, esi, ecx, ecx, edx
|
|
|
|
|
inc ebx
|
|
|
|
|
cmp ebx,eax
|
|
|
|
|
jle @b
|
|
|
|
|
|
|
|
|
|
.no_draw:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
pole_next_gen:
|
|
|
|
|
pushad
|
|
|
|
|
;eax -> firstC
|
|
|
|
|
;ebx -> i
|
|
|
|
|
;ecx -> &memCell[i]
|
|
|
|
|
;edx -> cell[memCell[i]]
|
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[memCell]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ecx,eax
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[eax]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp eax,1
|
|
|
|
|
jl .fun_e
|
|
|
|
|
inc dword[tim]
|
|
|
|
|
mov ebx,1
|
|
|
|
|
@@: ;for(i=1;i<=firstC;i++)
|
|
|
|
|
add ecx,4
|
2018-10-31 15:09:14 +01:00
|
|
|
|
get_cell_offset edx,[ecx]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
bt word[edx+Cell.liv],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jae .if_0_e
|
|
|
|
|
; <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9> (<28><>ᥤ<EFBFBD><E1A5A4> 2 <20><><EFBFBD> 3)
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp byte[edx+Cell.so],2
|
2012-02-20 15:24:37 +01:00
|
|
|
|
je .if_2_e
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp byte[edx+Cell.so],3
|
2012-02-20 15:24:37 +01:00
|
|
|
|
je .if_2_e
|
|
|
|
|
jmp .change
|
|
|
|
|
.if_0_e:
|
|
|
|
|
; ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9> (<28><>ᥤ<EFBFBD><E1A5A4> 3)
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp byte[edx+Cell.so],3
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jne .if_1_e
|
|
|
|
|
.change:
|
2018-11-03 21:59:00 +01:00
|
|
|
|
or byte[edx+Cell.liv],2
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp .if_2_e
|
|
|
|
|
.if_1_e:
|
|
|
|
|
; 㤠<><E3A4A0><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⮩ <20>祩<EFBFBD><E7A5A9> <20><><EFBFBD> <20><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp byte[edx+Cell.so],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jne .if_2_e
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov edi,[edx+Cell.tc]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edi,5 ; 5 - <20>६<EFBFBD> <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD>⮩ <20>祩<EFBFBD><E7A5A9>, <20><> <20><> 㤠<><E3A4A0><EFBFBD><EFBFBD><EFBFBD>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
cmp edi,[tim]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jge .if_2_e
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edi,[eax*4]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add edi,[memCell] ;edi -> &memCell[fristC]
|
|
|
|
|
mov esi,[edi] ;swp=memCell[fristC];
|
|
|
|
|
mov edx,[ecx] ;edx - 㦥 <20><> <20>ᯮ<EFBFBD><E1AFAE><EFBFBD>㥬, <20><>⮬<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [edi],edx ;memCell[fristC]=memCell[i];
|
|
|
|
|
mov [ecx],esi ;memCell[i]=swp;
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec eax
|
|
|
|
|
dec ebx
|
|
|
|
|
sub ecx,4
|
|
|
|
|
.if_2_e:
|
|
|
|
|
|
|
|
|
|
inc ebx
|
|
|
|
|
cmp ebx,eax
|
|
|
|
|
jle @b
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ebx,[memCell]
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [ebx],eax ;firstC <- eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [b_sort],eax
|
|
|
|
|
stdcall pole_fl_sort, [memCell],eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[memCell]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ebx,1
|
|
|
|
|
@@: ;for(i=1;i<=firstC;i++)
|
|
|
|
|
add ecx,4
|
2018-10-31 15:09:14 +01:00
|
|
|
|
get_cell_offset edx,[ecx]
|
2018-11-03 21:59:00 +01:00
|
|
|
|
bt word[edx+Cell.liv],1
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jae .no_change
|
2018-11-03 21:59:00 +01:00
|
|
|
|
xor byte[edx+Cell.liv],3
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edi,[tim]
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [edx+Cell.tc],edi
|
2018-11-03 21:59:00 +01:00
|
|
|
|
bt word[edx+Cell.liv],0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jc .new_cell
|
|
|
|
|
push eax
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edi,[edx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec edi
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov esi,[edx+Cell.y]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec esi
|
|
|
|
|
dec dword[osob]
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD> edx <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc edi
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
sub esi,2
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc edi
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_find,edi,esi
|
|
|
|
|
get_cell_offset edx,eax
|
2018-11-03 21:59:00 +01:00
|
|
|
|
dec byte[edx+Cell.so]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
pop eax
|
|
|
|
|
jmp .no_change
|
|
|
|
|
.new_cell: ; <20><><EFBFBD><EFA2A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>祩<EFBFBD><E7A5A9>
|
|
|
|
|
inc dword[osob]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edi,[edx]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec edi
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov esi,[edx+Cell.y]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
dec esi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
inc edi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
sub esi,2
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
inc edi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
inc esi
|
|
|
|
|
stdcall pole_cell_creat,edi,esi,0
|
|
|
|
|
.no_change:
|
|
|
|
|
inc ebx
|
|
|
|
|
cmp ebx,eax
|
|
|
|
|
jle @b
|
|
|
|
|
.fun_e:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> a[1..n] <20><>⮤<EFBFBD><E2AEA4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_fl_sort, a:dword, n:dword
|
|
|
|
|
pushad
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[a]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;<3B><>ନ<E0ACA8><E0AEA2><EFBFBD> <20><>室<EFBFBD><E5AEA4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>筮 㯮<>冷祭<EFA4AE><E7A5AD><EFBFBD> <20><>ॢ<EFBFBD>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[n]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1
|
|
|
|
|
@@: ;for(i=n>>1; i>=2; i--)
|
|
|
|
|
stdcall pole_fl_surface, ecx,eax,[n] ;(a,i,n)
|
|
|
|
|
dec eax
|
|
|
|
|
cmp eax,2
|
|
|
|
|
jge @b
|
|
|
|
|
;<3B>믮<EFBFBD><EBAFAE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>楤<EFBFBD><E6A5A4><EFBFBD> <20>ᯫ<EFBFBD><E1AFAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ॢ<EFBFBD>
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[n]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@: ;for(i=n; i>=2; i--){
|
|
|
|
|
stdcall pole_fl_surface, ecx,1,eax ;(a,1,i)
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᨬ<EFBFBD><E1A8AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> ᯨ᪠
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edi,[eax*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edi,ecx ;edi -> &a[i]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov esi,[edi] ;w=a[i];
|
|
|
|
|
mov edx,[ecx+4]
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [edi],edx ;a[i]=a[1];
|
|
|
|
|
mov [ecx+4],esi ;a[1]=w;
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
dec eax
|
|
|
|
|
cmp eax,2
|
|
|
|
|
jge @b
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;<3B><><EFBFBD>楤<EFBFBD><E6A5A4><EFBFBD> <20>ᯫ<EFBFBD><E1AFAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>ॢ<EFBFBD> a[1..k]
|
|
|
|
|
align 4
|
|
|
|
|
proc pole_fl_surface, a:dword, i:dword, k:dword
|
|
|
|
|
locals
|
|
|
|
|
copy dd ?
|
|
|
|
|
endl
|
|
|
|
|
pushad
|
|
|
|
|
;edx -> ...
|
|
|
|
|
;edi -> m
|
|
|
|
|
;esi -> j
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[a]
|
|
|
|
|
mov ebx,[i]
|
|
|
|
|
mov ecx,[k]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edx,[ebx*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,eax
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[edx]
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [copy],edx ;copy=a[i];
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov edi,ebx
|
|
|
|
|
shl edi,1 ;m=i<<1;
|
|
|
|
|
.cycle_b: ;while (m<=k) {
|
|
|
|
|
cmp edi,ecx
|
|
|
|
|
jg .cycle_e
|
|
|
|
|
jne @f ;if (m==k) j=m;
|
|
|
|
|
mov esi,edi
|
|
|
|
|
jmp .else_e
|
|
|
|
|
@@: ;else if (pole_compare_cells_bm(a[m],a[m+1])) j=m;
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edx,[edi*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,eax
|
|
|
|
|
stdcall pole_compare_cells_bm, dword[edx],dword[edx+4]
|
|
|
|
|
cmp dl,0
|
|
|
|
|
je @f
|
|
|
|
|
mov esi,edi
|
|
|
|
|
jmp .else_e
|
|
|
|
|
@@: ;else j=m+1;
|
|
|
|
|
mov esi,edi
|
|
|
|
|
inc esi
|
|
|
|
|
.else_e:
|
|
|
|
|
|
|
|
|
|
;if (pole_compare_cells_bm(a[j],copy)) {
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edx,[esi*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,eax
|
2020-12-08 22:01:35 +01:00
|
|
|
|
stdcall pole_compare_cells_bm, dword[edx],[copy]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dl,0
|
|
|
|
|
je .cycle_e ;} else break; //<2F><>室 <20><> 横<><E6A8AA>
|
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edx,[esi*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,eax
|
|
|
|
|
push dword[edx] ;push a[j];
|
2018-11-03 21:59:00 +01:00
|
|
|
|
lea edx,[ebx*4]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add edx,eax
|
|
|
|
|
pop dword[edx] ;a[i]=a[j];
|
|
|
|
|
mov ebx,esi ;i=j;
|
|
|
|
|
mov edi,ebx
|
|
|
|
|
shl edi,1 ;m=i<<1;
|
|
|
|
|
|
|
|
|
|
jmp .cycle_b
|
|
|
|
|
.cycle_e:
|
|
|
|
|
|
|
|
|
|
;<3B><><EFBFBD>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ॣ<><E0A5A3><EFBFBD> 㦥 <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20>. <20>. <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
|
|
|
|
shl ebx,2
|
|
|
|
|
add eax,ebx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov edx,[copy]
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mov [eax],edx ;a[i]=copy;
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
start:
|
|
|
|
|
load_libraries l_libs_start,l_libs_end
|
|
|
|
|
;<3B><EFBFBD>ઠ <20><> <>쪮 㤠筮 <20><><EFBFBD>㧨<EFBFBD><E3A7A8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov ebp,lib2
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp dword [ebp+ll_struc_size-4],0
|
|
|
|
|
jz @f
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_TERMINATE_PROCESS ;exit not correct
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
|
|
|
|
mcall SF_SET_EVENTS_MASK,0x27
|
2012-02-20 15:24:37 +01:00
|
|
|
|
stdcall [OpenDialog_Init],OpenDialog_data ;<3B><><EFBFBD><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
stdcall [buf2d_create], buf_0 ;ᮧ<><E1AEA7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
stdcall mem.Alloc,MAX_CELL*sizeof.Cell
|
|
|
|
|
mov [cell],eax
|
|
|
|
|
stdcall mem.Alloc,MAX_CELL*4
|
|
|
|
|
mov [memCell],eax
|
|
|
|
|
stdcall mem.Alloc,(COL_MEM+1)*4
|
|
|
|
|
mov [CellColors],eax
|
2018-11-04 01:20:00 +01:00
|
|
|
|
include_image_file 'life3tb.png', image_data_toolbar
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2012-03-23 18:24:30 +01:00
|
|
|
|
;<3B><><EFBFBD><EFBFBD>ன<EFBFBD><E0AEA9> 梥⮢ <20>祥<EFBFBD>
|
|
|
|
|
stdcall pole_init_colors, 0xffffd0,0xff0000,0x0000ff
|
2012-02-20 15:24:37 +01:00
|
|
|
|
call pole_clear
|
|
|
|
|
call pole_paint ;<3B><>ᮢ<EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><> <20><> <20><>࠭<EFBFBD>)
|
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov [last_time],eax
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
red_win:
|
|
|
|
|
call draw_window
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
still:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ebx,[last_time]
|
|
|
|
|
add ebx,10 ;<3B><><EFBFBD><EFBFBD>প<EFBFBD>
|
|
|
|
|
cmp ebx,eax
|
|
|
|
|
jge @f
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
@@:
|
|
|
|
|
sub ebx,eax
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_WAIT_EVENT_TIMEOUT
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp eax,0
|
|
|
|
|
je timer_funct
|
|
|
|
|
|
|
|
|
|
cmp al,1
|
|
|
|
|
jz red_win
|
|
|
|
|
cmp al,2
|
|
|
|
|
jz key
|
|
|
|
|
cmp al,3
|
|
|
|
|
jz button
|
2018-11-03 21:59:00 +01:00
|
|
|
|
cmp al,6
|
|
|
|
|
jne @f
|
|
|
|
|
mcall SF_THREAD_INFO,procinfo,-1
|
|
|
|
|
cmp ax,word[procinfo.window_stack_position]
|
|
|
|
|
jne @f ;<3B><><EFBFBD><EFBFBD> <20><> <20><>⨢<EFBFBD><E2A8A2>
|
|
|
|
|
call mouse
|
|
|
|
|
@@:
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
align 4
|
|
|
|
|
mouse:
|
|
|
|
|
push eax ebx ecx
|
|
|
|
|
mcall SF_MOUSE_GET,SSF_BUTTON_EXT
|
|
|
|
|
bt eax,8
|
|
|
|
|
jnc @f
|
|
|
|
|
;mouse l. but. press
|
|
|
|
|
;call mouse_left_d
|
|
|
|
|
;jmp .end_l
|
|
|
|
|
@@:
|
|
|
|
|
bt eax,16
|
|
|
|
|
jnc .end_l
|
|
|
|
|
;mouse l. but. up
|
|
|
|
|
;call mouse_left_u
|
|
|
|
|
;jmp .end_l
|
|
|
|
|
.end_l:
|
|
|
|
|
|
|
|
|
|
call buf_get_mouse_coord
|
|
|
|
|
cmp eax,-1
|
|
|
|
|
je .end0
|
|
|
|
|
shl eax,1
|
|
|
|
|
sub eax,[buf_0.w]
|
|
|
|
|
sar eax,1
|
|
|
|
|
;mov [mouse_prop_x],eax
|
|
|
|
|
shl ebx,1
|
|
|
|
|
sub ebx,[buf_0.h]
|
|
|
|
|
sar ebx,1
|
|
|
|
|
;mov [mouse_prop_y],ebx
|
|
|
|
|
|
|
|
|
|
mcall SF_MOUSE_GET,SSF_SCROLL_DATA
|
|
|
|
|
test ax,ax
|
|
|
|
|
jz .end0
|
|
|
|
|
|
|
|
|
|
test ax,0x8000
|
|
|
|
|
jnz .decr
|
|
|
|
|
;㢥<><E3A2A5>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD>⠡<EFBFBD>
|
|
|
|
|
call but_zoom_p
|
|
|
|
|
jmp .end0
|
|
|
|
|
.decr:
|
|
|
|
|
;㬥<><E3ACA5>襭<EFBFBD><E8A5AD> <20><><EFBFBD><EFBFBD>⠡<EFBFBD>
|
|
|
|
|
call but_zoom_m
|
|
|
|
|
.end0:
|
|
|
|
|
|
|
|
|
|
pop ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;output:
|
|
|
|
|
; eax - buffer coord X (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> -1)
|
|
|
|
|
; ebx - buffer coord Y (<28> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> -1)
|
|
|
|
|
align 4
|
|
|
|
|
proc buf_get_mouse_coord
|
|
|
|
|
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
|
|
|
|
cmp ax,word[buf_0.t]
|
|
|
|
|
jl .no_buf ;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
shr ebx,16
|
|
|
|
|
cmp bx,word[buf_0.l]
|
|
|
|
|
jl .no_buf ;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x
|
|
|
|
|
|
|
|
|
|
and eax,0xffff ;<3B><>⠢<EFBFBD>塞 <20><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> y
|
|
|
|
|
sub ax,word[buf_0.t]
|
|
|
|
|
cmp eax,[buf_0.h]
|
|
|
|
|
jg .no_buf
|
|
|
|
|
sub bx,word[buf_0.l]
|
|
|
|
|
cmp ebx,[buf_0.w]
|
|
|
|
|
jg .no_buf
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
jmp .end_f
|
|
|
|
|
.no_buf:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
not eax
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
not ebx
|
|
|
|
|
.end_f:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
2012-02-20 15:24:37 +01:00
|
|
|
|
align 4
|
|
|
|
|
timer_funct:
|
|
|
|
|
pushad
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov [last_time],eax
|
|
|
|
|
|
|
|
|
|
cmp byte[tim_ch],0
|
|
|
|
|
je @f
|
|
|
|
|
;call but_next_gen
|
|
|
|
|
cld
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov ecx,[poc_stop]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp ecx,1
|
|
|
|
|
jg .clear
|
|
|
|
|
mov ecx,1 ;<3B><><EFBFBD>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD> ecx <20><> <20><><EFBFBD>砩 <20><>ᥫ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
|
|
|
|
|
jmp .cycle
|
|
|
|
|
.clear: ;<3B><><EFBFBD>⨬ <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>쪮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> 1 ⠪<> ⠩<><E2A0A9><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
.cycle:
|
|
|
|
|
call pole_next_gen
|
|
|
|
|
loop .cycle
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
call draw_pok
|
|
|
|
|
@@:
|
|
|
|
|
popad
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
draw_window:
|
|
|
|
|
pushad
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mcall SF_CREATE_WINDOW,(50 shl 16)+485,(50 shl 16)+415,0x73000000,0,hed
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mcall SF_THREAD_INFO,procinfo,-1
|
|
|
|
|
mov eax,[procinfo.box.height]
|
|
|
|
|
cmp eax,120
|
|
|
|
|
jge @f
|
|
|
|
|
mov eax,120 ;min size
|
|
|
|
|
@@:
|
|
|
|
|
sub eax,63
|
|
|
|
|
mov ebx,[procinfo.box.width]
|
|
|
|
|
cmp ebx,270
|
|
|
|
|
jge @f
|
|
|
|
|
mov ebx,270
|
|
|
|
|
@@:
|
|
|
|
|
sub ebx,9
|
|
|
|
|
cmp eax,[buf_0.h] ;ᬮ<>ਬ ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
jne @f
|
|
|
|
|
cmp ebx,[buf_0.w]
|
|
|
|
|
jne @f
|
|
|
|
|
jmp .end0
|
|
|
|
|
@@:
|
|
|
|
|
stdcall [buf2d_resize], buf_0, ebx,eax,1
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
.end0:
|
2018-11-04 01:20:00 +01:00
|
|
|
|
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
mov ebx, 0 shl 16
|
|
|
|
|
add ebx, [buf_0.w]
|
|
|
|
|
mcall SF_DRAW_RECT,,<0,35>
|
2018-11-03 21:59:00 +01:00
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mcall SF_DEFINE_BUTTON,(6 shl 16)+TBTNSIZE,(6 shl 16)+TBTNSIZE,4+0x40000000, [sc.work_button]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(36 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,6+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(61 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,7+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(86 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,8+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(116 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,9+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(141 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,10+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(171 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,11+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(196 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,12+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(221 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,13+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,(246 shl 16)+TBTNSIZE
|
|
|
|
|
mov edx,14+0x40000000
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mcall SF_PUT_IMAGE,[image_data_toolbar],(ICONSIZE shl 16)+ICONSIZE,(5 shl 16)+5
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(35 shl 16)+5 ;run once
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(60 shl 16)+5 ;run auto
|
|
|
|
|
int 0x40
|
2012-02-20 15:24:37 +01:00
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(85 shl 16)+5 ;stop
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(115 shl 16)+5 ;-
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(140 shl 16)+5 ;+
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(170 shl 16)+5 ;move up
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(195 shl 16)+5 ;move doun
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(220 shl 16)+5 ;move left
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(245 shl 16)+5 ;move right
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40
|
2018-11-04 01:20:00 +01:00
|
|
|
|
|
|
|
|
|
; add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
|
|
|
|
; mov edx,(270 shl 16)+5
|
|
|
|
|
; int 0x40
|
|
|
|
|
; add ebx,IMAGE_TOOLBAR_ICON_SIZE
|
|
|
|
|
; mov edx,(295 shl 16)+5
|
|
|
|
|
; int 0x40
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,SF_DRAW_TEXT
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov ebx,295*65536+5
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,0x80000000 ;or (1 shl 30)
|
|
|
|
|
mov edx,txt_zoom
|
|
|
|
|
;mov edi,[sc.work]
|
|
|
|
|
int 0x40
|
|
|
|
|
add bx,9
|
|
|
|
|
mov edx,txt_gen
|
|
|
|
|
int 0x40
|
|
|
|
|
add bx,9
|
|
|
|
|
mov edx,txt_osob
|
|
|
|
|
int 0x40
|
2018-11-04 01:20:00 +01:00
|
|
|
|
|
|
|
|
|
call draw_pok
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
2018-11-04 01:20:00 +01:00
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
|
|
|
|
|
mcall SF_REDRAW,SSF_END_DRAW
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
draw_pok:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,SF_DRAW_NUMBER
|
2018-11-03 21:59:00 +01:00
|
|
|
|
movzx ecx,byte[zoom]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov ebx,(2 shl 16)
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edx,(295+8*9)*65536+5
|
|
|
|
|
mov esi,[sc.work_text]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
or esi,(1 shl 30)
|
2018-11-04 01:20:00 +01:00
|
|
|
|
mov edi,[sc.work]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40 ;<3B><><EFBFBD><EFBFBD>⠡
|
|
|
|
|
mov ebx,(5 shl 16)
|
|
|
|
|
mov ecx,[tim]
|
2018-11-04 01:20:00 +01:00
|
|
|
|
add edx,9
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40 ;<3B>६<EFBFBD>
|
|
|
|
|
mov ebx,(5 shl 16)
|
|
|
|
|
mov ecx,[osob]
|
2018-11-04 01:20:00 +01:00
|
|
|
|
add edx,9
|
2012-02-20 15:24:37 +01:00
|
|
|
|
int 0x40 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
key:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_GET_KEY
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
button:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_GET_BUTTON
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp ah,3
|
|
|
|
|
jne @f
|
|
|
|
|
call but_new_file
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,4
|
|
|
|
|
jne @f
|
|
|
|
|
call but_open_file
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,5
|
|
|
|
|
jne @f
|
|
|
|
|
call but_save_file
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,6
|
|
|
|
|
jne @f
|
|
|
|
|
call but_next_gen
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,7
|
|
|
|
|
jne @f
|
|
|
|
|
call but_run
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,8
|
|
|
|
|
jne @f
|
|
|
|
|
call but_stop
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,9
|
|
|
|
|
jne @f
|
|
|
|
|
call but_zoom_p
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,10
|
|
|
|
|
jne @f
|
|
|
|
|
call but_zoom_m
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,11
|
|
|
|
|
jne @f
|
|
|
|
|
call but_pole_up
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,12
|
|
|
|
|
jne @f
|
|
|
|
|
call but_pole_dn
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,13
|
|
|
|
|
jne @f
|
|
|
|
|
call but_pole_left
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,14
|
|
|
|
|
jne @f
|
|
|
|
|
call but_pole_right
|
2018-10-31 15:09:14 +01:00
|
|
|
|
jmp still
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp ah,1
|
|
|
|
|
jne still
|
|
|
|
|
.exit:
|
|
|
|
|
stdcall [buf2d_delete],buf_0
|
2018-10-31 15:09:14 +01:00
|
|
|
|
stdcall mem.Free,[open_file_lif]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
stdcall mem.Free,[cell]
|
|
|
|
|
stdcall mem.Free,[memCell]
|
|
|
|
|
stdcall mem.Free,[CellColors]
|
|
|
|
|
stdcall mem.Free,[image_data_toolbar]
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_TERMINATE_PROCESS
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_new_file:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
2018-10-31 15:09:14 +01:00
|
|
|
|
open_file_lif dd 0 ;㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD>
|
|
|
|
|
open_file_size dd 0 ;ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⮣<EFBFBD> 䠩<><E4A0A9>
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_open_file:
|
|
|
|
|
pushad
|
|
|
|
|
copy_path open_dialog_name,communication_area_default_path,file_name,0
|
|
|
|
|
mov [OpenDialog_data.type],0
|
|
|
|
|
stdcall [OpenDialog_Start],OpenDialog_data
|
|
|
|
|
cmp [OpenDialog_data.status],2
|
|
|
|
|
je .end_open_file
|
|
|
|
|
;<3B><><EFBFBD> <20><><EFBFBD> 㤠筮<E3A4A0> <20><><EFBFBD><EFBFBD><EFBFBD>⨨ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov [run_file_70.Function], SSF_GET_INFO
|
|
|
|
|
mov [run_file_70.Position], 0
|
|
|
|
|
mov [run_file_70.Flags], 0
|
|
|
|
|
mov dword[run_file_70.Count], 0
|
|
|
|
|
mov dword[run_file_70.Buffer], open_b
|
|
|
|
|
mov byte[run_file_70+20], 0
|
|
|
|
|
mov dword[run_file_70.FileName], openfile_path
|
|
|
|
|
mcall SF_FILE,run_file_70
|
|
|
|
|
|
|
|
|
|
mov ecx,dword[open_b+32] ;+32 qword: ࠧ<><E0A0A7><EFBFBD> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
inc ecx ;for text files
|
|
|
|
|
stdcall mem.ReAlloc,[open_file_lif],ecx
|
|
|
|
|
mov [open_file_lif],eax
|
|
|
|
|
dec ecx ;for text files
|
|
|
|
|
mov byte[eax+ecx],0 ;for text files
|
|
|
|
|
|
|
|
|
|
mov [run_file_70.Function], SSF_READ_FILE
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov [run_file_70.Position], 0
|
|
|
|
|
mov [run_file_70.Flags], 0
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov [run_file_70.Count], ecx
|
|
|
|
|
m2m dword[run_file_70.Buffer], dword[open_file_lif]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mov byte[run_file_70+20], 0
|
|
|
|
|
mov dword[run_file_70.FileName], openfile_path
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mcall SF_FILE,run_file_70 ;<3B><><EFBFBD><EFBFBD>㦠<EFBFBD><E3A6A0> 䠩<> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz .end_open_file
|
2012-02-20 15:24:37 +01:00
|
|
|
|
cmp ebx,0xffffffff
|
|
|
|
|
je .end_open_file
|
|
|
|
|
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov [open_file_size],ebx
|
|
|
|
|
mcall SF_SET_CAPTION,1,openfile_path
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
call pole_clear
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.w]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
cmp cx,2
|
|
|
|
|
jl @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>稭<EFBFBD> zoom
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
@@:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add [Cor_x],eax
|
|
|
|
|
mov eax,[buf_0.h]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1
|
|
|
|
|
cmp cx,2
|
|
|
|
|
jl @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>稭<EFBFBD> zoom
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
@@:
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add [Cor_y],eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
;eax - first x position
|
|
|
|
|
;ebx - x position
|
|
|
|
|
;ecx - y position
|
2018-10-31 15:09:14 +01:00
|
|
|
|
;edx - <20><><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9>
|
|
|
|
|
mov edi,[open_file_lif]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
xor ebx,ebx
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov eax,ebx
|
2018-11-03 21:59:00 +01:00
|
|
|
|
mov edx,edi
|
2018-10-31 15:09:14 +01:00
|
|
|
|
add edx,[open_file_size]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
@@:
|
|
|
|
|
cmp byte[edi],'*'
|
|
|
|
|
jne .no_cell
|
|
|
|
|
stdcall pole_cell_creat, ebx,ecx,1
|
|
|
|
|
inc ebx
|
|
|
|
|
.no_cell:
|
|
|
|
|
cmp byte[edi],'.'
|
|
|
|
|
jne .cell_move
|
|
|
|
|
inc ebx
|
|
|
|
|
.cell_move:
|
|
|
|
|
cmp byte[edi],13
|
|
|
|
|
jne .cell_nl
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
inc ecx
|
|
|
|
|
.cell_nl:
|
|
|
|
|
cmp word[edi],'#P' ;ᬥ<><E1ACA5> <20><><EFBFBD><EFBFBD>樨
|
|
|
|
|
jne .pos
|
|
|
|
|
inc edi ;<3B>ய<EFBFBD><E0AEAF><EFBFBD> '#'
|
|
|
|
|
.space:
|
|
|
|
|
inc edi ;<3B>ய<EFBFBD><E0AEAF><EFBFBD> 'P' <20> ' '
|
|
|
|
|
cmp byte[edi],' '
|
|
|
|
|
je .space
|
|
|
|
|
stdcall conv_str_to_int,edi
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
cmp byte[edi],'-'
|
|
|
|
|
jne .digit
|
|
|
|
|
inc edi
|
|
|
|
|
.digit:
|
|
|
|
|
cmp byte[edi],'0'
|
|
|
|
|
jl .digit_no
|
|
|
|
|
cmp byte[edi],'9'
|
|
|
|
|
jg .digit_no
|
|
|
|
|
inc edi
|
|
|
|
|
jmp .digit
|
|
|
|
|
.digit_no:
|
|
|
|
|
;.space_1:
|
|
|
|
|
inc edi ;<3B>ய<EFBFBD><E0AEAF><EFBFBD> 'P' <20> ' '
|
|
|
|
|
cmp byte[edi],' '
|
|
|
|
|
je .digit_no ;.space_1
|
|
|
|
|
stdcall conv_str_to_int,edi
|
|
|
|
|
mov ecx,eax
|
|
|
|
|
mov eax,ebx ;<3B><><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>㯠 <20> eax
|
|
|
|
|
.pos:
|
|
|
|
|
inc edi
|
2018-10-31 15:09:14 +01:00
|
|
|
|
cmp edi,edx
|
|
|
|
|
jl @b
|
2012-02-20 15:24:37 +01:00
|
|
|
|
;---
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color] ;<3B><><EFBFBD>⨬ <20><><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
call pole_paint ;<3B><><EFBFBD>㥬 <20><><EFBFBD><EFBFBD> (<28><> <20><><EFBFBD>砩 <20> <20><><EFBFBD><EFBFBD> <20><>⪠ <20><><EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
stdcall [buf2d_draw], buf_0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>࠭<EFBFBD>
|
|
|
|
|
.end_open_file:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_save_file:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_next_gen:
|
|
|
|
|
call pole_next_gen
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
pushad
|
|
|
|
|
call draw_pok
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_run:
|
|
|
|
|
mov byte[tim_ch],1
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_stop:
|
|
|
|
|
mov byte[tim_ch],0
|
|
|
|
|
;cld
|
|
|
|
|
;mov ecx,100
|
|
|
|
|
;@@:
|
|
|
|
|
; call pole_next_gen
|
|
|
|
|
;loop @b
|
|
|
|
|
;stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
;call pole_paint
|
|
|
|
|
;stdcall [buf2d_draw], buf_0
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_zoom_p:
|
|
|
|
|
cmp byte[zoom],16
|
|
|
|
|
jge @f
|
|
|
|
|
pushad
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><E1ABA5><EFBFBD> ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᯥ<EFBFBD><E1AFA5><EFBFBD> 業<><EFBFBD><E0AEA2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> 㢥<><E3A2A5>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD>⠡<EFBFBD>
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
xor edx,edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.w]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1 ;<3B> eax <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> १<>ࢭ<EFBFBD><E0A2AD> <20><><EFBFBD><EFBFBD><EFBFBD> eax
|
|
|
|
|
div ecx ;<3B><><EFBFBD><EFBFBD><EFBFBD> eax <20><> ⥪<>騩 <20><><EFBFBD><EFBFBD>⠡
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
inc ecx
|
|
|
|
|
div ecx ;<3B><><EFBFBD><EFBFBD><EFBFBD> eax <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⠡
|
|
|
|
|
sub ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᤢ<><E1A4A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᯥ<EFBFBD><E1AFA5><EFBFBD> 業<><EFBFBD><E0AEA2> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
sub dword[Cor_x],ebx ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>७<EFBFBD><E0A5AD> <20><> <20><><EFBFBD> x
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
xor edx,edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.h]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
div ecx
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
inc ecx
|
|
|
|
|
div ecx
|
|
|
|
|
sub ebx,eax
|
|
|
|
|
sub dword[Cor_y],ebx ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>७<EFBFBD><E0A5AD> <20><> <20><><EFBFBD> y
|
|
|
|
|
|
|
|
|
|
inc byte[zoom]
|
|
|
|
|
call draw_pok
|
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
cmp dword[poc_stop],1
|
|
|
|
|
jle .buf_clear
|
|
|
|
|
cmp byte[tim_ch],0
|
|
|
|
|
jne @f
|
|
|
|
|
.buf_clear:
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_zoom_m:
|
|
|
|
|
cmp byte[zoom],1
|
|
|
|
|
jle @f
|
|
|
|
|
pushad
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><E1ABA5><EFBFBD> ᤢ<><E1A4A2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᯥ<EFBFBD><E1AFA5><EFBFBD> 業<><EFBFBD><E0AEA2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> 㬥<><E3ACA5>襭<EFBFBD><E8A5AD> <20><><EFBFBD><EFBFBD>⠡<EFBFBD>
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
xor edx,edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.w]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1 ;<3B> eax <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ਭ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> १<>ࢭ<EFBFBD><E0A2AD> <20><><EFBFBD><EFBFBD><EFBFBD> eax
|
|
|
|
|
div ecx ;<3B><><EFBFBD><EFBFBD><EFBFBD> eax <20><> ⥪<>騩 <20><><EFBFBD><EFBFBD>⠡
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
dec ecx
|
|
|
|
|
div ecx ;<3B><><EFBFBD><EFBFBD><EFBFBD> eax <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>⠡
|
|
|
|
|
sub ebx,eax ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᤢ<><E1A4A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᯥ<EFBFBD><E1AFA5><EFBFBD> 業<><EFBFBD><E0AEA2> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
sub dword[Cor_x],ebx ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>७<EFBFBD><E0A5AD> <20><> <20><><EFBFBD> x
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
xor edx,edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.h]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,1
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
div ecx
|
|
|
|
|
xchg eax,ebx
|
|
|
|
|
xor edx,edx
|
|
|
|
|
dec ecx
|
|
|
|
|
div ecx
|
|
|
|
|
sub ebx,eax
|
|
|
|
|
sub dword[Cor_y],ebx ;ᤢ<><E1A4A2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>७<EFBFBD><E0A5AD> <20><> <20><><EFBFBD> y
|
|
|
|
|
|
|
|
|
|
dec byte[zoom]
|
|
|
|
|
call draw_pok
|
|
|
|
|
popad
|
|
|
|
|
|
|
|
|
|
cmp dword[poc_stop],1
|
|
|
|
|
jle .buf_clear
|
|
|
|
|
cmp byte[tim_ch],0
|
|
|
|
|
jne @f
|
|
|
|
|
.buf_clear:
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_pole_up:
|
|
|
|
|
push eax ecx edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.h]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,2
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
cmp cx,2
|
|
|
|
|
jl @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>稭<EFBFBD> zoom
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
@@:
|
2020-12-08 22:01:35 +01:00
|
|
|
|
add [Cor_y],eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
pop edx ecx eax
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_pole_dn:
|
|
|
|
|
push eax ecx edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.h]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,2
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
cmp cx,2
|
|
|
|
|
jl @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>稭<EFBFBD> zoom
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
@@:
|
2020-12-08 22:01:35 +01:00
|
|
|
|
sub [Cor_y],eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
pop edx ecx eax
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_pole_left:
|
|
|
|
|
push eax ecx edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.w]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,2
|
2020-12-08 22:01:35 +01:00
|
|
|
|
movzx ecx,byte[zoom]
|
|
|
|
|
cmp ecx,2
|
2012-02-20 15:24:37 +01:00
|
|
|
|
jl @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>稭<EFBFBD> zoom
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
@@:
|
2020-12-08 22:01:35 +01:00
|
|
|
|
add [Cor_x],eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
pop edx ecx eax
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_pole_right:
|
|
|
|
|
push eax ecx edx
|
2018-10-31 15:09:14 +01:00
|
|
|
|
mov eax,[buf_0.w]
|
2012-02-20 15:24:37 +01:00
|
|
|
|
shr eax,2
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cl,byte[zoom]
|
|
|
|
|
cmp cx,2
|
|
|
|
|
jl @f ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>稭<EFBFBD> zoom
|
|
|
|
|
xor edx,edx
|
|
|
|
|
div ecx
|
|
|
|
|
@@:
|
2020-12-08 22:01:35 +01:00
|
|
|
|
sub [Cor_x],eax
|
2012-02-20 15:24:37 +01:00
|
|
|
|
pop edx ecx eax
|
|
|
|
|
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
|
|
|
|
call pole_paint
|
|
|
|
|
stdcall [buf2d_draw], buf_0
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;input:
|
|
|
|
|
; buf - 㪠<><E3AAA0>⥫<EFBFBD> <20><> <20><>ப<EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 10 <20><><EFBFBD> 16 <20><>筮<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
;output:
|
|
|
|
|
; eax - <20><>
|
|
|
|
|
align 4
|
2020-12-08 22:01:35 +01:00
|
|
|
|
proc conv_str_to_int uses ebx ecx esi, buf:dword
|
2012-02-20 15:24:37 +01:00
|
|
|
|
xor eax,eax
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
mov esi,[buf]
|
|
|
|
|
;<3B><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫<EFBFBD><E2A5AB><EFBFBD><EFBFBD> <20><>ᥫ
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
inc ecx
|
|
|
|
|
cmp byte[esi],'-'
|
|
|
|
|
jne @f
|
|
|
|
|
dec ecx
|
|
|
|
|
inc esi
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp word[esi],'0x'
|
|
|
|
|
je .load_digit_16
|
|
|
|
|
|
|
|
|
|
.load_digit_10: ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> 10-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
mov bl,byte[esi]
|
|
|
|
|
cmp bl,'0'
|
|
|
|
|
jl @f
|
|
|
|
|
cmp bl,'9'
|
|
|
|
|
jg @f
|
|
|
|
|
sub bl,'0'
|
|
|
|
|
imul eax,10
|
|
|
|
|
add eax,ebx
|
|
|
|
|
inc esi
|
|
|
|
|
jmp .load_digit_10
|
|
|
|
|
jmp @f
|
|
|
|
|
|
|
|
|
|
.load_digit_16: ;<3B><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD> 16-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
add esi,2
|
|
|
|
|
.cycle_16:
|
|
|
|
|
mov bl,byte[esi]
|
|
|
|
|
cmp bl,'0'
|
|
|
|
|
jl @f
|
|
|
|
|
cmp bl,'f'
|
|
|
|
|
jg @f
|
|
|
|
|
cmp bl,'9'
|
|
|
|
|
jle .us1
|
|
|
|
|
cmp bl,'A'
|
|
|
|
|
jl @f ;<3B><>ᥨ<EFBFBD><E1A5A8><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD> >'9' <20> <'A'
|
|
|
|
|
.us1: ;<3B><><EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD> <20><EFBFBD><E1ABAE><EFBFBD>
|
|
|
|
|
cmp bl,'F'
|
|
|
|
|
jle .us2
|
|
|
|
|
cmp bl,'a'
|
|
|
|
|
jl @f ;<3B><>ᥨ<EFBFBD><E1A5A8><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD> >'F' <20> <'a'
|
|
|
|
|
sub bl,32 ;<3B><>ॢ<EFBFBD><E0A5A2><EFBFBD><EFBFBD> ᨬ<><E1A8AC><EFBFBD><EFBFBD> <20> <20><><EFBFBD>孨<EFBFBD> ॣ<><E0A5A3><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD>饭<EFBFBD><E9A5AD> <20><> <20><><EFBFBD><E1ABA5>饩 <20><>ࠡ<EFBFBD>⪨
|
|
|
|
|
.us2: ;<3B><><EFBFBD>⠢<EFBFBD><E2A0A2><EFBFBD> <20><EFBFBD><E1ABAE><EFBFBD>
|
|
|
|
|
sub bl,'0'
|
|
|
|
|
cmp bl,9
|
|
|
|
|
jle .cor1
|
|
|
|
|
sub bl,7 ;convert 'A' to '10'
|
|
|
|
|
.cor1:
|
|
|
|
|
shl eax,4
|
|
|
|
|
add eax,ebx
|
|
|
|
|
inc esi
|
|
|
|
|
jmp .cycle_16
|
|
|
|
|
@@:
|
|
|
|
|
cmp ecx,0 ;<3B> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥫쭮<E2A5AB>
|
|
|
|
|
jne @f
|
|
|
|
|
sub ecx,eax
|
|
|
|
|
mov eax,ecx
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
OpenDialog_data:
|
|
|
|
|
.type dd 0 ;0 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 1 - <20><><EFBFBD>࠭<EFBFBD><E0A0AD><EFBFBD>, 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>४<EFBFBD><E0A5AA><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
.procinfo dd procinfo ;+4
|
|
|
|
|
.com_area_name dd communication_area_name ;+8
|
|
|
|
|
.com_area dd 0 ;+12
|
|
|
|
|
.opendir_path dd plugin_path ;+16
|
|
|
|
|
.dir_default_path dd default_dir ;+20
|
|
|
|
|
.start_path dd file_name ;+24 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD>
|
|
|
|
|
.draw_window dd draw_window ;+28
|
|
|
|
|
.status dd 0 ;+32
|
|
|
|
|
.openfile_path dd openfile_path ;+36 <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD><EFBFBD> 䠩<><E4A0A9>
|
|
|
|
|
.filename_area dd filename_area ;+40
|
|
|
|
|
.filter_area dd Filter
|
|
|
|
|
.x:
|
|
|
|
|
.x_size dw 420 ;+48 ; Window X size
|
|
|
|
|
.x_start dw 10 ;+50 ; Window X position
|
|
|
|
|
.y:
|
|
|
|
|
.y_size dw 320 ;+52 ; Window y size
|
|
|
|
|
.y_start dw 10 ;+54 ; Window Y position
|
|
|
|
|
|
2022-01-07 13:42:44 +01:00
|
|
|
|
default_dir db '/sys',0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
communication_area_name:
|
|
|
|
|
db 'FFFFFFFF_open_dialog',0
|
|
|
|
|
open_dialog_name:
|
|
|
|
|
db 'opendial',0
|
|
|
|
|
communication_area_default_path:
|
2022-01-07 13:42:44 +01:00
|
|
|
|
db '/sys/File managers/',0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
Filter:
|
|
|
|
|
dd Filter.end - Filter ;.1
|
|
|
|
|
.1:
|
|
|
|
|
db 'LIF',0
|
|
|
|
|
db 'RLE',0
|
|
|
|
|
.end:
|
|
|
|
|
db 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
system_dir_0 db '/sys/lib/'
|
|
|
|
|
lib_name_0 db 'proc_lib.obj',0
|
|
|
|
|
system_dir_1 db '/sys/lib/'
|
|
|
|
|
lib_name_1 db 'libimg.obj',0
|
2018-11-03 21:59:00 +01:00
|
|
|
|
system_dir_2 db '/sys/lib/'
|
|
|
|
|
lib_name_2 db 'buf2d.obj',0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
|
|
|
|
|
l_libs_start:
|
2020-12-08 22:01:35 +01:00
|
|
|
|
lib0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
|
|
|
|
|
lib1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
|
|
|
|
|
lib2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
|
2012-02-20 15:24:37 +01:00
|
|
|
|
l_libs_end:
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
import_libimg:
|
|
|
|
|
dd alib_init1
|
|
|
|
|
img_to_rgb2 dd aimg_to_rgb2
|
|
|
|
|
img_decode dd aimg_decode
|
|
|
|
|
img_destroy dd aimg_destroy
|
|
|
|
|
dd 0,0
|
|
|
|
|
alib_init1 db 'lib_init',0
|
|
|
|
|
aimg_to_rgb2 db 'img_to_rgb2',0
|
|
|
|
|
aimg_decode db 'img_decode',0 ;<3B><>⮬<EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD>᪨ <20><>।<EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><>ଠ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>᪨<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
aimg_destroy db 'img_destroy',0
|
|
|
|
|
|
|
|
|
|
align 4
|
2020-12-08 22:01:35 +01:00
|
|
|
|
import_proclib:
|
2012-02-20 15:24:37 +01:00
|
|
|
|
OpenDialog_Init dd aOpenDialog_Init
|
|
|
|
|
OpenDialog_Start dd aOpenDialog_Start
|
|
|
|
|
dd 0,0
|
|
|
|
|
aOpenDialog_Init db 'OpenDialog_init',0
|
|
|
|
|
aOpenDialog_Start db 'OpenDialog_start',0
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
import_buf2d:
|
|
|
|
|
init dd sz_init
|
|
|
|
|
buf2d_create dd sz_buf2d_create
|
|
|
|
|
buf2d_clear dd sz_buf2d_clear
|
|
|
|
|
buf2d_draw dd sz_buf2d_draw
|
|
|
|
|
buf2d_delete dd sz_buf2d_delete
|
2018-11-03 21:59:00 +01:00
|
|
|
|
buf2d_resize dd sz_buf2d_resize
|
2012-02-20 15:24:37 +01:00
|
|
|
|
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
|
|
|
|
|
buf2d_set_pixel dd sz_buf2d_set_pixel
|
|
|
|
|
dd 0,0
|
|
|
|
|
sz_init db 'lib_init',0
|
|
|
|
|
sz_buf2d_create db 'buf2d_create',0
|
|
|
|
|
sz_buf2d_clear db 'buf2d_clear',0
|
|
|
|
|
sz_buf2d_draw db 'buf2d_draw',0
|
|
|
|
|
sz_buf2d_delete db 'buf2d_delete',0
|
2018-11-03 21:59:00 +01:00
|
|
|
|
sz_buf2d_resize db 'buf2d_resize',0
|
2012-02-20 15:24:37 +01:00
|
|
|
|
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
|
|
|
|
|
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
|
|
|
|
|
|
|
|
|
|
align 4
|
2018-11-03 21:59:00 +01:00
|
|
|
|
buf_0: dd 0
|
|
|
|
|
.l: dw 0 ;+4 left
|
|
|
|
|
.t: dw 35 ;+6 top
|
|
|
|
|
.w: dd 476 ;+8 w
|
|
|
|
|
.h: dd 352 ;+12 h
|
2012-02-20 15:24:37 +01:00
|
|
|
|
.color: dd 0xffffd0 ;+16 color
|
|
|
|
|
db 24 ;+20 bit in pixel
|
|
|
|
|
|
2020-11-16 08:55:40 +01:00
|
|
|
|
align 16
|
2012-02-20 15:24:37 +01:00
|
|
|
|
i_end:
|
2020-12-08 22:01:35 +01:00
|
|
|
|
mouse_dd rd 1
|
|
|
|
|
last_time rd 1
|
|
|
|
|
sc system_colors
|
2020-11-16 08:55:40 +01:00
|
|
|
|
procinfo process_information
|
2012-02-20 15:24:37 +01:00
|
|
|
|
sys_path rb 1024
|
2020-12-08 22:01:35 +01:00
|
|
|
|
file_name rb 2048 ;4096
|
2012-02-20 15:24:37 +01:00
|
|
|
|
plugin_path rb 4096
|
|
|
|
|
openfile_path rb 4096
|
|
|
|
|
filename_area rb 256
|
2020-12-08 22:01:35 +01:00
|
|
|
|
rb 1024
|
|
|
|
|
stacktop:
|
2012-02-20 15:24:37 +01:00
|
|
|
|
mem:
|