kolibrios-fun/programs/media/palitra/branch/draw_sliders.inc
Kirill Lipatov (Leency) 2325fc5d35 new palitra: update UI
git-svn-id: svn://kolibrios.org@9542 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-01-01 14:48:03 +00:00

221 lines
6.3 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

draw_result:
;.................................................................................................
; <EFBFBD>®«ěč ď ŕ ¬Ş  ˘ë˘®¤  १ă«ěâ â 
;.................................................................................................
mcall SF_DRAW_RECT, <4,110>, <9, 197>, [sc.work_graph]
mcall , <5,110-2>, <10,195>, [sc.work_light]
;.................................................................................................
; Žâŕ¨á®˘Ş  १ă«ěâ â  ć˘Ąâ  ˘ hex color2
;.................................................................................................
CURCOLX = 11
CURCOLY = 17
mcall , <CURCOLX+5,15>, <CURCOLY+4,15>, 0x222222
; color 2 - draw color
mcall , <CURCOLX+6,13>, <CURCOLY+5,13>, [color2]
; color 1 - draw fringle
mcall , <CURCOLX+0,15>, <CURCOLY+0,15>, 0x222222
; color 2 - draw color
mcall , <CURCOLX+1,13>, <CURCOLY+1,13>, [color]
; value - draw fringle
mcall , <CURCOLX+23,72>, <CURCOLY+0,19>, 0x222222
; value - draw background
mcall , <CURCOLX+24,70>, <CURCOLY+1,17>, 0xFFFFFF
; ”ă­Şć¨ď 47 - ˘ë˘®¤ ç¨á«  ˘ ®Ş­®
; ebx - Ż ŕ ¬Ąâŕë ŻŕĄ®ˇŕ §®˘ ­¨ď ç¨á«  ˘ ⥪áâ (HEX)
mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], <CURCOLX+27,CURCOLY+2>, 0x10000000, 0
; äă­Şć¨ď 4: ­ Ż¨á âě ⥪áâ ˘ ®Ş­Ą
; edx - ŕ¨á㥬 '#'
; esi - ¤«¨­  ⥪áâ  ˘ ˇ ©â ĺ
; mcall SF_DRAW_TEXT, <38,20>, 0, hex, 1
;.................................................................................................
; Žâŕ¨á®˘Ş  r g b §­ çĄ­¨©
;.................................................................................................
call get_spectr
movzx eax,[cred] ; Şŕ á­ë©
mov ebx,12*65536+190 ; [x ­ ç «ě­ë©] *65536 + [y ­ ç «ě­ë©]
call draw_value ; ˘ë˘®¤¨¬ १ă«ěâ â
movzx eax,[cgreen] ; §Ą«Ą­ë©
mov ebx,37*65536+190 ; [x ­ ç «ě­ë©] *65536 + [y ­ ç «ě­ë©]
call draw_value ; ˘ë˘®¤¨¬ १ă«ěâ â
movzx eax,[cblue] ; ᨭ¨©
mov ebx,62*65536+190 ; [x ­ ç «ě­ë©] *65536 + [y ­ ç «ě­ë©]
call draw_value ; ˘ë˘®¤¨¬ १ă«ěâ â
movzx eax,[calpha] ;  «ěä 
mov ebx,87*65536+190 ; [x ­ ç «ě­ë©] *65536 + [y ­ ç «ě­ë©]
call draw_value ; ˘ë˘®¤¨¬ १ă«ěâ â
;.................................................................................................
; ‚뢮¤¨¬ ˇăŞ˘ë r g b a
;.................................................................................................
mov eax,SF_DRAW_TEXT ; 4 - ˘ë˘Ąá⨠áâபă ⥪áâ  ˘ ®Ş­®
mov ebx,18 shl 16+DRAWY+32 ; [Ş®®ŕ¤¨­ â  Ż® ®á¨ x]*65536 + [Ş®®ŕ¤¨­ â  Ż® ®á¨ y]
mov ecx, 0x00000000 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
add ecx, [sc.work_text]
mov edx,cname ; 㪠§ âĄ«ě ­  ­ ç «® áâப¨
mov esi,1 ; ˘ë˘®¤¨âě esi ᨬ˘®«®˘
newline: ; 横«
int 0x40 ; ŹŕĄŕ뢠­¨Ą
add ebx,25 shl 16 ; „®ˇ ˘«ďĄ¬
inc edx ; „®ˇ ˘«ďĄ¬
cmp [edx],byte 'x' ; ‘ŕ ˘­Ą­¨Ą á ˇ ©â®¬ ĺ
jne newline ; …᫨ ­Ą ­ă«ě ¨«¨ ­Ą ŕ ˘­®
;.................................................................................................
; Žâŕ¨á®˘Ş  á« ©¤Ąŕ®˘
;.................................................................................................
; ”ă­Şć¨ď 13 - ­ ŕ¨á®˘ âě Żŕאַ㣮«ě­¨Ş
mov ebx, 18*65536+18
mov ecx, 55*65536+55
push dword 0xFC5663
push dword 0xFA0919
push dword 0xE20516
push dword 0xFA0919
call Draw_base
add ebx, 20*65536+20
push dword 0x33F742
push dword 0x0ADD18
push dword 0x08CE19
push dword 0x08CE19
call Draw_base
add ebx, 20*65536+20
push dword 0x88A6FF
push dword 0x3366FF
push dword 0x114DFF
push dword 0x114DFF
call Draw_base
add ebx, 20*65536+20
push dword 0xDADADA
push dword 0xB9B9B9
push dword 0xA9A9A9
push dword 0xA9A9A9
call Draw_base
;.................................................................................................
; Žâŕ¨á®˘Ş  Ż®«§ă­Ş®˘
;.................................................................................................
mov ebx, 13*65536+13
mov ecx, (55-3)*65536+(55-3)
movzx eax,[cred]
call draw_slider
mov ebx, (13+25*1)*65536+(13+25*1)
mov ecx, (55-3)*65536+(55-3)
movzx eax,[cgreen]
call draw_slider
mov ebx, (13+25*2)*65536+(13+25*2)
mov ecx, (55-3)*65536+(55-3)
movzx eax,[cblue]
call draw_slider
mov ebx, (13+25*3)*65536+(13+25*3)
mov ecx, (55-3)*65536+(55-3)
movzx eax,[calpha]
call draw_slider
ret ; ‚®§˘ŕ é Ą¬ ăŻŕ ˘«Ą­¨Ą
;end_draw_result
Draw_base:
push ebp
mov ebp, esp
add ebx, 1*65536+4
mcall SF_DRAW_LINE, , , 0
add ecx, 128*65536+128
int 0x40
sub ebx, 1*65536+4
sub ecx, (128-1)*65536+1
int 0x40
add ebx, 1*65536+1
mov edx, dword [ebp+20]
int 0x40
add ebx, 1*65536+1
mov edx, dword [ebp+16]
int 0x40
add ebx, 1*65536+1
mov edx, dword [ebp+12]
int 0x40
add ebx, 1*65536+1
mov edx, dword [ebp+8]
int 0x40
add ebx, 1*65536+1
mov edx, 0
int 0x40
sub ecx, 1*65536+(128-1)
pop ebp
ret 4*4
draw_slider:
shr eax, 1
mov edx, eax
shl edx, 16
or eax, edx
sub ecx, eax
add ecx, 127*65536+127
add ecx, 1*65536+5
mcall SF_DRAW_LINE, , , 0
add ebx, 15*65536+15
int 0x40
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
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
ret
;end_slider