upgrade component

git-svn-id: svn://kolibrios.org@356 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Alexey Teplov ( 2007-02-16 14:09:57 +00:00
parent 95ecd429a8
commit 45d720c0c7
3 changed files with 36 additions and 36 deletions

View File

@ -1,5 +1,5 @@
;ª®¬¯®­¥­â OptionBox (Žá­®¢ ­ ­  Checkbox)
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, ¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, ¨ ¨å ¯à®£à ¬¬ ¬, ¡¥§
;ª®¬¯®­¥­â OptionBox (®á­®¢ ­ ­  Checkbox)
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron ¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, ¨ ¨å ¯à®£à ¬¬ ¬, ¡¥§
;ª®â®àëå ï ­¥ ᬮ£ ¡ë ­ ¯¨á âì íâ®â ª®¬¯®­¥­â.
;16.02.2007
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
@ -23,7 +23,7 @@ use32 ;
;------------------
include 'macros.inc'
include 'optionbox.inc' ;¢ª«îç¨âì ä ©« check.inc
use_option_box ;¨á¯®«ì§ãï ¬ ªà®áë ¢­¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ­¨ï 祪 ¡®ªá 
use_option_box ;¨á¯®«ì§ãï ¬ ªà®áë,¢­¥á⨠¯à®æ¥¤ãàë ¤«ï à¨á®¢ ­¨ï optionbox
align 16
;Ž¡« áâì ª®¤ 
start: ;’®çª  ¢å®¤  ¢ ¯à®£à ¬¬ã
@ -49,10 +49,10 @@ still: ;
mouse_option_boxes option_boxes,option_boxes_end ;¯à®¢¥àª  祪 ¡®ªá 
jmp still ;¥á«¨ ­¨ç¥£® ¨§ ¯¥à¥ç¨á«¥­­®£® â® á­®¢  ¢ 横«
button:
mov eax,17 ;¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª« ¢¨è¨
int 0x40
test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ­  ®¡à ¡®â稪 ᮡë⨩ still
jz still
; mov eax,17 ;¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª« ¢¨è¨
; int 0x40
; test ah,ah ;¥á«¨ ¢ ah 0, â® ¯¥à¥©â¨ ­  ®¡à ¡®â稪 ᮡë⨩ still
; jz still
or eax,-1 ;¢ eax,-1 - 5 ,¡ ©â®¢ ã ­ á ¦¥ ⮫쪮 3 ¢ë©â¨
int 0x40 ;¤ «¥¥ ¢ë¯®«­ï¥âáï ¢ë室 ¨§ ¯à®£à ¬¬ë
@ -67,8 +67,7 @@ draw_window: ;
mov ecx,30*65536+200 ;[ª®®à¤¨­ â  ¯® ®á¨ y]*65536 + [à §¬¥à ¯® ®á¨ y]
mov edx,[sc.work] ; color of work area RRGGBB,8->color gl
or edx,0xb3000000
mov esi,[sc.work_text]
mov edi,hed;0x005080DD ;0x00RRGGBB - 梥â à ¬ª¨
mov edi,hed
int 0x40 ;­ à¨á®¢ âì ®ª­® ¯à¨«®¦¥­¨ï
draw_option_boxes option_boxes,option_boxes_end ;à¨á®¢ ­¨¥ 祪¡®ªá®¢
@ -83,20 +82,20 @@ draw_window: ;
;”®à¬ â ¤ ­­ëå 祪 ¡®ªá :
;10 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® å
;30 - ª®®à¤¨­ â  祪 ¡®ªá  ¯® ã
;0xffffff - 梥⠢­ãâਠ祪 ¡®ªá 
;0 - 梥â à ¬ª¨ 祪 ¡®ªá 
;0 - 梥â ⥪áâ  ­ ¤¯¨á¨
;op_text.1 - 㪠§ â¥«ì ­  ­ ç «® áâப¨
;option_group1 - íâ® ¯à¨§­ ª £à㯯ë, â.¥. íâ®â ª®¤ ¬®¦¥â ®¡à ¡ â뢠âì ¬­®£® £à㯯 ¨§ optibox
;op_text.e1-ch_text.1 - ¤«¨­  áâப¨
;
align 16
option_boxes:
op1 option_box 10,15,0xffffff,0,0,ch_text.1,ch_text.e1-ch_text.1,option_group1
op2 option_box 10,30,0xffffff,0,0,ch_text.2,ch_text.e2-ch_text.2,option_group1
op3 option_box 10,45,0xffffff,0,0,ch_text.3,ch_text.e3-ch_text.3,option_group1
op11 option_box 10,80,0xffffff,0,0,ch_text.1,ch_text.e1-ch_text.1,option_group2
op12 option_box 10,95,0xffffff,0,0,ch_text.2,ch_text.e2-ch_text.2,option_group2
op13 option_box 10,110,0xffffff,0,0,ch_text.3,ch_text.e3-ch_text.3,option_group2
op1 option_box 10,15,0,0,ch_text.1,ch_text.e1-ch_text.1,option_group1
op2 option_box 10,30,0,0,ch_text.2,ch_text.e2-ch_text.2,option_group1
op3 option_box 10,45,0,0,ch_text.3,ch_text.e3-ch_text.3,option_group1
op11 option_box 10,80,0,0,ch_text.1,ch_text.e1-ch_text.1,option_group2
op12 option_box 10,95,0,0,ch_text.2,ch_text.e2-ch_text.2,option_group2
op13 option_box 10,110,0,0,ch_text.3,ch_text.e3-ch_text.3,option_group2
option_boxes_end:
ch_text: ; ‘®¯à®¢®¦¤ î騩 ⥪áâ ¤«ï 祪 ¡®ªá®¢
@ -113,3 +112,4 @@ option_group2 dd op11 ;
hed db 'Optionbox [16.02.2007]',0 ;§ £®«®¢®ª ¯à¨«®¦¥­¨ï
sc system_colors
i_end: ;ª®­¥æ ª®¤ 

View File

@ -1,2 +1,3 @@
@fasm.exe optionbox.asm optionbox
@mtappack.exe optionbox
@kpack.exe optionbox
REM @klbrinwin.exe optionbox

View File

@ -1,5 +1,5 @@
;ª®¬¯®­¥­â OptionBox (Žá­®¢ ­ ­  Checkbox)
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, ¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, ¨ ¨å ¯à®£à ¬¬ ¬, ¡¥§
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron, ¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬, ¨ ¨å ¯à®£à ¬¬ ¬, ¡¥§
;ª®â®àëå ï ­¥ ᬮ£ ¡ë ­ ¯¨á âì íâ®â ª®¬¯®­¥­â.
;16.02.2007
;<Lrz> - ’¥¯«®¢ €«¥ªá¥© www.lrz.land.ru
@ -10,12 +10,11 @@ op_text_margin=4 ;
op_size=10 ;à §¬¥à ª¢ ¤à â  祪 ¡®ªá 
op_left equ [edi] ;ª®®à¤¨­ â  ­ ç «  à¨á®¢ ­¨ï ¯® å
op_top equ [edi+2] ;ª®®à¤¨­ â  ­ ç «  à¨á®¢ ­¨ï ¯® ã
op_color equ [edi+4] ;梥⠢­ãâਠoptionbox
op_border_color equ [edi+8] ;梥â à ¬ª¨ optionbox
op_text_color equ [edi+12] ;梥â ⥪áâ 
op_text_ptr equ [edi+16] ;㪠§ â¥«ì ­  ­ ç «® ⥪á⮢®© áâப¨
op_text_length equ [edi+20] ;¤«¨­  ­ ¤¯¨á¨ (2^64 â ª®© ¤«¨­ë ¬®¦¥â ¡ëâì ⥪áâ)
op_optibox_gr equ [edi+22]
op_border_color equ [edi+4] ;梥â à ¬ª¨ optionbox
op_text_color equ [edi+8] ;梥â ⥪áâ 
op_text_ptr equ [edi+12] ;㪠§ â¥«ì ­  ­ ç «® ⥪á⮢®© áâப¨
op_text_length equ [edi+16] ;¤«¨­  ­ ¤¯¨á¨ (2^64 â ª®© ¤«¨­ë ¬®¦¥â ¡ëâì ⥪áâ)
op_optibox_gr equ [edi+18]
option_box:
.draw:
pusha ;á®åà ­¨¬ ¢á¥ ॣ¨áâàë
@ -34,7 +33,7 @@ pusha ;
;pop cx ;[ª®®à¤¨­ â  ­ ç «  ¯® ®á¨ y]*65536 + [ª®®à¤¨­ â  ­ ç «  ¯® ®á¨ y]
;push cx
add ecx,op_size ;[ª®®à¤¨­ â  ­ ç «  ¯® ®á¨ y]*65536 + [ª®®à¤¨­ â  ª®­æ  ¯® ®á¨ y]
mov edx,op_border_color ;–¢¥â «¨­¨¨
mov edx,dword op_border_color ;–¢¥â «¨­¨¨
int 0x40 ;à¨á®¢ ­¨¥ ¢¥à⨪ «ì­®© «¥¢®© «¨­¨¨ ª¢ ¤à â  (¯àאַ㣮«ì­¨ª )
;
mov ebp,ebx ;á®åà ­¨¬ ॣ¨áâà bx ¢ ॣ¨áâॠ㪠§ â¥«ï ¡ §ë
@ -70,10 +69,10 @@ pusha ;
shl ecx,16 ;ᤢ¨­¥¬ ­  16 à §à冷¢ ¢ «¥¢® (㬭®¦¨¬ ­  65536)
mov cx,bp ;¢®ááâ ­®¢¨¬ §­ ç¥­¨¥ ॣ¨áâà  cx
;pop cx
mov edx,op_color ;§ £à㧨¬ 梥⠯®«®áë
mov edx,dword [sc.work] ;§ £à㧨¬ 梥⠯®«®áë
int 0x40 ;§ ªà á¨«¨
mov eax,op_optibox_gr
mov eax,dword op_optibox_gr
mov dword eax,[eax]
cmp eax,edi
jne @f
@ -97,7 +96,7 @@ popa ;
ret ;¢ë©¤¥¬ ¨§ ¯à®æ¥¤ãàë
.clear_op: ;®ç¨á⪠ 祪 ¡®ªá 
mov edx,op_color ;梥⠢­ãâਠ祪 ¡®ªá 
mov edx,dword [sc.work] ;梥⠢­ãâਠ祪 ¡®ªá 
jmp @f ;¡¥§ãá«®¢­ë© ¯à릮ª ­  ­¨¦­îî ¬¥âªã @@
.draw_op: ;­ à¨á®¢ âì ¢ª«î祭­ë© 祪 ¡®ªá
@ -133,10 +132,11 @@ pusha
;lea esi,[eax*2+eax]
;shl eax,1
imul esi,6 ; ¨«¨ ¬®¦­® ¨ â ª 㬭®¦¨âì ­  6
xor ebx,ebx
add esi,op_text_margin ;¤®¡ ¢¨âì 3 - à ááâ®ï­¨¥ ®â 祪 ¡®ªá  ¤® ­ ¤¯¨á¨
mov eax,37 ;¯®«ã稬 ª®®à¤¨­ âë ¬ë誨
mov ebx,1 ;¤®¡ ¢¨âì 1
inc ebx ;¤®¡ ¢¨âì 1
int 0x40 ;¯®«ãç¨âì ª®®à¤¨­ âë ªãàá®à  ®â­®á¨â¥«ì­® ®ª­ 
movzx ebx,word op_top ;§ £à㧨âì ¢ bx §­ ç¥­¨¥ ª®®à¤¨­ âë ã
@ -151,10 +151,10 @@ pusha
cmp ax,bx ;áà ¢­¨âì ॣ¨áâàë
jl .mouse_end ;¥á«¨ ¬¥­ìè¥
add ebx,op_size ;¤®¡ ¢¨âì ¤«¨­ã áâ®à®­ë ¯àאַ㣮«ì­¨ª 
add ebx,esi ;“ç¥áâì ¢ §­ ç¥­¨¨ ¯® å ¥é¥ ¨ ¤«¨­ã ­ ¤¯¨á¨ ª 祪¡®ªáã
add ebx,esi ;“ç¥áâì ¢ §­ ç¥­¨¨ ¯® å ¥é¥ ¨ ¤«¨­ã ­ ¤¯¨á¨ ª 祪¡®ªáã
cmp ax,bx ;áâà ¢­¨âì ॣ¨áâàë
jg .mouse_end ;¥á«¨ ¡®«ìè¥
mov eax,op_optibox_gr
mov eax,dword op_optibox_gr
mov [eax],edi
.mouse_end:
@ -162,18 +162,17 @@ popa ;
ret ;¢ë©â¨
}
struc option_box left,top,color,border_color,text_color,text,text_length,point_gr,flags
struc option_box left,top,border_color,text_color,text,text_length,point_gr,flags
{ ;áâàãªâãà  ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá 
.left: dw left ;+0 ;¯®«®¦¥­¨¥ ¯® å
.top: dw top ;+2 ;¯®«®¦¥­¨¥ ¯® ã
.color: dd color ;+4 ;梥⠢­ãâਠ祪 ¡®ªá 
.border_color: dd border_color ;+8 梥â à ¬ª¨
.text_color: dd text_color ;+12 梥â ⥪áâ  ­ ¤¯¨á¨
.text: dd text ;+16  ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à á¯®«®¦¥­ ⥪áâà
.text_length: dw text_length ; +20 ¤«¨­  ⥪áâ 
.option_group: dd point_gr ;㪠§ â¥«ì ­  à §¬¥é¥­¨¥ edi - ¨¤¥­â¨ä¨ª â®à  optibox
}
op_struc_size=26 ;®¡é ï áâàãªâãà  24 ¡ ©â
op_struc_size=22 ;®¡é ï áâàãªâãà  24 ¡ ©â
op_flag_en=10b
macro draw_option_boxes start,end ;à¨á®¢ âì 祪 ¡®ªáë
{
@ -197,7 +196,7 @@ macro mouse_option_boxes start,end ;
mov ecx,((end-start)/op_struc_size) ;Š®«¨ç¥á⢮ 祪 ¡®ªá®¢
.home:
mov eax,[edi+22] ;op_optibox_gr
mov eax,[edi+18] ;op_optibox_gr
mov dword eax,[eax]
pusha