forked from KolibriOS/kolibrios
Palitra: update by Vaicheslav97
git-svn-id: svn://kolibrios.org@9541 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
89cd2db0bd
commit
7b02f7b61d
270
programs/media/palitra/branch/draw_palitra.inc
Normal file
270
programs/media/palitra/branch/draw_palitra.inc
Normal file
@ -0,0 +1,270 @@
|
||||
draw_palitra:
|
||||
; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
;mcall SF_DRAW_RECT, 110 shl 16+148, 9 shl 16+148, [sc.work]
|
||||
|
||||
cmp [renmode],2
|
||||
je cyrcle_draw
|
||||
;cmp [renmode],1
|
||||
;je picker_draw
|
||||
cmp [renmode],0
|
||||
je sheme_draw
|
||||
ret
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ªà㣮¢®© ¤¨ £à ¬¬ë
|
||||
;.................................................................................................
|
||||
cyrcle_draw:
|
||||
;mov eax,13
|
||||
;mov edx,0x666666
|
||||
;mov ebx,108*65536+152
|
||||
;mov ecx,125*65536+33
|
||||
;mcall
|
||||
;mov edx,0xF3F3F3
|
||||
;mov ebx,109*65536+150
|
||||
;mov ecx,126*65536+31
|
||||
;mcall
|
||||
|
||||
;mov eax,4 ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
;mov ebx,115 shl 16+131 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
;mov ecx,0x666666 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
|
||||
;mov edx,hint ; 㪠§ ⥫ì ç «® áâப¨
|
||||
;mov esi,24 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
;mcall
|
||||
;mov ebx,125 shl 16+144 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
;mov edx,hint2 ; 㪠§ ⥫ì ç «® áâப¨
|
||||
;mov esi,21 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
;mcall
|
||||
|
||||
;mov edx,[color]
|
||||
;mov ebx,109*65536+150
|
||||
;mov ecx, 10*65536+150
|
||||
;mcall
|
||||
call mouse_local ; ¯®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨ ®â®á¨â¥«ì® ®ª
|
||||
mov ecx, [mouse_x] ; § ®á¨¬ ¢ ॣ¨áâà
|
||||
mov edx, [mouse_y] ; § ®á¨¬ ¢ ॣ¨áâà
|
||||
cmp ecx, WIN_W-10
|
||||
jg cyrcle_draw_2
|
||||
cmp edx, WIN_H
|
||||
jle end_cyrcle_draw
|
||||
|
||||
cyrcle_draw_2:
|
||||
mcall SF_SLEEP,10
|
||||
call desktop_get
|
||||
call mouse_global
|
||||
|
||||
mov ebx,112*65536+11
|
||||
mov esi,0 ; counter=8
|
||||
circle_loop:
|
||||
mov ecx, 10*65536+11
|
||||
mov edi,0
|
||||
circle_loop2:
|
||||
call circle_pixel_read
|
||||
mcall SF_DRAW_RECT
|
||||
add ecx,11 shl 16
|
||||
inc edi
|
||||
cmp edi,13
|
||||
jne circle_loop2
|
||||
|
||||
add ebx,11 shl 16
|
||||
inc esi
|
||||
cmp esi,13
|
||||
jne circle_loop
|
||||
|
||||
mcall SF_DRAW_RECT, 177*65536+13, 76*65536+13, 0
|
||||
mov ecx, [mouse_x]
|
||||
mov edx, [mouse_y]
|
||||
inc ecx
|
||||
inc edx
|
||||
mov ebx, edx
|
||||
imul ebx, [desctop_w]
|
||||
add ebx, ecx
|
||||
mcall SF_GET_PIXEL
|
||||
mov edx,eax
|
||||
mcall SF_DRAW_RECT, 178*65536+11, 77*65536+11
|
||||
ret
|
||||
end_cyrcle_draw:
|
||||
mcall SF_DRAW_RECT, 111*65536+145, 9*65536+145, 0x666666
|
||||
ret
|
||||
|
||||
circle_pixel_read:
|
||||
push ecx ebx
|
||||
mov ecx, [mouse_x]
|
||||
mov edx, [mouse_y]
|
||||
inc ecx
|
||||
add ecx, esi
|
||||
cmp ecx, 6
|
||||
jl _cpr_exit
|
||||
sub ecx, 6
|
||||
inc edx
|
||||
add edx, edi
|
||||
cmp edx, 6
|
||||
jl _cpr_exit
|
||||
sub edx, 6
|
||||
|
||||
mov ebx, edx
|
||||
imul ebx, [desctop_w]
|
||||
add ebx, ecx
|
||||
mcall SF_GET_PIXEL
|
||||
mov edx,eax
|
||||
pop ebx ecx
|
||||
ret
|
||||
|
||||
_cpr_exit:
|
||||
xor edx,edx
|
||||
pop ebx ecx
|
||||
ret
|
||||
|
||||
;picker_draw:
|
||||
;ret
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ä® ¯®¤ ª®¯ª¨
|
||||
;.................................................................................................
|
||||
|
||||
sheme_draw:
|
||||
mov eax,SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x222222 ; 梥â
|
||||
mov ecx, palitra_yw ; <EFBFBD> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
mov esi,2 ; ‘ç¥â稪 «¨¨© ¯®¤«®¦¥ª
|
||||
re_draw:
|
||||
mov ebx,palitra_xw ; <EFBFBD> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov edi,2 ; ‘ç¥â稪 ª®«¨ç¥á⢠¯®¤«®¦¥ª
|
||||
for_fon_loop:
|
||||
int 0x40 ; <EFBFBD>à¥àë¢ ¨¥
|
||||
add ebx,(palitra_w+2) shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® å
|
||||
dec edi ; “¬¥ìè ¥¬ áç¥â稪 ª®¯®ª
|
||||
cmp edi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_fon_loop ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
dec esi ; “¬¥ìè ¥¬ ¥£®
|
||||
cmp esi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
mov ecx,(palitra_w+DRAWY+3) shl 16+palitra_w ; <EFBFBD> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
jnz re_draw ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ª®¯®ª ¯® 横«ã
|
||||
;.................................................................................................
|
||||
mov eax,SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x0FFFFFFF ; 梥â
|
||||
mov esi,4 ; ‘ç¥â稪 ª®«¨ç¥á⢠¡§ 楢 (#4,8)
|
||||
mov ebx,(palitra_x-CELLW-3) shl 16+CELLW ; <EFBFBD> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
for_abz:
|
||||
;;push esi ; ‘®åà 塞 § 票¥ áç¥â稪 «¨¨© ¢ á⥪
|
||||
cmp esi,2
|
||||
jne x2_line
|
||||
mov ebx,(palitra_x-CELLW-3) shl 16+CELLW
|
||||
x2_line:
|
||||
add ebx,3 shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® x
|
||||
mov edi,8 ; ‘ç¥â稪 ª®«¨ç¥á⢠ª®¯®ª ¢ áâப¥
|
||||
for_stolbik:
|
||||
push edi ; ‘®åà 塞 § 票¥ áç¥â稪 «¨¨© ¢ á⥪
|
||||
mov edi,8 ; ‘ç¥â稪 ª®«¨ç¥á⢠ª®¯®ª ¢ áâப¥
|
||||
mov ecx, (1-CELLW/3) shl 16+CELLW ; <EFBFBD> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
cmp esi,2
|
||||
jg y2_line ; …᫨ ¡®«ìè¥ 4 â® ¨£®à¨¬
|
||||
mov ecx,(palitra_w+4-(CELLW/3)) shl 16+CELLW
|
||||
y2_line:
|
||||
add ebx,(CELLW+1) shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® x
|
||||
for_loop:
|
||||
add ecx,(CELLW+1) shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® y
|
||||
int 0x40 ; <EFBFBD>à¥àë¢ ¨¥
|
||||
call sub_red
|
||||
dec edi ; “¬¥ìè ¥¬ áç¥â稪 ª®¯®ª
|
||||
cmp edi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_loop ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
call sub_green
|
||||
pop edi ; ˆ ç¥ ¢®ááâ ¢«¨¢ ¥¬ áç¥â稪 «¨¨©
|
||||
dec edi ; “¬¥ìè ¥¬ ¥£®
|
||||
cmp edi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_stolbik ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
call sub_blue
|
||||
;;pop esi ; ˆ ç¥ ¢®ááâ ¢«¨¢ ¥¬ áç¥â稪 «¨¨©
|
||||
dec esi ; “¬¥ìè ¥¬ ¥£®
|
||||
cmp esi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_abz ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_draw_palitra-------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
sub_red:
|
||||
;.................................................................................................
|
||||
; <EFBFBD> áçñâ ᬥ饨© ªà ᮣ® 梥⠢ £¥¥à 樨 梥⠯ «¨âàë
|
||||
;.................................................................................................
|
||||
push eax
|
||||
mov eax,[pnext]
|
||||
;sub_red_0 ; palitra
|
||||
cmp al,0
|
||||
jne sub_red_1
|
||||
sub edx,0x40
|
||||
jmp sub_red_e
|
||||
sub_red_1: ; random
|
||||
cmp al,1
|
||||
jne sub_red_2
|
||||
sub edx,0x20
|
||||
jmp sub_red_e
|
||||
sub_red_2: ; gree
|
||||
cmp al,2
|
||||
jne sub_red_3
|
||||
sub edx,0x010101
|
||||
jmp sub_red_e
|
||||
sub_red_3: ; red
|
||||
cmp al,3
|
||||
jne sub_red_4
|
||||
sub edx,0x0101
|
||||
jmp sub_red_e
|
||||
sub_red_4: ; green
|
||||
cmp al,4
|
||||
jne sub_red_5
|
||||
sub edx,0x010001
|
||||
jmp sub_red_e
|
||||
sub_red_5: ; blue
|
||||
cmp al,5
|
||||
jne sub_red_e
|
||||
sub edx,0x010100
|
||||
jmp sub_red_e
|
||||
sub_red_e:
|
||||
pop eax
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_sub_red------------------------------------------------------------------------------------------
|
||||
|
||||
sub_green:
|
||||
;.................................................................................................
|
||||
; <EFBFBD> áçñâ ᬥ饨© ªà ᮣ® 梥⠢ £¥¥à 樨 梥⠯ «¨âàë
|
||||
;.................................................................................................
|
||||
push eax
|
||||
mov eax,[pnext]
|
||||
;sub_green_0
|
||||
cmp al,0
|
||||
jne sub_green_1
|
||||
sub edx,0x4000
|
||||
jmp sub_green_e
|
||||
sub_green_1:
|
||||
cmp al,1
|
||||
jne sub_green_e
|
||||
sub edx,0x2000
|
||||
;jmp sub_green_e
|
||||
sub_green_e:
|
||||
pop eax
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_sub_green----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
sub_blue:
|
||||
;.................................................................................................
|
||||
; <EFBFBD> áçñâ ᬥ饨© ªà ᮣ® 梥⠢ £¥¥à 樨 梥⠯ «¨âàë
|
||||
;.................................................................................................
|
||||
push eax
|
||||
mov eax,[pnext]
|
||||
;sub_blue_0
|
||||
cmp al,0
|
||||
jne sub_blue_1
|
||||
sub edx,0x600000
|
||||
jmp sub_blue_e
|
||||
sub_blue_1:
|
||||
cmp al,1
|
||||
jne sub_blue_e
|
||||
sub edx,0x400000
|
||||
;jmp sub_blue_e
|
||||
sub_blue_e:
|
||||
pop eax
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_sub_blue-----------------------------------------------------------------------------------------
|
@ -1,3 +1,72 @@
|
||||
draw_result:
|
||||
;.................................................................................................
|
||||
; <EFBFBD>®«ìè ï à ¬ª ¢ë¢®¤ १ã«ìâ â
|
||||
;.................................................................................................
|
||||
mcall SF_DRAW_RECT, <4,110>, <9,219-18>, [sc.work_graph]
|
||||
mcall , <5,110-2>, <10,219-20>, [sc.work_light]
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª १ã«ìâ â 梥⠢ hex color2
|
||||
;.................................................................................................
|
||||
mcall , (16+2) shl 16+15, (16+8) shl 16+15, 0x222222
|
||||
; color 2 - draw color
|
||||
mcall , (17+2) shl 16+13, (17+8) shl 16+13, [color2]
|
||||
; color 1 - draw fringle
|
||||
mcall , (11+2) shl 16+15, (12+8) shl 16+15, 0x222222
|
||||
; color 2 - draw color
|
||||
mcall , (12+2) shl 16+13, (13+8) shl 16+13, [color]
|
||||
|
||||
; value - draw fringle
|
||||
mcall , (34+2) shl 16+72, (16+4) shl 16+15+4, 0x222222
|
||||
; value - draw background
|
||||
mcall , (35+2) shl 16+70, (17+4) shl 16+13+4, 0xFFFFFF
|
||||
|
||||
; ”ãªæ¨ï 47 - ¢ë¢®¤ ç¨á« ¢ ®ª®
|
||||
;ebx - ¯ à ¬¥âàë ¯à¥®¡à §®¢ ¨ï ç¨á« ¢ ⥪áâ (HEX)
|
||||
mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], <40,22>, 0x10000000, 0
|
||||
|
||||
; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
; edx - à¨á㥬 '#'
|
||||
; esi - ¤«¨ ⥪áâ ¢ ¡ ©â å
|
||||
;mcall SF_DRAW_TEXT,38*65536+20,0,hex,1
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª r g b § 票©
|
||||
;.................................................................................................
|
||||
call get_spectr
|
||||
|
||||
movzx eax,[cred] ; ªà áë©
|
||||
mov ebx,12*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[cgreen] ; §¥«¥ë©
|
||||
mov ebx,37*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[cblue] ; ᨨ©
|
||||
mov ebx,62*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[calpha] ; «ìä
|
||||
mov ebx,87*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
;.................................................................................................
|
||||
; ‚뢮¤¨¬ ¡ãª¢ë r g b a
|
||||
;.................................................................................................
|
||||
mov eax,SF_DRAW_TEXT ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
mov ebx,17 shl 16+DRAWY+37 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
mov ecx, 0x10000000 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
|
||||
add ecx, [sc.work_text]
|
||||
mov edx,cname ; 㪠§ ⥫ì ç «® áâப¨
|
||||
mov esi,1 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
newline: ; 横«
|
||||
int 0x40 ; <EFBFBD>à¥àë¢ ¨¥
|
||||
add ebx,25 shl 16 ; „®¡ ¢«ï¥¬
|
||||
inc edx ; „®¡ ¢«ï¥¬
|
||||
cmp [edx],byte 'x' ; ‘à ¢¥¨¥ á ¡ ©â®¬ å
|
||||
jne newline ; …᫨ ¥ ã«ì ¨«¨ ¥ à ¢®
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª á« ©¤¥à®¢
|
||||
;.................................................................................................
|
||||
@ -43,23 +112,23 @@
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ¯®«§ãª®¢
|
||||
;.................................................................................................
|
||||
mov ebx, 16*65536+16
|
||||
mov ecx, 61*65536+61
|
||||
mov ebx, 13*65536+13
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
movzx eax,[cred]
|
||||
call draw_slider
|
||||
|
||||
mov ebx, (16+25*1)*65536+(16+25*1)
|
||||
mov ecx, 61*65536+61
|
||||
mov ebx, (13+25*1)*65536+(13+25*1)
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
movzx eax,[cgreen]
|
||||
call draw_slider
|
||||
|
||||
mov ebx, (16+25*2)*65536+(16+25*2)
|
||||
mov ecx, 61*65536+61
|
||||
mov ebx, (13+25*2)*65536+(13+25*2)
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
movzx eax,[cblue]
|
||||
call draw_slider
|
||||
|
||||
mov ebx, (16+25*3)*65536+(16+25*3)
|
||||
mov ecx, 61*65536+61
|
||||
mov ebx, (13+25*3)*65536+(13+25*3)
|
||||
mov ecx, (61-3)*65536+(61-3)
|
||||
movzx eax,[calpha]
|
||||
call draw_slider
|
||||
|
||||
@ -115,13 +184,17 @@ or eax, edx
|
||||
sub ecx, eax
|
||||
add ecx, 127*65536+127
|
||||
|
||||
add ecx, 1*65536+2
|
||||
add ecx, 1*65536+5
|
||||
mcall SF_DRAW_LINE, , , 0
|
||||
add ebx, 9*65536+9
|
||||
add ebx, 15*65536+15
|
||||
int 0x40
|
||||
|
||||
sub ebx, 8*65536+1
|
||||
sub ecx, 1*65536+2
|
||||
sub ebx, 14*65536+1
|
||||
sub ecx, 1*65536+5
|
||||
int 0x40
|
||||
|
||||
mov edx, 0xFFFFFF
|
||||
add ecx, 1*65536+1
|
||||
int 0x40
|
||||
|
||||
mov edx, 0xE1E1E1
|
||||
@ -129,17 +202,17 @@ add ecx, 1*65536+1
|
||||
int 0x40
|
||||
add ecx, 1*65536+1
|
||||
int 0x40
|
||||
add ecx, 1*65536+1
|
||||
int 0x40
|
||||
|
||||
mov edx, 0xB9B9B9
|
||||
add ecx, 1*65536+1
|
||||
int 0x40
|
||||
|
||||
mov edx, 0
|
||||
add ecx, 1*65536+1
|
||||
int 0x40
|
||||
|
||||
shr ebx, 16
|
||||
shr ecx, 16
|
||||
dec ecx
|
||||
mcall SF_PUT_PIXEL, , , 0xF3F3F3
|
||||
int 0x40
|
||||
|
||||
ret
|
||||
|
||||
;end_slider
|
69
programs/media/palitra/branch/draw_utils.inc
Normal file
69
programs/media/palitra/branch/draw_utils.inc
Normal file
@ -0,0 +1,69 @@
|
||||
; DrawRectangle3D not work
|
||||
proc DrawRectangle3D, _x:word, _y:word, _w:word, _h:word, _color1:dword, _color2:dword
|
||||
mov ebx,dword[_w]
|
||||
add ebx,dword[_x] ;âăâ âŽçŽ Ş Ş ď-⎠¤¨çě... ㌎ ŻĽŕĽŻ¨á âě :)
|
||||
shl ebx,16
|
||||
mov bx,1
|
||||
mov ecx,dword[_h]
|
||||
inc cx
|
||||
mov edx,[_color2]
|
||||
mcall SF_DRAW_RECT ; x+w,y,1,h+1,color2
|
||||
rol ebx,16
|
||||
sub bx,[_w]
|
||||
ror ebx,16
|
||||
dec cx
|
||||
mov edx,[_color1]
|
||||
mcall ;SF_DRAW_RECT x,y,1,h,color1
|
||||
mov bx,[_h]
|
||||
xchg bx,cx
|
||||
mcall ;SF_DRAW_RECT x,y,w,1,color1
|
||||
rol ecx,16
|
||||
add cx,[_h]
|
||||
ror ecx,16
|
||||
mov edx,[_color2]
|
||||
mcall ;SF_DRAW_RECT x,y+h,w,1,color2
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
|
||||
proc DrawDeepRectangle, _x:word, _y:word, _w:word, _h:word, color1:dword, color2:dword
|
||||
pusha
|
||||
|
||||
movzx ebx, [_x]
|
||||
shl ebx, 16
|
||||
or ebx, dword[_x]
|
||||
add ebx, dword[_w]
|
||||
|
||||
movzx ecx, [_y]
|
||||
shl ecx, 16
|
||||
add ecx, dword[_y]
|
||||
|
||||
mcall SF_DRAW_LINE, , ,[color1] ; x+w,y,1,h+1,color2
|
||||
|
||||
sub ebx, dword[_w]
|
||||
add ecx, dword[_h]
|
||||
int 0x40
|
||||
|
||||
mov edx, dword[_w]
|
||||
shl edx, 16
|
||||
or edx, dword[_w]
|
||||
add ebx, edx
|
||||
mcall SF_DRAW_LINE, , ,[color2]
|
||||
|
||||
|
||||
|
||||
mov edx, dword[_w]
|
||||
shl edx, 16
|
||||
sub ebx, edx
|
||||
|
||||
mov edx, dword[_h]
|
||||
shl edx, 16
|
||||
add ecx, edx
|
||||
|
||||
mcall SF_DRAW_LINE, , ,[color2]
|
||||
|
||||
|
||||
popa
|
||||
ret
|
||||
endp
|
@ -74,16 +74,31 @@
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../dll.inc'
|
||||
|
||||
include 'draw_sliders.inc'
|
||||
include 'draw_utils.inc'
|
||||
include 'draw_palitra.inc'
|
||||
|
||||
|
||||
|
||||
WIN_W = 394 ; è¨à¨ ®ª
|
||||
WIN_H = 251 ; ¢ëá®â ®ª
|
||||
WIN_X = 250 ; ª®®à¤¨ â å ®ª
|
||||
WIN_Y = 190 ; ª®®à¤¨ â ã ®ª
|
||||
|
||||
CELLW = 8 ; not used yet, but has to be :)
|
||||
Left_Border=4
|
||||
SliderPanel_W = 110
|
||||
DRAWY = 9
|
||||
|
||||
CELLW = 11; 11 ; not used yet, but has to be :)
|
||||
|
||||
ICONX = WIN_W - 35
|
||||
SLIDEW = 25
|
||||
|
||||
palitra_x = Left_Border+SliderPanel_W+12
|
||||
palitra_w = CELLW*(8)+8+1
|
||||
palitra_xw = palitra_x shl 16 + palitra_w
|
||||
palitra_yw = DRAWY shl 16 + palitra_w
|
||||
|
||||
START:
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT ; ¨¨æ¨ «¨§ æ¨ï ªãç¨
|
||||
mcall SF_SYS_MISC, SSF_MEM_OPEN, i18_name
|
||||
@ -272,7 +287,7 @@ draw_main:
|
||||
call draw_palitra ; <20>ˆ‘“…Œ <20>€‹ˆ’<CB86>“
|
||||
call draw_result ; <20>ˆ‘“…Œ <20>…‡“‹œ’€’
|
||||
|
||||
mcall SF_DEFINE_BUTTON, <110,147>, <DRAWY,147>, 0x07+BT_HIDE
|
||||
mcall SF_DEFINE_BUTTON, <palitra_x,palitra_w*2+1 > , <DRAWY,palitra_w*2+2>, 0x07+BT_HIDE ; palitra
|
||||
|
||||
add edx,1++BT_NOFRAME
|
||||
mcall , <10,22>, <62,128> ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ red
|
||||
@ -296,31 +311,7 @@ draw_main:
|
||||
mcall SF_REDRAW,SSF_END_DRAW
|
||||
ret
|
||||
|
||||
proc DrawRectangle3D, _x:word, _w:word, _y:word, _h:word, color1:dword, color2:dword
|
||||
mov ebx,[_w]
|
||||
add ebx,[_x] ;âãâ â®ç® ª ª ï-â® ¤¨çì... 㦮 ¯¥à¥¯¨á âì :)
|
||||
shl ebx,16
|
||||
mov bx,1
|
||||
mov ecx,[_h]
|
||||
inc cx
|
||||
mov edx,[_color2]
|
||||
mcall SF_DRAW_RECT ; x+w,y,1,h+1,color2
|
||||
rol ebx,16
|
||||
sub bx,[_w]
|
||||
ror ebx,16
|
||||
dec cx
|
||||
mov edx,[_color1]
|
||||
mcall ;SF_DRAW_RECT x,y,1,h,color1
|
||||
mov bx,[_h]
|
||||
xchg bx,cx
|
||||
mcall ;SF_DRAW_RECT x,y,w,1,color1
|
||||
rol ecx,16
|
||||
add cx,[_h]
|
||||
ror ecx,16
|
||||
mov edx,[_color2]
|
||||
mcall ;SF_DRAW_RECT x,y+h,w,1,color2
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
;#___________________________________________________________________________________________________
|
||||
;****************************************************************************************************|
|
||||
@ -333,25 +324,33 @@ endp
|
||||
;.................................................................................................
|
||||
; button_next_colorsheme
|
||||
mcall SF_DEFINE_BUTTON, <ICONX,21>, <DRAWY,21>, 12+BT_HIDE
|
||||
; circle diagram
|
||||
add ecx,19 shl 16 ; move rect
|
||||
add edx,3 ; ID = 15
|
||||
mcall
|
||||
|
||||
; palitra button ; ID = 14
|
||||
mcall , ,(DRAWY+150) shl 16 + 21, 14+BT_HIDE
|
||||
|
||||
; pipet button ; ID = 15
|
||||
mcall , , (DRAWY+150) shl 16 + 21, 15+BT_HIDE
|
||||
|
||||
mov ebx,[icons18bg]
|
||||
add ebx,18*18*4*53
|
||||
mcall SF_PUT_IMAGE_EXT, ebx, <18,18>, <ICONX+2,DRAWY+2>, 32, 0, 0
|
||||
|
||||
add ebx,18*18*4*(39-53)
|
||||
mov edx,ICONX*65536+WIN_H-90
|
||||
mov edx,(ICONX+2)*65536+WIN_H-90
|
||||
mcall
|
||||
|
||||
mov ebx,[icons18]
|
||||
add ebx,18*18*4*(52-39)
|
||||
add ebx,18*18*4*(53-1)
|
||||
sub edx,40
|
||||
mcall
|
||||
|
||||
;stdcall DrawRectangle3D ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark] ;Leency: draw rectangle around the button, buggy now
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark]
|
||||
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY+110, 22, 22, [sc.work_light], [sc.work_dark]
|
||||
|
||||
stdcall DrawDeepRectangle, ICONX, DRAWY+150, 22, 22, [sc.work_light], [sc.work_dark]
|
||||
|
||||
;stdcall DrawRectangle3D, ICONX, DRAWY, 22, 22, [sc.work_light], [sc.work_dark] ;Leency: draw rectangle around the button, buggy now
|
||||
|
||||
;mov eax,13 ; draw rect
|
||||
;mov ebx,266 shl 16+16 ; [x] + [size]
|
||||
@ -395,7 +394,7 @@ endp
|
||||
;------------------------------------------------------------------------------------------------+
|
||||
draw_bottom_panel: ; Žâà¨á®¢ª ¨¦¥© ¯ ¥«¨
|
||||
;.................................................................................................
|
||||
mcall SF_DEFINE_BUTTON, ((60+70) shl 16)+90, (225 shl 16)+16, 14, [sc.work_button]
|
||||
mcall SF_DEFINE_BUTTON, ((60+70) shl 16)+90, ((WIN_H-26) shl 16)+16, 14, [sc.work_button]
|
||||
|
||||
add ebx, 100 shl 16
|
||||
add edx, 2
|
||||
@ -404,7 +403,7 @@ endp
|
||||
; Write string
|
||||
mov ecx,[sc.work_text] ; RGB
|
||||
or ecx, 1 shl 31
|
||||
mcall SF_DRAW_TEXT, (60) shl 16+230, ,bground
|
||||
mcall SF_DRAW_TEXT, (60) shl 16+(WIN_H-21), ,bground
|
||||
|
||||
mov ecx, [sc.work_button_text]
|
||||
or ecx, 1 shl 31
|
||||
@ -417,7 +416,7 @@ endp
|
||||
mov edx, bground2
|
||||
int 0x40
|
||||
|
||||
mcall SF_DRAW_LINE, 4 shl 16+(380), (219) shl 16+219, 0x00666666
|
||||
mcall SF_DRAW_LINE, 4 shl 16+(WIN_W-14), (WIN_H-32) shl 16+(WIN_H-32), 0x00666666
|
||||
ret ; return
|
||||
;.................................................................................................
|
||||
|
||||
@ -559,349 +558,10 @@ mouse_get:
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_mouse_get----------------------------------------------------------------------------------------
|
||||
|
||||
draw_palitra:
|
||||
; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
;mcall SF_DRAW_RECT, 110 shl 16+148, 9 shl 16+148, [sc.work]
|
||||
|
||||
cmp [renmode],2
|
||||
je cyrcle_draw
|
||||
;cmp [renmode],1
|
||||
;je picker_draw
|
||||
cmp [renmode],0
|
||||
je sheme_draw
|
||||
ret
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ªà㣮¢®© ¤¨ £à ¬¬ë
|
||||
;.................................................................................................
|
||||
cyrcle_draw:
|
||||
;mov eax,13
|
||||
;mov edx,0x666666
|
||||
;mov ebx,108*65536+152
|
||||
;mov ecx,125*65536+33
|
||||
;mcall
|
||||
;mov edx,0xF3F3F3
|
||||
;mov ebx,109*65536+150
|
||||
;mov ecx,126*65536+31
|
||||
;mcall
|
||||
|
||||
;mov eax,4 ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
;mov ebx,115 shl 16+131 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
;mov ecx,0x666666 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
|
||||
;mov edx,hint ; 㪠§ ⥫ì ç «® áâப¨
|
||||
;mov esi,24 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
;mcall
|
||||
;mov ebx,125 shl 16+144 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
;mov edx,hint2 ; 㪠§ ⥫ì ç «® áâப¨
|
||||
;mov esi,21 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
;mcall
|
||||
|
||||
;mov edx,[color]
|
||||
;mov ebx,109*65536+150
|
||||
;mov ecx, 10*65536+150
|
||||
;mcall
|
||||
call mouse_local ; ¯®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨ ®â®á¨â¥«ì® ®ª
|
||||
mov ecx, [mouse_x] ; § ®á¨¬ ¢ ॣ¨áâà
|
||||
mov edx, [mouse_y] ; § ®á¨¬ ¢ ॣ¨áâà
|
||||
cmp ecx, WIN_W-10
|
||||
jg cyrcle_draw_2
|
||||
cmp edx, WIN_H
|
||||
jle end_cyrcle_draw
|
||||
|
||||
cyrcle_draw_2:
|
||||
mcall SF_SLEEP,10
|
||||
call desktop_get
|
||||
call mouse_global
|
||||
|
||||
mov ebx,112*65536+11
|
||||
mov esi,0 ; counter=8
|
||||
circle_loop:
|
||||
mov ecx, 10*65536+11
|
||||
mov edi,0
|
||||
circle_loop2:
|
||||
call circle_pixel_read
|
||||
mcall SF_DRAW_RECT
|
||||
add ecx,11 shl 16
|
||||
inc edi
|
||||
cmp edi,13
|
||||
jne circle_loop2
|
||||
|
||||
add ebx,11 shl 16
|
||||
inc esi
|
||||
cmp esi,13
|
||||
jne circle_loop
|
||||
|
||||
mcall SF_DRAW_RECT, 177*65536+13, 76*65536+13, 0
|
||||
mov ecx, [mouse_x]
|
||||
mov edx, [mouse_y]
|
||||
inc ecx
|
||||
inc edx
|
||||
mov ebx, edx
|
||||
imul ebx, [desctop_w]
|
||||
add ebx, ecx
|
||||
mcall SF_GET_PIXEL
|
||||
mov edx,eax
|
||||
mcall SF_DRAW_RECT, 178*65536+11, 77*65536+11
|
||||
ret
|
||||
end_cyrcle_draw:
|
||||
mcall SF_DRAW_RECT, 111*65536+145, 9*65536+145, 0x666666
|
||||
ret
|
||||
|
||||
circle_pixel_read:
|
||||
push ecx ebx
|
||||
mov ecx, [mouse_x]
|
||||
mov edx, [mouse_y]
|
||||
inc ecx
|
||||
add ecx, esi
|
||||
cmp ecx, 6
|
||||
jl _cpr_exit
|
||||
sub ecx, 6
|
||||
inc edx
|
||||
add edx, edi
|
||||
cmp edx, 6
|
||||
jl _cpr_exit
|
||||
sub edx, 6
|
||||
|
||||
mov ebx, edx
|
||||
imul ebx, [desctop_w]
|
||||
add ebx, ecx
|
||||
mcall SF_GET_PIXEL
|
||||
mov edx,eax
|
||||
pop ebx ecx
|
||||
ret
|
||||
|
||||
_cpr_exit:
|
||||
xor edx,edx
|
||||
pop ebx ecx
|
||||
ret
|
||||
|
||||
;picker_draw:
|
||||
;ret
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ä® ¯®¤ ª®¯ª¨
|
||||
;.................................................................................................
|
||||
sheme_draw:
|
||||
mov eax,SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x222222 ; 梥â
|
||||
mov ecx,9 shl 16+73 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
mov esi,2 ; ‘ç¥â稪 «¨¨© ¯®¤«®¦¥ª
|
||||
re_draw:
|
||||
mov ebx,110 shl 16+73 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov edi,2 ; ‘ç¥â稪 ª®«¨ç¥á⢠¯®¤«®¦¥ª
|
||||
for_fon_loop:
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
add ebx,75 shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® å
|
||||
dec edi ; “¬¥ìè ¥¬ áç¥â稪 ª®¯®ª
|
||||
cmp edi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_fon_loop ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
dec esi ; “¬¥ìè ¥¬ ¥£®
|
||||
cmp esi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
mov ecx,84 shl 16+73 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
jnz re_draw ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ª®¯®ª ¯® 横«ã
|
||||
;.................................................................................................
|
||||
mov eax,SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x0FFFFFFF ; 梥â
|
||||
mov esi,4 ; ‘ç¥â稪 ª®«¨ç¥á⢠¡§ 楢 (#4,8)
|
||||
mov ebx,99 shl 16+8 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
for_abz:
|
||||
;;push esi ; ‘®åà 塞 § 票¥ áç¥â稪 «¨¨© ¢ á⥪
|
||||
cmp esi,2
|
||||
jne x2_line
|
||||
mov ebx,99 shl 16+8
|
||||
x2_line:
|
||||
add ebx,3 shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® x
|
||||
mov edi,8 ; ‘ç¥â稪 ª®«¨ç¥á⢠ª®¯®ª ¢ áâப¥
|
||||
for_stolbik:
|
||||
push edi ; ‘®åà 塞 § 票¥ áç¥â稪 «¨¨© ¢ á⥪
|
||||
mov edi,8 ; ‘ç¥â稪 ª®«¨ç¥á⢠ª®¯®ª ¢ áâப¥
|
||||
mov ecx, 1 shl 16+8 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
cmp esi,2
|
||||
jg y2_line ; …᫨ ¡®«ìè¥ 4 â® ¨£®à¨¬
|
||||
mov ecx,76 shl 16+8
|
||||
y2_line:
|
||||
add ebx,9 shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® x
|
||||
for_loop:
|
||||
add ecx,9 shl 16 ; ‘¬¥é ¥¬ ¯®«®¦¥¨¥ «¨¨¨ ¯® y
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
call sub_red
|
||||
dec edi ; “¬¥ìè ¥¬ áç¥â稪 ª®¯®ª
|
||||
cmp edi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_loop ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
call sub_green
|
||||
pop edi ; ˆ ç¥ ¢®ááâ ¢«¨¢ ¥¬ áç¥â稪 «¨¨©
|
||||
dec edi ; “¬¥ìè ¥¬ ¥£®
|
||||
cmp edi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_stolbik ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
call sub_blue
|
||||
;;pop esi ; ˆ ç¥ ¢®ááâ ¢«¨¢ ¥¬ áç¥â稪 «¨¨©
|
||||
dec esi ; “¬¥ìè ¥¬ ¥£®
|
||||
cmp esi,0 ; ‘à ¢¨¢ ¥¬ á ã«¥¬
|
||||
jnz for_abz ; …᫨ ¥ ®«ì â® ¢ ç «® 横«
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_draw_palitra-------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
sub_red:
|
||||
;.................................................................................................
|
||||
; <20> áçñâ ᬥ饨© ªà ᮣ® 梥⠢ £¥¥à 樨 梥⠯ «¨âàë
|
||||
;.................................................................................................
|
||||
push eax
|
||||
mov eax,[pnext]
|
||||
;sub_red_0 ; palitra
|
||||
cmp al,0
|
||||
jne sub_red_1
|
||||
sub edx,0x40
|
||||
jmp sub_red_e
|
||||
sub_red_1: ; random
|
||||
cmp al,1
|
||||
jne sub_red_2
|
||||
sub edx,0x20
|
||||
jmp sub_red_e
|
||||
sub_red_2: ; gree
|
||||
cmp al,2
|
||||
jne sub_red_3
|
||||
sub edx,0x010101
|
||||
jmp sub_red_e
|
||||
sub_red_3: ; red
|
||||
cmp al,3
|
||||
jne sub_red_4
|
||||
sub edx,0x0101
|
||||
jmp sub_red_e
|
||||
sub_red_4: ; green
|
||||
cmp al,4
|
||||
jne sub_red_5
|
||||
sub edx,0x010001
|
||||
jmp sub_red_e
|
||||
sub_red_5: ; blue
|
||||
cmp al,5
|
||||
jne sub_red_e
|
||||
sub edx,0x010100
|
||||
jmp sub_red_e
|
||||
sub_red_e:
|
||||
pop eax
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_sub_red------------------------------------------------------------------------------------------
|
||||
|
||||
sub_green:
|
||||
;.................................................................................................
|
||||
; <20> áçñâ ᬥ饨© ªà ᮣ® 梥⠢ £¥¥à 樨 梥⠯ «¨âàë
|
||||
;.................................................................................................
|
||||
push eax
|
||||
mov eax,[pnext]
|
||||
;sub_green_0
|
||||
cmp al,0
|
||||
jne sub_green_1
|
||||
sub edx,0x4000
|
||||
jmp sub_green_e
|
||||
sub_green_1:
|
||||
cmp al,1
|
||||
jne sub_green_e
|
||||
sub edx,0x2000
|
||||
;jmp sub_green_e
|
||||
sub_green_e:
|
||||
pop eax
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_sub_green----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
sub_blue:
|
||||
;.................................................................................................
|
||||
; <20> áçñâ ᬥ饨© ªà ᮣ® 梥⠢ £¥¥à 樨 梥⠯ «¨âàë
|
||||
;.................................................................................................
|
||||
push eax
|
||||
mov eax,[pnext]
|
||||
;sub_blue_0
|
||||
cmp al,0
|
||||
jne sub_blue_1
|
||||
sub edx,0x600000
|
||||
jmp sub_blue_e
|
||||
sub_blue_1:
|
||||
cmp al,1
|
||||
jne sub_blue_e
|
||||
sub edx,0x400000
|
||||
;jmp sub_blue_e
|
||||
sub_blue_e:
|
||||
pop eax
|
||||
ret ; ‚®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
;end_sub_blue-----------------------------------------------------------------------------------------
|
||||
|
||||
draw_result:
|
||||
;.................................................................................................
|
||||
; <20>®«ìè ï à ¬ª ¢ë¢®¤ १ã«ìâ â
|
||||
;.................................................................................................
|
||||
mcall SF_DRAW_RECT, <4,110>, <9,219-18>, [sc.work_graph]
|
||||
mcall , <5,110-2>, <10,219-20>, [sc.work_light]
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª १ã«ìâ â 梥⠢ hex color2
|
||||
;.................................................................................................
|
||||
mcall , (16+2) shl 16+15, (16+8) shl 16+15, 0x222222
|
||||
; color 2 - draw color
|
||||
mcall , (17+2) shl 16+13, (17+8) shl 16+13, [color2]
|
||||
; color 1 - draw fringle
|
||||
mcall , (11+2) shl 16+15, (12+8) shl 16+15, 0x222222
|
||||
; color 2 - draw color
|
||||
mcall , (12+2) shl 16+13, (13+8) shl 16+13, [color]
|
||||
|
||||
; value - draw fringle
|
||||
mcall , (34+2) shl 16+72, (16+4) shl 16+15+4, 0x222222
|
||||
; value - draw background
|
||||
mcall , (35+2) shl 16+70, (17+4) shl 16+13+4, 0xFFFFFF
|
||||
|
||||
; ”ãªæ¨ï 47 - ¢ë¢®¤ ç¨á« ¢ ®ª®
|
||||
;ebx - ¯ à ¬¥âàë ¯à¥®¡à §®¢ ¨ï ç¨á« ¢ ⥪áâ (HEX)
|
||||
mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], <40,22>, 0x10000000, 0
|
||||
|
||||
; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
; edx - à¨á㥬 '#'
|
||||
; esi - ¤«¨ ⥪áâ ¢ ¡ ©â å
|
||||
;mcall SF_DRAW_TEXT,38*65536+20,0,hex,1
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª r g b § 票©
|
||||
;.................................................................................................
|
||||
call get_spectr
|
||||
|
||||
movzx eax,[cred] ; ªà áë©
|
||||
mov ebx,12*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[cgreen] ; §¥«¥ë©
|
||||
mov ebx,37*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[cblue] ; ᨨ©
|
||||
mov ebx,62*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
movzx eax,[calpha] ; «ìä
|
||||
mov ebx,87*65536+196 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
call draw_value ; ¢ë¢®¤¨¬ १ã«ìâ â
|
||||
|
||||
;.................................................................................................
|
||||
; ‚뢮¤¨¬ ¡ãª¢ë r g b a
|
||||
;.................................................................................................
|
||||
mov eax,SF_DRAW_TEXT ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
mov ebx,17 shl 16+DRAWY+37 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
mov ecx, 0x10000000 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
|
||||
add ecx, [sc.work_text]
|
||||
mov edx,cname ; 㪠§ ⥫ì ç «® áâப¨
|
||||
mov esi,1 ; ¢ë¢®¤¨âì esi ᨬ¢®«®¢
|
||||
newline: ; 横«
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
add ebx,25 shl 16 ; „®¡ ¢«ï¥¬
|
||||
inc edx ; „®¡ ¢«ï¥¬
|
||||
cmp [edx],byte 'x' ; ‘à ¢¥¨¥ á ¡ ©â®¬ å
|
||||
jne newline ; …᫨ ¥ ã«ì ¨«¨ ¥ à ¢®
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª á« ©¤¥à®¢
|
||||
;.................................................................................................
|
||||
include 'draw_sliders.inc'
|
||||
|
||||
draw_value:
|
||||
;.................................................................................................
|
||||
|
Loading…
Reference in New Issue
Block a user