KIV: save desktop image set by IgorA

Palitra: save desktop colors set by IgorA
Docky: no close by Alt+F4
IconNew: fix system hang when use an icon with number >99 by GerdtR
Gears (TinyGL asm): add key description to window, uncomment zoom code, add key shortcut "+" for zoom-in
TinyGL asm images: much better compression, for instance, TEXT_2.PNG from 235Kb to 106Kb without any visible degradation


git-svn-id: svn://kolibrios.org@7421 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2018-10-01 15:18:07 +00:00
parent 01ba9472ef
commit dd9e50c167
8 changed files with 243 additions and 279 deletions

View File

@ -149,7 +149,14 @@ key:
cmp ah,27 ;Esc cmp ah,27 ;Esc
je button.exit je button.exit
cmp ah,61 ;+ cmp ah,43 ;+
jne @f
fld dword[scale]
fdiv dword[delt_sc]
fstp dword[scale]
call draw_3d
@@:
cmp ah,61 ;=
jne @f jne @f
fld dword[scale] fld dword[scale]
fdiv dword[delt_sc] fdiv dword[delt_sc]
@ -208,7 +215,7 @@ title1: db 'TinyGL in KolibriOS'
.end: db 0 .end: db 0
title2: db 'F full screen' title2: db 'F full screen'
.end: db 0 .end: db 0
title3: db 'ESC - exit' title3: db 'ESC - exit Arrow keys - rotate +/- zoom'
.end: db 0 .end: db 0
fps: db 'FPS:' fps: db 'FPS:'
.end: db 0 .end: db 0
@ -222,7 +229,7 @@ draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT
stdcall [glPushMatrix] stdcall [glPushMatrix]
;stdcall [glScalef], [scale], [scale], [scale] stdcall [glScalef], [scale], [scale], [scale]
stdcall [glRotatef], [view_rotx], 1.0, 0.0, 0.0 stdcall [glRotatef], [view_rotx], 1.0, 0.0, 0.0
stdcall [glRotatef], [view_roty], 0.0, 1.0, 0.0 stdcall [glRotatef], [view_roty], 0.0, 1.0, 0.0
stdcall [glRotatef], [view_rotz], 0.0, 0.0, 1.0 stdcall [glRotatef], [view_rotz], 0.0, 0.0, 1.0
@ -283,7 +290,7 @@ draw_3d:
align 4 align 4
an_9 dd 9.0 an_9 dd 9.0
an_25 dd 25.0 an_25 dd 25.0
scale dd 0.14 ;??? scale dd 1.0 ;???
delt_sc dd 0.85 ;??? delt_sc dd 0.85 ;???
delt_size dd 5.0 delt_size dd 5.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

@ -4,7 +4,7 @@ use32
org 0x0 org 0x0
db 'MENUET01' db 'MENUET01'
dd 0x01, START, I_END, F_END, stacktop, @PARAMS, 0x0 dd 0x01, START, I_END, F_END, stacktop, @PARAMS, sys_path
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
@ -503,6 +503,32 @@ set_as_bgr:
@@: @@:
mcall SF_BACKGROUND_SET, SSF_REDRAW_BG mcall SF_BACKGROUND_SET, SSF_REDRAW_BG
;save to file eskin.ini
xor al,al
mov ecx,1024
mov edi,sys_path+2
repne scasb
sub edi,sys_path+3
invoke ini_set_str, inifileeskin, amain, aprogram, sys_path+2, edi
;add param '\S__'
cmp word[@PARAMS],'\S'
je @f
mov esi, @PARAMS+4096-8
mov edi, @PARAMS+4096-4
mov ecx, 4096/4-1
std
rep movsd
cld
mov dword[@PARAMS],'\S__'
@@:
;
xor al,al
mov ecx,4096
mov edi,@PARAMS
repne scasb
sub edi,@PARAMS+1
invoke ini_set_str, inifileeskin, amain, aparam, @PARAMS, edi
ret ret
slide_show: slide_show:
@ -1217,7 +1243,8 @@ import libimg , \
img.draw , 'img_draw' img.draw , 'img_draw'
import libini, \ import libini, \
ini_get_shortcut, 'ini_get_shortcut' ini_get_shortcut, 'ini_get_shortcut',\
ini_set_str, 'ini_set_str'
import sort, sort.START, 'START', SortDir, 'SortDir', strcmpi, 'strcmpi' import sort, sort.START, 'START', SortDir, 'SortDir', strcmpi, 'strcmpi'
@ -1279,6 +1306,11 @@ aPrev db 'Prev',0
aSlide db 'SlideShow',0 aSlide db 'SlideShow',0
aTglbar db 'ToggleBar',0 aTglbar db 'ToggleBar',0
inifileeskin db '/sys/settings/eskin.ini',0
amain db 'main',0
aprogram db 'program',0
aparam db 'param',0
align 4 align 4
check_modifier_table: check_modifier_table:
dd check_modifier_0 dd check_modifier_0
@ -1385,10 +1417,12 @@ tglbar_key dd ?
toolbar_height_old rd 1 toolbar_height_old rd 1
procinfo process_information procinfo process_information
align 16
path: rb 4096 ;1024+16 path: rb 4096 ;1024+16
real_header rb 256 real_header rb 256
@PARAMS rb 4096 ;512 @PARAMS rb 4096 ;512
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
sys_path rb 1024
temp_dir_pach: temp_dir_pach:
rb 4096 rb 4096
;--------------------------------------------------------------------- ;---------------------------------------------------------------------

View File

@ -65,18 +65,14 @@
; ‡€ƒŽ‹Ž‚ŽŠ ˆ<CB86>Ž<C5BD>Ÿ…ŒŽƒŽ ”€‰‹€ <20><>ˆŽ†…<E280A0>ˆŸ „‹Ÿ ŠŽˆ<E280B9><CB86>ˆ Ž‘ | ; ‡€ƒŽ‹Ž‚ŽŠ ˆ<CB86>Ž<C5BD>Ÿ…ŒŽƒŽ ”€‰‹€ <20><>ˆŽ†…<E280A0>ˆŸ „‹Ÿ ŠŽˆ<E280B9><CB86>ˆ Ž‘ |
;----------------------------------------------------------------------------------------------------/ ;----------------------------------------------------------------------------------------------------/
use32 use32
org 0x0 org 0
db 'MENUET01' db 'MENUET01'
dd 0x01 dd 1,START,I_END,I_MEM,stacktop,params,sys_path
dd START
dd I_END
dd I_MEM
dd I_MEM
dd params
dd 0x0
include '../../../macros.inc' include '../../../macros.inc'
include '../../../proc32.inc' include '../../../proc32.inc'
include '../../../KOSfuncs.inc'
include '../../../dll.inc'
WIN_W equ 295 ; è¨à¨­  ®ª­  WIN_W equ 295 ; è¨à¨­  ®ª­ 
WIN_H equ 195 ; ¢ëá®â  ®ª­  WIN_H equ 195 ; ¢ëá®â  ®ª­ 
@ -87,8 +83,11 @@ panel:
file "panel.raw" file "panel.raw"
START: START:
mcall 68,11 ; ¨­¨æ¨ «¨§ æ¨ï ªãç¨ mcall SF_SYS_MISC,SSF_HEAP_INIT ; ¨­¨æ¨ «¨§ æ¨ï ªãç¨
mcall 40,0x27 ; ãáâ ­ ¢«¨¢ ¥¬ ¬ áªã ᮡë⨩ stdcall dll.Load, @IMPORT
or eax,eax
jnz bexit
mcall SF_SET_EVENTS_MASK,0x27 ; ãáâ ­ ¢«¨¢ ¥¬ ¬ áªã ᮡë⨩
include 'params_init.inc' ; ®¡à ¡®âª  ¯ à ¬¥â஢ ª®¬ ­¤­®© áâப¨ include 'params_init.inc' ; ®¡à ¡®âª  ¯ à ¬¥â஢ ª®¬ ­¤­®© áâப¨
;#___________________________________________________________________________________________________ ;#___________________________________________________________________________________________________
@ -98,7 +97,7 @@ START:
red: red:
call draw_main ; ¢ë§ë¢ ¥¬ ¯¥à¥à¨á®¢ªã ®ª­  ¯à¨«®¦¥­¨ï call draw_main ; ¢ë§ë¢ ¥¬ ¯¥à¥à¨á®¢ªã ®ª­  ¯à¨«®¦¥­¨ï
still: still:
mcall 10 ; äã­ªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï mcall SF_WAIT_EVENT ; äã­ªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï
cmp eax,1 ; ¯¥à¥à¨á®¢ âì ®ª­® ? cmp eax,1 ; ¯¥à¥à¨á®¢ âì ®ª­® ?
je red ; ¥á«¨ ¤  - ­  ¬¥âªã red je red ; ¥á«¨ ¤  - ­  ¬¥âªã red
cmp eax,2 ; ­ ¦ â  ª« ¢¨è  ? cmp eax,2 ; ­ ¦ â  ª« ¢¨è  ?
@ -111,7 +110,7 @@ still:
;end_still ;end_still
key: ; ­ ¦ â  ª« ¢¨è  ­  ª« ¢¨ âãॠkey: ; ­ ¦ â  ª« ¢¨è  ­  ª« ¢¨ âãà¥
mcall 2 ; äã­ªæ¨ï 2 - áç¨â âì ª®¤ ᨬ¢®«  (¢ ah) (âãâ ¢ ¯à¨­æ¨¯¥ ­¥ ­ã¦­ ) mcall SF_GET_KEY ; äã­ªæ¨ï 2 - áç¨â âì ª®¤ ᨬ¢®«  (¢ ah) (âãâ ¢ ¯à¨­æ¨¯¥ ­¥ ­ã¦­ )
jmp still ; ¢¥à­ãâìáï ª ­ ç «ã 横«  jmp still ; ¢¥à­ãâìáï ª ­ ç «ã 横« 
;end_key ;end_key
@ -121,7 +120,7 @@ mouse:
call cyrcle_draw call cyrcle_draw
jmp center jmp center
left: left:
mcall 37,2 mcall SF_MOUSE_GET,SSF_BUTTON
cmp al,1b cmp al,1b
jne right jne right
mov [mouse_f],1 mov [mouse_f],1
@ -132,7 +131,7 @@ mouse:
mov [mouse_f],2 mov [mouse_f],2
jmp still jmp still
center: center:
mcall 37,2 mcall SF_MOUSE_GET,SSF_BUTTON
cmp al,100b cmp al,100b
jne still jne still
mov [mouse_f],3 mov [mouse_f],3
@ -142,7 +141,7 @@ mouse:
;end_mouse ;end_mouse
button: button:
mcall 17 ; 17 - ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨ mcall SF_GET_BUTTON ; 17 - ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
cmp ah, 1 ; ¥á«¨ ­ ¦ â  ª­®¯ª  á ­®¬¥à®¬ 1, cmp ah, 1 ; ¥á«¨ ­ ¦ â  ª­®¯ª  á ­®¬¥à®¬ 1,
jz bexit ; ¢ë室¨¬ jz bexit ; ¢ë室¨¬
;®¡à ¡®âª  ª­®¯ª¨ Next ;®¡à ¡®âª  ª­®¯ª¨ Next
@ -222,7 +221,7 @@ button:
call set_spectr call set_spectr
jmp still ; “室¨¬ ­  ®¦¨¤ ­¨¥ ¤à㣮£® ᮡëâ¨ï jmp still ; “室¨¬ ­  ®¦¨¤ ­¨¥ ¤à㣮£® ᮡëâ¨ï
bexit: bexit:
mcall -1 ; ¨­ ç¥ ª®­¥æ ¯à®£à ¬¬ë mcall SF_TERMINATE_PROCESS ; ¨­ ç¥ ª®­¥æ ¯à®£à ¬¬ë
;end_button ;end_button
;#___________________________________________________________________________________________________ ;#___________________________________________________________________________________________________
@ -230,19 +229,14 @@ button:
; ƒ<E282AC>‰ ŒŽ„“‹œ Ž<C5BD>ˆŽŠˆ ŽŠ<C5BD>ˆ <20>…Œ…<C592>Ž <20><>ˆŽ†…<E280A0>ˆŸ | ; ƒ<E282AC>‰ ŒŽ„“‹œ Ž<C5BD>ˆŽŠˆ ŽŠ<C5BD>ˆ <20>…Œ…<C592>Ž <20><>ˆŽ†…<E280A0>ˆŸ |
;----------------------------------------------------------------------------------------------------/ ;----------------------------------------------------------------------------------------------------/
draw_main: draw_main:
mov eax,12 ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­® ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­®
mov ebx,1 ; 1,­ ç «® à¨á®¢ ­¨ï mcall SF_REDRAW,SSF_BEGIN_DRAW
int 0x40 ; <20>à¥à뢠­¨¥
mov eax,48 ; ”ã­ªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥­¨ï ®ª®­ ; ”ã­ªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥­¨ï ®ª®­
mov ebx,3 ; <20>®¤äã­ªæ¨ï 3 - ¯®«ãç¨âì áâ ­¤ àâ­ë¥ æ¢¥â  ®ª®­. mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
mov ecx,sc ; “ª § â¥«ì ­  ¡ãä¥à à §¬¥à®¬ edx ¡ ©â, ¯®¤ áâàãªâãàã
mov edx,sizeof.system_colors ; <20> §¬¥à â ¡«¨æë 梥⮢ (¤®«¦¥­ ¡ëâì 40 ¡ ©â)
int 0x40 ; <20>à¥à뢠­¨¥
mov eax,48 ; ”ã­ªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥­¨ï ®ª®­. ; ”ã­ªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥­¨ï ®ª®­
mov ebx,4 ; <20>®¤äã­ªæ¨ï 4 - ¢®§¢à é ¥â eax = ¢ëá®â  ᪨­ . mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
int 0x40 ; <20>à¥à뢠­¨¥
mov ecx,eax ; ‡ ¯®¬¨­ ¥¬ ¢ëá®âã ᪨­  mov ecx,eax ; ‡ ¯®¬¨­ ¥¬ ¢ëá®âã ᪨­ 
mov edi,[runmode] mov edi,[runmode]
@ -271,16 +265,11 @@ draw_main:
call draw_palitra ; <20>ˆ“…Œ <20>ˆ<CB86> call draw_palitra ; <20>ˆ“…Œ <20>ˆ<CB86>
call draw_result ; <20>ˆ“…Œ <20>…‡“œ call draw_result ; <20>ˆ“…Œ <20>…‡“œ
mov eax,8 ; ”ã­ªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª­®¯ªã ; ”ã­ªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª­®¯ªã
mov ebx,110 shl 16+147 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® å [ª-â  x]*65536 + [à §¬¥à] mcall SF_DEFINE_BUTTON, (110 shl 16)+147, (9 shl 16)+147, 0x60000007
mov ecx,9 shl 16+147 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
mov edx,0x60000007 ; <20> ç «ì­®¥ ID ª­®¯®ª - 0xXYnnnnnn
int 0x40
mov ebx,13 shl 16+12 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® å [ª-â  x]*65536 + [à §¬¥à] inc edx
mov edx,0x60000008 ; ID = 8 mcall , (13 shl 16)+12, (51 shl 16)+85 ; <20>¨á㥬 ­¥¢¨¤¨¬ãî ª­®¯ªã ¯®¤ á« ©¤¥à®¬ red
mov ecx,51 shl 16+85 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>¨á㥬 ­¥¢¨¤¨¬ãî ª­®¯ªã ¯®¤ á« ©¤¥à®¬ red
add ebx,23 shl 16 ; „®¡ ¢«ï¥¬ add ebx,23 shl 16 ; „®¡ ¢«ï¥¬
inc edx ; ID = 9 inc edx ; ID = 9
int 0x40 ; <20>¨á㥬 ­¥¢¨¤¨¬ãî ª­®¯ªã ¯®¤ á« ©¤¥à®¬ green int 0x40 ; <20>¨á㥬 ­¥¢¨¤¨¬ãî ª­®¯ªã ¯®¤ á« ©¤¥à®¬ green
@ -291,18 +280,14 @@ draw_main:
inc edx ; ID = 11 inc edx ; ID = 11
int 0x40 ; <20>¨á㥬 ­¥¢¨¤¨¬ãî ª­®¯ªã ¯®¤ á« ©¤¥à®¬ alpha int 0x40 ; <20>¨á㥬 ­¥¢¨¤¨¬ãî ª­®¯ªã ¯®¤ á« ©¤¥à®¬ alpha
mov eax,8 ; ”ã­ªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª­®¯ªã (Œ…<C592>€ –‚…’€) ; ”ã­ªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª­®¯ªã (Œ…<C592>€ –‚…’€)
mov ebx,11 shl 16+20 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® å [ª-â  x]*65536 + [à §¬¥à] mcall , (11 shl 16)+20, (12 shl 16)+20, 0x6000000D
mov ecx,12 shl 16+20 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
mov edx,0x6000000D ; ID = 13
int 0x40
call draw_bottom_panel call draw_bottom_panel
call draw_left_panel call draw_left_panel
mov eax,12 ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­® ; äã­ªæ¨ï 12: ®§­ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª­®
mov ebx,2 ; 2 - ª®­¥æ à¨á®¢ ­¨ï mcall SF_REDRAW,SSF_END_DRAW
int 0x40 ; <20>à¥à뢠­¨¥
ret ret
;#___________________________________________________________________________________________________ ;#___________________________________________________________________________________________________
@ -314,22 +299,14 @@ draw_main:
;------------------------------------------------------------------------------------------------+ ;------------------------------------------------------------------------------------------------+
draw_left_panel: ; Žâà¨á®¢ª  ¡®ª®¢®© ¯ ­¥«¨ draw_left_panel: ; Žâà¨á®¢ª  ¡®ª®¢®© ¯ ­¥«¨
;................................................................................................. ;.................................................................................................
mov eax,8 ; button_next_colorsheme ; button_next_colorsheme
mov ebx,266 shl 16+16 ; [x] + [size] mcall SF_DEFINE_BUTTON, (266 shl 16)+16, (9 shl 16)+16, 0x6000000C, [sc.work_button]
mov ecx,9 shl 16+16 ; [y] + [size]
mov edx,0x6000000C ; ID = 12
mov esi,[sc.work_button] ; RGB
int 0x40 ; call
; circle diagram ; circle diagram
add ecx,19 shl 16 ; move rect add ecx,19 shl 16 ; move rect
mov edx,0x6000000F ; ID = 15 mov edx,0x6000000F ; ID = 15
int 0x40 ; call int 0x40 ; call
mov eax,7 ; 7 - ­®¬¥à ä㭪樨 mcall SF_PUT_IMAGE, panel, (16 shl 16)+149, (266 shl 16)+9
mov ebx,panel ; 㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨¥ ¢ ä®à¬ â¥ BBGGRRBBGGRR...
mov ecx, 16 shl 16 + 149 ; [à §¬¥à ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ y]
mov edx,266 shl 16 + 9 ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
int 0x40
;mov eax,13 ; draw rect ;mov eax,13 ; draw rect
;mov ebx,266 shl 16+16 ; [x] + [size] ;mov ebx,266 shl 16+16 ; [x] + [size]
@ -373,23 +350,16 @@ draw_main:
;------------------------------------------------------------------------------------------------+ ;------------------------------------------------------------------------------------------------+
draw_bottom_panel: ; Žâà¨á®¢ª  ­¨¦­¥© ¯ ­¥«¨ draw_bottom_panel: ; Žâà¨á®¢ª  ­¨¦­¥© ¯ ­¥«¨
;................................................................................................. ;.................................................................................................
mov eax,8 ; draw button mcall SF_DEFINE_BUTTON, (92 shl 16)+90, (169 shl 16)+16, 14, [sc.work_button]
mov ebx,(92) shl 16+90 ; [x] + [size]
mov ecx,169 shl 16+16 ; [y] + [size]
mov edx,14 ; ID = 14
mov esi,[sc.work_button] ; RGB
int 0x40 ; call
add ebx, 100 shl 16 add ebx, 100 shl 16
add edx, 2 add edx, 2
int 0x40 int 0x40
mov eax,4 ; Write string ; Write string
mov ebx,(113 - 104) shl 16+174 ; [x] + [y]
mov ecx,[sc.work_text] ; RGB mov ecx,[sc.work_text] ; RGB
or ecx, 1 shl 31 or ecx, 1 shl 31
mov edx,bground ; string pointer mcall SF_DRAW_TEXT, (113 - 104) shl 16+174, ,bground
int 0x40 ; call
mov ecx, [sc.work_button_text] mov ecx, [sc.work_button_text]
or ecx, 1 shl 31 or ecx, 1 shl 31
@ -402,11 +372,7 @@ draw_main:
mov edx, bground2 mov edx, bground2
int 0x40 int 0x40
mov eax,38 ; draw line mcall SF_DRAW_LINE, 4 shl 16+282, 163 shl 16+163, 0x00666666
mov ebx,4 shl 16+282 ; [start x] + [end x]
mov ecx,163 shl 16+163 ; [start y] + [end y]
mov edx,0x00666666 ; RGB
int 0x40 ; call
ret ; return ret ; return
;................................................................................................. ;.................................................................................................
@ -414,9 +380,8 @@ mouse_global:
;................................................................................................. ;.................................................................................................
; <20>®«ãç ¥¬ ª®®à¤¨­ âë ¬ëè¨ ; <20>®«ãç ¥¬ ª®®à¤¨­ âë ¬ëè¨
;................................................................................................. ;.................................................................................................
mov eax,37 ; ”ã­ªæ¨ï 37 - à ¡®â  á ¬ëèìî mcall SF_MOUSE_GET,SSF_SCREEN_POSITION
mov ebx,0 ; ­ ¬ ­ã¦­ë £«®¡ «ì­ë¥ ª®®à¤¨­ âë ; eax = x*65536 + y, (x,y)=ª®®à¤¨­ âë ªãàá®à  ¬ëè¨
int 0x40 ; eax = x*65536 + y, (x,y)=ª®®à¤¨­ âë ªãàá®à  ¬ëè¨
mov ecx,eax ; mov ecx,eax ;
shr ecx,16 ; ecx = x+1 shr ecx,16 ; ecx = x+1
movzx edx,ax ; edx = y+1 movzx edx,ax ; edx = y+1
@ -431,9 +396,8 @@ mouse_local:
;................................................................................................. ;.................................................................................................
; <20>®«ãç ¥¬ ª®®à¤¨­ âë ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­  ; <20>®«ãç ¥¬ ª®®à¤¨­ âë ¬ëè¨ ®â­®á¨â¥«ì­® ®ª­ 
;................................................................................................. ;.................................................................................................
mov eax,37 ; ”ã­ªæ¨ï 37 - à ¡®â  á ¬ëèìî mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
mov ebx,1 ; ­ ¬ ­ã¦­ë £«®¡ «ì­ë¥ ª®®à¤¨­ âë ; eax = x*65536 + y, (x,y)=ª®®à¤¨­ âë ªãàá®à  ¬ëè¨
int 0x40 ; eax = x*65536 + y, (x,y)=ª®®à¤¨­ âë ªãàá®à  ¬ëè¨
mov ecx,eax ; mov ecx,eax ;
shr ecx,16 ; ecx = x+1 shr ecx,16 ; ecx = x+1
movzx edx,ax ; edx = y+1 movzx edx,ax ; edx = y+1
@ -448,16 +412,14 @@ set_background:
;................................................................................................. ;.................................................................................................
; “áâ ­ ¢«¨¢ ¥â ä®­ à ¡®ç¥£® á⮫  ; “áâ ­ ¢«¨¢ ¥â ä®­ à ¡®ç¥£® á⮫ 
;................................................................................................. ;.................................................................................................
mov eax,15 ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®© ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®©
mov ebx,4 ; <20>®¤äã­ªæ¨ï 4 - ãáâ ­®¢¨âì ०¨¬ ®âà¨á®¢ª¨ ä®­ . ; <20>®¤äã­ªæ¨ï 4 - ãáâ ­®¢¨âì ०¨¬ ®âà¨á®¢ª¨ ä®­ .
mov ecx,2 ; <20>¥¦¨¬ ®âà¨á®¢ª¨ - § ¬®áâ¨âì (1) ; <20>¥¦¨¬ ®âà¨á®¢ª¨ - § ¬®áâ¨âì (1), à áâï­ãâì (2)
int 0x40 ; ‚ë§ë¢ ¥¬ mcall SF_BACKGROUND_SET,SSF_MODE_BG,2
mov eax,15 ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®© ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®©
mov ebx,1 ; <20>®¤äã­ªæ¨ï 1 - ãáâ ­®¢¨âì à §¬¥à ä®­®¢®£® ¨§®¡à ¦¥­¨ï. ; <20>®¤äã­ªæ¨ï 1 - ãáâ ­®¢¨âì à §¬¥à ä®­®¢®£® ¨§®¡à ¦¥­¨ï.
mov ecx,2 ; ˜¨à¨­  ¨§®¡à ¦¥­¨ï mcall SF_BACKGROUND_SET,SSF_SIZE_BG,2,2
mov edx,2 ; ‚ëá®â  ¨§®¡à ¦¥­¨ï
int 0x40 ; ‚ë§ë¢ ¥¬
mov eax,[color] mov eax,[color]
mov [cm+0],al mov [cm+0],al
@ -479,16 +441,68 @@ set_background:
mov [cm+5],al mov [cm+5],al
mov [cm+8],al mov [cm+8],al
mov eax,15 ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®© ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®©
mov ebx,5 ; <20>®¤äã­ªæ¨ï 5 - ¯®¬¥áâ¨âì ¡«®ª ¯¨ªá¥«¥© ­  ä®­. ; <20>®¤äã­ªæ¨ï 5 - ¯®¬¥áâ¨âì ¡«®ª ¯¨ªá¥«¥© ­  ä®­.
mov ecx,cm ; “ª § â¥«ì ­  ¤ ­­ë¥ ¢ ä®à¬ â¥ BBGGRRBBGGRR ; - “ª § â¥«ì ­  ¤ ­­ë¥ ¢ ä®à¬ â¥ BBGGRRBBGGRR
mov edx,0 ; C¬¥é¥­¨¥ ¢ ¤ ­­ëå ä®­®¢®£® ¨§®¡à ¦¥­¨ï ; - C¬¥é¥­¨¥ ¢ ¤ ­­ëå ä®­®¢®£® ¨§®¡à ¦¥­¨ï
mov esi,3*4 ; <20> §¬¥à ¤ ­­ëå ¢ ¡ ©â å = 3 * ç¨á«® ¯¨ªá¥«¥© ; - <20> §¬¥à ¤ ­­ëå ¢ ¡ ©â å = 3 * ç¨á«® ¯¨ªá¥«¥©
int 0x40 ; ‚ë§ë¢ ¥¬ mcall SF_BACKGROUND_SET,SSF_IMAGE_BG,cm,0,3*4
mov eax,15 ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®© ; ”ã­ªæ¨ï 15 - à ¡®â  á ä®­®¢®© £à ä¨ª®©
mov ebx,3 ; <20>®¤äã­ªæ¨ï 3 - ¯¥à¥à¨á®¢ âì ä®­. ; <20>®¤äã­ªæ¨ï 3 - ¯¥à¥à¨á®¢ âì ä®­.
int 0x40 ; ‚ë§ë¢ ¥¬ mcall SF_BACKGROUND_SET,SSF_REDRAW_BG
;save to file eskin.ini
xor al,al
mov ecx,1024
mov edi,sys_path+2
repne scasb
sub edi,sys_path+3
invoke ini_set_str, inifileeskin, amain, aprogram, sys_path+2, edi
;add param 'H '
mov word[params],'H '
mov eax,[color]
or eax,0xf ;¤«ï ¨§¡¥¦ ­¨ï ¢¥ç­®£® 横«  ¥á«¨ eax=0
mov edi,params+2
@@:
rol eax,8
or al,al
jnz @f
mov word[edi],'00' ;­ã«¨ ¯¥à¥¤ ç¨á«®¬
add edi,2
jmp @b
@@:
and al,0xf0
jnz @f
mov byte[edi],'0'
inc edi
@@:
mov eax,[color]
mov ebx,16
call int2ascii
mov byte[params+10],' '
;add color2
mov eax,[color2]
or eax,0xf ;¤«ï ¨§¡¥¦ ­¨ï ¢¥ç­®£® 横«  ¥á«¨ eax=0
mov edi,params+11
@@:
rol eax,8
or al,al
jnz @f
mov word[edi],'00' ;­ã«¨ ¯¥à¥¤ ç¨á«®¬
add edi,2
jmp @b
@@:
and al,0xf0
jnz @f
mov byte[edi],'0'
inc edi
@@:
mov eax,[color2]
mov ebx,16
call int2ascii
invoke ini_set_str, inifileeskin, amain, aparam, params, 19
ret ret
;end_set_background ;end_set_background
@ -497,8 +511,8 @@ desktop_get:
;................................................................................................. ;.................................................................................................
; Ž¯à¥¤¥«ï¥¬ è¨à¨­ã íªà ­  ; Ž¯à¥¤¥«ï¥¬ è¨à¨­ã íªà ­ 
;................................................................................................. ;.................................................................................................
mov eax,14 ; Ž¯à¥¤¥«ï¥¬ è¨à¨­ã íªà ­  (eax = [xsize]*65536 + [ysize]) ; Ž¯à¥¤¥«ï¥¬ è¨à¨­ã íªà ­  (eax = [xsize]*65536 + [ysize])
int 0x40 ; xsize = à §¬¥à ¯® £®à¨§®­â «¨ - 1 mcall SF_GET_SCREEN_SIZE ; xsize = à §¬¥à ¯® £®à¨§®­â «¨ - 1
mov ebx,eax ; mov ebx,eax ;
shr ebx,16 ; ebx = xsize-1 shr ebx,16 ; ebx = xsize-1
movzx edx,ax ; edx = ysize-1 («¨è­¨© ª®¤) movzx edx,ax ; edx = ysize-1 («¨è­¨© ª®¤)
@ -521,9 +535,8 @@ mouse_get:
;................................................................................................. ;.................................................................................................
; <20>¥à¥¬ 梥â á ¯ «¨âàë ¢ ¯¥à¥¬¥­­ãî ; <20>¥à¥¬ 梥â á ¯ «¨âàë ¢ ¯¥à¥¬¥­­ãî
;................................................................................................. ;.................................................................................................
mov eax,35 ; ”ã­ªæ¨ï ¢§ïâ¨ï æ¢¥â  ;mov ebx,ecx ;; ebx = y*xsize+x («¨è­¨© ª®¤)
;mov ebx,ecx ;; ebx = y*xsize+x («¨è­¨© ª®¤) mcall SF_GET_PIXEL ; <20>®«ãç ¥¬ 梥⠢ eax
int 0x40 ; <20>®«ãç ¥¬ 梥⠢ eax
cmp eax,[sc.work] ; ‘à ¢­¨¢ ¥¬ á ä®­®¬ ¯à¨«®¦¥­¨ï cmp eax,[sc.work] ; ‘à ¢­¨¢ ¥¬ á ä®­®¬ ¯à¨«®¦¥­¨ï
je mouse_err ; …᫨ íâ® ®­ - â® ­¨ç¥£® ­¥ ¤¥« ¥¬ je mouse_err ; …᫨ íâ® ®­ - â® ­¨ç¥£® ­¥ ¤¥« ¥¬
cmp eax,0x222222 ; ‘à ¢­¨¢ ¥¬ á 梥⮬ á¥âª¨ cmp eax,0x222222 ; ‘à ¢­¨¢ ¥¬ á 梥⮬ á¥âª¨
@ -552,11 +565,8 @@ mouse_get:
;end_mouse_get---------------------------------------------------------------------------------------- ;end_mouse_get----------------------------------------------------------------------------------------
draw_palitra: draw_palitra:
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
mov ebx,110 shl 16+148 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à] mcall SF_DRAW_RECT, 110 shl 16+148, 9 shl 16+148, [sc.work]
mov ecx,9 shl 16+148 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
mov edx,[sc.work] ; 梥â
int 0x40
cmp [renmode],2 cmp [renmode],2
je cyrcle_draw je cyrcle_draw
@ -604,7 +614,7 @@ draw_palitra:
jle end_cyrcle_draw jle end_cyrcle_draw
cyrcle_draw_2: cyrcle_draw_2:
mcall 5,10 mcall SF_SLEEP,10
call desktop_get call desktop_get
call mouse_global call mouse_global
@ -614,9 +624,8 @@ draw_palitra:
mov ecx, 10*65536+11 mov ecx, 10*65536+11
mov edi,0 mov edi,0
circle_loop2: circle_loop2:
mov eax,13
call circle_pixel_read call circle_pixel_read
mcall mcall SF_DRAW_RECT
add ecx,11 shl 16 add ecx,11 shl 16
inc edi inc edi
cmp edi,13 cmp edi,13
@ -627,12 +636,7 @@ draw_palitra:
cmp esi,13 cmp esi,13
jne circle_loop jne circle_loop
mcall SF_DRAW_RECT, 177*65536+13, 76*65536+13, 0
mov eax,13
mov edx,0x0
mov ebx,177*65536+13
mov ecx, 76*65536+13
mcall
mov ecx, [mouse_x] mov ecx, [mouse_x]
mov edx, [mouse_y] mov edx, [mouse_y]
inc ecx inc ecx
@ -640,26 +644,16 @@ draw_palitra:
mov ebx, edx mov ebx, edx
imul ebx, [desctop_w] imul ebx, [desctop_w]
add ebx, ecx add ebx, ecx
mov eax, 35 mcall SF_GET_PIXEL
mcall
mov edx,eax mov edx,eax
mov eax,13 mcall SF_DRAW_RECT, 178*65536+11, 77*65536+11
mov ebx,178*65536+11
mov ecx, 77*65536+11
mcall
ret ret
end_cyrcle_draw: end_cyrcle_draw:
mov eax,13 mcall SF_DRAW_RECT, 111*65536+145, 9*65536+145, 0x666666
mov edx,0x666666
mov ebx,111*65536+145
mov ecx, 9*65536+145
mcall
ret ret
circle_pixel_read: circle_pixel_read:
push ecx push ecx ebx
push ebx
push eax
mov ecx, [mouse_x] mov ecx, [mouse_x]
mov edx, [mouse_y] mov edx, [mouse_y]
inc ecx inc ecx
@ -676,19 +670,14 @@ draw_palitra:
mov ebx, edx mov ebx, edx
imul ebx, [desctop_w] imul ebx, [desctop_w]
add ebx, ecx add ebx, ecx
mov eax, 35 mcall SF_GET_PIXEL
mcall
mov edx,eax mov edx,eax
pop eax pop ebx ecx
pop ebx
pop ecx
ret ret
_cpr_exit: _cpr_exit:
mov edx,0x00000000 xor edx,edx
pop eax pop ebx ecx
pop ebx
pop ecx
ret ret
;picker_draw: ;picker_draw:
@ -698,7 +687,7 @@ draw_palitra:
; Žâà¨á®¢ª  ä®­  ¯®¤ ª­®¯ª¨ ; Žâà¨á®¢ª  ä®­  ¯®¤ ª­®¯ª¨
;................................................................................................. ;.................................................................................................
sheme_draw: sheme_draw:
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª mov eax,SF_DRAW_RECT ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
mov edx,0x222222 ; 梥â mov edx,0x222222 ; 梥â
mov ecx,9 shl 16+73 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à] mov ecx,9 shl 16+73 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
mov esi,2 ; ‘ç¥â稪 «¨­¨© ¯®¤«®¦¥ª mov esi,2 ; ‘ç¥â稪 «¨­¨© ¯®¤«®¦¥ª
@ -719,7 +708,7 @@ draw_palitra:
;................................................................................................. ;.................................................................................................
; Žâà¨á®¢ª  ª­®¯®ª ¯® 横«ã ; Žâà¨á®¢ª  ª­®¯®ª ¯® 横«ã
;................................................................................................. ;.................................................................................................
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª mov eax,SF_DRAW_RECT ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
mov edx,0x0FFFFFFF ; 梥â mov edx,0x0FFFFFFF ; 梥â
mov esi,4 ; ‘ç¥â稪 ª®«¨ç¥á⢠  ¡§ æ¥¢ (#4,8) mov esi,4 ; ‘ç¥â稪 ª®«¨ç¥á⢠  ¡§ æ¥¢ (#4,8)
mov ebx,99 shl 16+8 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à] mov ebx,99 shl 16+8 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
@ -849,64 +838,33 @@ draw_result:
;................................................................................................. ;.................................................................................................
; <20>®«ìè ï à ¬ª  ¢ë¢®¤  १ã«ìâ â  ; <20>®«ìè ï à ¬ª  ¢ë¢®¤  १ã«ìâ â 
;................................................................................................. ;.................................................................................................
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª mcall SF_DRAW_RECT, 4 shl 16+98, 9 shl 16+148, 0x00666666
mov edx,0x00666666 ; 梥â-®¡¢®¤ª¨ mcall , 5 shl 16+96, 10 shl 16+146, 0x00F3F3F3
mov ebx,4 shl 16+98 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,9 shl 16+148 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40
mov edx,0x00F3F3F3 ; 梥â-ä®­ 
mov ebx,5 shl 16+96 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,10 shl 16+146 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40
;................................................................................................. ;.................................................................................................
; Žâà¨á®¢ª  १ã«ìâ â  æ¢¥â  ¢ hex color2 ; Žâà¨á®¢ª  १ã«ìâ â  æ¢¥â  ¢ hex color2
;................................................................................................. ;.................................................................................................
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª mcall , 16 shl 16+15, 16 shl 16+15, 0x222222
; color 2 - draw fringle
mov edx,0x222222 ; 梥â-®¡¢®¤ª¨
mov ebx,16 shl 16+15 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,16 shl 16+15 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>à¥à뢠­¨¥ (®á à¨áã¥â ¯àאַ㣮«ì­¨ª)
; color 2 - draw color ; color 2 - draw color
mov edx,[color2] ; 梥â mcall , 17 shl 16+13, 17 shl 16+13, [color2]
mov ebx,17 shl 16+13 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,17 shl 16+13 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>à¥à뢠­¨¥ (®á à¨áã¥â ¯àאַ㣮«ì­¨ª)
; color 1 - draw fringle ; color 1 - draw fringle
mov edx,0x222222 ; 梥â-®¡¢®¤ª¨ mcall , 11 shl 16+15, 12 shl 16+15, 0x222222
mov ebx,11 shl 16+15 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,12 shl 16+15 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>à¥à뢠­¨¥ (®á à¨áã¥â ¯àאַ㣮«ì­¨ª)
; value - draw fringle ; value - draw fringle
mov ebx,34 shl 16+62 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à] mcall , 34 shl 16+62, 16 shl 16+15
mov ecx,16 shl 16+15 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>à¥à뢠­¨¥ (®á à¨áã¥â ¯àאַ㣮«ì­¨ª)
; color 2 - draw color ; color 2 - draw color
mov edx,[color] ; 梥â mcall , 12 shl 16+13, 13 shl 16+13, [color]
mov ebx,12 shl 16+13 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,13 shl 16+13 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>à¥à뢠­¨¥ (®á à¨áã¥â ¯àאַ㣮«ì­¨ª)
; value - draw background ; value - draw background
mov edx,0xFFFFFF ; 梥â-ä®­  mcall , 35 shl 16+60, 17 shl 16+13, 0xFFFFFF
mov ebx,35 shl 16+60 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,17 shl 16+13 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40 ; <20>à¥à뢠­¨¥ (®á à¨áã¥â ¯àאַ㣮«ì­¨ª)
mov eax,47 ; ”ã­ªæ¨ï 47 - ¢ë¢®¤ ç¨á«  ¢ ®ª­® ; ”ã­ªæ¨ï 47 - ¢ë¢®¤ ç¨á«  ¢ ®ª­®
mov ecx,[color] ; ç¨á«® (¯à¨ bl=0) ¨«¨ 㪠§ â¥«ì (¯à¨ bl=1) ;ebx - ¯ à ¬¥âàë ¯à¥®¡à §®¢ ­¨ï ç¨á«  ¢ ⥪áâ (HEX)
mov esi,0x0 ; 0xX0RRGGBB mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], (45 shl 16)+20,, 0
mov ebx,256+8 shl 16 ; ¯ à ¬¥âàë ¯à¥®¡à §®¢ ­¨ï ç¨á«  ¢ ⥪áâ (HEX)
mov edx,45 shl 16+20 ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
int 0x40 ; <20>à¥à뢠­¨¥ - ¢ë¢®¤¨¬ १ã«ìâ â ¢ ®ª­® (HEX)
mov eax,4 ; äã­ªæ¨ï 4: ­ ¯¨á âì ⥪áâ ¢ ®ª­¥ ; äã­ªæ¨ï 4: ­ ¯¨á âì ⥪áâ ¢ ®ª­¥
mov ebx,38*65536+20 ; [x ­ ç «ì­ë©] *65536 + [y ­ ç «ì­ë©] ; edx - à¨á㥬 '#'
mov ecx,0x0 ; 梥â ⥪áâ  RRGGBB ; esi - ¤«¨­  ⥪áâ  ¢ ¡ ©â å
mov edx,hex ; à¨á㥬 '#' mcall SF_DRAW_TEXT,38*65536+20,0,hex,1
mov esi,1 ; ¤«¨­  ⥪áâ  ¢ ¡ ©â å
int 0x40
;................................................................................................. ;.................................................................................................
; Žâà¨á®¢ª  r g b §­ ç¥­¨© ; Žâà¨á®¢ª  r g b §­ ç¥­¨©
@ -932,7 +890,7 @@ draw_result:
;................................................................................................. ;.................................................................................................
; ‚뢮¤¨¬ ¡ãª¢ë r g b a ; ‚뢮¤¨¬ ¡ãª¢ë r g b a
;................................................................................................. ;.................................................................................................
mov eax,4 ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ  ¢ ®ª­® mov eax,SF_DRAW_TEXT ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ  ¢ ®ª­®
mov ebx,16 shl 16+40 ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y] mov ebx,16 shl 16+40 ; [ª®®à¤¨­ â  ¯® ®á¨ x]*65536 + [ª®®à¤¨­ â  ¯® ®á¨ y]
mov ecx,0x0 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ ) mov ecx,0x0 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
mov edx,cname ; 㪠§ â¥«ì ­  ­ ç «® áâப¨ mov edx,cname ; 㪠§ â¥«ì ­  ­ ç «® áâப¨
@ -940,18 +898,15 @@ draw_result:
newline: ; 横« newline: ; 横«
int 0x40 ; <20>à¥à뢠­¨¥ int 0x40 ; <20>à¥à뢠­¨¥
add ebx,23 shl 16 ; „®¡ ¢«ï¥¬ add ebx,23 shl 16 ; „®¡ ¢«ï¥¬
add edx,1 ; „®¡ ¢«ï¥¬ inc edx ; „®¡ ¢«ï¥¬
cmp [edx],byte 'x' ; ‘à ¢­¥­¨¥ á ¡ ©â®¬ å cmp [edx],byte 'x' ; ‘à ¢­¥­¨¥ á ¡ ©â®¬ å
jne newline ; …᫨ ­¥ ­ã«ì ¨«¨ ­¥ à ¢­® jne newline ; …᫨ ­¥ ­ã«ì ¨«¨ ­¥ à ¢­®
;................................................................................................. ;.................................................................................................
; Žâà¨á®¢ª  á« ©¤¥à®¢ ; Žâà¨á®¢ª  á« ©¤¥à®¢
;................................................................................................. ;.................................................................................................
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
mov edx,0x222222 ; 梥â-®¡¢®¤ª¨ mcall SF_DRAW_RECT, 16 shl 16+4, 51 shl 16+86, 0x222222
mov ebx,16 shl 16+4 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,51 shl 16+86 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40
add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à] add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à]
int 0x40 int 0x40
add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à] add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à]
@ -959,10 +914,7 @@ draw_result:
add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à] add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à]
int 0x40 int 0x40
mov edx,0xFA0919 ; 梥â-®¡¢®¤ª¨ mcall , 17 shl 16+2, 52 shl 16+84, 0xFA0919
mov ebx,17 shl 16+2 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  x]*65536 + [à §¬¥à]
mov ecx,52 shl 16+84 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® y [ª-â  y]*65536 + [à §¬¥à]
int 0x40
mov edx,0x08CE19 ; 梥â-®¡¢®¤ª¨ mov edx,0x08CE19 ; 梥â-®¡¢®¤ª¨
add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à] add ebx,23 shl 16 ; <20> ç «ì­ë¥ ª®®à¤¨­ âë ¯® x [ª-â  y]*65536 + [à §¬¥à]
int 0x40 int 0x40
@ -1000,10 +952,9 @@ draw_slider:
mov cl,136 ; ­¨¦­ïï â®çª  ¯®«§ã­ª  mov cl,136 ; ­¨¦­ïï â®çª  ¯®«§ã­ª 
sub cl,al ; cl=cl-al sub cl,al ; cl=cl-al
shl ecx,16 shl ecx,16
add ecx,1 ; § ¤ ¥¬ ­ ç «ì­®¥ ¯®«®¦¥­¨¥ inc ecx ; § ¤ ¥¬ ­ ç «ì­®¥ ¯®«®¦¥­¨¥
mov eax,13 ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª mcall SF_DRAW_RECT ; ”ã­ªæ¨ï 13 - ­ à¨á®¢ âì ¯àאַ㣮«ì­¨ª
int 0x40 push ebx ; á®å࠭塞 ¤«ï á«¥¤ãî饣® ¯®«§ã­ª  x+w
push ebx ; á®å࠭塞 ¤«ï á«¥¤ãî饣® ¯®«§ã­ª  x+w
sub ebx,8 ; â ª ª ª è¨à¨­  «¨­¨¨ 11 â® ®â­¨¬ ¥¬ 8 çâ®¡ë ªã¡¨ª áâ « è¨à¨­®© 3 sub ebx,8 ; â ª ª ª è¨à¨­  «¨­¨¨ 11 â® ®â­¨¬ ¥¬ 8 çâ®¡ë ªã¡¨ª áâ « è¨à¨­®© 3
add ebx,8 shl 16 ; Š®®à¤¨­ âë ¯® x ¤«ï ª¢ ¤à â  ­  ¯®«§ã­ª¥ ᬥ頥¬ ­  8 ¢ ¯à ¢® add ebx,8 shl 16 ; Š®®à¤¨­ âë ¯® x ¤«ï ª¢ ¤à â  ­  ¯®«§ã­ª¥ ᬥ頥¬ ­  8 ¢ ¯à ¢®
inc ecx ; ¡ë¤«®ª®¤¨¬ ¢ëá®âã ¯®«§ã­ª  ¤® 3-å (1+1=2) inc ecx ; ¡ë¤«®ª®¤¨¬ ¢ëá®âã ¯®«§ã­ª  ¤® 3-å (1+1=2)
@ -1020,9 +971,9 @@ draw_value:
;................................................................................................. ;.................................................................................................
push ebx ; á®å࠭塞 ¯à¨á« ­­ë¥ ª®®à¤¨­ âë push ebx ; á®å࠭塞 ¯à¨á« ­­ë¥ ª®®à¤¨­ âë
mov ebx,10 ; ãáâ ­ ¢«¨¢ ¥¬ ®á­®¢ ­¨¥ á¨á⥬ë áç¨á«¥­¨ï mov ebx,10 ; ãáâ ­ ¢«¨¢ ¥¬ ®á­®¢ ­¨¥ á¨á⥬ë áç¨á«¥­¨ï
mov edi,buff ; 㪠§ â¥«ì ­  áâப㠡ãä¥à  mov edi,buff ; 㪠§ â¥«ì ­  áâப㠡ãä¥à 
call int2ascii ; ª®­¢¥àâ¨à㥬 ç¨á«® ¨ «®¦¨¬ ª ª áâப㠢 ¡ãä¥à + esi ¤«¨­  call int2ascii ; ª®­¢¥àâ¨à㥬 ç¨á«® ¨ «®¦¨¬ ª ª áâப㠢 ¡ãä¥à + esi ¤«¨­ 
mov eax,4 ; äã­ªæ¨ï 4: ­ ¯¨á âì ⥪áâ ¢ ®ª­¥ mov eax,SF_DRAW_TEXT ; äã­ªæ¨ï 4: ­ ¯¨á âì ⥪áâ ¢ ®ª­¥
pop ebx ; ¤®áâ ¥¬ ¨§ á⥪  ¯à¨á« ­­ë¥ ª®®à¤¨­ âë pop ebx ; ¤®áâ ¥¬ ¨§ á⥪  ¯à¨á« ­­ë¥ ª®®à¤¨­ âë
cmp esi,2 ; <E28093><EFBFBD>ˆ<EFBFBD>Ž<E2809A>ˆ… ’…Š‘’€ cmp esi,2 ; <E28093><EFBFBD>ˆ<EFBFBD>Ž<E2809A>ˆ… ’…Š‘’€
jne draw_value_1 jne draw_value_1
@ -1041,58 +992,22 @@ draw_value:
_read_params: _read_params:
mov al,[params+2] mov eax,dword[params+2]
mov [params_c+0],al mov dword[params_c+0],eax
mov al,[params+3] mov eax,dword[params+6]
mov [params_c+1],al mov dword[params_c+4],eax
mov al,[params+4]
mov [params_c+2],al
mov al,[params+5]
mov [params_c+3],al
mov al,[params+6]
mov [params_c+4],al
mov al,[params+7]
mov [params_c+5],al
mov al,[params+8]
mov [params_c+6],al
mov al,[params+9]
mov [params_c+7],al
mov esi,params_c mov esi,params_c
mov ecx,16 mov ecx,16
call ascii2int call ascii2int
mov [color],eax mov [color],eax
mov al,[params+11] mov eax,dword[params+11]
mov [params_c+0],al mov dword[params_c+0],eax
mov al,[params+12] mov eax,dword[params+15]
mov [params_c+1],al mov dword[params_c+4],eax
mov al,[params+13]
mov [params_c+2],al
mov al,[params+14]
mov [params_c+3],al
mov al,[params+15]
mov [params_c+4],al
mov al,[params+16]
mov [params_c+5],al
mov al,[params+17]
mov [params_c+6],al
mov al,[params+18]
mov [params_c+7],al
mov esi,params_c mov esi,params_c
mov ecx,16 mov ecx,16
@ -1122,7 +1037,7 @@ int2ascii:
; ebx - ®á­®¢ ­¨¥ á¨á⥬ë áç¨á«¥­¨ï ; ebx - ®á­®¢ ­¨¥ á¨á⥬ë áç¨á«¥­¨ï
; edi - 㪠§ â¥«ì ­  áâப㠡ãä¥à  ; edi - 㪠§ â¥«ì ­  áâப㠡ãä¥à 
; ‚®§¢à é ¥â § ¯®«­¥­­ë© ¡ãä¥à ¨ esi - ¤«¨­  áâப¨ ; ‚®§¢à é ¥â § ¯®«­¥­­ë© ¡ãä¥à ¨ esi - ¤«¨­  áâப¨
;pushad push edi
xor esi,esi ; § ­ã«ï¥¬ áç¥â稪 ᨬ¢®«®¢ xor esi,esi ; § ­ã«ï¥¬ áç¥â稪 ᨬ¢®«®¢
convert_loop: convert_loop:
xor edx,edx ; § ­ã«ï¥¬ ॣ¨áâà ¯®¤ ®áâ â®ª xor edx,edx ; § ­ã«ï¥¬ ॣ¨áâà ¯®¤ ®áâ â®ª
@ -1140,9 +1055,8 @@ int2ascii:
test esi,esi ; ¥á«¨ ¥áâì çâ® ¤®áâ ¢ âì ¨§ á⥪  test esi,esi ; ¥á«¨ ¥áâì çâ® ¤®áâ ¢ âì ¨§ á⥪ 
jnz write_loop ; â® ¤®áâ ñ¬ jnz write_loop ; â® ¤®áâ ñ¬
mov byte [edi],0 ; ¨­ ç¥ ¤®¯¨áë뢠¥¬ ­ã«¥¢®© ¡ ©â mov byte [edi],0 ; ¨­ ç¥ ¤®¯¨áë뢠¥¬ ­ã«¥¢®© ¡ ©â
;popad ; ¢®ááâ ­ ¢«¨¢ ¥¬ §­ ç¥­¨ï ॣ¨áâ஢ pop edi
; ª®¤ ­¨¦¥ ­¥ ¨¬¥¥â ­¨ç¥£® ®¡é¥£® ª ä㭪樨, ¯à®áâ® ¢®§¢à é ¥â ¥é¥ ¤«¨­­ã ¯®«ã祭­®© áâப¨ ; ª®¤ ­¨¦¥ ­¥ ¨¬¥¥â ­¨ç¥£® ®¡é¥£® ª ä㭪樨, ¯à®áâ® ¢®§¢à é ¥â ¥é¥ ¤«¨­­ã ¯®«ã祭­®© áâப¨
mov edi,buff ; 㪠§ â¥«ì ­  ­ ç «® ⥪áâ 
call str_len call str_len
mov esi,eax mov esi,eax
ret ; ¨ ¢®§¢à é ¥¬ ã¯à ¢«¥­¨¥ ret ; ¨ ¢®§¢à é ¥¬ ã¯à ¢«¥­¨¥
@ -1227,9 +1141,7 @@ str_len:
;................................................................................................. ;.................................................................................................
; ®¯à¥¤¥«ï¥â ¤«¨­ã áâப¨ (¢å®¤->EDI ZS offset ; ¢ë室->EAX ZS length) ; ®¯à¥¤¥«ï¥â ¤«¨­ã áâப¨ (¢å®¤->EDI ZS offset ; ¢ë室->EAX ZS length)
;................................................................................................. ;.................................................................................................
push ecx push ecx esi edi
push esi
push edi
cld cld
xor al, al xor al, al
@ -1240,9 +1152,7 @@ str_len:
mov eax, edi mov eax, edi
dec eax dec eax
pop edi pop edi esi ecx
pop esi
pop ecx
ret ret
;end_str_len ;end_str_len
@ -1287,8 +1197,8 @@ str_len:
endp endp
set_background2: set_background2:
mcall 68, 11 mcall SF_SYS_MISC, SSF_HEAP_INIT
mcall 68, 12, 256 * 256 * 3 mcall SF_SYS_MISC, SSF_MEM_ALLOC, 256 * 256 * 3
mov [image], eax mov [image], eax
mov edx, eax mov edx, eax
@ -1309,12 +1219,12 @@ set_background2:
add edx, 3 add edx, 3
loop @b loop @b
mcall 15, 1, 256, 256 mcall SF_BACKGROUND_SET, SSF_SIZE_BG, 256, 256
mcall 15, 4, 1 mcall SF_BACKGROUND_SET, SSF_MODE_BG, 1
mcall 15, 5, [image], 0, 256 * 256 * 3 mcall SF_BACKGROUND_SET, SSF_IMAGE_BG, [image], 0, 256 * 256 * 3
mcall 15, 3 mcall SF_BACKGROUND_SET, SSF_REDRAW_BG
mcall 68, 13, [image] mcall SF_SYS_MISC, SSF_MEM_FREE, [image]
ret ret
;#___________________________________________________________________________________________________ ;#___________________________________________________________________________________________________
@ -1322,7 +1232,7 @@ ret
; <20>ŽŠ <20><EFBFBD>…Œ…<C592><E280A6>ˆ ŠŽ<C5A0><E28099> | ; <20>ŽŠ <20><EFBFBD>…Œ…<C592><E280A6>ˆ ŠŽ<C5A0><E28099> |
;----------------------------------------------------------------------------------------------------/ ;----------------------------------------------------------------------------------------------------/
circle: circle:
title db 'Palitra v0.76',0 ; åà ­¨â ¨¬ï ¯à®£à ¬¬ë title db 'Palitra v0.77',0 ; åà ­¨â ¨¬ï ¯à®£à ¬¬ë
hidden db 'Hidden',0 hidden db 'Hidden',0
hex db '#',0 ; ¤«ï ¢ë¢®¤  à¥èñ⪨ ª ª ⥪áâ  hex db '#',0 ; ¤«ï ¢ë¢®¤  à¥èñ⪨ ª ª ⥪áâ 
cname db 'RGBAx' ; åà ­¨â à §àï¤ë 梥⮢ (red,green,blue) x-¬¥âª  ª®­æ  cname db 'RGBAx' ; åà ­¨â à §àï¤ë 梥⮢ (red,green,blue) x-¬¥âª  ª®­æ 
@ -1334,7 +1244,19 @@ circle:
runmode dd 1 ; ०¨¬ § ¯ã᪠ (1-normal, 2-hidden, 3-colordialog) runmode dd 1 ; ०¨¬ § ¯ã᪠ (1-normal, 2-hidden, 3-colordialog)
color2 dd 00FFFFFFh ; åà ­¨â §­ ç¥­¨¥ ¢â®à®£® ¢ë¡à ­­®£® æ¢¥â  color2 dd 00FFFFFFh ; åà ­¨â §­ ç¥­¨¥ ¢â®à®£® ¢ë¡à ­­®£® 梥â 
inifileeskin db '/sys/settings/eskin.ini',0
amain db 'main',0
aprogram db 'program',0
aparam db 'param',0
align 16
@IMPORT:
library \
libini , 'libini.obj'
import libini, \
ini_set_str, 'ini_set_str'
I_END: I_END:
cm rb 12 cm rb 12
@ -1353,9 +1275,9 @@ I_END:
renmode rd 1 ; ०¨¬ ®âà¨á®¢ª¨ (1-梥⮢ ï á奬 ,2-¯¨¯¥âª ,3-ªà㣮¢ ï) renmode rd 1 ; ०¨¬ ®âà¨á®¢ª¨ (1-梥⮢ ï á奬 ,2-¯¨¯¥âª ,3-ªà㣮¢ ï)
params rb 20 ; ¯à¨ñ¬ ¯ à ¬¥â஢ params rb 20 ; ¯à¨ñ¬ ¯ à ¬¥â஢
params_c rb 9 ; ¯à¨ñ¬­¨ª ¤«ï æ¢¥â  params_c rb 9 ; ¯à¨ñ¬­¨ª ¤«ï 梥â 
image rd 1
image rd 1 rd 1024
stacktop:
sys_path rb 1024
rd 1024
I_MEM: I_MEM:

View File

@ -410,16 +410,17 @@ DRAW_WINDOW:
event_button: event_button:
mcall 17 mcall 17
cmp ah, 1 ;; it must not be possible to close dock
je .button_close ;cmp ah, 1
;je .button_close
cmp ah, 2 cmp ah, 2
je .button_dock je .button_dock
jmp @f jmp @f
.button_close: ;.button_close:
jmp exit ; jmp exit
.button_dock: .button_dock:
mov edi, [win.button_index] mov edi, [win.button_index]

View File

@ -534,8 +534,8 @@ local IconData:DWORD
repne scasb repne scasb
repne scasb repne scasb
mov al,[edi] mov al,[edi]
cmp al,'9' ;cmp al,'9'
ja PathToIcon ;ja PathToIcon
cmp al,'/' cmp al,'/'
jne GetIconInd jne GetIconInd