forked from KolibriOS/kolibrios
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:
parent
01ba9472ef
commit
dd9e50c167
@ -149,7 +149,14 @@ key:
|
||||
cmp ah,27 ;Esc
|
||||
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
|
||||
fld dword[scale]
|
||||
fdiv dword[delt_sc]
|
||||
@ -208,7 +215,7 @@ title1: db 'TinyGL in KolibriOS'
|
||||
.end: db 0
|
||||
title2: db 'F full screen'
|
||||
.end: db 0
|
||||
title3: db 'ESC - exit'
|
||||
title3: db 'ESC - exit Arrow keys - rotate +/- zoom'
|
||||
.end: db 0
|
||||
fps: db 'FPS:'
|
||||
.end: db 0
|
||||
@ -222,7 +229,7 @@ draw_3d:
|
||||
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT
|
||||
|
||||
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_roty], 0.0, 1.0, 0.0
|
||||
stdcall [glRotatef], [view_rotz], 0.0, 0.0, 1.0
|
||||
@ -283,7 +290,7 @@ draw_3d:
|
||||
align 4
|
||||
an_9 dd 9.0
|
||||
an_25 dd 25.0
|
||||
scale dd 0.14 ;???
|
||||
scale dd 1.0 ;???
|
||||
delt_sc dd 0.85 ;???
|
||||
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 |
@ -4,7 +4,7 @@ use32
|
||||
org 0x0
|
||||
|
||||
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
|
||||
|
||||
;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
|
||||
|
||||
slide_show:
|
||||
@ -1217,7 +1243,8 @@ import libimg , \
|
||||
img.draw , 'img_draw'
|
||||
|
||||
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'
|
||||
|
||||
@ -1279,6 +1306,11 @@ aPrev db 'Prev',0
|
||||
aSlide db 'SlideShow',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
|
||||
check_modifier_table:
|
||||
dd check_modifier_0
|
||||
@ -1385,10 +1417,12 @@ tglbar_key dd ?
|
||||
toolbar_height_old rd 1
|
||||
|
||||
procinfo process_information
|
||||
align 16
|
||||
path: rb 4096 ;1024+16
|
||||
real_header rb 256
|
||||
@PARAMS rb 4096 ;512
|
||||
;---------------------------------------------------------------------
|
||||
sys_path rb 1024
|
||||
temp_dir_pach:
|
||||
rb 4096
|
||||
;---------------------------------------------------------------------
|
||||
|
@ -65,18 +65,14 @@
|
||||
; ‡€ƒŽ‹Ž‚ŽŠ ˆ‘<CB86>Ž‹<C5BD>Ÿ…ŒŽƒŽ ”€‰‹€ <20><>ˆ‹Ž†…<E280A0>ˆŸ „‹Ÿ ŠŽ‹ˆ<E280B9><CB86>ˆ Ž‘ |
|
||||
;----------------------------------------------------------------------------------------------------/
|
||||
use32
|
||||
org 0x0
|
||||
org 0
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd I_END
|
||||
dd I_MEM
|
||||
dd I_MEM
|
||||
dd params
|
||||
dd 0x0
|
||||
dd 1,START,I_END,I_MEM,stacktop,params,sys_path
|
||||
|
||||
include '../../../macros.inc'
|
||||
include '../../../proc32.inc'
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../dll.inc'
|
||||
|
||||
WIN_W equ 295 ; è¨à¨ ®ª
|
||||
WIN_H equ 195 ; ¢ëá®â ®ª
|
||||
@ -87,8 +83,11 @@ panel:
|
||||
file "panel.raw"
|
||||
|
||||
START:
|
||||
mcall 68,11 ; ¨¨æ¨ «¨§ æ¨ï ªãç¨
|
||||
mcall 40,0x27 ; ãáâ ¢«¨¢ ¥¬ ¬ áªã ᮡë⨩
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT ; ¨¨æ¨ «¨§ æ¨ï ªãç¨
|
||||
stdcall dll.Load, @IMPORT
|
||||
or eax,eax
|
||||
jnz bexit
|
||||
mcall SF_SET_EVENTS_MASK,0x27 ; ãáâ ¢«¨¢ ¥¬ ¬ áªã ᮡë⨩
|
||||
include 'params_init.inc' ; ®¡à ¡®âª ¯ à ¬¥â஢ ª®¬ ¤®© áâப¨
|
||||
|
||||
;#___________________________________________________________________________________________________
|
||||
@ -98,7 +97,7 @@ START:
|
||||
red:
|
||||
call draw_main ; ¢ë§ë¢ ¥¬ ¯¥à¥à¨á®¢ªã ®ª ¯à¨«®¦¥¨ï
|
||||
still:
|
||||
mcall 10 ; äãªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï
|
||||
mcall SF_WAIT_EVENT ; äãªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï
|
||||
cmp eax,1 ; ¯¥à¥à¨á®¢ âì ®ª® ?
|
||||
je red ; ¥á«¨ ¤ - ¬¥âªã red
|
||||
cmp eax,2 ; ¦ â ª« ¢¨è ?
|
||||
@ -111,7 +110,7 @@ still:
|
||||
;end_still
|
||||
|
||||
key: ; ¦ â ª« ¢¨è ª« ¢¨ âãà¥
|
||||
mcall 2 ; äãªæ¨ï 2 - áç¨â âì ª®¤ ᨬ¢®« (¢ ah) (âãâ ¢ ¯à¨æ¨¯¥ ¥ 㦠)
|
||||
mcall SF_GET_KEY ; äãªæ¨ï 2 - áç¨â âì ª®¤ ᨬ¢®« (¢ ah) (âãâ ¢ ¯à¨æ¨¯¥ ¥ 㦠)
|
||||
jmp still ; ¢¥àãâìáï ª ç «ã 横«
|
||||
;end_key
|
||||
|
||||
@ -121,7 +120,7 @@ mouse:
|
||||
call cyrcle_draw
|
||||
jmp center
|
||||
left:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
cmp al,1b
|
||||
jne right
|
||||
mov [mouse_f],1
|
||||
@ -132,7 +131,7 @@ mouse:
|
||||
mov [mouse_f],2
|
||||
jmp still
|
||||
center:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
cmp al,100b
|
||||
jne still
|
||||
mov [mouse_f],3
|
||||
@ -142,7 +141,7 @@ mouse:
|
||||
;end_mouse
|
||||
|
||||
button:
|
||||
mcall 17 ; 17 - ¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª®¯ª¨
|
||||
mcall SF_GET_BUTTON ; 17 - ¯®«ãç¨âì ¨¤¥â¨ä¨ª â®à ¦ ⮩ ª®¯ª¨
|
||||
cmp ah, 1 ; ¥á«¨ ¦ â ª®¯ª á ®¬¥à®¬ 1,
|
||||
jz bexit ; ¢ë室¨¬
|
||||
;®¡à ¡®âª ª®¯ª¨ Next
|
||||
@ -222,7 +221,7 @@ button:
|
||||
call set_spectr
|
||||
jmp still ; “室¨¬ ®¦¨¤ ¨¥ ¤à㣮£® ᮡëâ¨ï
|
||||
bexit:
|
||||
mcall -1 ; ¨ ç¥ ª®¥æ ¯à®£à ¬¬ë
|
||||
mcall SF_TERMINATE_PROCESS ; ¨ ç¥ ª®¥æ ¯à®£à ¬¬ë
|
||||
;end_button
|
||||
|
||||
;#___________________________________________________________________________________________________
|
||||
@ -230,19 +229,14 @@ button:
|
||||
; ƒ‹€‚<E282AC>›‰ ŒŽ„“‹œ Ž’<C5BD>ˆ‘Ž‚Šˆ ŽŠ<C5BD>€ ˆ <20>‹…Œ…<C592>’Ž‚ <20><>ˆ‹Ž†…<E280A0>ˆŸ |
|
||||
;----------------------------------------------------------------------------------------------------/
|
||||
draw_main:
|
||||
mov eax,12 ; äãªæ¨ï 12: ®§ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª®
|
||||
mov ebx,1 ; 1, ç «® à¨á®¢ ¨ï
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
; äãªæ¨ï 12: ®§ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª®
|
||||
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||
|
||||
mov eax,48 ; ”ãªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥¨ï ®ª®
|
||||
mov ebx,3 ; <20>®¤äãªæ¨ï 3 - ¯®«ãç¨âì áâ ¤ àâë¥ æ¢¥â ®ª®.
|
||||
mov ecx,sc ; “ª § â¥«ì ¡ãä¥à à §¬¥à®¬ edx ¡ ©â, ¯®¤ áâàãªâãàã
|
||||
mov edx,sizeof.system_colors ; <20> §¬¥à â ¡«¨æë 梥⮢ (¤®«¦¥ ¡ëâì 40 ¡ ©â)
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
; ”ãªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥¨ï ®ª®
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
|
||||
mov eax,48 ; ”ãªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥¨ï ®ª®.
|
||||
mov ebx,4 ; <20>®¤äãªæ¨ï 4 - ¢®§¢à é ¥â eax = ¢ëá®â ᪨ .
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
; ”ãªæ¨ï 48 - á⨫¨ ®â®¡à ¦¥¨ï ®ª®
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
|
||||
mov ecx,eax ; ‡ ¯®¬¨ ¥¬ ¢ëá®âã ᪨
|
||||
|
||||
mov edi,[runmode]
|
||||
@ -271,16 +265,11 @@ draw_main:
|
||||
call draw_palitra ; <20>ˆ‘“…Œ <20>€‹ˆ’<CB86>“
|
||||
call draw_result ; <20>ˆ‘“…Œ <20>…‡“‹œ’€’
|
||||
|
||||
mov eax,8 ; ”ãªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª®¯ªã
|
||||
mov ebx,110 shl 16+147 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® å [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,9 shl 16+147 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
mov edx,0x60000007 ; <20> ç «ì®¥ ID ª®¯®ª - 0xXYnnnnnn
|
||||
int 0x40
|
||||
; ”ãªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª®¯ªã
|
||||
mcall SF_DEFINE_BUTTON, (110 shl 16)+147, (9 shl 16)+147, 0x60000007
|
||||
|
||||
mov ebx,13 shl 16+12 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® å [ª-â x]*65536 + [à §¬¥à]
|
||||
mov edx,0x60000008 ; ID = 8
|
||||
mov ecx,51 shl 16+85 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40 ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ red
|
||||
inc edx
|
||||
mcall , (13 shl 16)+12, (51 shl 16)+85 ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ red
|
||||
add ebx,23 shl 16 ; „®¡ ¢«ï¥¬
|
||||
inc edx ; ID = 9
|
||||
int 0x40 ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ green
|
||||
@ -291,18 +280,14 @@ draw_main:
|
||||
inc edx ; ID = 11
|
||||
int 0x40 ; <20>¨á㥬 ¥¢¨¤¨¬ãî ª®¯ªã ¯®¤ á« ©¤¥à®¬ alpha
|
||||
|
||||
mov eax,8 ; ”ãªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª®¯ªã (‘Œ…<C592>€ –‚…’€)
|
||||
mov ebx,11 shl 16+20 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® å [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,12 shl 16+20 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
mov edx,0x6000000D ; ID = 13
|
||||
int 0x40
|
||||
; ”ãªæ¨ï 8 - ®¯à¥¤¥«¨âì/㤠«¨âì ª®¯ªã (‘Œ…<C592>€ –‚…’€)
|
||||
mcall , (11 shl 16)+20, (12 shl 16)+20, 0x6000000D
|
||||
|
||||
call draw_bottom_panel
|
||||
call draw_left_panel
|
||||
|
||||
mov eax,12 ; äãªæ¨ï 12: ®§ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª®
|
||||
mov ebx,2 ; 2 - ª®¥æ à¨á®¢ ¨ï
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
; äãªæ¨ï 12: ®§ ç ¥â, çâ® ¡ã¤¥â à¨á®¢ âìáï ®ª®
|
||||
mcall SF_REDRAW,SSF_END_DRAW
|
||||
ret
|
||||
|
||||
;#___________________________________________________________________________________________________
|
||||
@ -314,22 +299,14 @@ draw_main:
|
||||
;------------------------------------------------------------------------------------------------+
|
||||
draw_left_panel: ; Žâà¨á®¢ª ¡®ª®¢®© ¯ ¥«¨
|
||||
;.................................................................................................
|
||||
mov eax,8 ; button_next_colorsheme
|
||||
mov ebx,266 shl 16+16 ; [x] + [size]
|
||||
mov ecx,9 shl 16+16 ; [y] + [size]
|
||||
mov edx,0x6000000C ; ID = 12
|
||||
mov esi,[sc.work_button] ; RGB
|
||||
int 0x40 ; call
|
||||
; button_next_colorsheme
|
||||
mcall SF_DEFINE_BUTTON, (266 shl 16)+16, (9 shl 16)+16, 0x6000000C, [sc.work_button]
|
||||
; circle diagram
|
||||
add ecx,19 shl 16 ; move rect
|
||||
mov edx,0x6000000F ; ID = 15
|
||||
int 0x40 ; call
|
||||
|
||||
mov eax,7 ; 7 - ®¬¥à äãªæ¨¨
|
||||
mov ebx,panel ; 㪠§ â¥«ì ¨§®¡à ¦¥¨¥ ¢ ä®à¬ ⥠BBGGRRBBGGRR...
|
||||
mov ecx, 16 shl 16 + 149 ; [à §¬¥à ¯® ®á¨ x]*65536 + [à §¬¥à ¯® ®á¨ y]
|
||||
mov edx,266 shl 16 + 9 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
int 0x40
|
||||
mcall SF_PUT_IMAGE, panel, (16 shl 16)+149, (266 shl 16)+9
|
||||
|
||||
;mov eax,13 ; draw rect
|
||||
;mov ebx,266 shl 16+16 ; [x] + [size]
|
||||
@ -373,23 +350,16 @@ draw_main:
|
||||
;------------------------------------------------------------------------------------------------+
|
||||
draw_bottom_panel: ; Žâà¨á®¢ª ¨¦¥© ¯ ¥«¨
|
||||
;.................................................................................................
|
||||
mov eax,8 ; draw 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
|
||||
mcall SF_DEFINE_BUTTON, (92 shl 16)+90, (169 shl 16)+16, 14, [sc.work_button]
|
||||
|
||||
add ebx, 100 shl 16
|
||||
add edx, 2
|
||||
int 0x40
|
||||
|
||||
mov eax,4 ; Write string
|
||||
mov ebx,(113 - 104) shl 16+174 ; [x] + [y]
|
||||
; Write string
|
||||
mov ecx,[sc.work_text] ; RGB
|
||||
or ecx, 1 shl 31
|
||||
mov edx,bground ; string pointer
|
||||
int 0x40 ; call
|
||||
mcall SF_DRAW_TEXT, (113 - 104) shl 16+174, ,bground
|
||||
|
||||
mov ecx, [sc.work_button_text]
|
||||
or ecx, 1 shl 31
|
||||
@ -402,11 +372,7 @@ draw_main:
|
||||
mov edx, bground2
|
||||
int 0x40
|
||||
|
||||
mov eax,38 ; draw line
|
||||
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
|
||||
mcall SF_DRAW_LINE, 4 shl 16+282, 163 shl 16+163, 0x00666666
|
||||
ret ; return
|
||||
;.................................................................................................
|
||||
|
||||
@ -414,9 +380,8 @@ mouse_global:
|
||||
;.................................................................................................
|
||||
; <20>®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨
|
||||
;.................................................................................................
|
||||
mov eax,37 ; ”ãªæ¨ï 37 - à ¡®â á ¬ëèìî
|
||||
mov ebx,0 ; ¬ ã¦ë £«®¡ «ìë¥ ª®®à¤¨ âë
|
||||
int 0x40 ; eax = x*65536 + y, (x,y)=ª®®à¤¨ âë ªãàá®à ¬ëè¨
|
||||
mcall SF_MOUSE_GET,SSF_SCREEN_POSITION
|
||||
; eax = x*65536 + y, (x,y)=ª®®à¤¨ âë ªãàá®à ¬ëè¨
|
||||
mov ecx,eax ;
|
||||
shr ecx,16 ; ecx = x+1
|
||||
movzx edx,ax ; edx = y+1
|
||||
@ -431,9 +396,8 @@ mouse_local:
|
||||
;.................................................................................................
|
||||
; <20>®«ãç ¥¬ ª®®à¤¨ âë ¬ëè¨ ®â®á¨â¥«ì® ®ª
|
||||
;.................................................................................................
|
||||
mov eax,37 ; ”ãªæ¨ï 37 - à ¡®â á ¬ëèìî
|
||||
mov ebx,1 ; ¬ ã¦ë £«®¡ «ìë¥ ª®®à¤¨ âë
|
||||
int 0x40 ; eax = x*65536 + y, (x,y)=ª®®à¤¨ âë ªãàá®à ¬ëè¨
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
; eax = x*65536 + y, (x,y)=ª®®à¤¨ âë ªãàá®à ¬ëè¨
|
||||
mov ecx,eax ;
|
||||
shr ecx,16 ; ecx = x+1
|
||||
movzx edx,ax ; edx = y+1
|
||||
@ -448,16 +412,14 @@ set_background:
|
||||
;.................................................................................................
|
||||
; “áâ ¢«¨¢ ¥â ä® à ¡®ç¥£® á⮫
|
||||
;.................................................................................................
|
||||
mov eax,15 ; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
mov ebx,4 ; <20>®¤äãªæ¨ï 4 - ãáâ ®¢¨âì ०¨¬ ®âà¨á®¢ª¨ ä® .
|
||||
mov ecx,2 ; <20>¥¦¨¬ ®âà¨á®¢ª¨ - § ¬®áâ¨âì (1)
|
||||
int 0x40 ; ‚ë§ë¢ ¥¬
|
||||
; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
; <20>®¤äãªæ¨ï 4 - ãáâ ®¢¨âì ०¨¬ ®âà¨á®¢ª¨ ä® .
|
||||
; <20>¥¦¨¬ ®âà¨á®¢ª¨ - § ¬®áâ¨âì (1), à áâïãâì (2)
|
||||
mcall SF_BACKGROUND_SET,SSF_MODE_BG,2
|
||||
|
||||
mov eax,15 ; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
mov ebx,1 ; <20>®¤äãªæ¨ï 1 - ãáâ ®¢¨âì à §¬¥à ä®®¢®£® ¨§®¡à ¦¥¨ï.
|
||||
mov ecx,2 ; ˜¨à¨ ¨§®¡à ¦¥¨ï
|
||||
mov edx,2 ; ‚ëá®â ¨§®¡à ¦¥¨ï
|
||||
int 0x40 ; ‚ë§ë¢ ¥¬
|
||||
; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
; <20>®¤äãªæ¨ï 1 - ãáâ ®¢¨âì à §¬¥à ä®®¢®£® ¨§®¡à ¦¥¨ï.
|
||||
mcall SF_BACKGROUND_SET,SSF_SIZE_BG,2,2
|
||||
|
||||
mov eax,[color]
|
||||
mov [cm+0],al
|
||||
@ -479,16 +441,68 @@ set_background:
|
||||
mov [cm+5],al
|
||||
mov [cm+8],al
|
||||
|
||||
mov eax,15 ; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
mov ebx,5 ; <20>®¤äãªæ¨ï 5 - ¯®¬¥áâ¨âì ¡«®ª ¯¨ªá¥«¥© ä®.
|
||||
mov ecx,cm ; “ª § â¥«ì ¤ ë¥ ¢ ä®à¬ ⥠BBGGRRBBGGRR
|
||||
mov edx,0 ; C¬¥é¥¨¥ ¢ ¤ ëå ä®®¢®£® ¨§®¡à ¦¥¨ï
|
||||
mov esi,3*4 ; <20> §¬¥à ¤ ëå ¢ ¡ ©â å = 3 * ç¨á«® ¯¨ªá¥«¥©
|
||||
int 0x40 ; ‚ë§ë¢ ¥¬
|
||||
; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
; <20>®¤äãªæ¨ï 5 - ¯®¬¥áâ¨âì ¡«®ª ¯¨ªá¥«¥© ä®.
|
||||
; - “ª § â¥«ì ¤ ë¥ ¢ ä®à¬ ⥠BBGGRRBBGGRR
|
||||
; - C¬¥é¥¨¥ ¢ ¤ ëå ä®®¢®£® ¨§®¡à ¦¥¨ï
|
||||
; - <20> §¬¥à ¤ ëå ¢ ¡ ©â å = 3 * ç¨á«® ¯¨ªá¥«¥©
|
||||
mcall SF_BACKGROUND_SET,SSF_IMAGE_BG,cm,0,3*4
|
||||
|
||||
mov eax,15 ; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
mov ebx,3 ; <20>®¤äãªæ¨ï 3 - ¯¥à¥à¨á®¢ âì ä®.
|
||||
int 0x40 ; ‚ë§ë¢ ¥¬
|
||||
; ”ãªæ¨ï 15 - à ¡®â á ä®®¢®© £à 䨪®©
|
||||
; <20>®¤äãªæ¨ï 3 - ¯¥à¥à¨á®¢ âì ä®.
|
||||
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
|
||||
;end_set_background
|
||||
@ -497,8 +511,8 @@ desktop_get:
|
||||
;.................................................................................................
|
||||
; Ž¯à¥¤¥«ï¥¬ è¨à¨ã íªà
|
||||
;.................................................................................................
|
||||
mov eax,14 ; Ž¯à¥¤¥«ï¥¬ è¨à¨ã íªà (eax = [xsize]*65536 + [ysize])
|
||||
int 0x40 ; xsize = à §¬¥à ¯® £®à¨§®â «¨ - 1
|
||||
; Ž¯à¥¤¥«ï¥¬ è¨à¨ã íªà (eax = [xsize]*65536 + [ysize])
|
||||
mcall SF_GET_SCREEN_SIZE ; xsize = à §¬¥à ¯® £®à¨§®â «¨ - 1
|
||||
mov ebx,eax ;
|
||||
shr ebx,16 ; ebx = xsize-1
|
||||
movzx edx,ax ; edx = ysize-1 («¨è¨© ª®¤)
|
||||
@ -521,9 +535,8 @@ mouse_get:
|
||||
;.................................................................................................
|
||||
; <20>¥à¥¬ 梥â á ¯ «¨âàë ¢ ¯¥à¥¬¥ãî
|
||||
;.................................................................................................
|
||||
mov eax,35 ; ”ãªæ¨ï ¢§ïâ¨ï 梥â
|
||||
;mov ebx,ecx ;; ebx = y*xsize+x («¨è¨© ª®¤)
|
||||
int 0x40 ; <20>®«ãç ¥¬ 梥⠢ eax
|
||||
mcall SF_GET_PIXEL ; <20>®«ãç ¥¬ 梥⠢ eax
|
||||
cmp eax,[sc.work] ; ‘à ¢¨¢ ¥¬ á ä®®¬ ¯à¨«®¦¥¨ï
|
||||
je mouse_err ; …᫨ íâ® ® - â® ¨ç¥£® ¥ ¤¥« ¥¬
|
||||
cmp eax,0x222222 ; ‘à ¢¨¢ ¥¬ á 梥⮬ á¥âª¨
|
||||
@ -552,11 +565,8 @@ mouse_get:
|
||||
;end_mouse_get----------------------------------------------------------------------------------------
|
||||
|
||||
draw_palitra:
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov ebx,110 shl 16+148 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,9 shl 16+148 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
mov edx,[sc.work] ; 梥â
|
||||
int 0x40
|
||||
; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mcall SF_DRAW_RECT, 110 shl 16+148, 9 shl 16+148, [sc.work]
|
||||
|
||||
cmp [renmode],2
|
||||
je cyrcle_draw
|
||||
@ -604,7 +614,7 @@ draw_palitra:
|
||||
jle end_cyrcle_draw
|
||||
|
||||
cyrcle_draw_2:
|
||||
mcall 5,10
|
||||
mcall SF_SLEEP,10
|
||||
call desktop_get
|
||||
call mouse_global
|
||||
|
||||
@ -614,9 +624,8 @@ draw_palitra:
|
||||
mov ecx, 10*65536+11
|
||||
mov edi,0
|
||||
circle_loop2:
|
||||
mov eax,13
|
||||
call circle_pixel_read
|
||||
mcall
|
||||
mcall SF_DRAW_RECT
|
||||
add ecx,11 shl 16
|
||||
inc edi
|
||||
cmp edi,13
|
||||
@ -627,12 +636,7 @@ draw_palitra:
|
||||
cmp esi,13
|
||||
jne circle_loop
|
||||
|
||||
|
||||
mov eax,13
|
||||
mov edx,0x0
|
||||
mov ebx,177*65536+13
|
||||
mov ecx, 76*65536+13
|
||||
mcall
|
||||
mcall SF_DRAW_RECT, 177*65536+13, 76*65536+13, 0
|
||||
mov ecx, [mouse_x]
|
||||
mov edx, [mouse_y]
|
||||
inc ecx
|
||||
@ -640,26 +644,16 @@ draw_palitra:
|
||||
mov ebx, edx
|
||||
imul ebx, [desctop_w]
|
||||
add ebx, ecx
|
||||
mov eax, 35
|
||||
mcall
|
||||
mcall SF_GET_PIXEL
|
||||
mov edx,eax
|
||||
mov eax,13
|
||||
mov ebx,178*65536+11
|
||||
mov ecx, 77*65536+11
|
||||
mcall
|
||||
mcall SF_DRAW_RECT, 178*65536+11, 77*65536+11
|
||||
ret
|
||||
end_cyrcle_draw:
|
||||
mov eax,13
|
||||
mov edx,0x666666
|
||||
mov ebx,111*65536+145
|
||||
mov ecx, 9*65536+145
|
||||
mcall
|
||||
mcall SF_DRAW_RECT, 111*65536+145, 9*65536+145, 0x666666
|
||||
ret
|
||||
|
||||
circle_pixel_read:
|
||||
push ecx
|
||||
push ebx
|
||||
push eax
|
||||
push ecx ebx
|
||||
mov ecx, [mouse_x]
|
||||
mov edx, [mouse_y]
|
||||
inc ecx
|
||||
@ -676,19 +670,14 @@ draw_palitra:
|
||||
mov ebx, edx
|
||||
imul ebx, [desctop_w]
|
||||
add ebx, ecx
|
||||
mov eax, 35
|
||||
mcall
|
||||
mcall SF_GET_PIXEL
|
||||
mov edx,eax
|
||||
pop eax
|
||||
pop ebx
|
||||
pop ecx
|
||||
pop ebx ecx
|
||||
ret
|
||||
|
||||
_cpr_exit:
|
||||
mov edx,0x00000000
|
||||
pop eax
|
||||
pop ebx
|
||||
pop ecx
|
||||
xor edx,edx
|
||||
pop ebx ecx
|
||||
ret
|
||||
|
||||
;picker_draw:
|
||||
@ -698,7 +687,7 @@ draw_palitra:
|
||||
; Žâà¨á®¢ª ä® ¯®¤ ª®¯ª¨
|
||||
;.................................................................................................
|
||||
sheme_draw:
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov eax,SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x222222 ; 梥â
|
||||
mov ecx,9 shl 16+73 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
mov esi,2 ; ‘ç¥â稪 «¨¨© ¯®¤«®¦¥ª
|
||||
@ -719,7 +708,7 @@ draw_palitra:
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª ª®¯®ª ¯® 横«ã
|
||||
;.................................................................................................
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov eax,SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x0FFFFFFF ; 梥â
|
||||
mov esi,4 ; ‘ç¥â稪 ª®«¨ç¥á⢠¡§ 楢 (#4,8)
|
||||
mov ebx,99 shl 16+8 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
@ -849,64 +838,33 @@ draw_result:
|
||||
;.................................................................................................
|
||||
; <20>®«ìè ï à ¬ª ¢ë¢®¤ १ã«ìâ â
|
||||
;.................................................................................................
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x00666666 ; 梥â-®¡¢®¤ª¨
|
||||
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
|
||||
mcall SF_DRAW_RECT, 4 shl 16+98, 9 shl 16+148, 0x00666666
|
||||
mcall , 5 shl 16+96, 10 shl 16+146, 0x00F3F3F3
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª १ã«ìâ â 梥⠢ hex color2
|
||||
;.................................................................................................
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
; 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>à¥àë¢ ¨¥ (®á à¨áã¥â ¯àאַ㣮«ì¨ª)
|
||||
mcall , 16 shl 16+15, 16 shl 16+15, 0x222222
|
||||
; color 2 - draw color
|
||||
mov edx,[color2] ; 梥â
|
||||
mov ebx,17 shl 16+13 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,17 shl 16+13 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥ (®á à¨áã¥â ¯àאַ㣮«ì¨ª)
|
||||
mcall , 17 shl 16+13, 17 shl 16+13, [color2]
|
||||
; color 1 - draw fringle
|
||||
mov edx,0x222222 ; 梥â-®¡¢®¤ª¨
|
||||
mov ebx,11 shl 16+15 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,12 shl 16+15 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥ (®á à¨áã¥â ¯àאַ㣮«ì¨ª)
|
||||
mcall , 11 shl 16+15, 12 shl 16+15, 0x222222
|
||||
; value - draw fringle
|
||||
mov ebx,34 shl 16+62 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,16 shl 16+15 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥ (®á à¨áã¥â ¯àאַ㣮«ì¨ª)
|
||||
mcall , 34 shl 16+62, 16 shl 16+15
|
||||
|
||||
; color 2 - draw color
|
||||
mov edx,[color] ; 梥â
|
||||
mov ebx,12 shl 16+13 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,13 shl 16+13 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥ (®á à¨áã¥â ¯àאַ㣮«ì¨ª)
|
||||
mcall , 12 shl 16+13, 13 shl 16+13, [color]
|
||||
; value - draw background
|
||||
mov edx,0xFFFFFF ; 梥â-ä®
|
||||
mov ebx,35 shl 16+60 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,17 shl 16+13 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥ (®á à¨áã¥â ¯àאַ㣮«ì¨ª)
|
||||
mcall , 35 shl 16+60, 17 shl 16+13, 0xFFFFFF
|
||||
|
||||
mov eax,47 ; ”ãªæ¨ï 47 - ¢ë¢®¤ ç¨á« ¢ ®ª®
|
||||
mov ecx,[color] ; ç¨á«® (¯à¨ bl=0) ¨«¨ 㪠§ ⥫ì (¯à¨ bl=1)
|
||||
mov esi,0x0 ; 0xX0RRGGBB
|
||||
mov ebx,256+8 shl 16 ; ¯ à ¬¥âàë ¯à¥®¡à §®¢ ¨ï ç¨á« ¢ ⥪áâ (HEX)
|
||||
mov edx,45 shl 16+20 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥ - ¢ë¢®¤¨¬ १ã«ìâ â ¢ ®ª® (HEX)
|
||||
; ”ãªæ¨ï 47 - ¢ë¢®¤ ç¨á« ¢ ®ª®
|
||||
;ebx - ¯ à ¬¥âàë ¯à¥®¡à §®¢ ¨ï ç¨á« ¢ ⥪áâ (HEX)
|
||||
mcall SF_DRAW_NUMBER, 256+8 shl 16, [color], (45 shl 16)+20,, 0
|
||||
|
||||
mov eax,4 ; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
mov ebx,38*65536+20 ; [x ç «ìë©] *65536 + [y ç «ìë©]
|
||||
mov ecx,0x0 ; 梥â ⥪áâ RRGGBB
|
||||
mov edx,hex ; à¨á㥬 '#'
|
||||
mov esi,1 ; ¤«¨ ⥪áâ ¢ ¡ ©â å
|
||||
int 0x40
|
||||
; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
; edx - à¨á㥬 '#'
|
||||
; esi - ¤«¨ ⥪áâ ¢ ¡ ©â å
|
||||
mcall SF_DRAW_TEXT,38*65536+20,0,hex,1
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª r g b § 票©
|
||||
@ -932,7 +890,7 @@ draw_result:
|
||||
;.................................................................................................
|
||||
; ‚뢮¤¨¬ ¡ãª¢ë r g b a
|
||||
;.................................................................................................
|
||||
mov eax,4 ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
mov eax,SF_DRAW_TEXT ; 4 - ¢ë¢¥á⨠áâபã ⥪áâ ¢ ®ª®
|
||||
mov ebx,16 shl 16+40 ; [ª®®à¤¨ â ¯® ®á¨ x]*65536 + [ª®®à¤¨ â ¯® ®á¨ y]
|
||||
mov ecx,0x0 ; 0xX0RRGGBB (RR, GG, BB § ¤ îâ 梥â ⥪áâ )
|
||||
mov edx,cname ; 㪠§ ⥫ì ç «® áâப¨
|
||||
@ -940,18 +898,15 @@ draw_result:
|
||||
newline: ; 横«
|
||||
int 0x40 ; <20>à¥àë¢ ¨¥
|
||||
add ebx,23 shl 16 ; „®¡ ¢«ï¥¬
|
||||
add edx,1 ; „®¡ ¢«ï¥¬
|
||||
inc edx ; „®¡ ¢«ï¥¬
|
||||
cmp [edx],byte 'x' ; ‘à ¢¥¨¥ á ¡ ©â®¬ å
|
||||
jne newline ; …᫨ ¥ ã«ì ¨«¨ ¥ à ¢®
|
||||
|
||||
;.................................................................................................
|
||||
; Žâà¨á®¢ª á« ©¤¥à®¢
|
||||
;.................................................................................................
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mov edx,0x222222 ; 梥â-®¡¢®¤ª¨
|
||||
mov ebx,16 shl 16+4 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,51 shl 16+86 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40
|
||||
; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
mcall SF_DRAW_RECT, 16 shl 16+4, 51 shl 16+86, 0x222222
|
||||
add ebx,23 shl 16 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40
|
||||
add ebx,23 shl 16 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â y]*65536 + [à §¬¥à]
|
||||
@ -959,10 +914,7 @@ draw_result:
|
||||
add ebx,23 shl 16 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40
|
||||
|
||||
mov edx,0xFA0919 ; 梥â-®¡¢®¤ª¨
|
||||
mov ebx,17 shl 16+2 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â x]*65536 + [à §¬¥à]
|
||||
mov ecx,52 shl 16+84 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® y [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40
|
||||
mcall , 17 shl 16+2, 52 shl 16+84, 0xFA0919
|
||||
mov edx,0x08CE19 ; 梥â-®¡¢®¤ª¨
|
||||
add ebx,23 shl 16 ; <20> ç «ìë¥ ª®®à¤¨ âë ¯® x [ª-â y]*65536 + [à §¬¥à]
|
||||
int 0x40
|
||||
@ -1000,9 +952,8 @@ draw_slider:
|
||||
mov cl,136 ; ¨¦ïï â®çª ¯®«§ãª
|
||||
sub cl,al ; cl=cl-al
|
||||
shl ecx,16
|
||||
add ecx,1 ; § ¤ ¥¬ ç «ì®¥ ¯®«®¦¥¨¥
|
||||
mov eax,13 ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
int 0x40
|
||||
inc ecx ; § ¤ ¥¬ ç «ì®¥ ¯®«®¦¥¨¥
|
||||
mcall SF_DRAW_RECT ; ”ãªæ¨ï 13 - à¨á®¢ âì ¯àאַ㣮«ì¨ª
|
||||
push ebx ; á®åà 塞 ¤«ï á«¥¤ãî饣® ¯®«§ãª x+w
|
||||
sub ebx,8 ; â ª ª ª è¨à¨ «¨¨¨ 11 â® ®â¨¬ ¥¬ 8 çâ®¡ë ªã¡¨ª áâ « è¨à¨®© 3
|
||||
add ebx,8 shl 16 ; Š®®à¤¨ âë ¯® x ¤«ï ª¢ ¤à â ¯®«§ãª¥ á¬¥é ¥¬ 8 ¢ ¯à ¢®
|
||||
@ -1022,7 +973,7 @@ draw_value:
|
||||
mov ebx,10 ; ãáâ ¢«¨¢ ¥¬ ®á®¢ ¨¥ á¨á⥬ë áç¨á«¥¨ï
|
||||
mov edi,buff ; 㪠§ ⥫ì áâப㠡ãä¥à
|
||||
call int2ascii ; ª®¢¥àâ¨à㥬 ç¨á«® ¨ «®¦¨¬ ª ª áâப㠢 ¡ãä¥à + esi ¤«¨
|
||||
mov eax,4 ; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
mov eax,SF_DRAW_TEXT ; äãªæ¨ï 4: ¯¨á âì ⥪áâ ¢ ®ª¥
|
||||
pop ebx ; ¤®áâ ¥¬ ¨§ á⥪ ¯à¨á« ë¥ ª®®à¤¨ âë
|
||||
cmp esi,2 ; –…<E28093>’<EFBFBD>ˆ<EFBFBD>Ž‚€<E2809A>ˆ… ’…Š‘’€
|
||||
jne draw_value_1
|
||||
@ -1041,58 +992,22 @@ draw_value:
|
||||
|
||||
_read_params:
|
||||
|
||||
mov al,[params+2]
|
||||
mov [params_c+0],al
|
||||
mov eax,dword[params+2]
|
||||
mov dword[params_c+0],eax
|
||||
|
||||
mov al,[params+3]
|
||||
mov [params_c+1],al
|
||||
|
||||
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 eax,dword[params+6]
|
||||
mov dword[params_c+4],eax
|
||||
|
||||
mov esi,params_c
|
||||
mov ecx,16
|
||||
call ascii2int
|
||||
mov [color],eax
|
||||
|
||||
mov al,[params+11]
|
||||
mov [params_c+0],al
|
||||
mov eax,dword[params+11]
|
||||
mov dword[params_c+0],eax
|
||||
|
||||
mov al,[params+12]
|
||||
mov [params_c+1],al
|
||||
|
||||
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 eax,dword[params+15]
|
||||
mov dword[params_c+4],eax
|
||||
|
||||
mov esi,params_c
|
||||
mov ecx,16
|
||||
@ -1122,7 +1037,7 @@ int2ascii:
|
||||
; ebx - ®á®¢ ¨¥ á¨á⥬ë áç¨á«¥¨ï
|
||||
; edi - 㪠§ ⥫ì áâப㠡ãä¥à
|
||||
; ‚®§¢à é ¥â § ¯®«¥ë© ¡ãä¥à ¨ esi - ¤«¨ áâப¨
|
||||
;pushad
|
||||
push edi
|
||||
xor esi,esi ; § ã«ï¥¬ áç¥â稪 ᨬ¢®«®¢
|
||||
convert_loop:
|
||||
xor edx,edx ; § ã«ï¥¬ ॣ¨áâà ¯®¤ ®áâ ⮪
|
||||
@ -1140,9 +1055,8 @@ int2ascii:
|
||||
test esi,esi ; ¥á«¨ ¥áâì çâ® ¤®áâ ¢ âì ¨§ á⥪
|
||||
jnz write_loop ; â® ¤®áâ ñ¬
|
||||
mov byte [edi],0 ; ¨ ç¥ ¤®¯¨áëë¢ ¥¬ ã«¥¢®© ¡ ©â
|
||||
;popad ; ¢®ááâ ¢«¨¢ ¥¬ § 票ï ॣ¨áâ஢
|
||||
pop edi
|
||||
; ª®¤ ¨¦¥ ¥ ¨¬¥¥â ¨ç¥£® ®¡é¥£® ª äãªæ¨¨, ¯à®áâ® ¢®§¢à é ¥â ¥é¥ ¤«¨ã ¯®«ã祮© áâப¨
|
||||
mov edi,buff ; 㪠§ ⥫ì ç «® ⥪áâ
|
||||
call str_len
|
||||
mov esi,eax
|
||||
ret ; ¨ ¢®§¢à é ¥¬ ã¯à ¢«¥¨¥
|
||||
@ -1227,9 +1141,7 @@ str_len:
|
||||
;.................................................................................................
|
||||
; ®¯à¥¤¥«ï¥â ¤«¨ã áâப¨ (¢å®¤->EDI ZS offset ; ¢ë室->EAX ZS length)
|
||||
;.................................................................................................
|
||||
push ecx
|
||||
push esi
|
||||
push edi
|
||||
push ecx esi edi
|
||||
|
||||
cld
|
||||
xor al, al
|
||||
@ -1240,9 +1152,7 @@ str_len:
|
||||
mov eax, edi
|
||||
dec eax
|
||||
|
||||
pop edi
|
||||
pop esi
|
||||
pop ecx
|
||||
pop edi esi ecx
|
||||
|
||||
ret
|
||||
;end_str_len
|
||||
@ -1287,8 +1197,8 @@ str_len:
|
||||
endp
|
||||
|
||||
set_background2:
|
||||
mcall 68, 11
|
||||
mcall 68, 12, 256 * 256 * 3
|
||||
mcall SF_SYS_MISC, SSF_HEAP_INIT
|
||||
mcall SF_SYS_MISC, SSF_MEM_ALLOC, 256 * 256 * 3
|
||||
mov [image], eax
|
||||
|
||||
mov edx, eax
|
||||
@ -1309,12 +1219,12 @@ set_background2:
|
||||
add edx, 3
|
||||
loop @b
|
||||
|
||||
mcall 15, 1, 256, 256
|
||||
mcall 15, 4, 1
|
||||
mcall 15, 5, [image], 0, 256 * 256 * 3
|
||||
mcall 15, 3
|
||||
mcall SF_BACKGROUND_SET, SSF_SIZE_BG, 256, 256
|
||||
mcall SF_BACKGROUND_SET, SSF_MODE_BG, 1
|
||||
mcall SF_BACKGROUND_SET, SSF_IMAGE_BG, [image], 0, 256 * 256 * 3
|
||||
mcall SF_BACKGROUND_SET, SSF_REDRAW_BG
|
||||
|
||||
mcall 68, 13, [image]
|
||||
mcall SF_SYS_MISC, SSF_MEM_FREE, [image]
|
||||
ret
|
||||
|
||||
;#___________________________________________________________________________________________________
|
||||
@ -1322,7 +1232,7 @@ ret
|
||||
; <20>‹ŽŠ <20>…<EFBFBD>…Œ…<C592><E280A6>›• ˆ ŠŽ<C5A0>‘’€<E28099>’ |
|
||||
;----------------------------------------------------------------------------------------------------/
|
||||
circle:
|
||||
title db 'Palitra v0.76',0 ; åà ¨â ¨¬ï ¯à®£à ¬¬ë
|
||||
title db 'Palitra v0.77',0 ; åà ¨â ¨¬ï ¯à®£à ¬¬ë
|
||||
hidden db 'Hidden',0
|
||||
hex db '#',0 ; ¤«ï ¢ë¢®¤ à¥èñ⪨ ª ª ⥪áâ
|
||||
cname db 'RGBAx' ; åà ¨â à §àï¤ë 梥⮢ (red,green,blue) x-¬¥âª ª®æ
|
||||
@ -1334,7 +1244,19 @@ circle:
|
||||
runmode dd 1 ; ०¨¬ § ¯ã᪠(1-normal, 2-hidden, 3-colordialog)
|
||||
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:
|
||||
cm rb 12
|
||||
@ -1353,9 +1275,9 @@ I_END:
|
||||
renmode rd 1 ; ०¨¬ ®âà¨á®¢ª¨ (1-梥⮢ ï á奬 ,2-¯¨¯¥âª ,3-ªà㣮¢ ï)
|
||||
params rb 20 ; ¯à¨ñ¬ ¯ à ¬¥â஢
|
||||
params_c rb 9 ; ¯à¨ñ¬¨ª ¤«ï 梥â
|
||||
|
||||
image rd 1
|
||||
|
||||
|
||||
rd 1024
|
||||
stacktop:
|
||||
sys_path rb 1024
|
||||
I_MEM:
|
@ -410,16 +410,17 @@ DRAW_WINDOW:
|
||||
event_button:
|
||||
mcall 17
|
||||
|
||||
cmp ah, 1
|
||||
je .button_close
|
||||
;; it must not be possible to close dock
|
||||
;cmp ah, 1
|
||||
;je .button_close
|
||||
|
||||
cmp ah, 2
|
||||
je .button_dock
|
||||
|
||||
jmp @f
|
||||
|
||||
.button_close:
|
||||
jmp exit
|
||||
;.button_close:
|
||||
; jmp exit
|
||||
|
||||
.button_dock:
|
||||
mov edi, [win.button_index]
|
||||
|
@ -534,8 +534,8 @@ local IconData:DWORD
|
||||
repne scasb
|
||||
repne scasb
|
||||
mov al,[edi]
|
||||
cmp al,'9'
|
||||
ja PathToIcon
|
||||
;cmp al,'9'
|
||||
;ja PathToIcon
|
||||
cmp al,'/'
|
||||
jne GetIconInd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user