2010-11-11 22:47:18 +01:00
|
|
|
|
|
2010-11-20 12:43:51 +01:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> ᯨ<EFBFBD><EFBFBD><EFBFBD>
|
2010-11-17 00:25:56 +01:00
|
|
|
|
align 4
|
|
|
|
|
but_obj_move_up:
|
|
|
|
|
stdcall [tl_node_move_up], tree2
|
|
|
|
|
ret
|
|
|
|
|
|
2010-11-20 12:43:51 +01:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD>᪠<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> ᯨ<EFBFBD><EFBFBD><EFBFBD>
|
2010-11-17 00:25:56 +01:00
|
|
|
|
align 4
|
|
|
|
|
but_obj_move_down:
|
|
|
|
|
stdcall [tl_node_move_down], tree2
|
|
|
|
|
ret
|
|
|
|
|
|
2010-11-20 12:43:51 +01:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD>ꥪ<EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
but_obj_copy:
|
|
|
|
|
push ecx esi edi
|
|
|
|
|
stdcall [tl_node_get_data], tree2
|
|
|
|
|
pop esi
|
|
|
|
|
mov edi,[tree2.data_info] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0-<EFBFBD><EFBFBD> 㧫<EFBFBD>, <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cx,word[tree2.info_size]
|
|
|
|
|
cld
|
|
|
|
|
rep movsb
|
|
|
|
|
pop edi esi ecx
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD>⠢<EFBFBD>塞 <EFBFBD><EFBFBD>ꥪ<EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
but_obj_paste:
|
|
|
|
|
push eax ebx ecx edi
|
2010-12-13 16:21:52 +01:00
|
|
|
|
mov eax,[tree2.data_info] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0-<EFBFBD><EFBFBD> 㧫<EFBFBD>, <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ebx,dword[eax]
|
|
|
|
|
call find_obj_in_opt
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cx,word[edi+obj_opt.img-obj_opt] ;cx - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
shl ecx,16
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall [tl_node_add], tree2,ecx,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD>ꥪ<EFBFBD>
|
2010-12-13 16:21:52 +01:00
|
|
|
|
stdcall [tl_draw], tree2
|
2010-11-20 12:43:51 +01:00
|
|
|
|
pop edi ecx ebx eax
|
|
|
|
|
ret
|
|
|
|
|
|
2010-11-11 22:47:18 +01:00
|
|
|
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ⮢ <EFBFBD> tree2, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD>⮢<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;<EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>⭠<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> on_file_object_select
|
|
|
|
|
align 4
|
|
|
|
|
but_element_change:
|
|
|
|
|
;foc_obj - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD> 㧥<EFBFBD> <EFBFBD> tree2
|
|
|
|
|
cmp dword[foc_obj],0
|
2010-12-08 19:45:24 +01:00
|
|
|
|
je .err_obj
|
2010-11-11 22:47:18 +01:00
|
|
|
|
pushad
|
2010-12-08 19:45:24 +01:00
|
|
|
|
;<EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD>⮢<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-11-29 20:11:22 +01:00
|
|
|
|
xor ebx,ebx
|
|
|
|
|
mov edi,edit2
|
2010-12-08 19:45:24 +01:00
|
|
|
|
@@:
|
2010-11-29 20:11:22 +01:00
|
|
|
|
call get_obj_win_param
|
|
|
|
|
inc ebx
|
|
|
|
|
add edi,ed_struc_size
|
|
|
|
|
cmp edi,prop_wnd_edits_end
|
2010-12-08 19:45:24 +01:00
|
|
|
|
jl @b
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>뫪<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD> ⨯<EFBFBD>
|
|
|
|
|
mov edx,dword[foc_obj]
|
|
|
|
|
mov dword[edx+u_object.typid-u_object],0 ;<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>砩 <EFBFBD> <EFBFBD><EFBFBD>祣<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD>
|
|
|
|
|
stdcall [tl_node_get_data],tree3
|
|
|
|
|
cmp eax,0
|
|
|
|
|
je @f
|
|
|
|
|
mov eax,dword[eax] ;<EFBFBD><EFBFBD>६ <EFBFBD><EFBFBD><EFBFBD>浪<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
mov dword[edx+u_object.typid-u_object],eax
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>᪨<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov edi,ch1.flags
|
|
|
|
|
mov eax,1
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
@@:
|
2010-12-09 23:35:04 +01:00
|
|
|
|
bt dword[edi],1
|
2010-12-08 19:45:24 +01:00
|
|
|
|
jnc .opt_no_sel
|
|
|
|
|
or ebx,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>⬥祭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>権
|
|
|
|
|
.opt_no_sel:
|
|
|
|
|
shl eax,1
|
|
|
|
|
add edi,ch_struc_size
|
|
|
|
|
cmp edi,check_boxes_end
|
|
|
|
|
jl @b
|
|
|
|
|
mov dword[edx+u_object.modif-u_object],ebx
|
2010-11-11 22:47:18 +01:00
|
|
|
|
popad
|
2010-12-08 19:45:24 +01:00
|
|
|
|
.err_obj:
|
2010-11-11 22:47:18 +01:00
|
|
|
|
call draw_constructor ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-12-08 19:45:24 +01:00
|
|
|
|
;call draw_window
|
2010-11-11 22:47:18 +01:00
|
|
|
|
ret
|
|
|
|
|
|
2010-11-29 20:11:22 +01:00
|
|
|
|
;input:
|
|
|
|
|
; ebx - property column
|
|
|
|
|
; edi - pointer to property editbox
|
2010-11-11 22:47:18 +01:00
|
|
|
|
align 4
|
2010-11-29 20:11:22 +01:00
|
|
|
|
get_obj_win_param:
|
|
|
|
|
pushad
|
2010-11-11 22:47:18 +01:00
|
|
|
|
mov esi,ed_text
|
2010-11-29 20:11:22 +01:00
|
|
|
|
stdcall get_obj_text_col, [foc_obj], ebx ;edx - ᬥ饭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
stdcall get_obj_text_len_col, [foc_obj], ebx ;eax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cld
|
2010-11-11 22:47:18 +01:00
|
|
|
|
mov edi,edx
|
|
|
|
|
mov ecx,eax
|
|
|
|
|
rep movsb
|
2010-11-29 20:11:22 +01:00
|
|
|
|
popad
|
2010-11-11 22:47:18 +01:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;input:
|
|
|
|
|
; obj - pointer to object
|
|
|
|
|
; ind - column index
|
|
|
|
|
;output:
|
|
|
|
|
; edx + offset
|
|
|
|
|
; edx = 0 if not text
|
|
|
|
|
align 4
|
|
|
|
|
proc get_obj_text_col, obj:dword, ind:dword
|
|
|
|
|
mov edx,dword[obj]
|
2010-12-13 16:21:52 +01:00
|
|
|
|
add edx,4 ;goto text
|
|
|
|
|
push ebx ecx
|
|
|
|
|
mov ecx,dword[ind]
|
|
|
|
|
cmp cx,0
|
2010-11-11 22:47:18 +01:00
|
|
|
|
je .end_fun
|
|
|
|
|
|
2010-12-13 16:21:52 +01:00
|
|
|
|
mov ebx,dword[edx-4] ;<EFBFBD> ebx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
2010-12-13 16:21:52 +01:00
|
|
|
|
push edi
|
2010-11-11 22:47:18 +01:00
|
|
|
|
call find_obj_in_opt ;<EFBFBD>饬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
add edi,obj_opt.Col-obj_opt
|
2010-12-13 16:21:52 +01:00
|
|
|
|
dec ecx
|
|
|
|
|
shl ecx,1 ;㬭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 2
|
|
|
|
|
add edi,ecx ;+ ind*2
|
2010-11-11 22:47:18 +01:00
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cx,word[edi] ;ecx - ᤨ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
add edx,ecx
|
|
|
|
|
|
|
|
|
|
cmp cx,0
|
|
|
|
|
jg @f
|
|
|
|
|
mov edx,0 ;not text
|
|
|
|
|
@@:
|
|
|
|
|
cmp cx,MAX_LEN_OBJ_TXT
|
|
|
|
|
jl @f
|
|
|
|
|
mov edx,0 ;not text
|
|
|
|
|
@@:
|
|
|
|
|
|
2010-12-13 16:21:52 +01:00
|
|
|
|
pop edi
|
2010-11-11 22:47:18 +01:00
|
|
|
|
.end_fun:
|
2010-12-13 16:21:52 +01:00
|
|
|
|
pop ecx ebx
|
2010-11-11 22:47:18 +01:00
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;input:
|
|
|
|
|
; obj - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD>
|
|
|
|
|
; ind - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
;output:
|
|
|
|
|
; eax - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD>⮢<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
2015-11-16 18:52:12 +01:00
|
|
|
|
proc get_obj_text_len_col uses ebx ecx edi, obj:dword, ind:dword
|
2010-11-11 22:47:18 +01:00
|
|
|
|
xor eax,eax
|
2010-12-13 16:21:52 +01:00
|
|
|
|
mov ecx,dword[ind]
|
2010-11-11 22:47:18 +01:00
|
|
|
|
mov eax,dword[obj]
|
2010-12-13 16:21:52 +01:00
|
|
|
|
mov ebx,dword[eax] ;<EFBFBD> ebx <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
xor eax,eax
|
|
|
|
|
|
|
|
|
|
call find_obj_in_opt ;<EFBFBD>饬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ﬨ <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
add edi,obj_opt.Col-obj_opt
|
2010-12-13 16:21:52 +01:00
|
|
|
|
shl ecx,1 ;㬭<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 2
|
|
|
|
|
add edi,ecx ;+ ind*2
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
|
|
|
|
mov ax,word[edi] ;eax - ᤨ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>饣<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp ax,0
|
|
|
|
|
jg @f
|
|
|
|
|
mov eax,MAX_LEN_OBJ_TXT ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> 㤮<EFBFBD><EFBFBD>⢠ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0, <EFBFBD> <EFBFBD><EFBFBD> MAX_LEN_OBJ_TXT, <EFBFBD><EFBFBD><EFBFBD>ࠢ<EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@:
|
|
|
|
|
cmp dword[ind],0
|
|
|
|
|
je .end_fun ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ࢮ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᤨ<EFBFBD> = 0, <EFBFBD><EFBFBD>⮬<EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥭ <EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD>
|
|
|
|
|
sub ax,word[edi-2] ;<EFBFBD>⭨<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᤨ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>砥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
cmp word[edi-2],0
|
|
|
|
|
jg @f
|
|
|
|
|
mov eax,0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⮥, <EFBFBD><EFBFBD> <EFBFBD>ᯮ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
@@:
|
|
|
|
|
cmp ax,MAX_LEN_OBJ_TXT
|
|
|
|
|
jl @f
|
|
|
|
|
mov eax,0 ;not text
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
.end_fun:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
2010-12-08 19:45:24 +01:00
|
|
|
|
proc draw_obj_icon, o_type:dword,n_col:dword, coord_y:dword
|
2010-11-11 22:47:18 +01:00
|
|
|
|
pushad
|
|
|
|
|
xor ebx,ebx
|
2010-12-13 16:21:52 +01:00
|
|
|
|
mov ebx,dword[o_type]
|
2010-11-11 22:47:18 +01:00
|
|
|
|
call find_obj_in_opt
|
|
|
|
|
|
|
|
|
|
add edi,obj_opt.img-obj_opt ;get index (+0)
|
|
|
|
|
mov ebx,[n_col]
|
|
|
|
|
shl ebx,1
|
|
|
|
|
add edi,ebx ;move index (+bh)
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cx,[edi]
|
|
|
|
|
|
|
|
|
|
cmp cx,0
|
|
|
|
|
jge @f
|
|
|
|
|
jmp .end_fun ;error icon index
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
mov ebx,bmp_icon
|
|
|
|
|
imul ecx,0x300
|
|
|
|
|
add ebx,ecx
|
|
|
|
|
|
|
|
|
|
mov eax,7
|
|
|
|
|
mov ecx,0x100010 ;ecx - size:16*16
|
2010-12-08 19:45:24 +01:00
|
|
|
|
mov edx,3 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠬ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
shl edx,16
|
|
|
|
|
add edx,[coord_y]
|
|
|
|
|
int 0x40
|
|
|
|
|
.end_fun:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
proc draw_icon, ind:dword,coord_x:dword,coord_y:dword
|
|
|
|
|
pushad
|
|
|
|
|
mov ecx,[ind]
|
|
|
|
|
cmp ecx,0
|
|
|
|
|
jl .end_fun
|
|
|
|
|
mov ebx,bmp_icon
|
|
|
|
|
imul ecx,0x300
|
|
|
|
|
add ebx,ecx
|
|
|
|
|
|
|
|
|
|
mov eax,7
|
|
|
|
|
mov ecx,0x100010 ;ecx - size:16*16
|
|
|
|
|
mov edx,[coord_x]
|
|
|
|
|
shl edx,16
|
|
|
|
|
add edx,[coord_y]
|
|
|
|
|
int 0x40
|
|
|
|
|
.end_fun:
|
|
|
|
|
popad
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;input
|
2010-12-13 16:21:52 +01:00
|
|
|
|
; ebx = cod object
|
2010-11-11 22:47:18 +01:00
|
|
|
|
;output:
|
|
|
|
|
; edi = pointer to option struct
|
|
|
|
|
align 4
|
|
|
|
|
find_obj_in_opt:
|
|
|
|
|
push ecx
|
2010-12-13 16:21:52 +01:00
|
|
|
|
xor ecx,ecx ;find 'ebx' in options
|
2010-11-11 22:47:18 +01:00
|
|
|
|
mov edi,obj_opt
|
|
|
|
|
@@:
|
2010-12-13 16:21:52 +01:00
|
|
|
|
cmp ebx,dword[edi] ;find
|
2010-11-11 22:47:18 +01:00
|
|
|
|
je @f
|
|
|
|
|
inc ecx
|
|
|
|
|
cmp ecx,MAX_OBJ_TYPES
|
|
|
|
|
je @f ;not find
|
|
|
|
|
add edi,sizeof.ObjOpt
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
|
|
|
|
pop ecx
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
obj_find_last dd 0 ;㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㤠筮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD>,
|
|
|
|
|
;<EFBFBD>㦥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>७<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>饣<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD>室:
|
|
|
|
|
;eax - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
proc find_obj_in_file, o_type:dword
|
|
|
|
|
push ebx esi
|
|
|
|
|
mov ebx,[o_type]
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall dword[tl_node_poi_get_info], tree2,0
|
|
|
|
|
mov esi,eax
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
cmp esi,0
|
|
|
|
|
je .find_no
|
|
|
|
|
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall dword[tl_node_poi_get_data], tree2,esi ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
cmp eax,0
|
|
|
|
|
je .find_no
|
|
|
|
|
|
2010-12-13 16:21:52 +01:00
|
|
|
|
cmp dword[eax],ebx ;ᬮ<EFBFBD>ਬ <EFBFBD><EFBFBD><EFBFBD>ᠭ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD> <EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
je .find_yes
|
|
|
|
|
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall dword[tl_node_poi_get_next_info], tree2,esi
|
|
|
|
|
mov esi,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>饬<EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
|
|
|
|
jmp @b
|
|
|
|
|
|
|
|
|
|
.find_yes:
|
|
|
|
|
mov dword[obj_find_last],esi
|
|
|
|
|
jmp @f
|
|
|
|
|
.find_no:
|
|
|
|
|
mov dword[obj_find_last],0
|
|
|
|
|
xor eax,eax
|
|
|
|
|
@@:
|
|
|
|
|
pop esi ebx
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;<EFBFBD><EFBFBD>室:
|
|
|
|
|
;eax - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
2015-11-16 18:52:12 +01:00
|
|
|
|
proc find_obj_in_file_next uses ebx esi, o_type:dword
|
2010-11-11 22:47:18 +01:00
|
|
|
|
cmp dword[obj_find_last],0
|
|
|
|
|
je .find_no
|
|
|
|
|
|
2010-12-13 16:21:52 +01:00
|
|
|
|
mov ebx,dword[o_type]
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall dword[tl_node_poi_get_next_info], tree2,dword[obj_find_last]
|
|
|
|
|
mov esi,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>饬<EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
cmp esi,0
|
|
|
|
|
je .find_no
|
|
|
|
|
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall dword[tl_node_poi_get_data], tree2,esi ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>砥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
cmp eax,0
|
|
|
|
|
je .find_no
|
|
|
|
|
|
2010-12-13 16:21:52 +01:00
|
|
|
|
cmp dword[eax],ebx ;ᬮ<EFBFBD>ਬ <EFBFBD><EFBFBD><EFBFBD>ᠭ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ꥪ<EFBFBD> <EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
je .find_yes
|
|
|
|
|
|
2015-11-16 18:52:12 +01:00
|
|
|
|
stdcall dword[tl_node_poi_get_next_info], tree2,esi
|
|
|
|
|
mov esi,eax ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>室<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD>饬<EFBFBD> 㧫<EFBFBD>
|
2010-11-11 22:47:18 +01:00
|
|
|
|
|
|
|
|
|
jmp @b
|
|
|
|
|
|
|
|
|
|
.find_yes:
|
|
|
|
|
mov dword[obj_find_last],esi
|
|
|
|
|
jmp @f
|
|
|
|
|
.find_no:
|
|
|
|
|
mov dword[obj_find_last],0
|
|
|
|
|
xor eax,eax
|
|
|
|
|
@@:
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_show_constructor:
|
|
|
|
|
mov byte[show_mode],0
|
|
|
|
|
stdcall [buf2d_draw], buf_fon
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
align 4
|
|
|
|
|
but_show_code:
|
|
|
|
|
mov byte[show_mode],1
|
|
|
|
|
stdcall [ted_draw], tedit0
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;input:
|
|
|
|
|
; buf - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> 10 <EFBFBD><EFBFBD><EFBFBD> 16 <EFBFBD><EFBFBD>筮<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;output:
|
|
|
|
|
; eax - <EFBFBD><EFBFBD>
|
|
|
|
|
align 4
|
|
|
|
|
proc conv_str_to_int, buf:dword
|
|
|
|
|
xor eax,eax
|
|
|
|
|
push ebx esi
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
mov esi,[buf]
|
|
|
|
|
cmp word[esi],'0x'
|
|
|
|
|
je .load_digit_16
|
|
|
|
|
|
|
|
|
|
.load_digit_10: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD> 10-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><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: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD> 16-<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><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 ;<EFBFBD><EFBFBD>ᥨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> >'9' <EFBFBD> <'A'
|
|
|
|
|
.us1: ;<EFBFBD><EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cmp bl,'F'
|
|
|
|
|
jle .us2
|
|
|
|
|
cmp bl,'a'
|
|
|
|
|
jl @f ;<EFBFBD><EFBFBD>ᥨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> >'F' <EFBFBD> <'a'
|
|
|
|
|
sub bl,32 ;<EFBFBD><EFBFBD>ॢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD>孨<EFBFBD> ॣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>饭<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>饩 <EFBFBD><EFBFBD>ࠡ<EFBFBD>⪨
|
|
|
|
|
.us2: ;<EFBFBD><EFBFBD><EFBFBD>⠢<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><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
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
pop esi ebx
|
|
|
|
|
ret
|
|
|
|
|
endp
|