bugfix and add new bugs :))

git-svn-id: svn://kolibrios.org@348 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2007-02-15 07:44:55 +00:00
parent 0502a61207
commit 2f5bd288b7
3 changed files with 44 additions and 44 deletions

View File

@ -1,5 +1,6 @@
; <Lrz> 13.02.2007 ã¡à « ¯® ¢®§¬®¦­®á⨠¬¥àæ ­¨¥, ã«ãç襭  ®¡à ¡®â ª  ¯¥à¥à¨á®¢ª¨ ä®­ 
; ¤®¡ ¢¨« ä¨âçã ¢­¥á¥­¨ï 0å0 ¯®  ¤à¥áã ed_size ¨­ ç¥ ã Maxxx32 ¡ë«¨ ­¥á®áâ몮¢ª¨ ¢ ª®¤¥. <20>à¥ç­¨  ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë«  ᢥ¤¥­  ª ⮬ã çâ® ï ­¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤  㤠«ï«, ï ¯à®áâ® ¨å ­¥ ¢ë¢®¤¨«, ¨ ¯®â®¬ ª®£¤  ¢­®á¨«áï ­®¢ë© ᨬ¢®«, ®­ ¯® ¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. …᫨ ¡ë ¯à®£à ¬¬  ®¡à ¡ â뢠«  ª®­¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ ¡ë ­¥ ¢®§­¨ª«®. <20>® ᥩç á íâ®â ­¥¤®áâ â®ª ¨á¯à ¢«¥­.
; <Lrz> 15.02.2007 ã«ãç襭¨¥ á­ïâ¨ï ¢ë¤¥«¥­¨ï ¨ ¯¥à¥à¨á®¢ª¨ ®ç¨é ¥¬®© ®¡« áâ¨, §­ ç¨â¥«ì­® ¯à¨ïâ­¥¥ à ¡®â ¥â ª®¬¯®­¥­â
; <Lrz> 13.02.2007 ã¡à « ¯® ¢®§¬®¦­®á⨠¬¥àæ ­¨¥, ã«ãç襭  ®¡à ¡®âª  ¯¥à¥à¨á®¢ª¨ ä®­ 
; ¤®¡ ¢¨« ä¨âçã ¢­¥á¥­¨ï 0å0 ¯®  ¤à¥áã ed_size ¨­ ç¥ ã Maxxx32 ¡ë«¨ ­¥á®áâ몮¢ª¨ ¢ ª®¤¥. <20>à¨ç¨­  ¢ ⮬, çâ® ®¯â¨¬¨§ æ¨ï ¡ë«  ᢥ¤¥­  ª ⮬ã, çâ® ï ­¥ ç¨á⨫ ᨬ¢®«ë ¢ ¡ãä¥à¥, ª®£¤  㤠«ï«, ï ¯à®áâ® ¨å ­¥ ¢ë¢®¤¨«, ¨ ¯®â®¬, ª®£¤  ¢­®á¨«áï ­®¢ë© ᨬ¢®«, ®­ ¯®¯à®áâã § â¨à « 㦥 ¨¬¥î騩áï. …᫨ ¡ë, ¯à®£à ¬¬  ®¡à ¡ â뢠«  ª®­¥æ áâப¨ ¯® ed_size, ¯à®¡«¥¬ë ­¥ ¢®§­¨ª«®. <20>® ᥩç á íâ®â ­¥¤®áâ â®ª ¨á¯à ¢«¥­.
; <Lrz> 01.02.2007 ¤®à ¡®âª  edit_box, ¨á¯à ¢¨« ¡ £¨.
; <Lrz> 26.01.2007 ­®à¬ «ì­ ï à ¡®â  ª®¬¯ ­¥­â  ¨á¯à ¢¨« äãªæ¨î .check_offset
; <Lrz> 24.01.2007 ¯®ä¨ªá¥« ¡ £¨ ¢ë§¢ ­ë¥ ­¥ ¯à ¢¨«ì­ë¬ ª®¤®¬ )).
@ -414,8 +415,8 @@ pusha
mov ecx,ed_pos
call .del_char
;clear
mov ebp,ed_size
call .clear_bg
mov ebp,ed_color
call .sh_cl_
;;;;
mov eax,ed_shift_pos
mov ebx,ed_size
@ -594,16 +595,23 @@ popa
;jz .draw_bg_cursor_text
call .draw_cursor
.shift: ;;;;;;;SHIFT
;test ed_flags,ed_
;mov ebp,ed_size
;call .clear_bg
test word ed_flags,ed_shift
je .f_exit
mov ebp,shift_color
call .sh_cl_
jmp .draw_cursor_text
;;;;;;;;;;;;;;;;;;;;;
.f_exit: and word ed_flags,ed_shift_cl
call .enable_null
jmp .draw_cursor_text
.sh_cl_:
;;;;;;SHIFT end
;¤«ï ®¡à ¡®âª¨ á­ïâ¨ï ¢ë¤¥«¥­¨ï
or word ed_flags,ed_shift_bac
mov eax,dword ed_pos
mov ebx,dword ed_shift_pos
cmp eax,ebx
@ -615,16 +623,13 @@ popa
.sh_n: push ebx
push eax
.sh_n1:
; jmp .draw_all2
;;;;;;;;;;;;;;;;;;;;;;;;;
;call .clear_cursor
call .check_offset
call .get_n
mov edx,eax ;size of ed_box
; push eax
mov ecx,ed_offset
add eax,ecx ;eax = w_off= ed_offset+width
mov ebp,eax ;save
mov edx,eax ;save
pop ebx ;¡®«ì襥
pop eax ;¬¥­ì襥
@ -632,23 +637,23 @@ popa
cmp eax,ecx ;áà ¢­¥­¨¥ á ¬¥­ì襣® á offset.
jae .f_f ;¥á«¨ ¡®«ìè¥
xor eax,eax
cmp ebp,ebx ;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
cmp edx,ebx ;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
jb @f
sub ebx,ecx
jmp .nxt_f
@@: mov ebx,ebp
@@: mov ebx,edx
sub ebx,ecx
jmp .nxt_f
.f_f:
sub eax,ecx
cmp ebp,ebx ;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
cmp edx,ebx ;cà ¢­¨¬ à §¬¥à w_off á ¡®«ì訬
jle @f
sub ebx,ecx
sub ebx,eax
jmp .nxt_f
@@:
mov ebx,ebp
mov ebx,edx
sub ebx,ecx
sub ebx,eax
.nxt_f:
@ -661,16 +666,14 @@ popa
lea ecx,[edx*2+edx]
shl ecx,1
mov bx,cx
mov edx,shift_color
mov edx,ebp;shift_color
call .draw_bg_eax
and word ed_flags,1111111111111011b
call .enable_null
jmp .draw_cursor_text
;;;;;;;;;;;;;;;;;;;;;
ret
.f_exit: and word ed_flags,ed_shift_cl
call .enable_null
jmp .draw_cursor_text
;¯à®¢¥àª  á®áâ®ï­¨ï shift ¡ë« «¨ ®­ ­ ¦ â à ­ìè¥?
.sh_enable:
@ -683,12 +686,14 @@ popa
or word ed_flags,ed_shift_on
ret
@@: and word ed_flags,ed_shift_cl
ret
.sh_ext_en: mov ebp,ed_size
call .clear_bg
@@: test word ed_flags,ed_shift_bac
je @f
mov ebp,ed_color
call .sh_cl_ ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
@@: and word ed_flags,ed_shift_cl
; ret
.sh_ext_en:
ret
;äã­ªæ¨ï ¢­¥á¥­¨ï 0 ¯®  ¤à¥áã ed_size+1
.enable_null:
pusha
@ -814,7 +819,7 @@ pusha
;----------------------------------------------------------
test eax,1
jnz .mouse_left_button
@@: popa
popa
ret
.mouse_left_button:
@ -866,25 +871,18 @@ pusha
;--- ¯à®æ¥¤ãà  ãáâ ­®¢ª¨ 䮪ãá  ---------------------------
;----------------------------------------------------------
bts word ed_flags,1
jc .mouse_pressed
jc @f
call .draw_cursor
call .draw_border
.mouse_pressed:
popa
ret
;.mouse_end_no_focus:
; call .blur
;popa
;ret
;.blur:
;pusha
jmp .drc
._blur:
test word ed_flags,ed_always_focus
jne @f
btr word ed_flags,1 ; ¥á«¨ ­¥ ¢ 䮪ãá¥, ¢ë室¨¬
jnc @f
call .clear_cursor
call .draw_border
.drc: call .draw_border
@@:
popa
ret
@ -908,7 +906,8 @@ ed_always_focus=100000000000000b
ed_focus=10b
ed_shift_on=1000b
ed_shift=100b
ed_shift_cl=1111111111110011b
ed_shift_bac=10000b
ed_shift_cl=1111111111100011b
macro draw_edit_boxes start,end
{
mov edi,start

View File

@ -1,2 +1,3 @@
@fasm editbox.asm editbox
@mtappack editbox
@pause

View File

@ -95,7 +95,7 @@ ed_buffer:
;text_b: db 'Š®«-¢® ᨬ¢®«®¢'
;buffer: dd 0
buffer_end:
hed db 'EDITBOX optimization and retype <Lrz> date 26.01.2007',0
hed db 'EDITBOX optimization and retype <Lrz> date 15.02.2007',0
i_end1:
rb 1024
i_end: