fix backward compatibility broken in #6675

git-svn-id: svn://kolibrios.org@6705 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
0CodErr 2016-11-12 17:19:46 +00:00
parent fe94d7915b
commit 0a05348fad
2 changed files with 96 additions and 96 deletions

View File

@ -1,31 +1,31 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; basic macros for EditBox ;; ;; basic macros for EditBox ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ed_width equ [edi] ; field width ed_width equ [edi] ; field width
ed_left equ [edi+4] ; left border X ed_left equ [edi + 4] ; left border X
ed_top equ [edi+8] ; top border Y ed_top equ [edi + 8] ; top border Y
ed_color equ [edi+12] ; field color ed_color equ [edi + 12] ; field color
shift_color equ [edi+16] ; select color shift_color equ [edi + 16] ; select color
ed_focus_border_color equ [edi+20] ; border color active ed_focus_border_color equ [edi + 20] ; border color active
ed_blur_border_color equ [edi+24] ; border color inactive ed_blur_border_color equ [edi + 24] ; border color inactive
ed_text_color equ [edi+28] ; color and font (as in sysfunc 4) ed_text_color equ [edi + 28] ; color and font (as in sysfunc 4)
ed_max equ [edi+32] ; chars max ed_max equ [edi + 32] ; chars max
ed_text equ [edi+36] ; buffer pointer ed_text equ [edi + 36] ; buffer pointer
ed_mouse_variable equ [edi+40] ; pointer ed_mouse_variable equ [edi + 40] ; pointer
ed_flags equ [edi+44] ed_flags equ [edi + 44]
bp_flags equ [ebp+44] bp_flags equ [ebp + 44]
ed_size equ [edi+48] ; chars currently ed_size equ [edi + 48] ; chars currently
bp_size equ [ebp+48] bp_size equ [ebp + 48]
ed_pos equ [edi+52] ; carret current position ed_pos equ [edi + 52] ; carret current position
ed_offset equ [edi+56] ed_offset equ [edi + 56]
cl_curs_x equ [edi+60] ; previous cursor X cl_curs_x equ [edi + 60] ; previous cursor X
cl_curs_y equ [edi+64] ; previous cursor Y cl_curs_y equ [edi + 62] ; previous cursor Y
ed_shift_pos equ [edi+68] ; selection current position ed_shift_pos equ [edi + 64] ; selection current position
ed_shift_pos_old equ [edi+72] ; selection previous position ed_shift_pos_old equ [edi + 66] ; selection previous position
ed_height equ [edi+76] ed_height equ [edi + 68]
ed_char_width equ [edi+80] ed_char_width equ [edi + 72]
ed_struc_size = 84 ed_struc_size = 76
;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
;; flags for EditBox ;; ;; flags for EditBox ;;
@ -60,27 +60,27 @@ ed_alt_off = not ed_alt_on
struc edit_box width,left,top,color,shift_color,focus_border_color,\ struc edit_box width,left,top,color,shift_color,focus_border_color,\
blur_border_color,text_color,max,text,mouse_variable,flags,size,pos blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
{ {
.width dd width .width dd width
.left dd left .left dd left
.top dd top .top dd top
.color dd color .color dd color
.shift_color dd shift_color .shift_color dd shift_color
.focus_border_color dd focus_border_color .focus_border_color dd focus_border_color
.blur_border_color dd blur_border_color .blur_border_color dd blur_border_color
.text_color dd text_color .text_color dd text_color
.max dd max .max dd max
.text dd text .text dd text
.mouse_variable dd mouse_variable .mouse_variable dd mouse_variable
.flags dd flags+0 .flags dd flags+0
.size dd size+0 .size dd size+0
.pos dd pos+0 .pos dd pos+0
.offset dd 0 .offset dd 0
.cl_curs_x dd 0 .cl_curs_x dw 0
.cl_curs_y dd 0 .cl_curs_y dw 0
.shift dd 0 .shift dw 0
.shift_old dd 0 .shift_old dw 0
.height dd 0 .height dd 0
.char_width dd 0 .char_width dd 0
} }
macro edit_boxes_set_sys_color start,end,color_table macro edit_boxes_set_sys_color start,end,color_table

View File

@ -207,7 +207,7 @@ edit_box.draw_shift:
test word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« á⨠test word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
jz @f jz @f
mov ebp,shift_color mov ebp,shift_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
@@: ret @@: ret
;---------------------------------------------------------- ;----------------------------------------------------------
@ -284,36 +284,36 @@ edit_box.get_n:
ret ret
;---------------------------------------------------------- ;----------------------------------------------------------
;--- ¯à®æ¥¤ãà  à¨á®¢ ­¨ï ªãàá®à  -------------------------- ;------------------ Draw Cursor Procedure -----------------
;---------------------------------------------------------- ;----------------------------------------------------------
;¢å®¤­ë¥ ebp- 梥â ; in: ebp = Color
edit_box.clear_cursor: edit_box.clear_cursor:
mov edx,ebp mov edx, ebp
mov ebx,cl_curs_x movzx ebx, word cl_curs_x
mov ecx,cl_curs_y movzx ecx, word cl_curs_y
jmp edit_box.draw_curs jmp edit_box.draw_curs
edit_box.draw_cursor: edit_box.draw_cursor:
mov eax,ed_pos mov edx, ed_text_color
sub eax,ed_offset mov eax, ed_pos
mul dword ed_char_width sub eax, ed_offset
mov ebx,eax mul dword ed_char_width
add ebx,ed_left mov ebx, eax
inc ebx add ebx, ed_left
mov edx,ebx inc ebx
shl ebx,16 mov ecx, ed_top
add ebx,edx add ecx, 2
mov ecx,ed_top mov cl_curs_x, bx
add ecx,2 mov cl_curs_y, cx
mov edx,ecx edit_box.draw_curs:
shl ecx,16 mov eax, ebx
add ecx,edx shl ebx, 16
add ecx,ed_height or ebx, eax
sub ecx,3 mov eax, ecx
mov cl_curs_x,ebx shl ecx, 16
mov cl_curs_y,ecx or ecx, eax
mov edx,ed_text_color add ecx, ed_height
edit_box.draw_curs: sub ecx, 3
mcall 38 mcall 38
ret ret
@ -444,7 +444,7 @@ edit_box_key.shift:
je edit_box_key.f_exit je edit_box_key.f_exit
mov ebp,shift_color mov ebp,shift_color
or word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« á⨠or word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
jmp edit_box.draw_cursor_text jmp edit_box.draw_cursor_text
@ -544,10 +544,10 @@ edit_box_key.draw_wigwag_cl:
edit_box_key.sh_first_sh: edit_box_key.sh_first_sh:
test word ed_flags,ed_shift test word ed_flags,ed_shift
je @f je @f
mov ed_shift_pos_old,ebx mov ed_shift_pos_old,bx
test word ed_flags,ed_shift_on test word ed_flags,ed_shift_on
jne @f jne @f
mov ed_shift_pos,ebx mov ed_shift_pos,bx
or word ed_flags,ed_shift_on or word ed_flags,ed_shift_on
@@: ret @@: ret
;Ž¡à ¡®âª  ªà ©­¨å ¯®«®¦¥­¨© ¢ editbox ¯à¨ ­ ¦ â®¬ shift ;Ž¡à ¡®âª  ªà ©­¨å ¯®«®¦¥­¨© ¢ editbox ¯à¨ ­ ¦ â®¬ shift
@ -560,7 +560,7 @@ edit_box_key.sh_st_of:
je @f je @f
call edit_box.draw_bg call edit_box.draw_bg
mov ebp,ed_color mov ebp,ed_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â  call edit_box_key.sh_cl_ ;®ç¨á⪠ ¢ë¤¥«¥­®£® äà £¬¥­â 
and word ed_flags,ed_shift_cl ; ®ç¨á⪠ ®â ⮣®, çâ® ã¡à «¨ ¢ë¤¥«¥­¨¥ and word ed_flags,ed_shift_cl ; ®ç¨á⪠ ®â ⮣®, çâ® ã¡à «¨ ¢ë¤¥«¥­¨¥
jmp edit_box.draw_cursor_text jmp edit_box.draw_cursor_text
@ -576,7 +576,7 @@ edit_box_key.sh_enable:
je @f je @f
call edit_box.check_offset call edit_box.check_offset
mov ebp,ed_color mov ebp,ed_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ ;®ç¨á⪠ ¢ë¤¥«¥­­®£® äà £¬¥­â  call edit_box_key.sh_cl_ ;®ç¨á⪠ ¢ë¤¥«¥­­®£® äà £¬¥­â 
call edit_box_key.draw_wigwag_cl call edit_box_key.draw_wigwag_cl
and word ed_flags,ed_shift_cl ; 1¢ à ­¥ ­ã¦­® and word ed_flags,ed_shift_cl ; 1¢ à ­¥ ­ã¦­®
@ -591,9 +591,9 @@ edit_box_key.sh_ext_en:
test word ed_flags,ed_offset_fl test word ed_flags,ed_offset_fl
je @f je @f
;<3B>¨á®¢ ­¨¥ § ªà è¥­­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ¨å ®ç¨á⪠ ;<3B>¨á®¢ ­¨¥ § ªà è¥­­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ¨å ®ç¨á⪠
mov eax,ed_shift_pos movzx eax, word ed_shift_pos
mov ebx,ed_pos mov ebx,ed_pos
mov ecx,ed_shift_pos_old movzx ecx, word ed_shift_pos_old
;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­­ëå ®¡« á⥩ ;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­­ëå ®¡« á⥩
cmp eax,ecx cmp eax,ecx
je edit_box_key.1_shem je edit_box_key.1_shem
@ -616,7 +616,7 @@ edit_box_key.sh_e_end:
ret ret
@@: mov ebp,shift_color @@: mov ebp,shift_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
jmp edit_box_key.sh_e_end jmp edit_box_key.sh_e_end
;äã­ªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ­ ¦ â¨¨ home and end ;äã­ªæ¨ï ¤«ï ®¡à ¡®âª¨ shift ¯à¨ ­ ¦ â¨¨ home and end
@ -626,13 +626,13 @@ edit_box_key.sh_home_end:
test word ed_flags,ed_shift_bac test word ed_flags,ed_shift_bac
je @f je @f
mov ebp,ed_color mov ebp,ed_color
mov ebx,ed_shift_pos_old movzx ebx, word ed_shift_pos_old
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
@@: @@:
test word ed_flags,ed_shift test word ed_flags,ed_shift
je edit_box_key.sh_exit_ ;¢ë©â¨ je edit_box_key.sh_exit_ ;¢ë©â¨
mov ebp,shift_color mov ebp,shift_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
or word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« á⨠or word ed_flags,ed_shift_bac ;ãáâ ­®¢ª  ä« £ , ¢ë¤¥«¥­­®© ®¡« áâ¨
jmp edit_box_key.sh_e_end jmp edit_box_key.sh_e_end
@ -661,7 +661,7 @@ edit_box_key.del_char:
mov esi,ed_text mov esi,ed_text
test word ed_flags,ed_shift_on test word ed_flags,ed_shift_on
je @f je @f
mov eax,ed_shift_pos movzx eax, word ed_shift_pos
mov ebx,esi mov ebx,esi
cmp eax,ecx cmp eax,ecx
jae edit_box_key.dh_n jae edit_box_key.dh_n
@ -671,7 +671,7 @@ edit_box_key.del_char:
add ebx,eax ;eax ¬¥­ìè¥ add ebx,eax ;eax ¬¥­ìè¥
sub edx,ecx sub edx,ecx
add esi,ecx add esi,ecx
mov ed_shift_pos,ebp mov ed_shift_pos,bp
jmp edit_box_key.del_ch_sh jmp edit_box_key.del_ch_sh
edit_box_key.dh_n: edit_box_key.dh_n:
@ -680,7 +680,7 @@ edit_box_key.dh_n:
add ebx,ecx add ebx,ecx
sub edx,eax sub edx,eax
add esi,eax add esi,eax
mov ed_shift_pos,ebp mov ed_shift_pos,bp
jmp edit_box_key.del_ch_sh jmp edit_box_key.del_ch_sh
@@: add esi,ecx ;㪠§ â¥«ì + ᬥ饭¨¥ ª ॠ«ì­®¬ã ¡ãä¥àã @@: add esi,ecx ;㪠§ â¥«ì + ᬥ饭¨¥ ª ॠ«ì­®¬ã ¡ãä¥àã
@ -848,14 +848,14 @@ macro are_key_shift_press
pusha pusha
; clear input area ; clear input area
mov ebp,ed_color mov ebp,ed_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
mov ebp,ed_size mov ebp,ed_size
call edit_box_key.clear_bg call edit_box_key.clear_bg
popa popa
call edit_box_key.del_char call edit_box_key.del_char
mov ebx,ed_size mov ebx,ed_size
sub ebx,ed_shift_pos sub bx,ed_shift_pos
mov ed_size,ebx mov ed_size,ebx
pop eax pop eax
@@: @@:
@ -966,7 +966,7 @@ edit_box_key.draw_all:
push edit_box_key.shift push edit_box_key.shift
test word ed_flags,ed_shift_on test word ed_flags,ed_shift_on
je @f je @f
mov eax,ed_shift_pos movzx eax, word ed_shift_pos
mov ebx,ed_size mov ebx,ed_size
sub ebx,eax sub ebx,eax
mov ed_size,ebx mov ed_size,ebx
@ -1159,9 +1159,9 @@ edit_box_mouse.mouse_wigwag:
edit_box_mouse.mdraw: edit_box_mouse.mdraw:
mov ed_pos,eax mov ed_pos,eax
;<3B>¨á®¢ ­¨¥ § ªà è¥­­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ¨å ®ç¨á⪠ ;<3B>¨á®¢ ­¨¥ § ªà è¥­­ëå ¯àאַ㣮«ì­¨ª®¢ ¨ ¨å ®ç¨á⪠
mov ecx,ed_shift_pos movzx ecx, word ed_shift_pos
mov ebx,ed_shift_pos_old movzx ebx, word ed_shift_pos_old
mov ed_shift_pos_old,eax mov ed_shift_pos_old,ax
;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­­ëå ®¡« á⥩ ;¯à®¢¥àª  ¨ à¨á®¢ ­¨¥ § ªà è¥­­ëå ®¡« á⥩
cmp ecx,ebx cmp ecx,ebx
je edit_box_mouse.m1_shem ;¤¢¨¦¥­¨ï ­¥ ¡ë«® à ­¥¥ je edit_box_mouse.m1_shem ;¤¢¨¦¥­¨ï ­¥ ¡ë«® à ­¥¥
@ -1195,7 +1195,7 @@ edit_box_mouse.mleft:
dec eax dec eax
call edit_box.check_offset call edit_box.check_offset
push eax push eax
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
mov ebp,shift_color mov ebp,shift_color
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
pop eax pop eax
@ -1208,7 +1208,7 @@ edit_box_mouse.mright:
jae edit_box_mouse.mwigvag jae edit_box_mouse.mwigvag
inc eax inc eax
call edit_box.check_offset call edit_box.check_offset
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
mov ebp,shift_color mov ebp,shift_color
push eax push eax
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
@ -1253,7 +1253,7 @@ edit_box_mouse._mshift:
test word ed_flags,ed_shift_bac test word ed_flags,ed_shift_bac
je @f je @f
mov ebp,ed_color mov ebp,ed_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
push eax push eax
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
and word ed_flags,ed_shift_bac_cl and word ed_flags,ed_shift_bac_cl
@ -1261,7 +1261,7 @@ edit_box_mouse._mshift:
@@: @@:
test word ed_flags,ed_mouse_on test word ed_flags,ed_mouse_on
jne @f jne @f
mov ed_shift_pos,eax mov ed_shift_pos,ax
or word ed_flags,ed_mouse_on or word ed_flags,ed_mouse_on
mov ed_pos,eax mov ed_pos,eax
mov ebx,ed_mouse_variable mov ebx,ed_mouse_variable
@ -1271,12 +1271,12 @@ edit_box_mouse._mshift:
call edit_box.draw_bg call edit_box.draw_bg
jmp edit_box_mouse.m_sh jmp edit_box_mouse.m_sh
@@: cmp eax,ed_shift_pos @@: cmp ax,ed_shift_pos
je edit_box.editbox_exit je edit_box.editbox_exit
mov ed_pos,eax mov ed_pos,eax
call edit_box.draw_bg call edit_box.draw_bg
mov ebp,shift_color mov ebp,shift_color
mov ebx,ed_shift_pos movzx ebx, word ed_shift_pos
call edit_box_key.sh_cl_ call edit_box_key.sh_cl_
or word ed_flags,ed_mous_adn_b or word ed_flags,ed_mous_adn_b
edit_box_mouse.m_sh: edit_box_mouse.m_sh: