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

View File

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

View File

@ -95,7 +95,7 @@ ed_buffer:
;text_b: db 'Š®«-¢® ᨬ¢®«®¢' ;text_b: db 'Š®«-¢® ᨬ¢®«®¢'
;buffer: dd 0 ;buffer: dd 0
buffer_end: 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: i_end1:
rb 1024 rb 1024
i_end: i_end: