1) fix draw caption in 'tree_list'

2) 'info3ds' correct scale on axis x and y

git-svn-id: svn://kolibrios.org@5948 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2015-12-03 10:55:32 +00:00
parent 94a081e526
commit bee21cb588
2 changed files with 725 additions and 754 deletions

View File

@ -521,6 +521,24 @@ align 4
fild dword[rad_c] fild dword[rad_c]
fdivp ;radius=(size.x+size.y)/rad_c fdivp ;radius=(size.x+size.y)/rad_c
fstp dword[sph_radius] fstp dword[sph_radius]
;¤¥« ¥¬ ®¤¨­ ª®¢ë© ¬ áèâ ¡ ¯® ®áï¬ x ¨ y, çâ®-¡ë ­¥ ­ àãè «¨áì ¯à®¯®à樨 ¨§®¡à ¦¥­¨ï
fld dword[obj_y_scale]
fdiv dword[ratio] ;¯à¨¢¥¤¥­¨¥ ¬ áèâ ¡  ¯® ®á¨ y ãç¨â뢠ï çâ® ¯® ¢ëá®â¥ íªà ­ ¬¥­ìè¥
fcomp dword[obj_x_scale]
fstsw ax
sahf
jb @f
;ᦠ⨥ ¬ áèâ ¡  ¯® y
fld dword[obj_x_scale]
fmul dword[ratio]
fstp dword[obj_y_scale] ;¬ áèâ ¡ ¯® ®á¨ y = ¬ áèâ ¡ ¯® ®á¨ x
jmp .end
@@:
;ᦠ⨥ ¬ áèâ ¡  ¯® x >...<
fld dword[obj_x_scale]
fdiv dword[ratio]
fstp dword[obj_x_scale]
.end: .end:
ret ret
endp endp
@ -1268,6 +1286,7 @@ mouse_x dd 0
mouse_y dd 0 mouse_y dd 0
angle_dxm dd 1.7775 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩 angle_dxm dd 1.7775 ;~ 3d_wnd_w/180 - ¯à¨¡ ¢«¥­¨¥ 㣫®¢ ¯®¢®à®â  áæ¥­ë ¯à¨ ¢à é¥­¨¨ ¬ë襩
angle_dym dd 1.3335 ;~ 3d_wnd_h/180 angle_dym dd 1.3335 ;~ 3d_wnd_h/180
ratio dd 1.3333 ;~ 3d_wnd_w/3d_wnd_h
;angle_dzm dd ? ;angle_dzm dd ?
draw_mode dd 0 ;०¨¬ à¨á®¢ ­¨ï ®¡ê¥ªâ  draw_mode dd 0 ;०¨¬ à¨á®¢ ­¨ï ®¡ê¥ªâ 
obj_poi_data dd 0 ;㪠§ â¥«ì ­  ª®®à¤¨­ âë ¢¥à設 obj_poi_data dd 0 ;㪠§ â¥«ì ­  ª®®à¤¨­ âë ¢¥à設

View File

@ -1,6 +1,6 @@
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj ; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TreeList ¤«ï Kolibri OS ; í«¥¬¥­â TreeList ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 14.11.2015 IgorA ; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 03.12.2015 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï ; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
@ -63,8 +63,7 @@ endp
;®ç¨á⪠ ¯ ¬ïâ¨ í«¥¬¥­â  (¤¥áâàãªâ®à) ;®ç¨á⪠ ¯ ¬ïâ¨ í«¥¬¥­â  (¤¥áâàãªâ®à)
align 4 align 4
proc tl_data_clear uses edi, tlist:dword proc tl_data_clear uses eax edi, tlist:dword
;uses eax ???
mov edi,dword[tlist] mov edi,dword[tlist]
cmp tl_data_img,0 cmp tl_data_img,0
je @f je @f
@ -190,7 +189,6 @@ proc tl_mouse, tlist:dword
shl ebx,16 shl ebx,16
cmp eax,ebx ;«¥¢ ï £à ­¨æ  ®ª­  cmp eax,ebx ;«¥¢ ï £à ­¨æ  ®ª­ 
jl .no_in_wnd ;.test_scroll ­¥ ¯à¨¬¥­ï¥¬ jl .no_in_wnd ;.test_scroll ­¥ ¯à¨¬¥­ï¥¬
shr ebx,16 shr ebx,16
add ebx,tl_box_width add ebx,tl_box_width
shl ebx,16 shl ebx,16
@ -208,9 +206,9 @@ proc tl_mouse, tlist:dword
jl .test_scroll jl .test_scroll
push eax ebx push eax ebx
mcall 37,7 ;®¡à ¡®âª  ª®«¥á  ¬ëè¨ mcall 37,7 ;®¡à ¡®âª  ª®«¥á  ¬ëè¨
mov edx,eax mov edx,eax
xor ecx,ecx xor ecx,ecx
test eax,eax test eax,eax
jz .mouse_next jz .mouse_next
test ax,0x8000 test ax,0x8000
@ -231,7 +229,7 @@ xor ecx,ecx
dec ecx dec ecx
jnz @r jnz @r
jmp .mouse_next jmp .mouse_next
;---------------------------------------- ;------------------------------------------------
.decr: ;¢¥à⨪ «ì­ ï ¯à®ªàã⪠ ®âà¨æ â¥«ì­ ï .decr: ;¢¥à⨪ «ì­ ï ¯à®ªàã⪠ ®âà¨æ â¥«ì­ ï
mov bx,ax ;ax = mouse scroll data vertical mov bx,ax ;ax = mouse scroll data vertical
jmp @f jmp @f
@ -245,7 +243,7 @@ xor ecx,ecx
stdcall tl_cur_perv, edi stdcall tl_cur_perv, edi
dec ecx dec ecx
jnz @r jnz @r
;--------------------------------------------------- ;------------------------------------------------
.mouse_next: .mouse_next:
pop ebx eax pop ebx eax
@ -351,7 +349,6 @@ pop ebx eax
mcall 37,2 ;¯à®¢¥à塞 ­ ¦ â®áâì «î¡ëå ª­®¯®ª mcall 37,2 ;¯à®¢¥à塞 ­ ¦ â®áâì «î¡ëå ª­®¯®ª
cmp eax,0 ;­¨ç¥£® ­¥ ­ ¦ «¨ eax=0 cmp eax,0 ;­¨ç¥£® ­¥ ­ ¦ «¨ eax=0
je .no_draw je .no_draw
mov ebx,tl_el_focus mov ebx,tl_el_focus
cmp dword[ebx],edi cmp dword[ebx],edi
jne .no_draw ;í«¥¬¥­â ­¥ ¢ 䮪ãᥠjne .no_draw ;í«¥¬¥­â ­¥ ¢ 䮪ãá¥
@ -407,7 +404,6 @@ tl_info_set_undo:
mov eax,tl_ch_tim mov eax,tl_ch_tim
cmp edx,ecx cmp edx,ecx
jle @f jle @f
;if(node[i].tc>ch_tim){ // ¥á«¨ ᮧ¤ ­¨¥ ᨬ¢®«  ¡ë«® ®â¬¥­¥­® ;if(node[i].tc>ch_tim){ // ¥á«¨ ᮧ¤ ­¨¥ ᨬ¢®«  ¡ë«® ®â¬¥­¥­®
cmp dword[edx+12],eax cmp dword[edx+12],eax
jle .no_u1 jle .no_u1
@ -425,7 +421,6 @@ tl_info_set_undo:
add ebx, tl_data_nodes ;.perv add ebx, tl_data_nodes ;.perv
push dword[edx+4] ;node[node[i].next].perv=node[i].perv; push dword[edx+4] ;node[node[i].next].perv=node[i].perv;
pop dword[ebx+4] pop dword[ebx+4]
.no_u1: .no_u1:
;else if(node[i].td>ch_tim) node[i].td=0; // ¥á«¨ 㤠«¥­¨¥ ᨬ¢®«  ¡ë«® ®â¬¥­¥­® ;else if(node[i].td>ch_tim) node[i].td=0; // ¥á«¨ 㤠«¥­¨¥ ᨬ¢®«  ¡ë«® ®â¬¥­¥­®
@ -433,19 +428,12 @@ tl_info_set_undo:
jle .no_u2 jle .no_u2
mov dword[edx+16],0 mov dword[edx+16],0
.no_u2: .no_u2:
call tl_move_next call tl_move_next
jmp @b jmp @b
@@: @@:
mov tl_tim_undo,0 mov tl_tim_undo,0
; mov eax,[edi+?] ;co_tim
; cmp tl_ch_tim,eax ;ch_tim
; jge @f
; mov [edi+?],0 ;co_tim
; @@:
pop edx ecx ebx eax pop edx ecx ebx eax
.no_work: .no_work:
ret ret
;¢ë¢®¤ ᯨ᪠ ­  íªà ­ ;¢ë¢®¤ ᯨ᪠ ­  íªà ­
@ -522,8 +510,7 @@ proc tl_draw, tlist:dword
jle .end_draw jle .end_draw
inc eax inc eax
cmp eax,dword[esi+sb_offs_position] cmp eax,dword[esi+sb_offs_position]
jge .end_c1 jl @b
jmp @b
.end_c1: .end_c1:
xor eax,eax xor eax,eax
@ -544,7 +531,6 @@ proc tl_draw, tlist:dword
cmp edi,0 ;¤«ï ⮣® çâ®-¡ë ¥£® ­¥ ¯à¨è«®áì à¨á®¢ âì ¢ ¯®«ì§®¢ â¥«ì᪮© ¯à®£à ¬¬¥ cmp edi,0 ;¤«ï ⮣® çâ®-¡ë ¥£® ­¥ ¯à¨è«®áì à¨á®¢ âì ¢ ¯®«ì§®¢ â¥«ì᪮© ¯à®£à ¬¬¥
je .end_draw ;¥á«¨ ­¥â áªà®««¨­£  ¢ë室¨¬ je .end_draw ;¥á«¨ ­¥â áªà®««¨­£  ¢ë室¨¬
stdcall scroll_bar_vertical.draw, edi stdcall scroll_bar_vertical.draw, edi
.end_draw: .end_draw:
popad popad
ret ret
@ -854,7 +840,6 @@ proc tl_draw_null_cursor uses eax ebx ecx edx esi
call tl_get_display_cur_pos ;eax = cursor pos in screen call tl_get_display_cur_pos ;eax = cursor pos in screen
cmp eax,0 cmp eax,0
jl .end_f ;ªãàá®à ­ å®¤¨âáï ¢ëè¥ ®ª­ , ¢ ®¡« á⨠¯à®ªàã祭­®© áªà®««¨­£®¬ jl .end_f ;ªãàá®à ­ å®¤¨âáï ¢ëè¥ ®ª­ , ¢ ®¡« á⨠¯à®ªàã祭­®© áªà®««¨­£®¬
mov ebx,tl_box_left mov ebx,tl_box_left
shl ebx,16 shl ebx,16
mov bx,tl_img_cx mov bx,tl_img_cx
@ -875,10 +860,7 @@ proc tl_draw_null_cursor uses eax ebx ecx edx esi
jge @f jge @f
mov cx,si ;¥á«¨ ªãàá®à ¢¨¤¥­ ç áâ¨ç­® (¯®¯ « ­  ­¨¦­îî £à ­¨æã) mov cx,si ;¥á«¨ ªãàá®à ¢¨¤¥­ ç áâ¨ç­® (¯®¯ « ­  ­¨¦­îî £à ­¨æã)
@@: @@:
mcall 13,,,tl_col_bkg ;à¨á㥬 ¯à®á⮩ ¯àאַ㣮«ì­¨ª á ä®­®¢ë¬ 梥⮬
mov edx,tl_col_bkg
mcall 13 ;à¨á㥬 ¯à®á⮩ ¯àאַ㣮«ì­¨ª á ä®­®¢ë¬ 梥⮬
.end_f: .end_f:
ret ret
endp endp
@ -903,7 +885,7 @@ tl_get_display_cur_pos:
;à¨áã¥â 㧥« á: ª à⨭ª®©, ¯®¤¯¨áìî, ¨ª®­ª®© ®âªàëâ¨ï/§ ªàëâ¨ï ¨ «¨­¨ï¬¨ ª த¨â. 㧫ã ;à¨áã¥â 㧥« á: ª à⨭ª®©, ¯®¤¯¨áìî, ¨ª®­ª®© ®âªàëâ¨ï/§ ªàëâ¨ï ¨ «¨­¨ï¬¨ ª த¨â. 㧫ã
;input: ;input:
; eax = node position ; eax = node position (0, ..., max_nodes-scroll_pos) ­¥ ¤® tl_box_height/tl_img_cy
; edx = pointer to some node struct ; edx = pointer to some node struct
; edi = pointer to 'TreeList' struct ; edi = pointer to 'TreeList' struct
; esi = coord of bottom border ; esi = coord of bottom border
@ -923,8 +905,9 @@ proc tl_draw_node uses eax ebx ecx edx esi
xor ecx,ecx xor ecx,ecx
mov cx,tl_img_cy mov cx,tl_img_cy
imul ecx,eax imul ecx,eax
add ecx,tl_box_top
add cx,tl_capt_cy add cx,tl_capt_cy
jc .end_draw ;ª®£¤  ¬­®£® 㧫®¢, â® ¬®¦¥â ¡ëâì ¯¥à¥¯®«­¥­¨¥ ª®®à¤¨­ âë cx
add ecx,tl_box_top
;crop image if on the border ;crop image if on the border
cmp esi,ecx ;¥á«¨ 㧥« ¢­¨§ã ¨ ¥£® ¢®®¡é¥ ­¥ ¢¨¤­® cmp esi,ecx ;¥á«¨ 㧥« ¢­¨§ã ¨ ¥£® ¢®®¡é¥ ­¥ ¢¨¤­®
@ -1007,8 +990,7 @@ proc tl_draw_node_icon_opn_clo uses eax ebx ecx edx esi
ror ebx,16 ror ebx,16
cmp tl_data_img_sys,0 cmp tl_data_img_sys,0
jne .draw_img_s jne .draw_img_s
mov edx,tl_col_txt mcall 13,,,tl_col_txt ;draw minus rect, if not system icons
mcall 13 ;draw minus rect, if not system icons
jmp @f jmp @f
.draw_img_s: .draw_img_s:
mov ecx,esi ;load ecx mov ecx,esi ;load ecx
@ -1042,9 +1024,6 @@ tl_draw_node_icon_par_lin:
push eax ebx ecx edx esi push eax ebx ecx edx esi
cmp al,0 cmp al,0
je @f je @f
; dec al
; call tl_iterat_perv ;get perv visible item
call tl_iterat_next_all ;get next visible item call tl_iterat_next_all ;get next visible item
cmp edx,ecx cmp edx,ecx
jle .line3 ;if end of list jle .line3 ;if end of list
@ -1062,11 +1041,9 @@ tl_draw_node_icon_par_lin:
ror ebx,16 ror ebx,16
cmp tl_data_img_sys,0 cmp tl_data_img_sys,0
jne .draw_img_s jne .draw_img_s
mov edx,tl_col_txt mcall 13,,,tl_col_txt ;draw minus rect, if not system icons
mcall 13 ;draw minus rect, if not system icons
jmp @f jmp @f
.draw_img_s: .draw_img_s:
; mov ecx,esi ;load ecx
mov edx,ebx mov edx,ebx
ror ecx,16 ror ecx,16
mov dx,cx mov dx,cx
@ -1076,8 +1053,6 @@ tl_draw_node_icon_par_lin:
imul bx,tl_img_cx imul bx,tl_img_cx
imul bx,tl_img_cy imul bx,tl_img_cy
; shr eax,8
; and eax,0xff
imul ebx,eax ;eax = icon index imul ebx,eax ;eax = icon index
add ebx,tl_data_img_sys add ebx,tl_data_img_sys
mcall 7 ;draw line icon mcall 7 ;draw line icon
@ -1089,18 +1064,16 @@ tl_draw_node_icon_par_lin:
;input: ;input:
; al = ã஢¥­ì í«¥¬¥­â  ; al = ã஢¥­ì í«¥¬¥­â 
; ebx = (node.left shl 16) + tl_img_cx
; ecx = pointer to 1 node struct ; ecx = pointer to 1 node struct
; edx = pointer to some node struct ; edx = pointer to some node struct
; edi = pointer to 'TreeList' struct ; edi = pointer to 'TreeList' struct
align 4 align 4
tl_draw_node_icon_par_lin_up: proc tl_draw_node_icon_par_lin_up uses eax ebx ecx edx esi
push eax ebx ecx edx
push esi
cmp tl_data_img_sys,0 ;if not image cmp tl_data_img_sys,0 ;if not image
je @f je @f
cmp al,0 cmp al,0
je @f je @f
xor esi,esi ;¢ si ¡ã¤¥¬ ­ áç¨â뢠âì ª®«-¢® ¨ª®­®ª, ­ã¦­ëå ¤«ï ¯à®à¨á®¢ª¨ «¨­¨¨ xor esi,esi ;¢ si ¡ã¤¥¬ ­ áç¨â뢠âì ª®«-¢® ¨ª®­®ª, ­ã¦­ëå ¤«ï ¯à®à¨á®¢ª¨ «¨­¨¨
;--- 横« ¤«ï ¢ëç¨á«¥­¨ï ª®««¨ç¥á⢠ ¢¥à⨪ «ì­ëå «¨­¨© --- ;--- 横« ¤«ï ¢ëç¨á«¥­¨ï ª®««¨ç¥á⢠ ¢¥à⨪ «ì­ëå «¨­¨© ---
.cycle0: .cycle0:
@ -1149,9 +1122,8 @@ tl_draw_node_icon_par_lin_up:
sub esi,0x10000 ;㬥­ìè ¥¬ áç¥â稪 ¨ª®­®ª sub esi,0x10000 ;㬥­ìè ¥¬ áç¥â稪 ¨ª®­®ª
jmp .cycle1 jmp .cycle1
@@: @@:
pop esi
pop edx ecx ebx eax
ret ret
endp
;input: ;input:
; edi = pointer to TreeInfo struct ; edi = pointer to TreeInfo struct
@ -1176,14 +1148,11 @@ tl_get_rows_count:
; edx = pointer to some node struct ; edx = pointer to some node struct
; edi = pointer to TreeInfo struct ; edi = pointer to TreeInfo struct
align 4 align 4
tl_draw_node_caption: proc tl_draw_node_caption uses ebx ecx edx esi
push ebx ecx edx esi
xor esi,esi xor esi,esi
mov si,tl_info_size mov si,tl_info_size
cmp si,tl_info_capt_offs cmp si,tl_info_capt_offs
jle @f ;if caption size <= 0 jle @f ;if caption size <= 0
push eax push eax
call tl_get_node_index ;eax = node index call tl_get_node_index ;eax = node index
imul esi,eax imul esi,eax
@ -1195,7 +1164,7 @@ tl_draw_node_caption:
shr ebx,16 shr ebx,16
add bx,tl_img_cx ;ᤢ¨£ ¥¬ ­ ¤¯¨áì ¯® £®à¨§®­â «¨ ---> add bx,tl_img_cx ;ᤢ¨£ ¥¬ ­ ¤¯¨áì ¯® £®à¨§®­â «¨ --->
add bx,3 ;®âáâ㯠add bx,3 ;®âáâã¯
;bx = coord. x ;bx = coord.x
call tl_strlen ;eax = strlen call tl_strlen ;eax = strlen
call tl_get_draw_text_len call tl_get_draw_text_len
mov cx,bx mov cx,bx
@ -1205,11 +1174,10 @@ tl_draw_node_caption:
sub bx,9 ;®â­¨¬ ¥¬ ¢ëá®âã ⥪áâ  sub bx,9 ;®â­¨¬ ¥¬ ¢ëá®âã ⥪áâ 
mov ecx,tl_col_txt mov ecx,tl_col_txt
and ecx,0xffffff and ecx,0xffffff
; or ecx,0x80000000 ;text is ASCIIZ
mcall 4 mcall 4
@@: @@:
pop esi edx ecx ebx
ret ret
endp
;input: ;input:
; eax = strlen ; eax = strlen
@ -1217,10 +1185,8 @@ tl_draw_node_caption:
;output: ;output:
; esi = text len ; esi = text len
align 4 align 4
tl_get_draw_text_len: proc tl_get_draw_text_len uses eax ecx edx
push eax ecx edx
mov esi,eax ;¡¥à¥¬ ¤«¨­­ã áâப¨ mov esi,eax ;¡¥à¥¬ ¤«¨­­ã áâப¨
mov eax,tl_box_left mov eax,tl_box_left
add eax,tl_box_width add eax,tl_box_width
cmp eax,ebx cmp eax,ebx
@ -1229,7 +1195,6 @@ tl_get_draw_text_len:
xor edx,edx xor edx,edx
mov ecx,6 ;è¨à¨­  á¨á⥬­®£® èà¨äâ  mov ecx,6 ;è¨à¨­  á¨á⥬­®£® èà¨äâ 
div ecx ;ᬮâਬ ᪮«ìª® ᨬ¢®«®¢ ¬®¦¥â ¯®¬¥áâ¨âìáï ­  íªà ­¥ div ecx ;ᬮâਬ ᪮«ìª® ᨬ¢®«®¢ ¬®¦¥â ¯®¬¥áâ¨âìáï ­  íªà ­¥
cmp esi,eax cmp esi,eax
jl @f jl @f
mov esi,eax ;¥á«¨ ¤«¨­­  ⥪áâ  ¬¥­ìè¥, 祬 ¢á¥ ¬¥áâ® ¯®¤ áâபã mov esi,eax ;¥á«¨ ¤«¨­­  ⥪áâ  ¬¥­ìè¥, 祬 ¢á¥ ¬¥áâ® ¯®¤ áâபã
@ -1237,8 +1202,8 @@ tl_get_draw_text_len:
.text_null: .text_null:
xor esi,esi xor esi,esi
@@: @@:
pop edx ecx eax
ret ret
endp
;input: ;input:
; esi = pointer to string ; esi = pointer to string
@ -1291,10 +1256,9 @@ proc tl_node_add uses eax ebx ecx edx edi, tlist:dword, n_opt:dword, n_info:dwor
mov ecx,dword[n_opt] mov ecx,dword[n_opt]
ror ecx,16 ;cx = type ror ecx,16 ;cx = type
mov word[edx],cx mov word[edx],cx
;;;mov cl,byte[ebp+13]
rol ecx,8 ;cl = close|open rol ecx,8 ;cl = close|open
mov byte[edx+3],cl ;node[i].clo mov byte[edx+3],cl ;node[i].clo
mov byte[edx+2], 0 ;node[i].lev=0 mov byte[edx+2],0 ;node[i].lev=0
bt tl_style,2 ;tl_list_box_mode bt tl_style,2 ;tl_list_box_mode
jc .l_box_m jc .l_box_m
mov cl,byte[n_opt] mov cl,byte[n_opt]
@ -1302,7 +1266,7 @@ proc tl_node_add uses eax ebx ecx edx edi, tlist:dword, n_opt:dword, n_info:dwor
.l_box_m: .l_box_m:
push tl_ch_tim ;node[i].tc=ch_tim; push tl_ch_tim ;node[i].tc=ch_tim;
pop dword[edx+12] pop dword[edx+12]
mov dword[edx+4], eax ;node[i].perv=po_t; mov [edx+4],eax ;node[i].perv=po_t;
;*** copy node data *** ;*** copy node data ***
push esi push esi
xor ecx,ecx xor ecx,ecx
@ -1340,13 +1304,12 @@ proc tl_node_add uses eax ebx ecx edx edi, tlist:dword, n_opt:dword, n_info:dwor
imul ecx,sizeof.TreeList imul ecx,sizeof.TreeList
add ecx,tl_data_nodes ; *** ecx = node[po_t] *** add ecx,tl_data_nodes ; *** ecx = node[po_t] ***
add ecx,8 ; *** ecx = node[po_t].next *** add ecx,8 ; *** ecx = node[po_t].next ***
push dword [ecx] ;node[i].next=node[po_t].next; push dword[ecx] ;node[i].next=node[po_t].next;
pop dword [edx+8] pop dword[edx+8]
call tl_get_node_index ;*** eax = i *** call tl_get_node_index ;*** eax = i ***
cmp eax,tl_info_max_count cmp eax,tl_info_max_count
jge .u0 jge .u0
mov [ecx],eax ;node[po_t].next=i; // áá뫪¨ ¯¥à¥­ ¯à ¢«ï¥¬ mov [ecx],eax ;node[po_t].next=i; // áá뫪¨ ¯¥à¥­ ¯à ¢«ï¥¬
mov ecx,[edx+8] ; *** ecx = node[i].next *** mov ecx,[edx+8] ; *** ecx = node[i].next ***
imul ecx,sizeof.TreeList imul ecx,sizeof.TreeList
@ -1376,13 +1339,12 @@ proc tb_scrol_resize uses eax ecx edx
jg .ye_sb jg .ye_sb
xor ecx,ecx xor ecx,ecx
.ye_sb: .ye_sb:
mov edx,tl_p_scroll mov edx,tl_p_scroll
mov dword[edx+sb_offs_cur_area],eax mov dword[edx+sb_offs_cur_area],eax
mov dword[edx+sb_offs_max_area],ecx mov dword[edx+sb_offs_max_area],ecx
stdcall scroll_bar_vertical.draw,edx stdcall scroll_bar_vertical.draw,edx
@@: @@:
ret ret
endp endp
;input: ;input:
@ -1421,7 +1383,6 @@ proc tl_node_set_data uses eax ecx edx edi esi, tlist:dword, n_info:dword
dec esi dec esi
mov byte[esi],0 ;®¡­ã«ï¥¬ ¯®á«¥¤­¨© ᨬ¢®« ¯®¤¯¨á¨, çâ®-¡ë ­¥ £«î稫® ¥á«¨ ¯®«ì§®¢ â¥«ì § ¤ « ­¥¯à ¢¨«ì­ãî áâàãªâãàã mov byte[esi],0 ;®¡­ã«ï¥¬ ¯®á«¥¤­¨© ᨬ¢®« ¯®¤¯¨á¨, çâ®-¡ë ­¥ £«î稫® ¥á«¨ ¯®«ì§®¢ â¥«ì § ¤ « ­¥¯à ¢¨«ì­ãî áâàãªâãàã
.no_text_data: .no_text_data:
@@: @@:
ret ret
endp endp
@ -1608,7 +1569,6 @@ align 4
proc tl_cur_next uses eax ebx edi esi, tlist:dword proc tl_cur_next uses eax ebx edi esi, tlist:dword
mov edi,dword[tlist] mov edi,dword[tlist]
call tl_get_node_count ;eax = node count call tl_get_node_count ;eax = node count
;inc eax
cmp tl_cur_pos,eax cmp tl_cur_pos,eax
jge .no_redraw jge .no_redraw
mov esi,tl_box_top mov esi,tl_box_top
@ -1625,7 +1585,6 @@ proc tl_cur_next uses eax ebx edi esi, tlist:dword
jl @f jl @f
inc dword[ebx+sb_offs_position] inc dword[ebx+sb_offs_position]
stdcall scroll_bar_vertical.draw,ebx stdcall scroll_bar_vertical.draw,ebx
stdcall tl_draw,dword[tlist] ;¯®«­ ï ¯¥à¥à¨á®¢ª  ®ª­  stdcall tl_draw,dword[tlist] ;¯®«­ ï ¯¥à¥à¨á®¢ª  ®ª­ 
jmp .no_redraw jmp .no_redraw
@@: @@:
@ -1720,7 +1679,6 @@ proc tl_cur_page_up uses eax edi esi, tlist:dword
cmp tl_p_scroll,0 ;¥á«¨ ¥áâì 㪠§ â¥«ì ­  áªà®««¨­£ cmp tl_p_scroll,0 ;¥á«¨ ¥áâì 㪠§ â¥«ì ­  áªà®««¨­£
je .no_redraw je .no_redraw
mov esi,tl_p_scroll mov esi,tl_p_scroll
call tl_get_rows_count ;eax = rows count call tl_get_rows_count ;eax = rows count
@ -1758,10 +1716,8 @@ proc tl_cur_page_down uses eax ebx ecx edi esi, tlist:dword
;ebx - ¬ ªá. ¯®§¨æ¨ï ªãàá®à  ;ebx - ¬ ªá. ¯®§¨æ¨ï ªãàá®à 
;ecx - ¬ ªá. ¯®§¨æ¨ï áªà®««¨­£  ;ecx - ¬ ªá. ¯®§¨æ¨ï áªà®««¨­£ 
mov edi,dword[tlist] mov edi,dword[tlist]
cmp tl_p_scroll,0 ;¥á«¨ ¥áâì 㪠§ â¥«ì ­  áªà®««¨­£ cmp tl_p_scroll,0 ;¥á«¨ ¥áâì 㪠§ â¥«ì ­  áªà®««¨­£
je .no_redraw je .no_redraw
mov esi,tl_p_scroll mov esi,tl_p_scroll
call tl_get_node_count ;eax = node count call tl_get_node_count ;eax = node count
mov ebx,eax mov ebx,eax
@ -1783,13 +1739,11 @@ proc tl_cur_page_down uses eax ebx ecx edi esi, tlist:dword
jl @f jl @f
jmp .no_redraw jmp .no_redraw
@@: @@:
add tl_cur_pos,eax ;¯¥à¥¬¥é ¥¬ ªãàá®à add tl_cur_pos,eax ;¯¥à¥¬¥é ¥¬ ªãàá®à
cmp tl_cur_pos,ebx cmp tl_cur_pos,ebx
jl @f jl @f
mov tl_cur_pos,ebx mov tl_cur_pos,ebx
@@: @@:
add dword[esi+sb_offs_position],eax ;¯¥à¥¬¥é ¥¬ áªà®««¨­£ add dword[esi+sb_offs_position],eax ;¯¥à¥¬¥é ¥¬ áªà®««¨­£
cmp dword[esi+sb_offs_position],ecx cmp dword[esi+sb_offs_position],ecx
jl @f jl @f
@ -1979,7 +1933,6 @@ tl_node_move_po6:
;ecx = ? ;ecx = ?
align 4 align 4
tl_node_move_po8: tl_node_move_po8:
; push ecx
mov ecx,edx ;save node pointer mov ecx,edx ;save node pointer
call tl_move_perv call tl_move_perv
mov dword[edx+8],ebx mov dword[edx+8],ebx
@ -1993,7 +1946,6 @@ tl_node_move_po8:
call tl_move_next call tl_move_next
mov dword[edx+4],eax mov dword[edx+4],eax
mov edx,ecx ;restore node pointer mov edx,ecx ;restore node pointer
; pop ecx
;+4 perv ;+4 perv
mov eax,dword[edx+4] mov eax,dword[edx+4]
@ -2291,7 +2243,7 @@ align 4
xor edx,edx ;®ç¨áâ¨âì edx xor edx,edx ;®ç¨áâ¨âì edx
div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx div ecx ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
push edx ;¯®«®¦¨âì ¢ á⥪ push edx ;¯®«®¦¨âì ¢ á⥪
call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx call .str ;¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
pop eax pop eax
@@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï)) @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥ or al,0x30 ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥ 祬 ¤¢¥ ¢ëè¥