Update programs to support new locale codes

- Update language codes and add comments.
- Correct some en_US translations.
- White space sanitation, including EOL.
This commit is contained in:
Andrew 2024-06-10 22:27:47 +01:00
parent 84c5a4400a
commit 0cdd2189aa
64 changed files with 37481 additions and 36825 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,275 +1,275 @@
use32 use32
org 0x0 org 0x0
db 'MENUET01' db 'MENUET01'
dd 0x01 dd 0x01
dd _preSTART dd _preSTART
dd I_END dd I_END
dd 0x4000 dd 0x4000
dd 0x4000 dd 0x4000
dd 0x0,0x0 dd 0x0,0x0
include '../../macros.inc' include '../../macros.inc'
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include 'draw_window.inc' include 'draw_window.inc'
include 'ball_operations.inc' include 'ball_operations.inc'
include 'basic_alg.inc' include 'basic_alg.inc'
_preSTART: _preSTART:
mcall 66, 1, 1 ;¯à¨­¨¬ ¥¬ ᪠­-ª®¤ë mcall 66, 1, 1 ;¯à¨­¨¬ ¥¬ ᪠­-ª®¤ë
mcall 3 ;randomize mcall 3 ;randomize
ror eax, 16 ror eax, 16
mov [TC_U_SYSTEM_RANDSEED], eax ;from PPro "system.inc" mov [TC_U_SYSTEM_RANDSEED], eax ;from PPro "system.inc"
new_game: new_game:
;®¡­ã«¥­¨¥ ¬ âà¨æë ;®¡­ã«¥­¨¥ ¬ âà¨æë
mov eax, 0 mov eax, 0
mov ecx, 81 / 4 mov ecx, 81 / 4
mov edi, lineBall mov edi, lineBall
rep stosd rep stosd
stosb stosb
mov [score], 0 mov [score], 0
mov [countAllBall], 0 mov [countAllBall], 0
mov [current], 0 mov [current], 0
@@: @@:
mov ebx, 7 mov ebx, 7
call random call random
inc dl inc dl
call add_new_ball call add_new_ball
call test_new_ball call test_new_ball
cmp [countAllBall], 5 cmp [countAllBall], 5
jb @b jb @b
call generate_new___new_color call generate_new___new_color
START: START:
draw_window draw_window
still: still:
mcall 10 mcall 10
dec eax dec eax
jz START ; ¯¥à¥à¨á®¢ âì ®ª­® jz START ; ¯¥à¥à¨á®¢ âì ®ª­®
dec eax dec eax
jnz button ;¥á«¨ ­¥ ª« ¢¨è  - §­ ç¨â ª­®¯ª  jnz button ;¥á«¨ ­¥ ª« ¢¨è  - §­ ç¨â ª­®¯ª 
key: ; ­ ¦ â¨¥ ª« ¢¨è¨ key: ; ­ ¦ â¨¥ ª« ¢¨è¨
mcall 2 ; ¯®«ãç ¥¬ ª®¤ ª« ¢¨è¨ mcall 2 ; ¯®«ãç ¥¬ ª®¤ ª« ¢¨è¨
cmp ah, 60 cmp ah, 60
je new_game je new_game
jmp still jmp still
button: ; ­ ¦ â¨¥ ª­®¯ª¨ button: ; ­ ¦ â¨¥ ª­®¯ª¨
mcall 17 mcall 17
shr eax, 8 shr eax, 8
cmp ax, 1 ; ¥á«¨ ª­®¯ª  ¢ë室 ? cmp ax, 1 ; ¥á«¨ ª­®¯ª  ¢ë室 ?
je .exit je .exit
;¯à®¢¥à¨¬, ­¥ ¯ãáâ  «¨ ª«¥âª  ;¯à®¢¥à¨¬, ­¥ ¯ãáâ  «¨ ª«¥âª 
mov edx, [current] mov edx, [current]
test byte [eax + lineBall - 2], 0x7 test byte [eax + lineBall - 2], 0x7
jz .blank jz .blank
;¯à®¢¥à¨¬ ­¥ ¡ë«  «¨ íâ  ª«¥âª  㦥 ¢ë¡à ­  ;¯à®¢¥à¨¬ ­¥ ¡ë«  «¨ íâ  ª«¥âª  㦥 ¢ë¡à ­ 
cmp eax, edx cmp eax, edx
je .double_choice je .double_choice
mov [current], eax mov [current], eax
call choice_ball call choice_ball
call paint_ball ;á­ ç «  ¯à®à¨á㥬 ­®¢ë© ¢ë¡à ­­ë© è à¨ª call paint_ball ;á­ ç «  ¯à®à¨á㥬 ­®¢ë© ¢ë¡à ­­ë© è à¨ª
test edx, edx ;cmp [current], 0 test edx, edx ;cmp [current], 0
jz still jz still
mov eax, edx mov eax, edx
@@: @@:
call redraw_cell ;  㦥 ¯®â®¬ 㡥६ à ¬ªã ®â áâ à®£® call redraw_cell ;  㦥 ¯®â®¬ 㡥६ à ¬ªã ®â áâ à®£®
call paint_ball call paint_ball
jmp still jmp still
.double_choice: .double_choice:
mov [current], 0 mov [current], 0
jmp @B jmp @B
.blank: ;­ ¦ â ï ª­®¯ª  - ¯ãáâ  .blank: ;­ ¦ â ï ª­®¯ª  - ¯ãáâ 
test edx, edx ;cmp [current], 0 test edx, edx ;cmp [current], 0
jz still jz still
mov [dest], eax ;ª­®¯ªã ­ §­ ç¥­¨ï -> ¢ [dest] mov [dest], eax ;ª­®¯ªã ­ §­ ç¥­¨ï -> ¢ [dest]
mov eax, edx ;¯ à ¬¥âà ¢ eax mov eax, edx ;¯ à ¬¥âà ¢ eax
call test_path ;¢ë§ë¢ ¥¬ ४ãàá¨î test_path call test_path ;¢ë§ë¢ ¥¬ ४ãàá¨î test_path
call zero_cheked call zero_cheked
jnc still jnc still
;^^^^^^^^^^^^^^^^^ move_ball proc ;^^^^^^^^^^^^^^^^^ move_ball proc
mov eax, [current] mov eax, [current]
mov cl, byte [eax + lineBall - 2] mov cl, byte [eax + lineBall - 2]
mov byte [eax + lineBall - 2], 0 mov byte [eax + lineBall - 2], 0
mov eax, [dest] mov eax, [dest]
mov byte [eax + lineBall - 2], cl mov byte [eax + lineBall - 2], cl
mov eax, [current] mov eax, [current]
call redraw_cell call redraw_cell
mov eax, [dest] mov eax, [dest]
call paint_ball call paint_ball
mov [current], 0 mov [current], 0
;^^^^^^^^^^^^^^^^^ move_ball endp ;^^^^^^^^^^^^^^^^^ move_ball endp
call find_line call find_line
call vanish_balls call vanish_balls
call zero_cheked call zero_cheked
cmp [countVanishBall], 0 cmp [countVanishBall], 0
je new_3_balls je new_3_balls
movzx eax, [countVanishBall] movzx eax, [countVanishBall]
inc eax inc eax
add [score], eax add [score], eax
sub [countAllBall], al sub [countAllBall], al
call redraw_score call redraw_score
jmp still jmp still
.exit: .exit:
mcall -1 ;¢ë室¨¬ mcall -1 ;¢ë室¨¬
new_3_balls: new_3_balls:
rept 3 num rept 3 num
{ {
mov dl, [newColor#num] mov dl, [newColor#num]
call add_new_ball call add_new_ball
call test_new_ball call test_new_ball
cmp [countAllBall],81 cmp [countAllBall],81
je .record_li je .record_li
} }
call generate_new___new_color call generate_new___new_color
call paint_new_color call paint_new_color
jmp still jmp still
.record_li: .record_li:
mov eax, [score] mov eax, [score]
cmp eax, [record] cmp eax, [record]
jbe still jbe still
mov [record], eax mov [record], eax
jmp START jmp START
zero_cheked: ;®¡­ã«¥­¨¥ ¬ âà¨æë cheked zero_cheked: ;®¡­ã«¥­¨¥ ¬ âà¨æë cheked
pushfd pushfd
mov eax, lineBall mov eax, lineBall
mov ecx, 81 mov ecx, 81
@@: @@:
and byte [eax], 0x7 and byte [eax], 0x7
inc eax inc eax
loop @B loop @B
popfd popfd
ret ret
random: ; edx := random [0..(ebx-1)] random: ; edx := random [0..(ebx-1)]
mov eax, 134775813 mov eax, 134775813
mul [TC_U_SYSTEM_RANDSEED] mul [TC_U_SYSTEM_RANDSEED]
inc eax inc eax
mov [ TC_U_SYSTEM_RANDSEED], eax mov [ TC_U_SYSTEM_RANDSEED], eax
xor edx, edx xor edx, edx
div ebx div ebx
ret ret
generate_new___new_color: generate_new___new_color:
rept 3 num rept 3 num
{ {
mov ebx, 7 mov ebx, 7
call random call random
inc dl inc dl
mov [newColor#num], dl mov [newColor#num], dl
} }
ret ret
add_new_ball: ;¢ dl - 梥â è à¨ª  add_new_ball: ;¢ dl - 梥â è à¨ª 
mov ebp, edx mov ebp, edx
mov ebx, 81 mov ebx, 81
sub bl, [countAllBall] sub bl, [countAllBall]
call random call random
mov ecx, edx mov ecx, edx
mov eax, lineBall-1 mov eax, lineBall-1
inc ecx inc ecx
@@: @@:
inc eax inc eax
test byte [eax], 0x7 test byte [eax], 0x7
jnz @B jnz @B
loop @B loop @B
;⥯¥àì ã ­ á ¢ eax -  ¤à¥á ­ è¥£® è à¨ª  ;⥯¥àì ã ­ á ¢ eax -  ¤à¥á ­ è¥£® è à¨ª 
mov edx, ebp mov edx, ebp
or byte [eax], dl or byte [eax], dl
inc [countAllBall] inc [countAllBall]
;¯®«ã稬 ID ª­®¯ª¨ ;¯®«ã稬 ID ª­®¯ª¨
sub eax, lineBall-2 sub eax, lineBall-2
mov [dest], eax mov [dest], eax
ret ret
test_new_ball: test_new_ball:
call paint_ball call paint_ball
call find_line call find_line
call vanish_balls call vanish_balls
call zero_cheked call zero_cheked
cmp [countVanishBall], 0 cmp [countVanishBall], 0
je @F je @F
movzx eax, [countVanishBall] movzx eax, [countVanishBall]
inc eax inc eax
add [score], eax add [score], eax
sub [countAllBall], al sub [countAllBall], al
call redraw_score call redraw_score
@@: @@:
ret ret
if lang eq ru_RU if lang eq ru_RU
szTitle db '–¢¥â­ë¥ «¨­¨¨ v 0.3',0 szTitle db '–¢¥â­ë¥ «¨­¨¨ v 0.3',0
szNewGame db 'F2 - ­®¢ ï ¨£à ',0 szNewGame db 'F2 - ­®¢ ï ¨£à ',0
szRecord db '<27>¥ª®à¤',0 szRecord db '<27>¥ª®à¤',0
szScore db 'Žçª¨',0 szScore db 'Žçª¨',0
else else ; Default to en_US
szTitle db 'Color lines v 0.3',0 szTitle db 'Color lines v 0.3',0
szNewGame db 'F2 - new game',0 szNewGame db 'F2 - new game',0
szRecord db 'Record',0 szRecord db 'Record',0
szScore db 'Score',0 szScore db 'Score',0
end if end if
blank = 0xB8C2D3 blank = 0xB8C2D3
brown = 0x804000 brown = 0x804000
red = 0xff0000 red = 0xff0000
yellow = 0xffff00 yellow = 0xffff00
green = 0x008000 green = 0x008000
cyan = 0x00ffff cyan = 0x00ffff
blue = 0x0000ff blue = 0x0000ff
purple = 0x800080 purple = 0x800080
tableColor dd blank,brown,red,yellow,green,cyan,blue,purple tableColor dd blank,brown,red,yellow,green,cyan,blue,purple
lineCoord: lineCoord:
rept 9 coory:0 rept 9 coory:0
{ {
rept 9 coorx:0 rept 9 coorx:0
\{ \{
dw coorx*256+coory dw coorx*256+coory
\} \}
} }
record dd 25 record dd 25
lineBall db 81 dup ? lineBall db 81 dup ?
score dd ? score dd ?
baseAddr dd ? baseAddr dd ?
current dd ? current dd ?
dest dd ? dest dd ?
newColor1 db ? newColor1 db ?
newColor2 db ? newColor2 db ?
newColor3 db ? newColor3 db ?
countVanishBall db ? countVanishBall db ?
countAllBall db ? countAllBall db ?
TC_U_SYSTEM_RANDSEED dd ? TC_U_SYSTEM_RANDSEED dd ?
bitID dd ? bitID dd ?
I_END: I_END:

View File

@ -1,140 +1,142 @@
; level format ; Language support for locales: ru_RU (CP866), en_US.
; [fx|fy]..[field cells x2]..[worm_count]..[worm_len][start cell #][body dirs x2]
; level format
; internal format ; [fx|fy]..[field cells x2]..[worm_count]..[worm_len][start cell #][body dirs x2]
; [stepptr]= worms #
; area: [worm_len][start_cell #][end_cell #]..[dirs].. ; internal format
; [cur_step]: dragged worm pointer ; [stepptr]= worms #
; [finish]: 0 - if head dragged, 1- if tail ; area: [worm_len][start_cell #][end_cell #]..[dirs]..
CZ_levelp: ; [cur_step]: dragged worm pointer
call get_xy_sf ; [finish]: 0 - if head dragged, 1- if tail
call LP_levelp.bit2 CZ_levelp:
mov dword[area],5;0 call get_xy_sf
ret call LP_levelp.bit2
mov dword[area],5;0
CZ_key: ret
mov [jump],still
cmp eax,176 CZ_key:
jb .ex mov [jump],still
cmp eax,179 cmp eax,176
ja .ex jb .ex
mov ecx,dword[area] cmp eax,179
lea ebx,[eax-176] ja .ex
mov eax,[player] mov ecx,dword[area]
call check_bounds lea ebx,[eax-176]
je .ex mov eax,[player]
cmp ecx,5 call check_bounds
jne .novert je .ex
.vert: cmp ecx,5
add eax,[dirs+ebx*4] jne .novert
call check_bounds .vert:
je .ex add eax,[dirs+ebx*4]
mov ecx,eax call check_bounds
add ecx,[dirs+ebx*4] je .ex
mov cl,[field+ecx] mov ecx,eax
cmp cl,[field+eax] add ecx,[dirs+ebx*4]
jne .ex mov cl,[field+ecx]
mov dword[area],ebx cmp cl,[field+eax]
.ok: jne .ex
mov [player],eax mov dword[area],ebx
cmp eax,[finish] .ok:
jne .jm mov [player],eax
cmp dword[area],5 cmp eax,[finish]
jne .jm jne .jm
mov [win_flag],1 cmp dword[area],5
.jm: jne .jm
mov [jump],drw mov [win_flag],1
.ex: .jm:
ret mov [jump],drw
.novert: .ex:
mov edx,ebx ret
cmp edx,ecx ; the same dir .novert:
jne .nosame mov edx,ebx
add eax,[dirs+ebx*4] cmp edx,ecx ; the same dir
call check_bounds jne .nosame
je .ex add eax,[dirs+ebx*4]
.set5: call check_bounds
mov dword[area],5 je .ex
add eax,[dirs+ebx*4] .set5:
jmp .ok mov dword[area],5
.nosame: add eax,[dirs+ebx*4]
xor edx,11b jmp .ok
cmp edx,ecx ; the opposite dir .nosame:
je .set5 xor edx,11b
add eax,[dirs+ebx*4] cmp edx,ecx ; the opposite dir
mov ebx,ecx je .set5
xor ecx,11b add eax,[dirs+ebx*4]
add eax,[dirs+ecx*4] mov ebx,ecx
jmp .vert xor ecx,11b
add eax,[dirs+ecx*4]
CZ_drawm: jmp .vert
mov ecx,[cell_count]
mov esi,field CZ_drawm:
mov [sq_size],3 mov ecx,[cell_count]
.lp: mov esi,field
push ecx mov [sq_size],3
movzx ebx,byte[field+ecx-1] .lp:
shr ebx,6 push ecx
lea eax,[ecx-1] movzx ebx,byte[field+ecx-1]
call get_xy shr ebx,6
add [lx],5-2 shl 16 lea eax,[ecx-1]
add [ly],5-2 shl 16 call get_xy
mov edx,[f_colors+ebx*4] add [lx],5-2 shl 16
mcall 13,[lx],[ly] add [ly],5-2 shl 16
.no: mov edx,[f_colors+ebx*4]
pop ecx mcall 13,[lx],[ly]
loop .lp .no:
pop ecx
inc [sq_size] loop .lp
mov eax,[player]
call get_xy inc [sq_size]
xor edx,edx mov eax,[player]
cmp dword[area],5 call get_xy
je .vert xor edx,edx
push [lx] cmp dword[area],5
push [ly] je .vert
mov edx,dword[area] push [lx]
add eax,[dirs+edx*4] push [ly]
call get_xy mov edx,dword[area]
mcall 13,[lx],[ly] add eax,[dirs+edx*4]
pop [ly] call get_xy
pop [lx] mcall 13,[lx],[ly]
.vert: pop [ly]
mcall 13,[lx],[ly] pop [lx]
add [sq_size],5 .vert:
mov eax,[finish] mcall 13,[lx],[ly]
call get_xy add [sq_size],5
mcall 13,[lx],[ly],0xffffff mov eax,[finish]
call get_xy
ret mcall 13,[lx],[ly],0xffffff
ret
CZ_level:
file 'colzone.bin'
CZ_level:
if lang eq ru_RU file 'colzone.bin'
CZ_help mstr \
'—¥à­ë© ¡«®ª ¨§ 2 ªã¡¨ª®¢ á⮨⠭  à áªà è¥­­®©',\ if lang eq ru_RU
'ª«¥âç â®© ¤®áª¥. ‚ è  § ¤ ç  - ¯¥à¥ª â¨âì ¥£® ­ ',\ CZ_help mstr \
'ª«¥âªã á ¡¥«ë¬ ª¢ ¤à â¨ª®¬. <20>«®ª ­ ç¨­ ¥â áâ®ï ¨',\ '—¥à­ë© ¡«®ª ¨§ 2 ªã¡¨ª®¢ á⮨⠭  à áªà è¥­­®©',\
'¤®«¦¥­ § ª®­ç¨âì ⮦¥ ¢ ¢¥à⨪ «ì­®¬ ¯®«®¦¥­¨¨.',\ 'ª«¥âç â®© ¤®áª¥. ‚ è  § ¤ ç  - ¯¥à¥ª â¨âì ¥£® ­ ',\
'<27>¥«ì§ï ¢ëª â뢠âì ¥£® §  ¯à¥¤¥«ë á¥âª¨ ¨ ᢥàå',\ 'ª«¥âªã á ¡¥«ë¬ ª¢ ¤à â¨ª®¬. <20>«®ª ­ ç¨­ ¥â áâ®ï ¨',\
'⮣® - ªã¡¨ª¨ ¡«®ª  ¤®«¦­ë ¢á¥£¤  «®¦¨âìáï ­ ',\ '¤®«¦¥­ § ª®­ç¨âì ⮦¥ ¢ ¢¥à⨪ «ì­®¬ ¯®«®¦¥­¨¨.',\
'ª«¥âª¨ ®¤¨­ ª®¢®£® 梥â . <20>«®ª ­¥ ®â®¡à ¦¥­ ¢ 3D,',\ '<27>¥«ì§ï ¢ëª â뢠âì ¥£® §  ¯à¥¤¥«ë á¥âª¨ ¨ ᢥàå',\
'¯®íâ®¬ã ‚ë ¢¨¤¨â¥ «¨èì ¥£® ¯à®¥ªæ¨î.','',\ '⮣® - ªã¡¨ª¨ ¡«®ª  ¤®«¦­ë ¢á¥£¤  «®¦¨âìáï ­ ',\
'http://www.clickmazes.com' 'ª«¥âª¨ ®¤¨­ ª®¢®£® 梥â . <20>«®ª ­¥ ®â®¡à ¦¥­ ¢ 3D,',\
else '¯®íâ®¬ã ‚ë ¢¨¤¨â¥ «¨èì ¥£® ¯à®¥ªæ¨î.','',\
CZ_help mstr \ 'http://www.clickmazes.com'
'A black block, made of two black cubes stuck',\ else ; Default to en_US
'together, sits on a coloured grid. Your challenge',\ CZ_help mstr \
'is to roll the black block to its target',\ 'A black block, made of two black cubes stuck',\
'position, which is marked with a small white',\ 'together, sits on a coloured grid. Your challenge',\
'square. The block starts on one end (vertical)',\ 'is to roll the black block to its target',\
'and must also finish in this position. The block',\ 'position, which is marked with a small white',\
'is not permitted to roll off the grid and, in',\ 'square. The block starts on one end (vertical)',\
'addition, the block must always lie entirely',\ 'and must also finish in this position. The block',\
'within one colour-zone. Note the block is not',\ 'is not permitted to roll off the grid and, in',\
'displayed in 3D, in effect you see only its',\ 'addition, the block must always lie entirely',\
'shadow.','',\ 'within one colour-zone. Note the block is not',\
'http://www.clickmazes.com' 'displayed in 3D, in effect you see only its',\
end if 'shadow.','',\
'http://www.clickmazes.com'
end if

View File

@ -1,66 +1,68 @@
; level format ; Language support for locales: ru_RU (CP866), en_US.
; [fx|fy][blue xy][red xy]..[maze walls]
; level format
; internal format ; [fx|fy][blue xy][red xy]..[maze walls]
; [player]= blue
; [finish]= red ; internal format
; [player]= blue
; [finish]= red
CSTEP_key:
cmp eax,176
jb .ex CSTEP_key:
cmp eax,179 cmp eax,176
ja .ex jb .ex
mov esi,area cmp eax,179
inc esi ja .ex
lea ebx,[eax-176] mov esi,area
mov [jump],still inc esi
mov eax,[player] lea ebx,[eax-176]
call check_move mov [jump],still
jc .ex mov eax,[player]
add eax,[dirs+ebx*4] call check_move
mov edx,eax jc .ex
.nom1: add eax,[dirs+ebx*4]
mov eax,[finish] mov edx,eax
xor ebx,11b .nom1:
call check_move mov eax,[finish]
jc .ex xor ebx,11b
add eax,[dirs+ebx*4] call check_move
mov [finish],eax jc .ex
mov [player],edx add eax,[dirs+ebx*4]
mov [jump],drw mov [finish],eax
cmp eax,edx mov [player],edx
jnz .ex mov [jump],drw
mov [win_flag],1 cmp eax,edx
.ex: jnz .ex
ret mov [win_flag],1
.ex:
CSTEP_drawm: ret
mov eax,[player]
call get_xy CSTEP_drawm:
mcall 13,[lx],[ly],0xff0000 mov eax,[player]
mov eax,[finish] call get_xy
call get_xy mcall 13,[lx],[ly],0xff0000
mcall 13,[lx],[ly],0xff mov eax,[finish]
ret call get_xy
mcall 13,[lx],[ly],0xff
CSTEP_level: ret
file 'cstep.bin'
CSTEP_level:
if lang eq ru_RU file 'cstep.bin'
CSTEP_help mstr \
'‘®¥¤¨­¨â¥ ªà á­ë© ¨ ᨭ¨© ¡«®ª¨ ¯ã⥬ ã¯à ¢«¥­¨ï',\ if lang eq ru_RU
'®¤­¨¬ ªà á­ë¬ ¡«®ª®¬. ‘¨­¨© ¡«®ª á«¥¤ã¥â § ',\ CSTEP_help mstr \
'ªà á­ë¬, ­® ¤¢¨¦¥âáï ¢ ¯àאַ ¯à®â¨¢®¯®«®¦­®¬',\ '‘®¥¤¨­¨â¥ ªà á­ë© ¨ ᨭ¨© ¡«®ª¨ ¯ã⥬ ã¯à ¢«¥­¨ï',\
'­ ¯à ¢«¥­¨¨. •®¤ à §à¥è¥­ ⮫쪮 ¢ á«ãç ¥',\ '®¤­¨¬ ªà á­ë¬ ¡«®ª®¬. ‘¨­¨© ¡«®ª á«¥¤ã¥â § ',\
'®âáãâáâ¢¨ï ¯à¥¯ïâá⢨© ¤«ï ®¡®¨å ¡«®ª®¢.','',\ 'ªà á­ë¬, ­® ¤¢¨¦¥âáï ¢ ¯àאַ ¯à®â¨¢®¯®«®¦­®¬',\
'http://www.clickmazes.com' '­ ¯à ¢«¥­¨¨. •®¤ à §à¥è¥­ ⮫쪮 ¢ á«ãç ¥',\
else '®âáãâáâ¢¨ï ¯à¥¯ïâá⢨© ¤«ï ®¡®¨å ¡«®ª®¢.','',\
CSTEP_help mstr \ 'http://www.clickmazes.com'
'Unite the red and blue dots by moving just the',\ else ; Default to en_US
'red dot. The blue dot follows the red dot, but',\ CSTEP_help mstr \
'moves in exactly in the opposite direction. A',\ 'Unite the red and blue dots by moving just the',\
'move is only permitted if the path is clear for',\ 'red dot. The blue dot follows the red dot, but',\
'both dots.','',\ 'moves in exactly in the opposite direction. A',\
'http://www.clickmazes.com' 'move is only permitted if the path is clear for',\
end if 'both dots.','',\
'http://www.clickmazes.com'
end if

View File

@ -1,197 +1,199 @@
FH_levelp: ; Language support for locales: ru_RU (CP866), en_US.
mcall 40,100111b
call get_xy_sf FH_levelp:
call erase_field mcall 40,100111b
sub esi,2 call get_xy_sf
mov [levptr],esi call erase_field
movzx ecx,byte[esi-2] sub esi,2
sub ecx,2 mov [levptr],esi
xor eax,eax movzx ecx,byte[esi-2]
.lp: sub ecx,2
lodsb xor eax,eax
mov byte[field+eax],-1 .lp:
loop .lp lodsb
mov dword[player],-1 mov byte[field+eax],-1
mov [win_flag],3 loop .lp
ret mov dword[player],-1
mov [win_flag],3
FH_key: ret
cmp eax,-1
je FH_mouse FH_key:
cmp eax,8 cmp eax,-1
jne .nobsp je FH_mouse
cmp [stepptr],0 cmp eax,8
jne .no1st jne .nobsp
mov [jump],run.game cmp [stepptr],0
ret jne .no1st
.no1st: mov [jump],run.game
mov [win_flag],0 ret
sub [cur_step],2 .no1st:
mov esi,[cur_step] mov [win_flag],0
mov edi,[finish] sub [cur_step],2
mov eax,3 mov esi,[cur_step]
movzx ebx,byte[esi] mov edi,[finish]
sub eax,ebx mov eax,3
movzx ecx,byte[esi+1] movzx ebx,byte[esi]
.lp0: sub eax,ebx
and byte[field+edi],0 movzx ecx,byte[esi+1]
add edi,[dirs+eax*4] .lp0:
loop .lp0 and byte[field+edi],0
mov [finish],edi add edi,[dirs+eax*4]
dec [stepptr] loop .lp0
ret mov [finish],edi
.nobsp: dec [stepptr]
cmp eax,176 ret
jb .ex .nobsp:
cmp eax,179 cmp eax,176
ja .ex jb .ex
sub eax,176 cmp eax,179
jmp FH_mouse.fromkey ja .ex
.ex: sub eax,176
ret jmp FH_mouse.fromkey
.ex:
FH_drawm: ret
mov ecx,[cell_count]
.lp: FH_drawm:
push ecx mov ecx,[cell_count]
movzx ebx,byte[field+ecx-1] .lp:
test ebx,ebx push ecx
jz .no movzx ebx,byte[field+ecx-1]
lea eax,[ecx-1] test ebx,ebx
call get_xy jz .no
mov edx,0 lea eax,[ecx-1]
cmp ebx,0xf call get_xy
jne .stable mov edx,0
mov edx,0x909090 cmp ebx,0xf
.stable: jne .stable
mcall 13,[lx],[ly] mov edx,0x909090
.no: .stable:
pop ecx mcall 13,[lx],[ly]
loop .lp .no:
pop ecx
mov eax,[player] loop .lp
cmp eax,-1
je .ex mov eax,[player]
call get_xy cmp eax,-1
mcall 13,[lx],[ly],0xff00 je .ex
mov eax,[finish] call get_xy
call get_xy mcall 13,[lx],[ly],0xff00
mcall 13,[lx],[ly],0xff0000 mov eax,[finish]
call get_xy
mov ecx,[stepptr] mcall 13,[lx],[ly],0xff0000
jecxz .ex
mov ebx,area mov ecx,[stepptr]
mov edi,[player] jecxz .ex
mov edx,0xffffff mov ebx,area
.lp3: mov edi,[player]
push ecx mov edx,0xffffff
mov esi,edi .lp3:
movzx eax,byte[ebx] push ecx
movzx ecx,byte[ebx+1] mov esi,edi
add ebx,2 movzx eax,byte[ebx]
.lp2: movzx ecx,byte[ebx+1]
add edi,[dirs+eax*4] add ebx,2
loop .lp2 .lp2:
call getline add edi,[dirs+eax*4]
pop ecx loop .lp2
loop .lp3 call getline
.ex: pop ecx
ret loop .lp3
.ex:
FH_mouse: ret
mov [jump],drw;red
call get_last_mclick FH_mouse:
cmp byte[field+ebx],0 mov [jump],drw;red
jne .ex call get_last_mclick
cmp dword[player],-1 cmp byte[field+ebx],0
jne .nostart jne .ex
mov dword[player],ebx cmp dword[player],-1
mov byte[field+ebx],0xf jne .nostart
mov [finish],ebx mov dword[player],ebx
and [win_flag],0 mov byte[field+ebx],0xf
mov [cur_step],area mov [finish],ebx
and [stepptr],0 and [win_flag],0
ret mov [cur_step],area
.nostart: and [stepptr],0
mov eax,[finish] ret
call get_offset .nostart:
cmp eax,-1 mov eax,[finish]
je .ex call get_offset
.fromkey: cmp eax,-1
xor ecx,ecx je .ex
mov edx,eax .fromkey:
mov esi,[finish] xor ecx,ecx
.lp: mov edx,eax
add esi,[dirs+edx*4] mov esi,[finish]
cmp byte[field+esi],0 .lp:
jnz .exlp add esi,[dirs+edx*4]
mov eax,[finish] cmp byte[field+esi],0
mov ebx,esi jnz .exlp
call get_offset mov eax,[finish]
cmp eax,edx mov ebx,esi
jne .exlp call get_offset
mov byte[field+esi],0xf cmp eax,edx
inc ecx jne .exlp
mov [finish],esi mov byte[field+esi],0xf
jmp .lp inc ecx
mov [finish],esi
.exlp: jmp .lp
jecxz .ex
mov eax,edx .exlp:
mov edi,[cur_step] jecxz .ex
stosb mov eax,edx
mov [edi],cl mov edi,[cur_step]
inc edi stosb
mov [cur_step],edi mov [edi],cl
inc [stepptr] inc edi
mov edi,field mov [cur_step],edi
mov ecx,[cell_count] inc [stepptr]
xor eax,eax mov edi,field
repne scasb mov ecx,[cell_count]
je .ch_deadend xor eax,eax
mov [win_flag],1 repne scasb
.ex: je .ch_deadend
ret mov [win_flag],1
.ch_deadend: .ex:
mov ecx,4 ret
mov edx,dirs .ch_deadend:
.lpp: mov ecx,4
mov eax,[finish] mov edx,dirs
mov ebx,[edx] .lpp:
add ebx,eax mov eax,[finish]
push ebx mov ebx,[edx]
call get_offset add ebx,eax
pop ebx push ebx
cmp eax,-1 call get_offset
je .nxtlp pop ebx
cmp byte[field+ebx],0 cmp eax,-1
jz .ex je .nxtlp
.nxtlp: cmp byte[field+ebx],0
add edx,4 jz .ex
loop .lpp .nxtlp:
mov [win_flag],4 add edx,4
ret loop .lpp
mov [win_flag],4
FH_level: ret
file 'fhouse.bin'
FH_level:
if lang eq ru_RU file 'fhouse.bin'
FH_help mstr \
' § ¤ ­¨¨ ­ ©¤¨â¥ ­ ç «ì­ãî ª«¥âªã ¨ ¯à®¢¥¤¨â¥',\ if lang eq ru_RU
'«¨­¨î, ª®â®à ï ¯à®å®¤¨â ç¥à¥§ ¯ãáâë¥ ª«¥âª¨ ¯®',\ FH_help mstr \
'®¤­®¬ã à §ã.',\ ' § ¤ ­¨¨ ­ ©¤¨â¥ ­ ç «ì­ãî ª«¥âªã ¨ ¯à®¢¥¤¨â¥',\
' Š ¦¤ë© à § ªà á­ë© ª¢ ¤à â ¤¢¨£ ¥âáï ¯àאַ,',\ '«¨­¨î, ª®â®à ï ¯à®å®¤¨â ç¥à¥§ ¯ãáâë¥ ª«¥âª¨ ¯®',\
'®áâ ­ ¢«¨¢ ïáì ⮫쪮 ã ªà ï, ¯¥à¥¤ ç¥à­ë¬¨',\ '®¤­®¬ã à §ã.',\
'ª¢ ¤à â ¬¨ ¨«¨ 㦥 ¯®á¥é¥­­ë¬¨ ª«¥âª ¬¨.','',\ ' Š ¦¤ë© à § ªà á­ë© ª¢ ¤à â ¤¢¨£ ¥âáï ¯àאַ,',\
'http://www.clickmazes.com' '®áâ ­ ¢«¨¢ ïáì ⮫쪮 ã ªà ï, ¯¥à¥¤ ç¥à­ë¬¨',\
else 'ª¢ ¤à â ¬¨ ¨«¨ 㦥 ¯®á¥é¥­­ë¬¨ ª«¥âª ¬¨.','',\
FH_help mstr \ 'http://www.clickmazes.com'
'For each puzzle find the starting square and draw',\ else ; Default to en_US
'a path moving horizontally and vertically that',\ FH_help mstr \
'passes through each open square exactly once.','',\ 'For each puzzle find the starting square and draw',\
'At each move the red runner will always run',\ 'a path moving horizontally and vertically that',\
'straight, as far as possible, stopping only when',\ 'passes through each open square exactly once.','',\
"blocked by the grid's edge, a black square, or a",\ 'At each move the red runner will always run',\
'square already visited.','',\ 'straight, as far as possible, stopping only when',\
'http://www.clickmazes.com' "blocked by the grid's edge, a black square, or a",\
end if 'square already visited.','',\
'http://www.clickmazes.com'
end if

View File

@ -1,245 +1,247 @@
LP_levelp: ; Language support for locales: ru_RU (CP866), en_US.
mcall 40,100111b
inc [drag_flag] LP_levelp:
lodsb mcall 40,100111b
lodsw inc [drag_flag]
mov byte[fx],al lodsb
mov byte[fy],ah lodsw
and dword[player],0 mov byte[fx],al
and dword[finish],0 mov byte[fy],ah
call get_xy_sf.count and dword[player],0
call erase_field and dword[finish],0
; mov [levptr],esi call get_xy_sf.count
.bit2: call erase_field
mov edx,8/2 ; mov [levptr],esi
mov edi,field .bit2:
lodsb mov edx,8/2
mov ecx,[cell_count] mov edi,field
.lp: lodsb
mov bl,al mov ecx,[cell_count]
rol al,2 .lp:
and bl,11000000b mov bl,al
mov [edi],bl rol al,2
inc edi and bl,11000000b
dec edx mov [edi],bl
test edx,edx inc edi
jnz .nxt dec edx
mov edx,8/2 test edx,edx
lodsb jnz .nxt
.nxt: mov edx,8/2
loop .lp lodsb
ret .nxt:
loop .lp
LP_key: ret
cmp eax,0
jl LP_mouse LP_key:
cmp eax,8 cmp eax,0
jne .nobsp jl LP_mouse
cmp [stepptr],0 cmp eax,8
jne .no1st jne .nobsp
mov [jump],run.game cmp [stepptr],0
ret jne .no1st
.no1st: mov [jump],run.game
mov [win_flag],0 ret
sub [cur_step],2 .no1st:
mov esi,[cur_step] mov [win_flag],0
mov edi,[finish] sub [cur_step],2
mov eax,3 mov esi,[cur_step]
movzx ebx,byte[esi] mov edi,[finish]
sub eax,ebx mov eax,3
movzx ecx,byte[esi+1] movzx ebx,byte[esi]
.lp0: sub eax,ebx
and byte[field+edi],0 movzx ecx,byte[esi+1]
add edi,[dirs+eax*4] .lp0:
loop .lp0 and byte[field+edi],0
mov [finish],edi add edi,[dirs+eax*4]
dec [stepptr] loop .lp0
ret mov [finish],edi
.nobsp: dec [stepptr]
cmp eax,176 ret
jb .ex .nobsp:
cmp eax,179 cmp eax,176
ja .ex jb .ex
sub eax,176 cmp eax,179
.ex: ja .ex
ret sub eax,176
.ex:
LP_drawm: ret
and [pause_time],0
mov ecx,[cell_count] LP_drawm:
.lp: and [pause_time],0
push ecx mov ecx,[cell_count]
mov bl,byte[field+ecx-1] .lp:
push ebx push ecx
lea eax,[ecx-1] mov bl,byte[field+ecx-1]
mov ecx,eax push ebx
call get_xy lea eax,[ecx-1]
mov ecx,eax
mov al,bl call get_xy
and al,0xf
test bl,11000000b mov al,bl
jnz .noempty and al,0xf
mov esi,LP_aw test bl,11000000b
mov ecx,11 jnz .noempty
call LP_draw_alert mov esi,LP_aw
jmp .no mov ecx,11
.noempty: call LP_draw_alert
mov edx,0 jmp .no
test bl,10000000b .noempty:
je .stable mov edx,0
mov edx,0xffffff test bl,10000000b
mov esi,LP_aw je .stable
mov ecx,7 mov edx,0xffffff
jmp .d13 mov esi,LP_aw
.stable: mov ecx,7
mov esi,LP_em jmp .d13
mov ecx,9 .stable:
.d13: mov esi,LP_em
call LP_draw_alert mov ecx,9
mcall 13,[lx],[ly] .d13:
.no: call LP_draw_alert
mov esi,[esp+4] mcall 13,[lx],[ly]
dec esi .no:
mov edi,esi mov esi,[esp+4]
mov edx,0x0000FF dec esi
; ecx - cell # mov edi,esi
test byte[esp],10b mov edx,0x0000FF
je .no_dn ; ecx - cell #
add edi,[dirs+4*1] test byte[esp],10b
call getline je .no_dn
.no_dn: add edi,[dirs+4*1]
test byte[esp],1000b call getline
je .no_right .no_dn:
mov edi,esi test byte[esp],1000b
add edi,[dirs+4*3] je .no_right
call getline mov edi,esi
.no_right: add edi,[dirs+4*3]
pop ebx call getline
pop ecx .no_right:
.valid: pop ebx
loop .lp2 pop ecx
jmp .exlp .valid:
.lp2: loop .lp2
jmp .lp jmp .exlp
.exlp: .lp2:
jmp .lp
mov esi,[player] .exlp:
mov edi,[finish]
cmp esi,edi mov esi,[player]
je .ex mov edi,[finish]
mov edx,0x7777FF cmp esi,edi
call getline je .ex
.ex: mov edx,0x7777FF
cmp [pause_time],0 call getline
jne .ex2 .ex:
xor ecx,ecx cmp [pause_time],0
xor ebx,ebx jne .ex2
mov edx,5 xor ecx,ecx
; eax - cur cell content, ebx - cell #, ecx - cell counter, edx - dir xor ebx,ebx
.chwin: mov edx,5
movzx eax,byte[field+ebx] ; eax - cur cell content, ebx - cell #, ecx - cell counter, edx - dir
and eax,0xf .chwin:
btr eax,edx movzx eax,byte[field+ebx]
bsf edx,eax and eax,0xf
je .ex3 btr eax,edx
inc ecx bsf edx,eax
add ebx,[dirs+edx*4] je .ex3
jz .ex3 inc ecx
xor edx,11b add ebx,[dirs+edx*4]
jmp .chwin jz .ex3
.ex3: xor edx,11b
cmp ecx,[cell_count] jmp .chwin
jne .ex2 .ex3:
mov [win_flag],1 cmp ecx,[cell_count]
.ex2: jne .ex2
ret mov [win_flag],1
.ex2:
LP_mouse: ret
cmp [win_flag],1
je .ex LP_mouse:
mov [jump],still cmp [win_flag],1
mov edx,eax je .ex
call get_last_mclick mov [jump],still
cmp edx,-2 mov edx,eax
jne .no1st call get_last_mclick
test eax,eax cmp edx,-2
jnz .noempty jne .no1st
mov eax,[player] test eax,eax
mov ebx,[finish] jnz .noempty
call get_offset mov eax,[player]
mov ecx,eax mov ebx,[finish]
mov edx,0x101 call get_offset
shl dl,cl mov ecx,eax
xor ecx,11b mov edx,0x101
shl dh,cl shl dl,cl
mov ecx,ebx xor ecx,11b
jecxz LP_drawm.ex2 shl dh,cl
mov esi,[player] mov ecx,ebx
.lp: jecxz LP_drawm.ex2
xor [field+esi],dl mov esi,[player]
add esi,[dirs+eax*4] .lp:
xor [field+esi],dh xor [field+esi],dl
loop .lp add esi,[dirs+eax*4]
xor ebx,ebx xor [field+esi],dh
.noempty: loop .lp
mov [player],ebx xor ebx,ebx
jmp .exx .noempty:
.no1st: mov [player],ebx
test eax,eax jmp .exx
jz .ex .no1st:
mov eax,[player] test eax,eax
push ebx jz .ex
call get_offset mov eax,[player]
pop ebx push ebx
cmp eax,-1 call get_offset
je .ex pop ebx
.exx: cmp eax,-1
mov [finish],ebx je .ex
mov [jump],drw .exx:
; ud2 mov [finish],ebx
.ex: mov [jump],drw
ret ; ud2
.ex:
ret
LP_aw db 1001b,0110b
LP_em db 0000b,0001b,0010b,0100b,1000b
LP_ab db 0011b,0101b,1100b,1010b,1001b,0110b LP_aw db 1001b,0110b
LP_em db 0000b,0001b,0010b,0100b,1000b
LP_draw_alert: LP_ab db 0011b,0101b,1100b,1010b,1001b,0110b
; al-cell, esi - ptr,ecx - len
.lp: LP_draw_alert:
cmp al,[esi] ; al-cell, esi - ptr,ecx - len
je .ex .lp:
inc esi cmp al,[esi]
loop .lp je .ex
pusha inc esi
mov ebx,[lx] loop .lp
mov ecx,[ly] pusha
add ebx,4-2 shl 16 mov ebx,[lx]
add ecx,4-2 shl 16 mov ecx,[ly]
mcall 13,,,0xFFAAAA add ebx,4-2 shl 16
mov [pause_time],eax add ecx,4-2 shl 16
popa mcall 13,,,0xFFAAAA
.ex: mov [pause_time],eax
ret popa
.ex:
LP_level: ret
file 'loops.bin'
LP_level:
if lang eq ru_RU file 'loops.bin'
LP_help mstr \
'—¥à¥§ ¢á¥ ª«¥âª¨ ¯àאַ㣮«ì­¨ª  ­¥®¡å®¤¨¬®',\ if lang eq ru_RU
'¯à®¢¥á⨠§ ¬ª­ãâãî «®¬ ­ãî. <20>à®å®¤ï ç¥à¥§ ç¥à­ë©',\ LP_help mstr \
'ªà㦮ª, «®¬ ­ ï ®¡ï§ ­  ¯®¢¥à­ãâì,   ¯à®å®¤ï',\ '—¥à¥§ ¢á¥ ª«¥âª¨ ¯àאַ㣮«ì­¨ª  ­¥®¡å®¤¨¬®',\
'ç¥à¥§ ¡¥«ë© ªà㦮ª, «®¬ ­ ï ¯®¢®à ç¨¢ âì ­¥',\ '¯à®¢¥á⨠§ ¬ª­ãâãî «®¬ ­ãî. <20>à®å®¤ï ç¥à¥§ ç¥à­ë©',\
'¬®¦¥â. ¯ãáâëå ¦¥ ª«¥âª å «®¬ ­ ï ¢¥¤¥â á¥¡ï ª ª',\ 'ªà㦮ª, «®¬ ­ ï ®¡ï§ ­  ¯®¢¥à­ãâì,   ¯à®å®¤ï',\
'§ å®ç¥â.','',\ 'ç¥à¥§ ¡¥«ë© ªà㦮ª, «®¬ ­ ï ¯®¢®à ç¨¢ âì ­¥',\
'http://puzzleprograms.narod.ru' '¬®¦¥â. ¯ãáâëå ¦¥ ª«¥âª å «®¬ ­ ï ¢¥¤¥â á¥¡ï ª ª',\
else '§ å®ç¥â.','',\
LP_help mstr \ 'http://puzzleprograms.narod.ru' ; FIXME: Check link works
'You have to draw closed line over every grid',\ else ; Default to en_US
'cell. On black square line must turn, and it must',\ LP_help mstr \
'go straight when over white square. The line may',\ 'You have to draw a closed line over every grid',\
'behave anyhow elsewhere.','',\ 'cell. On black square line must turn, and it must',\
'http://puzzleprograms.narod.ru' 'go straight when over white square. The line may',\
end if 'behave anyhow elsewhere.','',\
'http://puzzleprograms.narod.ru' ; FIXME: Check link works
end if

View File

@ -1,138 +1,140 @@
; level format ; Language support for locales: ru_RU (CP866), en_US.
; [fx|fy][hole xy][balls #]..[1-red,0-black xy]..[maze walls]
; level format
; internal format ; [fx|fy][hole xy][balls #]..[1-red,0-black xy]..[maze walls]
; [stepptr]= balls #
; [finish]= hole cell ; internal format
; area: ..[1-red,0-black xy].. ( -1 if empty) ; [stepptr]= balls #
; [finish]= hole cell
MAR_levelp: ; area: ..[1-red,0-black xy].. ( -1 if empty)
call get_xy_sf
movzx eax,byte[esi-2] MAR_levelp:
mov [finish],eax call get_xy_sf
movzx ecx,byte[esi-1] movzx eax,byte[esi-2]
mov [stepptr],ecx mov [finish],eax
mov edi,area movzx ecx,byte[esi-1]
rep movsb mov [stepptr],ecx
mov [pause_time],10 mov edi,area
call unpack_level rep movsb
ret mov [pause_time],10
call unpack_level
MAR_key: ret
cmp eax,176
jb .ex MAR_key:
cmp eax,179 cmp eax,176
ja .ex jb .ex
mov esi,area-1 cmp eax,179
lea ebx,[eax-176] ja .ex
.again: mov esi,area-1
and [cur_step],0 lea ebx,[eax-176]
mov ecx,[stepptr] .again:
.lp: and [cur_step],0
movzx eax,byte[esi+ecx] mov ecx,[stepptr]
cmp al,-1 .lp:
je .ex1 movzx eax,byte[esi+ecx]
mov byte[player],al cmp al,-1
and byte[player],0x80 je .ex1
and eax,0x7f mov byte[player],al
call check_move and byte[player],0x80
jc .ex1 and eax,0x7f
add eax,[dirs+ebx*4] call check_move
cmp eax,[finish] jc .ex1
jne .nohole add eax,[dirs+ebx*4]
mov byte[esi+ecx],-1 cmp eax,[finish]
jmp .ex2 jne .nohole
.nohole: mov byte[esi+ecx],-1
push ecx jmp .ex2
mov ecx,[stepptr] .nohole:
mov edi,area push ecx
.lp2: mov ecx,[stepptr]
mov dl,[edi] mov edi,area
and dl,0x7f .lp2:
cmp al,dl mov dl,[edi]
je .exlp2 and dl,0x7f
inc edi cmp al,dl
loop .lp2 je .exlp2
.exlp2: inc edi
pop ecx loop .lp2
je .ex1 .exlp2:
or al,byte[player] pop ecx
mov [esi+ecx],al je .ex1
.ex2: or al,byte[player]
inc [cur_step] mov [esi+ecx],al
.ex1: .ex2:
loop .lp inc [cur_step]
cmp [cur_step],0 .ex1:
je .exx loop .lp
call delay cmp [cur_step],0
call drwfld je .exx
jmp .again call delay
.exx: call drwfld
mov ecx,[stepptr] jmp .again
inc esi .exx:
.lp3: mov ecx,[stepptr]
lodsb inc esi
cmp al,-1 .lp3:
je .nxt lodsb
test al,0x80 cmp al,-1
jne .ex je .nxt
.nxt: test al,0x80
loop .lp3 jne .ex
mov [win_flag],1 .nxt:
.ex: loop .lp3
ret mov [win_flag],1
.ex:
MAR_drawm: ret
shl [sq_size],1
mov eax,[finish] MAR_drawm:
call get_xy shl [sq_size],1
shr [sq_size],1 mov eax,[finish]
mcall 13,[lx],[ly],0xa0a0a0 call get_xy
movzx ecx,byte[stepptr] shr [sq_size],1
mov edi,area mcall 13,[lx],[ly],0xa0a0a0
.lp: movzx ecx,byte[stepptr]
push ecx mov edi,area
movzx eax,byte[edi] .lp:
mov edx,0x0 push ecx
cmp al,-1 movzx eax,byte[edi]
je .exlp mov edx,0x0
test eax,0x80 cmp al,-1
je .no je .exlp
mov edx,0xff00000 test eax,0x80
.no: je .no
and eax,0x7f mov edx,0xff00000
call get_xy .no:
mcall 13,[lx],[ly] and eax,0x7f
.exlp: call get_xy
pop ecx mcall 13,[lx],[ly]
inc edi .exlp:
loop .lp pop ecx
.ex: inc edi
ret loop .lp
.ex:
MAR_level: ret
file 'marble.bin'
MAR_level:
if lang eq ru_RU file 'marble.bin'
MAR_help mstr \
'<27>¥áª®«ìª® ªà á­ëå ¨ ç¥à­ëå ¯« è¥ª «¥¦ â ­  ¤®áª¥,',\ if lang eq ru_RU
'¤ëઠ ®¡®§­ ç¥­  á¥à®© ª«¥âª®©. Š®£¤  ¯« èª ',\ MAR_help mstr \
'¯à®å®¤¨â ­ ¤ ¤ëમ©, ®­  ¯ ¤ ¥â â㤠 ¨ ¨á祧 ¥â.',\ '<27>¥áª®«ìª® ªà á­ëå ¨ ç¥à­ëå ¯« è¥ª «¥¦ â ­  ¤®áª¥,',\
'ˆá¯®«ì§ã©â¥ áâ५ª¨ ¤«ï ­ ª«®­  ¤®áª¨.',\ '¤ëઠ ®¡®§­ ç¥­  á¥à®© ª«¥âª®©. Š®£¤  ¯« èª ',\
' ‚ è  § ¤ ç  - á¡à®á¨âì ¢á¥ ªà á­ë¥ ¯« èª¨.',\ '¯à®å®¤¨â ­ ¤ ¤ëમ©, ®­  ¯ ¤ ¥â â㤠 ¨ ¨á祧 ¥â.',\
'Š®«¨ç¥á⢮ 㯠¢è¨å ç¥à­ëå ¯« è¥ª ஫¨ ­¥ ¨£à ¥â.','',\ 'ˆá¯®«ì§ã©â¥ áâ५ª¨ ¤«ï ­ ª«®­  ¤®áª¨.',\
'http://www.clickmazes.com' ' ‚ è  § ¤ ç  - á¡à®á¨âì ¢á¥ ªà á­ë¥ ¯« èª¨.',\
else 'Š®«¨ç¥á⢮ 㯠¢è¨å ç¥à­ëå ¯« è¥ª ஫¨ ­¥ ¨£à ¥â.','',\
MAR_help mstr \ 'http://www.clickmazes.com'
'Several red and black marbles sit on a flat tray,',\ else ; Default to en_US
'a grey square indicate a hole in the tray. If a',\ MAR_help mstr \
'marble rolls onto or over the hole it drops',\ 'Several red and black marbles sit on a flat tray,',\
'through and disappears. Use the cursor keys to',\ 'a grey square indicate a hole in the tray. If a',\
'tilt the tray and start the marbles rolling, the',\ 'marble rolls onto or over the hole it drops',\
'marbles roll in a straight line until they come',\ 'through and disappears. Use the cursor keys to',\
'to rest, you can then roll again. Your challenge',\ 'tilt the tray and start the marbles rolling, the',\
'is to drop all the red marbles, it does not',\ 'marbles roll in a straight line until they come',\
'matter how many black marbles you lose in the',\ 'to rest, you can then roll again. Your challenge',\
'process.','',\ 'is to drop all the red marbles, it does not',\
'http://www.clickmazes.com' 'matter how many black marbles you lose in the',\
end if 'process.','',\
'http://www.clickmazes.com'
end if

View File

@ -1,92 +1,94 @@
NLT_levelp: ; Language support for locales: ru_RU (CP866), en_US.
mov eax,OR_strip
call need_image NLT_levelp:
xor eax,eax mov eax,OR_strip
lodsb call need_image
lodsb xor eax,eax
mov [fx],eax lodsb
lodsb lodsb
mov [fy],eax mov [fx],eax
lodsw lodsb
mov [player],eax mov [fy],eax
mov dword[area],5 lodsw
lodsw mov [player],eax
mov [finish],eax mov dword[area],5
call get_xy_sf.count lodsw
mov [levptr],esi mov [finish],eax
call unpack_level call get_xy_sf.count
ret mov [levptr],esi
call unpack_level
NLT_key: ret
mov [jump],still
cmp eax,176 NLT_key:
jb .ex mov [jump],still
cmp eax,179 cmp eax,176
ja .ex jb .ex
lea ebx,[eax-176] cmp eax,179
mov eax,[player] ja .ex
call check_move lea ebx,[eax-176]
jc .ex mov eax,[player]
mov ecx,ebx call check_move
mov edx,ebx jc .ex
movzx ecx,byte[dir_rotate+ecx] mov ecx,ebx
cmp ecx,dword[area] mov edx,ebx
je .ex movzx ecx,byte[dir_rotate+ecx]
xor edx,11b cmp ecx,dword[area]
cmp edx,dword[area] je .ex
je .ex xor edx,11b
add eax,[dirs+ebx*4] cmp edx,dword[area]
mov dword[area],ebx je .ex
mov [player],eax add eax,[dirs+ebx*4]
cmp eax,[finish] mov dword[area],ebx
jne .nowin mov [player],eax
mov [win_flag],1 cmp eax,[finish]
.nowin: jne .nowin
mov [jump],drw mov [win_flag],1
.ex: .nowin:
ret mov [jump],drw
.ex:
NLT_drawm: ret
push [sq_size]
mov [sq_size],0 NLT_drawm:
mov eax,[finish] push [sq_size]
mov ebx,6 mov [sq_size],0
call out_image mov eax,[finish]
; mcall 13,[lx],[ly],0xff0000 mov ebx,6
mov ebx,dword[area] call out_image
cmp ebx,5 ; mcall 13,[lx],[ly],0xff0000
jne .skip mov ebx,dword[area]
mov eax,[player] cmp ebx,5
mov edi,eax jne .skip
pop [sq_size] mov eax,[player]
call get_xy mov edi,eax
mcall 13,[lx],[ly],0x8000 pop [sq_size]
jmp .ex call get_xy
.skip: mcall 13,[lx],[ly],0x8000
add ebx,8 jmp .ex
mov eax,[player] .skip:
call out_image add ebx,8
pop [sq_size] mov eax,[player]
.ex: call out_image
ret pop [sq_size]
.ex:
NLT_level: ret
file 'nolt.bin'
NLT_level:
if lang eq ru_RU file 'nolt.bin'
NLT_help mstr \
'‚ è  § ¤ ç  - ¯à®¢¥á⨠§¥«¥­ë© ª¢ ¤à â ª ªà á­®¬ã',\ if lang eq ru_RU
'¡¥§ ¯®¢®à®â  ­ «¥¢® ¨ ¤¢¨¦¥­¨ï ­ § ¤. <20>â® âà㤭¥¥',\ NLT_help mstr \
'祬 ª ¦¥âáï. ‚­¨¬ ­¨¥: ¥á«¨ ‚ë ¯à¨¬¥â¥ ¯«®å®¥',\ '‚ è  § ¤ ç  - ¯à®¢¥á⨠§¥«¥­ë© ª¢ ¤à â ª ªà á­®¬ã',\
'à¥è¥­¨¥, ¬®¦¥â¥ ¯®¯ áâì ¢ â㯨ª ¨ ¡ã¤¥â¥',\ '¡¥§ ¯®¢®à®â  ­ «¥¢® ¨ ¤¢¨¦¥­¨ï ­ § ¤. <20>â® âà㤭¥¥',\
'¢ë­ã¦¤¥­ë ­ ç âì á­ ç « .','',\ '祬 ª ¦¥âáï. ‚­¨¬ ­¨¥: ¥á«¨ ‚ë ¯à¨¬¥â¥ ¯«®å®¥',\
'http://puzzleprograms.narod.ru' 'à¥è¥­¨¥, ¬®¦¥â¥ ¯®¯ áâì ¢ â㯨ª ¨ ¡ã¤¥â¥',\
else '¢ë­ã¦¤¥­ë ­ ç âì á­ ç « .','',\
NLT_help mstr \ 'http://puzzleprograms.narod.ru' ; FIXME: Check link works
'Your challenge is to manouvre the green dot to',\ else ; Default to en_US
'the red square without ever turning left, or',\ NLT_help mstr \
'making a U-turn. Harder than it looks. Beware, if',\ 'Your challenge is to manouvre the green dot to',\
'you make a bad decision in this maze you may get',\ 'the red square without ever turning left, or',\
'completely stuck and have to restart.','',\ 'making a U-turn. Harder than it looks. Beware, if',\
'http://www.clickmazes.com' 'you make a bad decision in this maze you may get',\
end if 'completely stuck and have to restart.','',\
'http://www.clickmazes.com' ; FIXME: Why are links different?
end if

View File

@ -1,227 +1,229 @@
; level format ; Language support for locales: ru_RU (CP866), en_US.
; [fx|fy]..[field cells x2]..[worm_count]..[worm_len][start cell #][body dirs x2]
; level format
; internal format ; [fx|fy]..[field cells x2]..[worm_count]..[worm_len][start cell #][body dirs x2]
; [stepptr]= worms #
; area: [worm_len][start_cell #][end_cell #]..[dirs].. ; internal format
; [cur_step]: dragged worm pointer ; [stepptr]= worms #
; [finish]: 0 - if head dragged, 1- if tail ; area: [worm_len][start_cell #][end_cell #]..[dirs]..
; [cur_step]: dragged worm pointer
OR_levelp: ; [finish]: 0 - if head dragged, 1- if tail
mov [Ces],40
mcall 40,100111b OR_levelp:
inc [drag_flag] mov [Ces],40
mov eax,OR_strip mcall 40,100111b
call need_image inc [drag_flag]
inc esi mov eax,OR_strip
movzx ecx,byte[esi] call need_image
inc esi inc esi
push esi movzx ecx,byte[esi]
mov esi,OR_maze inc esi
jecxz .sk push esi
.nxtmz: mov esi,OR_maze
movzx eax,byte[esi] jecxz .sk
add esi,eax .nxtmz:
loop .nxtmz movzx eax,byte[esi]
.sk: add esi,eax
call get_xy_sf loop .nxtmz
call unpack_level .sk:
pop esi call get_xy_sf
movzx ecx,byte[esi] call unpack_level
inc esi pop esi
mov [cur_step],ecx movzx ecx,byte[esi]
jecxz .sk2 inc esi
mov edi,area mov [cur_step],ecx
rep movsb jecxz .sk2
.sk2: mov edi,area
mov ecx,[cell_count] rep movsb
mov edi,area+16 .sk2:
rep movsb mov ecx,[cell_count]
mov [stepptr],2 mov edi,area+16
; call erase_field rep movsb
; ud2 mov [stepptr],2
ret ; call erase_field
; ud2
OR_key: ret
cmp eax,0
jl OR_mouse OR_key:
ret cmp eax,0
jl OR_mouse
OR_drawf: ret
mov ecx,[cell_count]
push [sq_size] OR_drawf:
mov [sq_size],0 mov ecx,[cell_count]
.lp: push [sq_size]
push ecx mov [sq_size],0
movzx ebx,byte[area+16+ecx-1] .lp:
cmp bl,0xf push ecx
je .no movzx ebx,byte[area+16+ecx-1]
lea eax,[ecx-1] cmp bl,0xf
call out_image je .no
.no: lea eax,[ecx-1]
pop ecx call out_image
loop .lp .no:
pop [sq_size] pop ecx
ret loop .lp
pop [sq_size]
OR_drawm: ret
push [sq_size]
mov [sq_size],0 OR_drawm:
mov eax,[player] push [sq_size]
mov ebx,[stepptr] mov [sq_size],0
add ebx,8 mov eax,[player]
call out_image mov ebx,[stepptr]
mov ecx,[cur_step] add ebx,8
jecxz .skipb call out_image
mov ebx,7 mov ecx,[cur_step]
mov esi,area jecxz .skipb
xor eax,eax mov ebx,7
.nxtb: mov esi,area
lodsb xor eax,eax
call out_image .nxtb:
loop .nxtb lodsb
.skipb: call out_image
mov eax,[player] loop .nxtb
.again: .skipb:
mov ebx,[stepptr] mov eax,[player]
call check_move .again:
jc .ex mov ebx,[stepptr]
add eax,[dirs+ebx*4] call check_move
cmp byte[area+16+eax],6 jc .ex
je .ex add eax,[dirs+ebx*4]
mov ecx,[cur_step] cmp byte[area+16+eax],6
jecxz .skbchk je .ex
mov edi,area mov ecx,[cur_step]
repne scasb jecxz .skbchk
je .again mov edi,area
.skbchk: repne scasb
mov [sq_size],1 je .again
push eax .skbchk:
call get_xy mov [sq_size],1
mov ebx,[lx] push eax
sub bx,2 call get_xy
mov ecx,[ly] mov ebx,[lx]
mov cx,3 sub bx,2
mcall 13,,,0xFFC633 mov ecx,[ly]
xchg bx,cx mov cx,3
mcall mcall 13,,,0xFFC633
mov esi,[Ces] xchg bx,cx
sub esi,3+2 mcall
shl esi,16 mov esi,[Ces]
push ebx sub esi,3+2
add ebx,esi shl esi,16
mcall push ebx
pop ebx add ebx,esi
add ecx,esi mcall
xchg bx,cx pop ebx
add bx,2 add ecx,esi
mcall xchg bx,cx
pop eax add bx,2
jmp .again mcall
.ex: pop eax
pop [sq_size] jmp .again
ret .ex:
pop [sq_size]
OR_mouse: ret
cmp [win_flag],1
je .ex OR_mouse:
mov [jump],still cmp [win_flag],1
mov edx,eax je .ex
call get_last_mclick mov [jump],still
cmp edx,-2 mov edx,eax
jne .ex call get_last_mclick
test eax,eax cmp edx,-2
jnz .noempty jne .ex
.drw: test eax,eax
mov [jump],drw jnz .noempty
ret .drw:
.noempty: mov [jump],drw
ret
; First Click at ebx cell .noempty:
mov eax,[player]
cmp eax,ebx ; First Click at ebx cell
je OR_drawf mov eax,[player]
mov ecx,[cur_step] cmp eax,ebx
jecxz .skbchk je OR_drawf
mov edi,area mov ecx,[cur_step]
xchg eax,ebx jecxz .skbchk
repne scasb mov edi,area
xchg eax,ebx xchg eax,ebx
je OR_drawf repne scasb
.skbchk: xchg eax,ebx
cmp byte[area+16+ebx],0xf je OR_drawf
je .ex .skbchk:
cmp byte[area+16+ebx],6 cmp byte[area+16+ebx],0xf
je .ex je .ex
push eax cmp byte[area+16+ebx],6
mov edx,ebx je .ex
call get_offset push eax
mov ebx,eax mov edx,ebx
pop eax call get_offset
cmp ebx,[stepptr] mov ebx,eax
jne .ex pop eax
cmp ebx,[stepptr]
call check_move jne .ex
jc .ex
movzx ecx,byte[area+16+edx] call check_move
cmp ecx,4 jc .ex
jae .noarr movzx ecx,byte[area+16+edx]
mov ebx,ecx cmp ecx,4
call check_move jae .noarr
jc .ex mov ebx,ecx
mov edx,eax call check_move
add eax,[dirs+ebx*4] jc .ex
mov [player],eax mov edx,eax
mov ecx,[cur_step] add eax,[dirs+ebx*4]
jecxz .skbchk2 mov [player],eax
mov edi,area mov ecx,[cur_step]
repne scasb jecxz .skbchk2
jne .skbchk2 mov edi,area
mov [edi-1],dl repne scasb
.skbchk2: jne .skbchk2
cmp eax,[finish] mov [edi-1],dl
jne .drw .skbchk2:
mov [win_flag],1 cmp eax,[finish]
jmp .drw jne .drw
.noarr: mov [win_flag],1
mov edx,[stepptr] jmp .drw
cmp ecx,4 .noarr:
jne .nocw mov edx,[stepptr]
movzx edx,byte[dir_rotate+edx] cmp ecx,4
jmp .ex2 jne .nocw
.nocw: movzx edx,byte[dir_rotate+edx]
cmp ecx,5 jmp .ex2
jne .ex .nocw:
movzx edx,byte[dir_rotate+4+edx] cmp ecx,5
.ex2: jne .ex
mov [stepptr],edx movzx edx,byte[dir_rotate+4+edx]
jmp .drw .ex2:
.ex: mov [stepptr],edx
ret jmp .drw
.ex:
OR_maze: ret
file 'omaze.bin'
OR_maze:
OR_level: file 'omaze.bin'
file 'or2.bin'
OR_level:
if lang eq ru_RU file 'or2.bin'
OR_help mstr \
'™¥«ç®ª ­  ¢ë¤¥«¥­­®© ª«¥âª¥ ¯¥à¥¤¢¨£ ¥â ¨«¨',\ if lang eq ru_RU
'¢à é ¥â ªà á­ãî áâ५ªã. ‘¨­¨© ¡«®ª ¤¥©áâ¢ã¥â',\ OR_help mstr \
'ª ª ¯à¥¯ïâá⢨¥, áªàë¢ ï ®¤­ã ª«¥âªã. <20>à¨',\ '™¥«ç®ª ­  ¢ë¤¥«¥­­®© ª«¥âª¥ ¯¥à¥¤¢¨£ ¥â ¨«¨',\
'¯¥à¥å®¤¥ áâ५ª¨ ­  ª«¥âªã ᨭ¥£® ¡«®ª  ®­¨',\ '¢à é ¥â ªà á­ãî áâ५ªã. ‘¨­¨© ¡«®ª ¤¥©áâ¢ã¥â',\
'¯®¬¥­ïîâáï ¬¥áâ ¬¨. ‡ ¤ ç  - ¯à®¢¥á⨠ªà á­ãî',\ 'ª ª ¯à¥¯ïâá⢨¥, áªàë¢ ï ®¤­ã ª«¥âªã. <20>à¨',\
'áâ५ªã ¨§ ­¨¦­¥© ª«¥âª¨ ¢ ¢¥àå­îî.','',\ '¯¥à¥å®¤¥ áâ५ª¨ ­  ª«¥âªã ᨭ¥£® ¡«®ª  ®­¨',\
'http://www.clickmazes.com' '¯®¬¥­ïîâáï ¬¥áâ ¬¨. ‡ ¤ ç  - ¯à®¢¥á⨠ªà á­ãî',\
else 'áâ५ªã ¨§ ­¨¦­¥© ª«¥âª¨ ¢ ¢¥àå­îî.','',\
OR_help mstr \ 'http://www.clickmazes.com' ; FIXME: Check link works
'Click on a highlighted square to move or rotate',\ else ; Default to en_US
'the red pointer. The blue switcher acts as an',\ OR_help mstr \
'obstacle, hiding one square. The red pointer and',\ 'Click on a highlighted square to move or rotate',\
'blue switcher will swap places if the red pointer',\ 'the red pointer. The blue switcher acts as an',\
'is pushed onto a square occupied by a blue',\ 'obstacle, hiding one square. The red pointer and',\
'switcher. Your challenge is to negotiate the red',\ 'blue switcher will swap places if the red pointer',\
'arrow from the bottom to the top square.','',\ 'is pushed onto a square occupied by a blue',\
'http://www.clickmazes.com' 'switcher. Your challenge is to negotiate the red',\
end if 'arrow from the bottom to the top square.','',\
'http://www.clickmazes.com' ; FIXME: Check link works
end if

View File

@ -1,94 +1,96 @@
SMZ_levelp: ; Language support for locales: ru_RU (CP866), en_US.
call get_xy_sf
xor eax,eax SMZ_levelp:
mov [stepptr],esi call get_xy_sf
lodsb xor eax,eax
mov [cur_step],esi mov [stepptr],esi
add esi,eax lodsb
mov [levptr],esi mov [cur_step],esi
call unpack_level add esi,eax
ret mov [levptr],esi
call unpack_level
SMZ_key: ret
cmp eax,176
jb .ex SMZ_key:
cmp eax,179 cmp eax,176
ja .ex jb .ex
mov ecx,[cur_step] cmp eax,179
movzx ecx,byte[ecx] ja .ex
lea ebx,[eax-176] mov ecx,[cur_step]
mov eax,[player] movzx ecx,byte[ecx]
.lp: lea ebx,[eax-176]
call check_move mov eax,[player]
jc .exl .lp:
add eax,[dirs+ebx*4] call check_move
loop .lp jc .exl
.exl: add eax,[dirs+ebx*4]
test ecx,ecx loop .lp
jne .ex .exl:
mov [player],eax test ecx,ecx
cmp eax,[finish] jne .ex
jne .nowin mov [player],eax
mov [win_flag],1 cmp eax,[finish]
.nowin: jne .nowin
mov esi,[stepptr] mov [win_flag],1
movzx eax,byte[esi] .nowin:
inc esi mov esi,[stepptr]
lea ebx,[esi+eax] movzx eax,byte[esi]
inc [cur_step] inc esi
cmp [cur_step],ebx lea ebx,[esi+eax]
jb .ex inc [cur_step]
mov [cur_step],esi cmp [cur_step],ebx
.ex: jb .ex
ret mov [cur_step],esi
.ex:
SMZ_drawm: ret
mov eax,[player]
call get_xy SMZ_drawm:
mcall 13,[lx],[ly],0xff00 mov eax,[player]
mov eax,[finish] call get_xy
call get_xy mcall 13,[lx],[ly],0xff00
mcall 13,[lx],[ly],0xff0000 mov eax,[finish]
cmp [win_flag],1 call get_xy
je .ex mcall 13,[lx],[ly],0xff0000
mov edi,[stepptr] cmp [win_flag],1
movzx ecx,byte[edi] je .ex
inc edi mov edi,[stepptr]
mov edx,(XFOFS+MSGXO) shl 16+42 movzx ecx,byte[edi]
mov ebx,0x010000 inc edi
mov eax,47 mov edx,(XFOFS+MSGXO) shl 16+42
.lp: mov ebx,0x010000
push ecx mov eax,47
mov esi,0x10000000 .lp:
movzx ecx,byte[edi] push ecx
cmp edi,[cur_step] mov esi,0x10000000
jne .nocur movzx ecx,byte[edi]
mov esi,0x100000ff cmp edi,[cur_step]
mcall jne .nocur
add edx,1 shl 16 mov esi,0x100000ff
.nocur: mcall
mcall add edx,1 shl 16
pop ecx .nocur:
add edx,10 shl 16 mcall
inc edi pop ecx
loop .lp add edx,10 shl 16
.ex: inc edi
ret loop .lp
.ex:
SMZ_level: ret
file 'smz.bin'
SMZ_level:
if lang eq ru_RU file 'smz.bin'
SMZ_help mstr \
'𧎚T桌鴭漭 祚嶉奶恥罱市鴙桑碪 摰亢<E691B0>, 丐見𩤃',\ if lang eq ru_RU
'坏咱卿<E592B1> 炎𨸹<E7828E><F0A8B8B9> <20> 祚戶╞蟡限恭 狙咧蟡摵╳ 物乒悚',\ SMZ_help mstr \
'祚 能麍悟, 祚<> 郊 亢摵見郊漭 芹<>陋ㄝ 炎𨸹<E7828E><F0A8B8B9>.','',\ '𧎚T桌鴭漭 祚嶉奶恥罱市鴙桑碪 摰亢<E691B0>, 丐見𩤃',\
'http://puzzleprograms.narod.ru' '坏咱卿<E592B1> 炎𨸹<E7828E><F0A8B8B9> <20> 祚戶╞蟡限恭 狙咧蟡摵╳ 物乒悚',\
else '祚 能麍悟, 祚<> 郊 亢摵見郊漭 芹<>陋ㄝ 炎𨸹<E7828E><F0A8B8B9>.','',\
SMZ_help mstr \ 'http://puzzleprograms.narod.ru' ; FIXME: Check link works
'Repeat sequence shown above the field moving the',\ else ; Default to en_US
'green square by highlighted count of spaces as',\ SMZ_help mstr \
'many times as you like, until you finish at the',\ 'Repeat sequence shown above the field moving the',\
'red square.','',\ 'green square by highlighted count of spaces as',\
'http://puzzleprograms.narod.ru' 'many times as you like, until you finish at the',\
end if 'red square.','',\
'http://puzzleprograms.narod.ru' ; FIXME: Check link works
end if

View File

@ -1,164 +1,166 @@
TM_levelp: ; Language support for locales: ru_RU (CP866), en_US.
call get_xy_sf
mov [levptr],esi TM_levelp:
call unpack_level call get_xy_sf
ret mov [levptr],esi
call unpack_level
TM_key: ret
cmp eax,' '
je .mm TM_key:
cmp eax,176 cmp eax,' '
jb .still je .mm
cmp eax,179 cmp eax,176
ja .still jb .still
lea ebx,[eax-176] cmp eax,179
mov eax,[teseus] ja .still
call check_move lea ebx,[eax-176]
jc .still mov eax,[teseus]
call move_teseus call check_move
cmp [win_flag],0 jc .still
jne .ex call move_teseus
.nowin: cmp [win_flag],0
call drwfld jne .ex
.mm: .nowin:
call move_minotaur call drwfld
cmp eax,[teseus] .mm:
jne .still call move_minotaur
mov [win_flag],2 cmp eax,[teseus]
jmp .ex jne .still
.still: mov [win_flag],2
mov [jump],still jmp .ex
.ex: .still:
ret mov [jump],still
.ex:
move_minotaur: ret
xor esi,esi
mov eax,[teseus] move_minotaur:
mov ebx,[fx] xor esi,esi
div bl mov eax,[teseus]
mov ecx,eax ;teseus: ch-x, cl-y mov ebx,[fx]
mov eax,[minotaur] div bl
.again: mov ecx,eax ;teseus: ch-x, cl-y
call mino_xy mov eax,[minotaur]
xor ebx,ebx .again:
cmp dh,ch call mino_xy
je .stand2 xor ebx,ebx
ja .ok1 cmp dh,ch
add ebx,3 je .stand2
.ok1: ja .ok1
call check_move add ebx,3
jc .stand2 .ok1:
add eax,[dirs+ebx*4] call check_move
mov [minotaur],eax jc .stand2
inc esi add eax,[dirs+ebx*4]
call delay mov [minotaur],eax
call drwfld inc esi
cmp esi,2 call delay
jb .again call drwfld
jmp .ex cmp esi,2
.stand1: jb .again
call mino_xy jmp .ex
.stand2: .stand1:
mov ebx,2 call mino_xy
cmp dl,cl .stand2:
je .ex mov ebx,2
ja .ok2 cmp dl,cl
dec ebx je .ex
.ok2: ja .ok2
call check_move dec ebx
jc .ex .ok2:
add eax,[dirs+ebx*4] call check_move
mov [minotaur],eax jc .ex
inc esi add eax,[dirs+ebx*4]
call delay mov [minotaur],eax
call drwfld inc esi
cmp esi,2 call delay
jb .again call drwfld
.ex: cmp esi,2
ret jb .again
.ex:
mino_xy: ret
push eax
div byte[fx] mino_xy:
mov edx,eax ;minotaur: dh-x, dl-y push eax
pop eax div byte[fx]
ret mov edx,eax ;minotaur: dh-x, dl-y
pop eax
move_teseus: ret
pusha
cdq move_teseus:
mov ecx,[fx] pusha
div cl cdq
add ax,1 shl 8+1 mov ecx,[fx]
test ebx,ebx div cl
jne .no0 add ax,1 shl 8+1
cmp ah,1 test ebx,ebx
jne .move jne .no0
.win: cmp ah,1
inc [win_flag] jne .move
jmp .ex .win:
.no0: inc [win_flag]
cmp ebx,1 jmp .ex
jne .no1 .no0:
cmp al,byte[fy] cmp ebx,1
je .win jne .no1
jmp .move cmp al,byte[fy]
.no1: je .win
cmp ebx,2 jmp .move
jne .no2 .no1:
cmp al,1 cmp ebx,2
je .win jne .no2
jmp .move cmp al,1
.no2: je .win
cmp ebx,3 jmp .move
jne .move .no2:
cmp ah,byte[fx] cmp ebx,3
je .win jne .move
.move: cmp ah,byte[fx]
mov eax,[esp+28] je .win
add eax,[dirs+ebx*4] .move:
mov [teseus],eax mov eax,[esp+28]
.ex: add eax,[dirs+ebx*4]
popa mov [teseus],eax
ret .ex:
popa
TM_drawm: ret
mov eax,[teseus]
call get_xy TM_drawm:
mcall 13,[lx],[ly],0xff00 mov eax,[teseus]
mov eax,[minotaur] call get_xy
call get_xy mcall 13,[lx],[ly],0xff00
mcall 13,[lx],[ly],0xff0000 mov eax,[minotaur]
ret call get_xy
mcall 13,[lx],[ly],0xff0000
TM_level: ret
file 'tam.bin'
TM_level:
if lang eq ru_RU file 'tam.bin'
TM_help mstr \
' ’¥á¥© (§¥«¥­ë© ª¢ ¤à â) ¤®«¦¥­ ã¡¥¦ âì ¨§',\ if lang eq ru_RU
'« ¡¨à¨­â . ‡  ­¨¬ £®­¨âáï ¬¥å ­¨ç¥áª¨© Œ¨­®â ¢à',\ TM_help mstr \
'(ªà á­ë© ª¢ ¤à â). <20>  ª ¦¤ë© 室 ’¥á¥© Œ¨­®â ¢à',\ ' ’¥á¥© (§¥«¥­ë© ª¢ ¤à â) ¤®«¦¥­ ã¡¥¦ âì ¨§',\
'¤¥« ¥â 2 室  ¯® â ª®© á奬¥:',\ '« ¡¨à¨­â . ‡  ­¨¬ £®­¨âáï ¬¥å ­¨ç¥áª¨© Œ¨­®â ¢à',\
' ‘­ ç «  ®­ ¯ëâ ¥âáï ¯à¨¡«¨§¨âìáï ª ’¥á¥î ¯®',\ '(ªà á­ë© ª¢ ¤à â). <20>  ª ¦¤ë© 室 ’¥á¥© Œ¨­®â ¢à',\
'£®à¨§®­â «¨ ­  1 ª¢ ¤à â. …᫨ íâ® ­¥¢®§¬®¦­®,',\ '¤¥« ¥â 2 室  ¯® â ª®© á奬¥:',\
'®­ ¯ëâ ¥âáï ¯®¤®©â¨ ¯® ¢¥à⨪ «¨ ­  1 ª¢ ¤à â.',\ ' ‘­ ç «  ®­ ¯ëâ ¥âáï ¯à¨¡«¨§¨âìáï ª ’¥á¥î ¯®',\
'…᫨ ­¥¢®§¬®¦­® ᤥ« âì ­¨ ⮣®, ­¨ ¤à㣮£®,',\ '£®à¨§®­â «¨ ­  1 ª¢ ¤à â. …᫨ íâ® ­¥¢®§¬®¦­®,',\
'Œ¨­®â ¢à ¯à®¯ã᪠¥â ¤ ­­ë© 室.','',\ '®­ ¯ëâ ¥âáï ¯®¤®©â¨ ¯® ¢¥à⨪ «¨ ­  1 ª¢ ¤à â.',\
'http://puzzleprograms.narod.ru' '…᫨ ­¥¢®§¬®¦­® ᤥ« âì ­¨ ⮣®, ­¨ ¤à㣮£®,',\
else 'Œ¨­®â ¢à ¯à®¯ã᪠¥â ¤ ­­ë© 室.','',\
TM_help mstr \ 'http://puzzleprograms.narod.ru' ; FIXME: Check link works
' Theseus (the green dot) must escape from a maze.',\ else ; Default to en_US
'There is also a mechanical Minotaur (the red',\ TM_help mstr \
'dot) in each maze. For every turn that Theseus',\ ' Theseus (the green dot) must escape from a maze.',\
'takes, the Minotaur takes two turns.',\ 'There is also a mechanical Minotaur (the red',\
' Each turn he decides following:',\ 'dot) in each maze. For every turn that Theseus',\
'First he tests if he can move horizontally and',\ 'takes, the Minotaur takes two turns.',\
'get closer to Theseus. If he can, he will move',\ ' Each turn he decides following:',\
"one square horizontally. If he can't, he will",\ 'First he tests if he can move horizontally and',\
'test if he could move vertically and get closer',\ 'get closer to Theseus. If he can, he will move',\
'to Theseus. If he can, he will move one square',\ "one square horizontally. If he can't, he will",\
"vertically. If he can't move either horizontally",\ 'test if he could move vertically and get closer',\
'or vertically, then he just skips that turn.','',\ 'to Theseus. If he can, he will move one square',\
'http://puzzleprograms.narod.ru' "vertically. If he can't move either horizontally",\
end if 'or vertically, then he just skips that turn.','',\
'http://puzzleprograms.narod.ru' ; FIXME: Check link works
end if

View File

@ -1,93 +1,95 @@
TILT_levelp: ; Language support for locales: ru_RU (CP866), en_US.
call SMZ_levelp
mov esi,[stepptr] TILT_levelp:
movzx ecx,byte[esi] call SMZ_levelp
mov [finish],ecx mov esi,[stepptr]
inc ecx movzx ecx,byte[esi]
mov edi,area mov [finish],ecx
rep movsb inc ecx
mov [pause_time],10 mov edi,area
ret rep movsb
mov [pause_time],10
TILT_key: ret
cmp eax,176
jb .ex TILT_key:
cmp eax,179 cmp eax,176
ja .ex jb .ex
mov esi,area cmp eax,179
inc esi ja .ex
lea ebx,[eax-176] mov esi,area
mov eax,[player] inc esi
.lp: lea ebx,[eax-176]
call check_move mov eax,[player]
jc .ex1 .lp:
add eax,[dirs+ebx*4] call check_move
movzx ecx,byte[esi-1] jc .ex1
mov edi,esi add eax,[dirs+ebx*4]
repne scasb movzx ecx,byte[esi-1]
jne .notfound mov edi,esi
mov byte[edi-1],0xff repne scasb
dec dword[finish] jne .notfound
.notfound: mov byte[edi-1],0xff
mov [player],eax dec dword[finish]
call delay .notfound:
call drwfld mov [player],eax
jmp .lp call delay
.ex1: call drwfld
cmp dword[finish],0 jmp .lp
jnz .ex .ex1:
mov [win_flag],1 cmp dword[finish],0
.ex: jnz .ex
ret mov [win_flag],1
.ex:
TILT_drawm: ret
mov eax,[player]
call get_xy TILT_drawm:
mcall 13,[lx],[ly],0xff00 mov eax,[player]
cmp [win_flag],1 call get_xy
je .ex mcall 13,[lx],[ly],0xff00
mov edi,area cmp [win_flag],1
movzx ecx,byte[edi] je .ex
jecxz .ex mov edi,area
inc edi movzx ecx,byte[edi]
.lp: jecxz .ex
push ecx inc edi
movzx eax,byte[edi] .lp:
cmp eax,0xff push ecx
je .no movzx eax,byte[edi]
call get_xy cmp eax,0xff
mcall 13,[lx],[ly],0xff0000 je .no
.no: call get_xy
pop ecx mcall 13,[lx],[ly],0xff0000
inc edi .no:
loop .lp pop ecx
.ex: inc edi
ret loop .lp
.ex:
TILT_level: ret
file 'tilt.bin'
TILT_level:
if lang eq ru_RU file 'tilt.bin'
TILT_help mstr \
'<27>« èª  (§¥«¥­ë© ª¢ ¤à â) «¥¦¨â ­  ¤®áª¥, ª®â®àãî',\ if lang eq ru_RU
'¬®¦­® ­ ª«®­ïâì ¯® £®à¨§®­â «¨ ¨ ¢¥à⨪ «¨',\ TILT_help mstr \
' <20>®á«¥ ­ ª«®­  ¯« èª  ᪮«ì§¨â, ¯®ª  ­¥ ­ âª­¥âáï',\ '<27>« èª  (§¥«¥­ë© ª¢ ¤à â) «¥¦¨â ­  ¤®áª¥, ª®â®àãî',\
'­  á⥭ªã. <20>¥«ì§ï ®áâ ­®¢¨âì ¯« èªã ¢® á¥à¥¤¨­¥',\ '¬®¦­® ­ ª«®­ïâì ¯® £®à¨§®­â «¨ ¨ ¢¥à⨪ «¨',\
'¯ãâ¨.',\ ' <20>®á«¥ ­ ª«®­  ¯« èª  ᪮«ì§¨â, ¯®ª  ­¥ ­ âª­¥âáï',\
' ‚ è  § ¤ ç  - § áâ ¢¨âì ¯« èªã ¯®á¥â¨âì ª«¥âª¨',\ '­  á⥭ªã. <20>¥«ì§ï ®áâ ­®¢¨âì ¯« èªã ¢® á¥à¥¤¨­¥',\
'á ªà á­ë¬¨ ª¢ ¤à â ¬¨.','',\ '¯ãâ¨.',\
'http://www.clickmazes.com' ' ‚ è  § ¤ ç  - § áâ ¢¨âì ¯« èªã ¯®á¥â¨âì ª«¥âª¨',\
else 'á ªà á­ë¬¨ ª¢ ¤à â ¬¨.','',\
TILT_help mstr \ 'http://www.clickmazes.com'
'You are to imagine that a marble (shown here as a',\ else ; Default to en_US
'green square) is on a board that you can tilt',\ TILT_help mstr \
'only to the north, south, east, or west. (You',\ 'You are to imagine that a marble (shown here as a',\
"can't do anything tricky like tilt it southeast.)",\ 'green square) is on a board that you can tilt',\
' Once you tilt the board, the marble will roll',\ 'only to the north, south, east, or west. (You',\
'(horizontally or vertically) until it hits a',\ "can't do anything tricky like tilt it southeast.)",\
"barrier. There's no way you can stop the marble",\ ' Once you tilt the board, the marble will roll',\
'in the middle of its roll.',\ '(horizontally or vertically) until it hits a',\
' The object is to roll the marble onto or over',\ "barrier. There's no way you can stop the marble",\
'every red square in the maze.','',\ 'in the middle of its roll.',\
'http://www.clickmazes.com' ' The object is to roll the marble onto or over',\
end if 'every red square in the maze.','',\
'http://www.clickmazes.com'
end if

View File

@ -1,105 +1,107 @@
; level format ; Language support for locales: ru_RU (CP866), en_US.
; [fx|fy][blue xy][red xy][blue point xy][red point xy]..[maze walls]
; level format
; internal format ; [fx|fy][blue xy][red xy][blue point xy][red point xy]..[maze walls]
; points db=[stepptr]
; [player]= blue ; internal format
; [finish]= red ; points db=[stepptr]
; area: ..[1-red,0-black xy].. ( -1 if empty) ; [player]= blue
; [finish]= red
TILT2_levelp: ; area: ..[1-red,0-black xy].. ( -1 if empty)
call get_xy_sf
mov [stepptr],esi TILT2_levelp:
add esi,2 call get_xy_sf
call unpack_level mov [stepptr],esi
mov [pause_time],10 add esi,2
ret call unpack_level
mov [pause_time],10
TILT2_key: ret
cmp eax,176
jb .ex TILT2_key:
cmp eax,179 cmp eax,176
ja .ex jb .ex
mov esi,area cmp eax,179
inc esi ja .ex
lea ebx,[eax-176] mov esi,area
.lp: inc esi
xor edx,edx lea ebx,[eax-176]
mov eax,[player] .lp:
call check_move xor edx,edx
jc .nom1 mov eax,[player]
inc edx call check_move
add eax,[dirs+ebx*4] jc .nom1
mov [player],eax inc edx
.nom1: add eax,[dirs+ebx*4]
mov eax,[finish] mov [player],eax
call check_move .nom1:
jc .nom2 mov eax,[finish]
inc edx call check_move
add eax,[dirs+ebx*4] jc .nom2
mov [finish],eax inc edx
.nom2: add eax,[dirs+ebx*4]
test edx,edx mov [finish],eax
jz .ex1 .nom2:
call delay test edx,edx
call drwfld jz .ex1
jmp .lp call delay
.ex1: call drwfld
mov eax,[finish] jmp .lp
cmp eax,[player] .ex1:
jnz .ex2 mov eax,[finish]
mov [win_flag],2 cmp eax,[player]
jmp TILT2_drawm.skip jnz .ex2
.ex2: mov [win_flag],2
mov esi,[stepptr] jmp TILT2_drawm.skip
cmp al,[esi+1] .ex2:
jne .ex mov esi,[stepptr]
mov eax,[player] cmp al,[esi+1]
cmp al,[esi] jne .ex
jne .ex mov eax,[player]
mov [win_flag],1 cmp al,[esi]
.ex: jne .ex
ret mov [win_flag],1
.ex:
TILT2_drawm: ret
cmp [win_flag],2
je .skip TILT2_drawm:
; mov [sq_size],3 cmp [win_flag],2
mov eax,[player] je .skip
call get_xy ; mov [sq_size],3
mcall 13,[lx],[ly],0xff mov eax,[player]
mov eax,[finish] call get_xy
call get_xy mcall 13,[lx],[ly],0xff
mcall 13,[lx],[ly],0xff0000 mov eax,[finish]
.skip: call get_xy
shl [sq_size],1 mcall 13,[lx],[ly],0xff0000
mov esi,[stepptr] .skip:
lodsb shl [sq_size],1
call get_xy mov esi,[stepptr]
mcall 13,[lx],[ly],0xff lodsb
lodsb call get_xy
call get_xy mcall 13,[lx],[ly],0xff
shr [sq_size],1 lodsb
mcall 13,[lx],[ly],0xff0000 call get_xy
ret shr [sq_size],1
mcall 13,[lx],[ly],0xff0000
TILT2_level: ret
file 'tilt2.bin'
TILT2_level:
if lang eq ru_RU file 'tilt2.bin'
TILT2_help mstr \
'Šà á­ë© ¨ ᨭ¨© ¡«®ª¨ ¤®«¦­ë ¤®áâ¨çì ª«¥â®ª',\ if lang eq ru_RU
'ᮮ⢥âáâ¢ãî饣® 梥â . ‚­¨¬ ­¨¥! <20>«®ª¨ ᤥ« ­ë',\ TILT2_help mstr \
'¨§  £à¥áᨢ­®£® ¬ â¥à¨ « , ¨ ¯à¨ á⮫ª­®¢¥­¨¨',\ 'Šà á­ë© ¨ ᨭ¨© ¡«®ª¨ ¤®«¦­ë ¤®áâ¨çì ª«¥â®ª',\
'¬£­®¢¥­­® ¨á¯ àïîâáï. í⮬ á«ãç ¥ ‚ ¬ ¯à¨¤¥âáï',\ 'ᮮ⢥âáâ¢ãî饣® 梥â . ‚­¨¬ ­¨¥! <20>«®ª¨ ᤥ« ­ë',\
'­ ç âì ã஢¥­ì á­ ç « .','',\ '¨§  £à¥áᨢ­®£® ¬ â¥à¨ « , ¨ ¯à¨ á⮫ª­®¢¥­¨¨',\
'http://www.clickmazes.com' '¬£­®¢¥­­® ¨á¯ àïîâáï. í⮬ á«ãç ¥ ‚ ¬ ¯à¨¤¥âáï',\
else '­ ç âì ã஢¥­ì á­ ç « .','',\
TILT2_help mstr \ 'http://www.clickmazes.com'
'The red block must reach the red target and the',\ else ; Default to en_US
'blue block the blue target. Beware! The two',\ TILT2_help mstr \
'blocks are made of highly reactive material and,',\ 'The red block must reach the red target and the',\
'if they collide, will instantly evaporate. At',\ 'blue block the blue target. Beware! The two',\
'this point you must start all over again.','',\ 'blocks are made of highly reactive material and,',\
'http://www.clickmazes.com' 'if they collide, will instantly evaporate. At',\
end if 'this point you must start all over again.','',\
'http://www.clickmazes.com'
end if

View File

@ -241,7 +241,7 @@ if lang eq ru_RU
'—¥à¢ïª¨ ­¥ ¬®£ãâ ¯¥à¥ªà뢠âì ¨ ¯¥à¥á¥ª âì ¤àã£',\ '—¥à¢ïª¨ ­¥ ¬®£ãâ ¯¥à¥ªà뢠âì ¨ ¯¥à¥á¥ª âì ¤àã£',\
'¤à㣠.','',\ '¤à㣠.','',\
'http://www.clickmazes.com' 'http://www.clickmazes.com'
else else ; Default to en_US
WG_help mstr \ WG_help mstr \
'Your aim is to drag the wriggley worms by head or',\ 'Your aim is to drag the wriggley worms by head or',\
'tail until each worm covers the squares of its',\ 'tail until each worm covers the squares of its',\

File diff suppressed because it is too large Load Diff

View File

@ -456,10 +456,10 @@ is_dn1 dd 0x0 ; |
is_up2 dd 0x0 ; | is_up2 dd 0x0 ; |
is_dn2 dd 0x0 ; / is_dn2 dd 0x0 ; /
include "lang.inc" include "lang.inc" ; Language support for locales: ru_RU (CP866), en_US.
if lang eq ru_RU if lang eq ru_RU
include "russian.inc" include "russian.inc"
else else ; Default to en_US
include "english.inc" include "english.inc"
end if end if

File diff suppressed because it is too large Load Diff

View File

@ -1,241 +1,242 @@
; SQ_game for MenuetOS ; SQ_game for MenuetOS
; Author: Alexei Ershov aka ealex ; Author: Alexei Ershov aka ealex
; E-mail: e-al[at]yandex[dot]ru ; E-mail: e-al[at]yandex[dot]ru
; Fidonet: 2:469/335.38 ; Fidonet: 2:469/335.38
; slightly updated by leency and renamed to Lights ; slightly updated by leency and renamed to Lights
; https://en.wikipedia.org/wiki/Lights_Out_(game) ; https://en.wikipedia.org/wiki/Lights_Out_(game)
; slightly optimized by diamond ; slightly optimized by diamond
; english translation by diamond (two strings in end of source) ; English translation by diamond (two strings in end of source)
BtnSize equ 36 ; à §¬¥à ª­®¯ª¨ BtnSize equ 36 ; à §¬¥à ª­®¯ª¨
BtnSpace equ 0 ; ¯à®¬¥¦ã⮪ ¬¥¦¤ã ª­®¯ª ¬¨ BtnSpace equ 0 ; ¯à®¬¥¦ã⮪ ¬¥¦¤ã ª­®¯ª ¬¨
NofBtn equ 4 ; à §¬¥à ¯®«ï (3-15) NofBtn equ 4 ; à §¬¥à ¯®«ï (3-15)
Color1 equ 0xcc0000 Color1 equ 0xcc0000
Color2 equ 0x00cc00 Color2 equ 0x00cc00
FieldSize = (BtnSize+BtnSpace)*NofBtn + BtnSpace*3 FieldSize = (BtnSize+BtnSpace)*NofBtn + BtnSpace*3
center = FieldSize / 2 center = FieldSize / 2
margin = 20 margin = 20
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à  use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
org 0x0 ;  ¤à¥á æ¨ï á ­ã«ï org 0x0 ;  ¤à¥á æ¨ï á ­ã«ï
db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1) dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
dd I_END ; à §¬¥à ¯à®£à ¬¬ë dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd 0x1000 ; ª®«¨ç¥á⢮ ¯ ¬ï⨠dd 0x1000 ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd 0x1000 ;  ¤à¥á ¢¥à設ë áâíª  dd 0x1000 ;  ¤à¥á ¢¥à設ë áâíª 
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï) dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢ (­¥ ¨á¯®«ì§ã¥âáï)
dd 0x0 ; § à¥§¥à¢¨à®¢ ­® dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
include '../../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢! include '../../../macros.inc' ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
; Language support for locales: ru_RU (CP866), en_US.
START:
call Game_Init START:
red: call Game_Init
call Draw_Window red:
call Draw_Window
still:
mcall 10 ; äã­ªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï still:
dec eax mcall 10 ; äã­ªæ¨ï 10 - ¦¤ âì ᮡëâ¨ï
jz red dec eax
dec eax jz red
jnz button dec eax
jnz button
key: ; ­ ¦ â  ª« ¢¨è  ­  ª« ¢¨ âãà¥
mov al, 2 key: ; ­ ¦ â  ª« ¢¨è  ­  ª« ¢¨ âãà¥
int 0x40 mov al, 2
jmp still int 0x40
;--------------------------------------------------------------------- jmp still
;---------------------------------------------------------------------
button:
mov al, 17 ; 17 - ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨ button:
int 0x40 mov al, 17 ; 17 - ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
cmp ah, 1 ; ¥á«¨ ­ ¦ â  ª­®¯ª  á ­®¬¥à®¬ 1, ¢ë室¨¬ int 0x40
je .exit cmp ah, 1 ; ¥á«¨ ­ ¦ â  ª­®¯ª  á ­®¬¥à®¬ 1, ¢ë室¨¬
je .exit
cmp ah, 2 ; ¥á«¨ ­ ¦ â  ª­®¯ª  2, ­ ç¨­ ¥¬ ­®¢ãî ¨£àã
je START cmp ah, 2 ; ¥á«¨ ­ ¦ â  ª­®¯ª  2, ­ ç¨­ ¥¬ ­®¢ãî ¨£àã
je START
; <20> ¦  ª­®¯ª  ­  ¯®«¥
inc dword [moves] ; 㢥«¨ç¨¢ ¥¬ ç¨á«® 室®¢ ; <20> ¦  ª­®¯ª  ­  ¯®«¥
inc dword [moves] ; 㢥«¨ç¨¢ ¥¬ ç¨á«® 室®¢
shr eax, 8 ; ¢ eax ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
shr eax, 8 ; ¢ eax ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
mov dh, NofBtn
div dh ; al = ax(­®¬¥à ª­®¯ª¨) / NofBtn mov dh, NofBtn
; ah = ®áâ â®ª (á¬. à¨áã­®ª) div dh ; al = ax(­®¬¥à ª­®¯ª¨) / NofBtn
mov ebx, eax ; á®åà ­¨¬ ç áâ­®¥ ¨ ®áâ â®ª ¢ ebx ; ah = ®áâ â®ª (á¬. à¨áã­®ª)
mov ebx, eax ; á®åà ­¨¬ ç áâ­®¥ ¨ ®áâ â®ª ¢ ebx
; al\ah 0 1 2 3
; +-+ +-+ +-+ +-+ ; al\ah 0 1 2 3
; 1 |4| |5| |6| |7| ; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+ ; 1 |4| |5| |6| |7|
; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+
; 2 |8| |9| |10 |11 ; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+ ; 2 |8| |9| |10 |11
; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+
; 3 |12 |13 |14 |15 ; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+ ; 3 |12 |13 |14 |15
; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+
; 4 |16 |17 |18 |19 ; +-+ +-+ +-+ +-+
; +-+ +-+ +-+ +-+ ; 4 |16 |17 |18 |19
; +-+ +-+ +-+ +-+
; Œ¥­ï¥¬ 梥â á⮫¡¨ª 
shr eax, 8 ; eax = ah ; Œ¥­ï¥¬ 梥â á⮫¡¨ª 
mov edi, field shr eax, 8 ; eax = ah
add edi, eax ; edi 㪠§¢ë¥â ­  ¯¥à¢ãî ª­®¯ªã ¨ ¨áª®¬®¬ áâ«¡æ¥ mov edi, field
mov ecx, NofBtn add edi, eax ; edi 㪠§¢ë¥â ­  ¯¥à¢ãî ª­®¯ªã ¨ ¨áª®¬®¬ áâ«¡æ¥
@@: mov ecx, NofBtn
not byte[edi] ; ¬¥­ï¥¬ 梥⠢® ¢á¥¬ á⮫¡¨ª¥ @@:
dec ecx not byte[edi] ; ¬¥­ï¥¬ 梥⠢® ¢á¥¬ á⮫¡¨ª¥
add edi, NofBtn dec ecx
test ecx, ecx add edi, NofBtn
jnz @r test ecx, ecx
jnz @r
; Œ¥­ï¥¬ 梥â áâப¨
mov eax, ebx ; ¢®ááâ ­ ¢«¨¢ ¥¬ eax ; Œ¥­ï¥¬ 梥â áâப¨
dec eax mov eax, ebx ; ¢®ááâ ­ ¢«¨¢ ¥¬ eax
mov dl, NofBtn dec eax
mul dl ; ax = al * NofBtn mov dl, NofBtn
mov edi, field mul dl ; ax = al * NofBtn
add edi, eax ; edi 㪠§¢ë¥â ­  ¯¥à¢ãî ª­®¯ªã ¢ ¨áª®¬®© áâப¥ mov edi, field
mov ecx, NofBtn add edi, eax ; edi 㪠§¢ë¥â ­  ¯¥à¢ãî ª­®¯ªã ¢ ¨áª®¬®© áâப¥
@@: mov ecx, NofBtn
not byte [edi] ; ¬¥­ï¥¬ 梥⠢® ¢á¥© áâப¥ @@:
dec ecx not byte [edi] ; ¬¥­ï¥¬ 梥⠢® ¢á¥© áâப¥
inc edi dec ecx
test ecx, ecx inc edi
jnz @r test ecx, ecx
; –¢¥â ­ ¦ â®© ª­®¯ª¨ ¬¥­ï«áï 2 à §  (ª®£¤  ®¡à ¡ â뢠«¨ áâப㠨 á⮫¡¥æ), jnz @r
; â.¥. ®áâ «áï ¯¥à¢®­ ç «­ë¬ ; –¢¥â ­ ¦ â®© ª­®¯ª¨ ¬¥­ï«áï 2 à §  (ª®£¤  ®¡à ¡ â뢠«¨ áâப㠨 á⮫¡¥æ),
; Œ¥­ï¥¬ 梥⠭ ¦ â®© ª­®¯ª¨ ; â.¥. ®áâ «áï ¯¥à¢®­ ç «­ë¬
shr ebx, 8 ; ebx = ®áâ â®ª (ah ­  à¨áã­ª¥) ; Œ¥­ï¥¬ 梥⠭ ¦ â®© ª­®¯ª¨
not byte [field+eax+ebx] shr ebx, 8 ; ebx = ®áâ â®ª (ah ­  à¨áã­ª¥)
jmp red not byte [field+eax+ebx]
jmp red
.exit:
mcall -1 ; ¨­ ç¥ ª®­¥æ ¯à®£à ¬¬ë .exit:
mcall -1 ; ¨­ ç¥ ª®­¥æ ¯à®£à ¬¬ë
;----------------------------------------------------------------------------
; Draw_Window ;----------------------------------------------------------------------------
;---------------------------------------------------------------------------- ; Draw_Window
Draw_Window: ;----------------------------------------------------------------------------
Draw_Window:
mcall 12, 1
mcall 0, 200*65536+FieldSize+margin*2,\ mcall 12, 1
200*65536+FieldSize+28+margin*3,\ mcall 0, 200*65536+FieldSize+margin*2,\
0x14DDD7CF, 0x805080D0, header 200*65536+FieldSize+28+margin*3,\
0x14DDD7CF, 0x805080D0, header
mcall 8, (BtnSpace*2+margin)*65536 + 83,\
(FieldSize+BtnSpace+margin*2+10)*65536+ 22, 2 mcall 8, (BtnSpace*2+margin)*65536 + 83,\
mcall 4, (BtnSpace*2+3+margin)*65536+(FieldSize+BtnSpace+margin*2)+14,\ (FieldSize+BtnSpace+margin*2+10)*65536+ 22, 2
0x90DDEEFF, strNew mcall 4, (BtnSpace*2+3+margin)*65536+(FieldSize+BtnSpace+margin*2)+14,\
mcall 4, (center - 25+margin) * 65536 + 30, 0x80000000, strMovs 0x90DDEEFF, strNew
mcall 47, 4*65536+1, moves, (center + 2+margin ) * 65536 + 30, 0 mcall 4, (center - 25+margin) * 65536 + 30, 0x80000000, strMovs
mcall 47, 4*65536+1, moves, (center + 2+margin ) * 65536 + 30, 0
mov ecx, (20+20+BtnSpace-BtnSize)*65536+BtnSize
mov edx, NofBtn ; ¨¤¥­â¨ä¨ª â®à ¯¥à¢®© ª­®¯ª¨ ­  ¯®«¥ mov ecx, (20+20+BtnSpace-BtnSize)*65536+BtnSize
; ᬠà¨áã­®ª mov edx, NofBtn ; ¨¤¥­â¨ä¨ª â®à ¯¥à¢®© ª­®¯ª¨ ­  ¯®«¥
; ᬠà¨áã­®ª
buttons: ; à¨á㥬 ª­®¯®çª¨
mov eax, edx buttons: ; à¨á㥬 ª­®¯®çª¨
mov dh, NofBtn mov eax, edx
div dh ; al = ax / dh, ah - ®áâ â®ª mov dh, NofBtn
mov dh, 0 div dh ; al = ax / dh, ah - ®áâ â®ª
test ah, ah ; ¥á«¨ ah = 0, ­ ç¨­ ¥¬ ­®¢ë© àï¤ mov dh, 0
jnz @f test ah, ah ; ¥á«¨ ah = 0, ­ ç¨­ ¥¬ ­®¢ë© àï¤
add ecx, (BtnSize+BtnSpace)*65536 jnz @f
mov ebx, (BtnSpace*2+margin)*65536+BtnSize+1 add ecx, (BtnSize+BtnSpace)*65536
@@: mov ebx, (BtnSpace*2+margin)*65536+BtnSize+1
mov esi, Color1 ; ¡ ©â ¯®  ¤à¥áã @@:
cmp byte [field-NofBtn+edx], 0 ; field-NofBtn+­®¬¥à_ª­®¯ª¨ mov esi, Color1 ; ¡ ©â ¯®  ¤à¥áã
jz @f ; £®¢®à¨â ® ¥¥ 梥⥠cmp byte [field-NofBtn+edx], 0 ; field-NofBtn+­®¬¥à_ª­®¯ª¨
mov esi, Color2 jz @f ; £®¢®à¨â ® ¥¥ 梥â¥
@@: mov esi, Color2
mcall 8, @@:
add ebx, (BtnSize+BtnSpace)*65536 mcall 8,
inc edx ; ¯¥à¥å®¤¨¬ ª á«¥¤ãî饩 ª­®¯ª¥ add ebx, (BtnSize+BtnSpace)*65536
cmp edx, NofBtn*(NofBtn+1) inc edx ; ¯¥à¥å®¤¨¬ ª á«¥¤ãî饩 ª­®¯ª¥
jb buttons cmp edx, NofBtn*(NofBtn+1)
jb buttons
mcall 12, 2 ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª­ 
mcall 12, 2 ; äã­ªæ¨ï 12: á®®¡é¨âì Ž‘ ®¡ ®âà¨á®¢ª¥ ®ª­ 
ret
ret
;----------------------------------------------------------------------------
; Game_Init ;----------------------------------------------------------------------------
;---------------------------------------------------------------------------- ; Game_Init
Game_Init: ;----------------------------------------------------------------------------
and [moves], 0 ; ®¡­ã«¨¬ ª®«¨ç¥á⢮ 室®¢ Game_Init:
and [moves], 0 ; ®¡­ã«¨¬ ª®«¨ç¥á⢮ 室®¢
call random ; ¢ eax á«ãç ©­®¥ ç¨á«®
mov ecx, NofBtn * NofBtn ; ¢ ecx ª®«-¢® ª­®¯®ª ­  ¯®«¥ call random ; ¢ eax á«ãç ©­®¥ ç¨á«®
mov bh, 0 ; ¤«ï ª ¦¤®© ª­®¯ª¨ ¡ã¤¥¬ ¡à âì mov ecx, NofBtn * NofBtn ; ¢ ecx ª®«-¢® ª­®¯®ª ­  ¯®«¥
; 1 ¡¨â ¨§ eax, bh - ᪮«ìª® mov bh, 0 ; ¤«ï ª ¦¤®© ª­®¯ª¨ ¡ã¤¥¬ ¡à âì
button_init: ; ¡¨â 㦥 ¨á¯®«ì§®¢ «¨ ; 1 ¡¨â ¨§ eax, bh - ᪮«ìª®
shr eax, 1 ; ¬« ¤è¨© ¡¨â ¯®¯ ¤ ¥â ¢ ä« £ CF button_init: ; ¡¨â 㦥 ¨á¯®«ì§®¢ «¨
; ¢ § ¢¨á¨¬®á⨠®â ¥£® §­ ç¥­¨ï shr eax, 1 ; ¬« ¤è¨© ¡¨â ¯®¯ ¤ ¥â ¢ ä« £ CF
; ¢ bl § ¯¨á뢠¥âáï -1 ¨«¨ 0 ; ¢ § ¢¨á¨¬®á⨠®â ¥£® §­ ç¥­¨ï
sbb bl, bl ; ¢ bl § ¯¨á뢠¥âáï -1 ¨«¨ 0
mov [field + ecx - 1], bl sbb bl, bl
mov [field + ecx - 1], bl
inc bh
cmp bh, 32 ; ¥á«¨ ¨á¯®«ì§®¢ ­ë ¢á¥ 32 ¡¨â  ¨§ eax inc bh
jb @f ; ­ ® ¯®«ãç¨âì ­®¢®¥ á«ãç ©­®¥ ç¨á«® cmp bh, 32 ; ¥á«¨ ¨á¯®«ì§®¢ ­ë ¢á¥ 32 ¡¨â  ¨§ eax
call random jb @f ; ­ ® ¯®«ãç¨âì ­®¢®¥ á«ãç ©­®¥ ç¨á«®
mov bh, 0 call random
@@: mov bh, 0
loop button_init @@:
loop button_init
ret
ret
;----------------------------------------------------------------------------
; random - ¢§ïâ  ¨§ â¥âà¨á  ;----------------------------------------------------------------------------
;---------------------------------------------------------------------------- ; random - ¢§ïâ  ¨§ â¥âà¨á 
random: mov eax,[generator] ;----------------------------------------------------------------------------
add eax,-43ab45b5h random: mov eax,[generator]
ror eax,1 add eax,-43ab45b5h
xor eax,32c4324fh ror eax,1
ror eax,1 xor eax,32c4324fh
mov [generator],eax ror eax,1
; --- IVAN --- mov [generator],eax
mov eax,26 ; --- IVAN ---
mov ebx,9 mov eax,26
int 0x40 mov ebx,9
xor eax,0xdeadbeef int 0x40
add eax,[generator] xor eax,0xdeadbeef
; --- IVAN --- add eax,[generator]
ret ; --- IVAN ---
ret
;============================================================================
;============================================================================
field db NofBtn * NofBtn dup(0)
moves dd 0 field db NofBtn * NofBtn dup(0)
generator dd 0 moves dd 0
generator dd 0
header db 'Lights',0
header db 'Lights',0
if lang eq ru_RU
strMovs db '•Ž„',0 if lang eq ru_RU
strNew db '<27>®¢ ï ¨£à ',0 strMovs db '•Ž„',0
else strNew db '<27>®¢ ï ¨£à ',0
strMovs db 'MOVE',0 else ; Default to en_US
strNew db ' New game',0 strMovs db 'MOVE',0
end if strNew db ' New game',0
end if
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,184 +1,184 @@
; ;
; Œ ªà®áë ¤«ï ¤¥ª®¤¨à®¢ ­¨ï ¨§®¡à ¦¥­¨© ç१ ä㭪樨 ¡¨¡«¨®â¥ª¨ libimg. ; Œ ªà®áë ¤«ï ¤¥ª®¤¨à®¢ ­¨ï ¨§®¡à ¦¥­¨© ç१ ä㭪樨 ¡¨¡«¨®â¥ª¨ libimg.
; ;
; (1) ¬ ªà®á load_image_file: ; (1) ¬ ªà®á load_image_file:
; ;
; <EFBFBD>஢¥àï¥â à §¬¥à ¯®«ã祭­®£® ä ©«  á ¨§®¡à ¦¥­¨¥¬. ; <EFBFBD>஢¥àï¥â à §¬¥à ¯®«ã祭­®£® ä ©«  á ¨§®¡à ¦¥­¨¥¬.
; ‚뤥«ï¥â ¯®¤ ­¥£® ¯ ¬ïâì ¨ § £à㦠¥â â㤠 ä ©«. ; ‚뤥«ï¥â ¯®¤ ­¥£® ¯ ¬ïâì ¨ § £à㦠¥â â㤠 ä ©«.
; Ž¯à¥¤¥«ï¥â à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ¨§®¡à ¦¥­¨ï. ; Ž¯à¥¤¥«ï¥â à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ¨§®¡à ¦¥­¨ï.
; <EFBFBD>¥à¥¢ë¤¥«ï¥â ¯ ¬ïâì, ¨ à á¯ ª®¢ë¢ ¥â ¨§®¡à ¦¥­¨¥ ¨§ ä®à¬ â®¢ jpg, png, ... ; <EFBFBD>¥à¥¢ë¤¥«ï¥â ¯ ¬ïâì, ¨ à á¯ ª®¢ë¢ ¥â ¨§®¡à ¦¥­¨¥ ¨§ ä®à¬ â®¢ jpg, png, ...
; ¢ ä®à¬ â rgb ª®â®àë© ¬®¦­® ¢ë¢®¤¨âì ­  íªà ­ ç¥à¥§ á¨áâ. äã­ªæ¨î. ; ¢ ä®à¬ â rgb ª®â®àë© ¬®¦­® ¢ë¢®¤¨âì ­  íªà ­ ç¥à¥§ á¨áâ. äã­ªæ¨î.
; <EFBFBD>ਠ­¥®¡å®¤¨¬®á⨠¬®¦­® â ª¦¥ ¯®«ãç¨âì à §¬¥àë ®âªà뢠¥¬®£® ¨§®¡à ¦¥­¨ï ¤«ï ; <EFBFBD>ਠ­¥®¡å®¤¨¬®á⨠¬®¦­® â ª¦¥ ¯®«ãç¨âì à §¬¥àë ®âªà뢠¥¬®£® ¨§®¡à ¦¥­¨ï ¤«ï
; ¨å ¤ «ì­¥©è¥£® ¨á¯®«ì§®¢ ­¨ï ¢ ¯à®£à ¬¬¥. ; ¨å ¤ «ì­¥©è¥£® ¨á¯®«ì§®¢ ­¨ï ¢ ¯à®£à ¬¬¥.
; ;
; ¨á¯®«ì§ãî饩 ¯à®£à ¬¬¥ ¤®«¦­  ¡ëâì ¯®¤ª«î祭  ¡¨¡«¨®â¥ª  libimg, ; ¨á¯®«ì§ãî饩 ¯à®£à ¬¬¥ ¤®«¦­  ¡ëâì ¯®¤ª«î祭  ¡¨¡«¨®â¥ª  libimg,
; ®¡ê¥­  ¯¥à¥¬¥­­ ï file_name à §¬¥à®¬ ®ª®«® 4096 ¡ ©â, ; ®¡ê¥­  ¯¥à¥¬¥­­ ï file_name à §¬¥à®¬ ®ª®«® 4096 ¡ ©â,
;   â ª¦¥ áâàãªâãà  run_file_70 ⨯  FileInfoBlock. ;   â ª¦¥ áâàãªâãà  run_file_70 ⨯  FileInfoBlock.
; ;
; (2) ¬ ªà®á include_image_file: ; (2) ¬ ªà®á include_image_file:
; ;
; ‚­¥¤àï¥â ¨§®¡à ¦¥­¨¥ ¢ ä ©« ¯à®£à ¬¬ë. ; ‚­¥¤àï¥â ¨§®¡à ¦¥­¨¥ ¢ ä ©« ¯à®£à ¬¬ë.
; Ž¯à¥¤¥«ï¥â à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ¨§®¡à ¦¥­¨ï. ; Ž¯à¥¤¥«ï¥â à §¬¥à ¯ ¬ï⨠­¥®¡å®¤¨¬®© ¤«ï à á¯ ª®¢ª¨ ¨§®¡à ¦¥­¨ï.
; ‚뤥«ï¥â ¯ ¬ïâì, ¨ à á¯ ª®¢ë¢ ¥â ¨§®¡à ¦¥­¨¥ ¨§ ä®à¬ â®¢ jpg, png, ... ; ‚뤥«ï¥â ¯ ¬ïâì, ¨ à á¯ ª®¢ë¢ ¥â ¨§®¡à ¦¥­¨¥ ¨§ ä®à¬ â®¢ jpg, png, ...
; ¢ ä®à¬ â rgb ª®â®àë© ¬®¦­® ¢ë¢®¤¨âì ­  íªà ­ ç¥à¥§ á¨áâ. äã­ªæ¨î. ; ¢ ä®à¬ â rgb ª®â®àë© ¬®¦­® ¢ë¢®¤¨âì ­  íªà ­ ç¥à¥§ á¨áâ. äã­ªæ¨î.
; <EFBFBD>ਠ­¥®¡å®¤¨¬®á⨠¬®¦­® â ª¦¥ ¯®«ãç¨âì à §¬¥àë ¢­¥¤à¥­­®£® ¨§®¡à ¦¥­¨ï ¤«ï ; <EFBFBD>ਠ­¥®¡å®¤¨¬®á⨠¬®¦­® â ª¦¥ ¯®«ãç¨âì à §¬¥àë ¢­¥¤à¥­­®£® ¨§®¡à ¦¥­¨ï ¤«ï
; ¨å ¤ «ì­¥©è¥£® ¨á¯®«ì§®¢ ­¨ï ¢ ¯à®£à ¬¬¥. ; ¨å ¤ «ì­¥©è¥£® ¨á¯®«ì§®¢ ­¨ï ¢ ¯à®£à ¬¬¥.
; ¯®¤ª«î祭¨¥ ­¥ª®â®àëå ­¥®¡å®¤¨¬ëå ä ©«®¢: ; ¯®¤ª«î祭¨¥ ­¥ª®â®àëå ­¥®¡å®¤¨¬ëå ä ©«®¢:
include 'dll.inc' include 'dll.inc'
;include 'load_lib.mac' ;include 'load_lib.mac'
include 'develop/libraries/libs-dev/libio/libio.inc' include 'develop/libraries/libs-dev/libio/libio.inc'
align 4 align 4
open_b rb 560 open_b rb 560
txt_err_img_file: txt_err_img_file:
if lang eq ru_RU if lang eq ru_RU
db 'Žè¨¡ª  N' db 'Žè¨¡ª  N'
.n: db '* ¯à¨ ®âªàë⨨ ä ©«  ' .n: db '* ¯à¨ ®âªàë⨨ ä ©«  '
else else ; Default ot en_US
db 'Error N' db 'Error N'
.n: db '*. Can',39,'t open file ' .n: db '*. Can',39,'t open file '
end if end if
.f: dd 0,0 .f: dd 0,0
; path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬ ; path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥­­®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
; buf - ¯¥à¥¬¥­­ ï ªã¤  ¡ã¤¥â § ¯¨á ­ 㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨¥ ¢ ä®à¬ â¥ rgb, ; buf - ¯¥à¥¬¥­­ ï ªã¤  ¡ã¤¥â § ¯¨á ­ 㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨¥ ¢ ä®à¬ â¥ rgb,
; ¢ á«ãç ¥ ¥á«¨ ä ©« ­¥ ®âªà®¥âáï â® ¡ã¤¥â § ¯¨á ­ 0 ; ¢ á«ãç ¥ ¥á«¨ ä ©« ­¥ ®âªà®¥âáï â® ¡ã¤¥â § ¯¨á ­ 0
; img_w, img_h - ¯¥à¥¬¥­­ë¥ ªã¤  ¡ã¤ãâ § ¯¨á ­ë à §¬¥àë ®âªà뢠¥¬®£® ; img_w, img_h - ¯¥à¥¬¥­­ë¥ ªã¤  ¡ã¤ãâ § ¯¨á ­ë à §¬¥àë ®âªà뢠¥¬®£®
; ¨§®¡à ¦¥­¨ï, ­¥ ®¡ï§ â¥«ì­ë¥ ¯ à ¬¥âàë ; ¨§®¡à ¦¥­¨ï, ­¥ ®¡ï§ â¥«ì­ë¥ ¯ à ¬¥âàë
; bytes_p_p - ᪮«ìª® ¡ ©â ¯ ¬ï⨠¡à âì ­  ¯¨ªá¥«ì, ­¥ ®¡ï§ â¥«ì­ë© ¯ à ¬¥âà ; bytes_p_p - ᪮«ìª® ¡ ©â ¯ ¬ï⨠¡à âì ­  ¯¨ªá¥«ì, ­¥ ®¡ï§ â¥«ì­ë© ¯ à ¬¥âà
; ¥á«¨ ­¥ 㪠§ ­ ¡¥à¥âáï 3. Œ¨­¨¬ «ì­®¥ §­ ç¥­¨¥ ¤®«¦­® ¡ëâì ­¥ ¬¥­ìè¥ 3. ; ¥á«¨ ­¥ 㪠§ ­ ¡¥à¥âáï 3. Œ¨­¨¬ «ì­®¥ §­ ç¥­¨¥ ¤®«¦­® ¡ëâì ­¥ ¬¥­ìè¥ 3.
macro load_image_file path, buf, img_w, img_h, bytes_p_p macro load_image_file path, buf, img_w, img_h, bytes_p_p
{ {
local .err_open local .err_open
local .end_open local .end_open
if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path if path eqtype '' ;¯à®¢¥à塞 § ¤ ­ «¨ áâப®© ¯ à ¬¥âà path
local .path_str local .path_str
jmp @f jmp @f
.path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî .path_str db path ;ä®à¬¨à㥬 «®ª «ì­ãî ¯¥à¥¬¥­­ãî
db 0 db 0
@@: @@:
;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬ ;32 - áâ ­¤ àâ­ë©  ¤à¥á ¯® ª®â®à®¬ã ¤®«¦¥­ ¡ëâì ¡ãä¥à á á¨á⥬­ë¬ ¯ã⥬
copy_path .path_str,[32],file_name,0 copy_path .path_str,[32],file_name,0
else else
copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®© copy_path path,[32],file_name,0 ;ä®à¬¨à㥬 ¯®«­ë© ¯ãâì ª ä ©«ã ¨§®¡à ¦¥­¨ï, ¯®¤à §ã¬¥¢ ¥¬ çâ® ®­ ¢ ®¤­®© ¯ ¯ª¥ á ¯à®£à ¬¬®©
end if end if
mov dword[buf],0 mov dword[buf],0
mov [run_file_70.Function], SSF_GET_INFO mov [run_file_70.Function], SSF_GET_INFO
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
mov dword[run_file_70.Count], 0 mov dword[run_file_70.Count], 0
mov dword[run_file_70.Buffer], open_b mov dword[run_file_70.Buffer], open_b
mov byte[run_file_70+20], 0 mov byte[run_file_70+20], 0
mov dword[run_file_70.FileName], file_name mov dword[run_file_70.FileName], file_name
mcall SF_FILE,run_file_70 mcall SF_FILE,run_file_70
or eax,eax or eax,eax
jnz .err_open jnz .err_open
mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å mov ecx,dword[open_b+32] ;+32 qword: à §¬¥à ä ©«  ¢ ¡ ©â å
stdcall mem.Alloc,ecx ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï stdcall mem.Alloc,ecx ;¢ë¤¥«ï¥¬ ¯ ¬ïâì ¤«ï ¨§®¡à ¦¥­¨ï
mov [buf],eax mov [buf],eax
mov [run_file_70.Function], SSF_READ_FILE mov [run_file_70.Function], SSF_READ_FILE
mov [run_file_70.Position], 0 mov [run_file_70.Position], 0
mov [run_file_70.Flags], 0 mov [run_file_70.Flags], 0
mov [run_file_70.Count], ecx mov [run_file_70.Count], ecx
mov [run_file_70.Buffer], eax mov [run_file_70.Buffer], eax
mov byte[run_file_70+20], 0 mov byte[run_file_70+20], 0
mov [run_file_70.FileName], file_name mov [run_file_70.FileName], file_name
mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï mcall SF_FILE,run_file_70 ;§ £à㦠¥¬ ä ©« ¨§®¡à ¦¥­¨ï
test eax,eax test eax,eax
jnz .err_open jnz .err_open
cmp ebx,0xffffffff cmp ebx,0xffffffff
je .end_open je .end_open
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¨è¥¬ ¥£® ¯ à ¬¥âàë ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¨è¥¬ ¥£® ¯ à ¬¥âàë
stdcall [img_decode], [buf],ebx,0 stdcall [img_decode], [buf],ebx,0
mov ebx,eax mov ebx,eax
;®¯à¥¤¥«ï¥¬ à §¬¥à ¤¥ª®¤¨à®¢ ­­®£® ¨§®¡à ¦¥­¨ï ;®¯à¥¤¥«ï¥¬ à §¬¥à ¤¥ª®¤¨à®¢ ­­®£® ¨§®¡à ¦¥­¨ï
mov ecx,[eax+4] ;+4 = image width mov ecx,[eax+4] ;+4 = image width
if img_w eq if img_w eq
else else
mov dword[img_w],ecx mov dword[img_w],ecx
end if end if
if img_h eq if img_h eq
imul ecx,[eax+8] ;+8 = image height imul ecx,[eax+8] ;+8 = image height
else else
mov eax,[eax+8] ;+8 = image height mov eax,[eax+8] ;+8 = image height
mov dword[img_h],eax mov dword[img_h],eax
imul ecx,eax imul ecx,eax
end if end if
if bytes_p_p eq if bytes_p_p eq
imul ecx,3 ;need for r,g,b imul ecx,3 ;need for r,g,b
else else
imul ecx,bytes_p_p imul ecx,bytes_p_p
end if end if
stdcall mem.ReAlloc,[buf],ecx ;¨§¬¥­ï¥¬ à §¬¥à ¤«ï ¡ãä¥à  stdcall mem.ReAlloc,[buf],ecx ;¨§¬¥­ï¥¬ à §¬¥à ¤«ï ¡ãä¥à 
mov [buf],eax mov [buf],eax
stdcall [img_to_rgb2], ebx,[buf] ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb stdcall [img_to_rgb2], ebx,[buf] ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
stdcall [img_destroy], ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à á ¯ à ¬¥âà ¬¨ ¨§®¡à ¦¥­¨ï stdcall [img_destroy], ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à á ¯ à ¬¥âà ¬¨ ¨§®¡à ¦¥­¨ï
jmp .end_open jmp .end_open
.err_open: .err_open:
add al,'0' add al,'0'
mov byte[txt_err_img_file.n],al mov byte[txt_err_img_file.n],al
if path eqtype '' if path eqtype ''
mov eax,dword[.path_str] mov eax,dword[.path_str]
mov dword[txt_err_img_file.f],eax mov dword[txt_err_img_file.f],eax
mov eax,dword[.path_str+4] mov eax,dword[.path_str+4]
else else
mov eax,dword[path] mov eax,dword[path]
mov dword[txt_err_img_file.f],eax mov dword[txt_err_img_file.f],eax
mov eax,dword[path+4] mov eax,dword[path+4]
end if end if
mov dword[txt_err_img_file.f+4],eax mov dword[txt_err_img_file.f+4],eax
mov byte[txt_err_img_file.f+7],0 mov byte[txt_err_img_file.f+7],0
notify_window_run txt_err_img_file notify_window_run txt_err_img_file
.end_open: .end_open:
} }
; path - ¨¬ï ¢ª«îç ¥¬®£® ä ©«  ; path - ¨¬ï ¢ª«îç ¥¬®£® ä ©« 
; buf - ¯¥à¥¬¥­­ ï ªã¤  ¡ã¤¥â § ¯¨á ­ 㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨¥ ¢ ä®à¬ â¥ rgb ; buf - ¯¥à¥¬¥­­ ï ªã¤  ¡ã¤¥â § ¯¨á ­ 㪠§ â¥«ì ­  ¨§®¡à ¦¥­¨¥ ¢ ä®à¬ â¥ rgb
; img_w, img_h - ¯¥à¥¬¥­­ë¥ ªã¤  ¡ã¤ãâ § ¯¨á ­ë à §¬¥àë ¨§®¡à ¦¥­¨ï, ; img_w, img_h - ¯¥à¥¬¥­­ë¥ ªã¤  ¡ã¤ãâ § ¯¨á ­ë à §¬¥àë ¨§®¡à ¦¥­¨ï,
; ­¥ ®¡ï§ â¥«ì­ë¥ ¯ à ¬¥âàë ; ­¥ ®¡ï§ â¥«ì­ë¥ ¯ à ¬¥âàë
; bytes_p_p - ᪮«ìª® ¡ ©â ¯ ¬ï⨠¡à âì ­  ¯¨ªá¥«ì, ­¥ ®¡ï§ â¥«ì­ë© ¯ à ¬¥âà ; bytes_p_p - ᪮«ìª® ¡ ©â ¯ ¬ï⨠¡à âì ­  ¯¨ªá¥«ì, ­¥ ®¡ï§ â¥«ì­ë© ¯ à ¬¥âà
; ¥á«¨ ­¥ 㪠§ ­ ¡¥à¥âáï 3. Œ¨­¨¬ «ì­®¥ §­ ç¥­¨¥ ¤®«¦­® ¡ëâì ­¥ ¬¥­ìè¥ 3. ; ¥á«¨ ­¥ 㪠§ ­ ¡¥à¥âáï 3. Œ¨­¨¬ «ì­®¥ §­ ç¥­¨¥ ¤®«¦­® ¡ëâì ­¥ ¬¥­ìè¥ 3.
macro include_image_file path, buf, img_w, img_h, bytes_p_p macro include_image_file path, buf, img_w, img_h, bytes_p_p
{ {
local .beg_file local .beg_file
local .end_file local .end_file
jmp .end_file jmp .end_file
align 4 align 4
.beg_file: .beg_file:
file path file path
.end_file: .end_file:
;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¨è¥¬ ¥£® ¯ à ¬¥âàë ;®¯à¥¤¥«ï¥¬ ¢¨¤ ¨§®¡à ¦¥­¨ï ¨ ¯¨è¥¬ ¥£® ¯ à ¬¥âàë
stdcall [img_decode], .beg_file,.end_file-.beg_file,0 stdcall [img_decode], .beg_file,.end_file-.beg_file,0
mov ebx,eax mov ebx,eax
;®¯à¥¤¥«ï¥¬ à §¬¥à ¤¥ª®¤¨à®¢ ­­®£® ¨§®¡à ¦¥­¨ï ;®¯à¥¤¥«ï¥¬ à §¬¥à ¤¥ª®¤¨à®¢ ­­®£® ¨§®¡à ¦¥­¨ï
mov ecx,[eax+4] ;+4 = image width mov ecx,[eax+4] ;+4 = image width
if img_w eq if img_w eq
else else
mov dword[img_w],ecx mov dword[img_w],ecx
end if end if
if img_h eq if img_h eq
imul ecx,[eax+8] ;+8 = image height imul ecx,[eax+8] ;+8 = image height
else else
mov eax,[eax+8] ;+8 = image height mov eax,[eax+8] ;+8 = image height
mov dword[img_h],eax mov dword[img_h],eax
imul ecx,eax imul ecx,eax
end if end if
if bytes_p_p eq if bytes_p_p eq
imul ecx,3 ;need for r,g,b imul ecx,3 ;need for r,g,b
else else
imul ecx,bytes_p_p imul ecx,bytes_p_p
end if end if
stdcall mem.Alloc,ecx ;¨§¬¥­ï¥¬ à §¬¥à ¤«ï ¡ãä¥à  stdcall mem.Alloc,ecx ;¨§¬¥­ï¥¬ à §¬¥à ¤«ï ¡ãä¥à 
mov [buf],eax mov [buf],eax
stdcall [img_to_rgb2], ebx,[buf] ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb stdcall [img_to_rgb2], ebx,[buf] ;¯à¥®¡à §ã¥¬ ¨§®¡à ¦¥­¨¥ ª ä®à¬ âã rgb
stdcall [img_destroy], ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à á ¯ à ¬¥âà ¬¨ ¨§®¡à ¦¥­¨ï stdcall [img_destroy], ebx ;㤠«ï¥¬ ¢à¥¬¥­­ë© ¡ãä¥à á ¯ à ¬¥âà ¬¨ ¨§®¡à ¦¥­¨ï
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,395 +1,397 @@
align 4 ; Language support for locales: ru_RU (CP866), en_US.
set_rect_window:
mov ebx,set_rect_window_procinfo align 4
call get_slot_n set_rect_window:
mov ebx,set_rect_window_procinfo
mov [set_rect_window_slot],ecx call get_slot_n
set_events_mask (evm_redraw+evm_key+evm_button+evm_mouse) mov [set_rect_window_slot],ecx
call init_rect
edit_boxes_set_sys_color rect_input,rect_input_end,sc set_events_mask (evm_redraw+evm_key+evm_button+evm_mouse)
.red: call init_rect
labels_set_sys_color rect_input_labels,rect_input_labels_end,sc edit_boxes_set_sys_color rect_input,rect_input_end,sc
check_boxes_set_sys_color2 riw_check_boxes,riw_check_boxes_end,sc .red:
call .draw_window labels_set_sys_color rect_input_labels,rect_input_labels_end,sc
align 4 check_boxes_set_sys_color2 riw_check_boxes,riw_check_boxes_end,sc
.still: call .draw_window
wait_event .red,.key,.button,.mouse align 4
.still:
.key: wait_event .red,.key,.button,.mouse
get_key
.key:
stdcall [edit_box_key], rect_input.left get_key
stdcall [edit_box_key], rect_input.top
stdcall [edit_box_key], rect_input.width stdcall [edit_box_key], rect_input.left
stdcall [edit_box_key], rect_input.height stdcall [edit_box_key], rect_input.top
stdcall [edit_box_key], rect_input.width
call read_rect stdcall [edit_box_key], rect_input.height
call draw_rect_on_screen
call read_rect
jmp .still call draw_rect_on_screen
.button: jmp .still
get_pressed_button
.button:
cmp ah,1 get_pressed_button
jne @f
btr dword [flags],3 cmp ah,1
jmp close jne @f
@@: btr dword [flags],3
jmp close
jmp .still @@:
.mouse: jmp .still
get_active_window
cmp eax,[set_rect_window_slot] .mouse:
jne .still get_active_window
cmp eax,[set_rect_window_slot]
stdcall [edit_box_mouse], rect_input.left jne .still
stdcall [edit_box_mouse], rect_input.top
stdcall [edit_box_mouse], rect_input.width stdcall [edit_box_mouse], rect_input.left
stdcall [edit_box_mouse], rect_input.height stdcall [edit_box_mouse], rect_input.top
stdcall [edit_box_mouse], rect_input.width
;;;;;;;;;;;;;;;;;;;;;; stdcall [edit_box_mouse], rect_input.height
stdcall [check_box_mouse], use_rect_active_window
;;;;;;;;;;;;;;;;;;;;;;
jmp .still stdcall [check_box_mouse], use_rect_active_window
align 4 jmp .still
.draw_window:
start_draw_window align 4
.draw_window:
mov edx,[sc.work] start_draw_window
add edx,0x33000000
mov edi,riw_grab_text mov edx,[sc.work]
xor esi,esi add edx,0x33000000
mcall SF_CREATE_WINDOW, 100*65536+250, 100*65536+130 mov edi,riw_grab_text
xor esi,esi
draw_labels rect_input_labels,rect_input_labels_end mcall SF_CREATE_WINDOW, 100*65536+250, 100*65536+130
stdcall [edit_box_draw], rect_input.left draw_labels rect_input_labels,rect_input_labels_end
stdcall [edit_box_draw], rect_input.top
stdcall [edit_box_draw], rect_input.width stdcall [edit_box_draw], rect_input.left
stdcall [edit_box_draw], rect_input.height stdcall [edit_box_draw], rect_input.top
;;;;;;;;;;;;;;;;;;;;;; stdcall [edit_box_draw], rect_input.width
stdcall [check_box_draw], use_rect_active_window stdcall [edit_box_draw], rect_input.height
;;;;;;;;;;;;;;;;;;;;;;
call read_rect stdcall [check_box_draw], use_rect_active_window
call draw_rect_on_screen
call read_rect
stop_draw_window call draw_rect_on_screen
ret
stop_draw_window
align 4 ret
init_rect:
bt dword [use_rect_active_window.flags],1 align 4
jc init_rect_from_active_window init_rect:
pushad bt dword [use_rect_active_window.flags],1
mov edi,rect_input_buffer.left jc init_rect_from_active_window
movsx eax,word[rect.left] pushad
mov ecx,rect_input.left mov edi,rect_input_buffer.left
call init_editbox movsx eax,word[rect.left]
mov edi,rect_input_buffer.top mov ecx,rect_input.left
movsx eax,word[rect.top] call init_editbox
mov ecx,rect_input.top mov edi,rect_input_buffer.top
call init_editbox movsx eax,word[rect.top]
mov edi,rect_input_buffer.width mov ecx,rect_input.top
movsx eax,word[rect.width] call init_editbox
mov ecx,rect_input.width mov edi,rect_input_buffer.width
call init_editbox movsx eax,word[rect.width]
mov edi,rect_input_buffer.height mov ecx,rect_input.width
movsx eax,word[rect.height] call init_editbox
mov ecx,rect_input.height mov edi,rect_input_buffer.height
call init_editbox movsx eax,word[rect.height]
popad mov ecx,rect_input.height
ret call init_editbox
popad
align 4 ret
init_rect_from_active_window:
align 4
ret init_rect_from_active_window:
align 4 ret
init_editbox:
push edi align 4
push ecx init_editbox:
xor ebx,ebx push edi
inc ebx push ecx
cmp eax,10 xor ebx,ebx
jl @f inc ebx
inc ebx cmp eax,10
@@: jl @f
cmp eax,100 inc ebx
jl @f @@:
inc ebx cmp eax,100
@@: jl @f
cmp eax,1000 inc ebx
jl @f @@:
inc ebx cmp eax,1000
@@: jl @f
call int_to_str inc ebx
call [edit_box_set_text] ;ecx,edi @@:
ret call int_to_str
;-------------------------------------------------------------------- call [edit_box_set_text] ;ecx,edi
;--- ‘ç¨â뢠­¨¥ ®¡« á⨠--------------------------------------------- ret
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
align 4 ;--- ‘ç¨â뢠­¨¥ ®¡« á⨠---------------------------------------------
read_rect: ;--------------------------------------------------------------------
bt dword [use_rect_active_window.flags],1 align 4
jc read_rect_from_active_window read_rect:
bt dword [use_rect_active_window.flags],1
mov edi,rect_input_buffer.left jc read_rect_from_active_window
call zstr_to_int
cmp ax,[scr.width] mov edi,rect_input_buffer.left
jb @f call zstr_to_int
mov ax,[scr.width] cmp ax,[scr.width]
@@: jb @f
mov [rect.left],ax mov ax,[scr.width]
@@:
mov edi,rect_input_buffer.top mov [rect.left],ax
call zstr_to_int
cmp ax,[scr.height] mov edi,rect_input_buffer.top
jb @f call zstr_to_int
mov ax,[scr.height] cmp ax,[scr.height]
@@: jb @f
mov [rect.top],ax mov ax,[scr.height]
@@:
mov edi,rect_input_buffer.width mov [rect.top],ax
call zstr_to_int
mov bx,[scr.width] mov edi,rect_input_buffer.width
sub bx,[rect.left] call zstr_to_int
cmp ax,bx mov bx,[scr.width]
jb @f sub bx,[rect.left]
mov ax,bx cmp ax,bx
@@: jb @f
mov [rect.width],ax mov ax,bx
@@:
mov edi,rect_input_buffer.height mov [rect.width],ax
call zstr_to_int
mov bx,[scr.height] mov edi,rect_input_buffer.height
sub bx,[rect.top] call zstr_to_int
cmp ax,bx mov bx,[scr.height]
jb @f sub bx,[rect.top]
mov ax,bx cmp ax,bx
@@: jb @f
mov [rect.height],ax mov ax,bx
ret @@:
mov [rect.height],ax
align 4 ret
read_rect_from_active_window:
call get_active_window_info align 4
read_rect_from_active_window:
mov eax,[active_app.left] call get_active_window_info
mov [rect.left],ax
mov eax,[active_app.top] mov eax,[active_app.left]
mov [rect.top],ax mov [rect.left],ax
mov eax,[active_app.width] mov eax,[active_app.top]
inc eax mov [rect.top],ax
mov [rect.width],ax mov eax,[active_app.width]
mov eax,[active_app.height] inc eax
inc eax mov [rect.width],ax
mov [rect.height],ax mov eax,[active_app.height]
ret inc eax
mov [rect.height],ax
align 4 ret
draw_rect_on_screen:
align 4
xor edx,edx draw_rect_on_screen:
mcall SF_DRAW_RECT, 150*65536+80, 5*65536+60
xor edx,edx
;movzx eax,word [rect.left] mcall SF_DRAW_RECT, 150*65536+80, 5*65536+60
;mul word [scr.width]
xor edx,edx ;movzx eax,word [rect.left]
movzx eax,word [scr.width] ;mul word [scr.width]
mov ebx,80 xor edx,edx
div ebx movzx eax,word [scr.width]
mov ebx,eax mov ebx,80
div ebx
xor edx,edx mov ebx,eax
movzx eax,word [rect.height]
div ebx xor edx,edx
push ax movzx eax,word [rect.height]
div ebx
xor edx,edx push ax
movzx eax,word [rect.width]
div ebx xor edx,edx
push ax movzx eax,word [rect.width]
div ebx
xor edx,edx push ax
movzx eax,word [rect.top]
div ebx xor edx,edx
push ax movzx eax,word [rect.top]
div ebx
xor edx,edx push ax
movzx eax,word [rect.left]
div ebx xor edx,edx
push ax movzx eax,word [rect.left]
div ebx
pop bx push ax
add bx,150
shl ebx,16 pop bx
add bx,150
pop cx shl ebx,16
add cx,5
shl ecx,16 pop cx
add cx,5
pop bx shl ecx,16
pop cx
pop bx
mcall SF_DRAW_RECT,,,0xffffff pop cx
ret
mcall SF_DRAW_RECT,,,0xffffff
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ret
;DATA ¤ ­­ë¥
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
system_dir_Boxlib db '/sys/lib/box_lib.obj',0 ;DATA ¤ ­­ë¥
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
system_dir_LibImg db '/sys/lib/libimg.obj',0 system_dir_Boxlib db '/sys/lib/box_lib.obj',0
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
;--------------------------------------------------------------------- system_dir_LibImg db '/sys/lib/libimg.obj',0
align 4
ProcLib_import: ;---------------------------------------------------------------------
OpenDialog_Init dd aOpenDialog_Init align 4
OpenDialog_Start dd aOpenDialog_Start ProcLib_import:
;OpenDialog__Version dd aOpenDialog_Version OpenDialog_Init dd aOpenDialog_Init
dd 0,0 OpenDialog_Start dd aOpenDialog_Start
aOpenDialog_Init db 'OpenDialog_init',0 ;OpenDialog__Version dd aOpenDialog_Version
aOpenDialog_Start db 'OpenDialog_start',0 dd 0,0
;aOpenDialog_Version db 'Version_OpenDialog',0 aOpenDialog_Init db 'OpenDialog_init',0
;--------------------------------------------------------------------- aOpenDialog_Start db 'OpenDialog_start',0
align 4 ;aOpenDialog_Version db 'Version_OpenDialog',0
Box_lib_import: ;---------------------------------------------------------------------
;init_lib dd a_init align 4
;version_lib dd a_version Box_lib_import:
;init_lib dd a_init
edit_box_draw dd aEdit_box_draw ;version_lib dd a_version
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse edit_box_draw dd aEdit_box_draw
edit_box_set_text dd aEdit_box_set_text edit_box_key dd aEdit_box_key
;version_ed dd aVersion_ed edit_box_mouse dd aEdit_box_mouse
edit_box_set_text dd aEdit_box_set_text
init_checkbox dd aInit_checkbox ;version_ed dd aVersion_ed
check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse init_checkbox dd aInit_checkbox
;version_ch dd aVersion_ch check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse
option_box_draw dd aOption_box_draw ;version_ch dd aVersion_ch
option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op option_box_draw dd aOption_box_draw
option_box_mouse dd aOption_box_mouse
PathShow_prepare dd sz_PathShow_prepare ;version_op dd aVersion_op
PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show PathShow_prepare dd sz_PathShow_prepare
dd 0,0 PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show
;a_init db 'lib_init',0 dd 0,0
;a_version db 'version',0
;a_init db 'lib_init',0
aEdit_box_draw db 'edit_box_draw',0 ;a_version db 'version',0
aEdit_box_key db 'edit_box_key',0
aEdit_box_mouse db 'edit_box_mouse',0 aEdit_box_draw db 'edit_box_draw',0
aEdit_box_set_text db 'edit_box_set_text',0 aEdit_box_key db 'edit_box_key',0
;aVersion_ed db 'version_ed',0 aEdit_box_mouse db 'edit_box_mouse',0
aEdit_box_set_text db 'edit_box_set_text',0
;aVersion_ed db 'version_ed',0
aInit_checkbox db 'init_checkbox2',0
aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0 aInit_checkbox db 'init_checkbox2',0
;aVersion_ch db 'version_ch2',0 aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0
aOption_box_draw db 'option_box_draw',0 ;aVersion_ch db 'version_ch2',0
aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0 aOption_box_draw db 'option_box_draw',0
aOption_box_mouse db 'option_box_mouse',0
sz_PathShow_prepare db 'PathShow_prepare',0 ;aVersion_op db 'version_op',0
sz_PathShow_draw db 'PathShow_draw',0
;szVersion_path_show db 'version_PathShow',0 sz_PathShow_prepare db 'PathShow_prepare',0
;--------------------------------------------------------------------- sz_PathShow_draw db 'PathShow_draw',0
align 4 ;szVersion_path_show db 'version_PathShow',0
import_libimg: ;---------------------------------------------------------------------
dd alib_init1 align 4
img_is_img dd aimg_is_img import_libimg:
img_info dd aimg_info dd alib_init1
img_from_file dd aimg_from_file img_is_img dd aimg_is_img
img_to_file dd aimg_to_file img_info dd aimg_info
img_from_rgb dd aimg_from_rgb img_from_file dd aimg_from_file
img_to_rgb dd aimg_to_rgb img_to_file dd aimg_to_file
img_to_rgb2 dd aimg_to_rgb2 img_from_rgb dd aimg_from_rgb
img_decode dd aimg_decode img_to_rgb dd aimg_to_rgb
img_encode dd aimg_encode img_to_rgb2 dd aimg_to_rgb2
img_create dd aimg_create img_decode dd aimg_decode
img_destroy dd aimg_destroy img_encode dd aimg_encode
img_destroy_layer dd aimg_destroy_layer img_create dd aimg_create
img_count dd aimg_count img_destroy dd aimg_destroy
img_lock_bits dd aimg_lock_bits img_destroy_layer dd aimg_destroy_layer
img_unlock_bits dd aimg_unlock_bits img_count dd aimg_count
img_flip dd aimg_flip img_lock_bits dd aimg_lock_bits
img_flip_layer dd aimg_flip_layer img_unlock_bits dd aimg_unlock_bits
img_rotate dd aimg_rotate img_flip dd aimg_flip
img_rotate_layer dd aimg_rotate_layer img_flip_layer dd aimg_flip_layer
img_draw dd aimg_draw img_rotate dd aimg_rotate
dd 0,0 img_rotate_layer dd aimg_rotate_layer
alib_init1 db 'lib_init',0 img_draw dd aimg_draw
aimg_is_img db 'img_is_img',0 dd 0,0
aimg_info db 'img_info',0 alib_init1 db 'lib_init',0
aimg_from_file db 'img_from_file',0 aimg_is_img db 'img_is_img',0
aimg_to_file db 'img_to_file',0 aimg_info db 'img_info',0
aimg_from_rgb db 'img_from_rgb',0 aimg_from_file db 'img_from_file',0
aimg_to_rgb db 'img_to_rgb',0 aimg_to_file db 'img_to_file',0
aimg_to_rgb2 db 'img_to_rgb2',0 aimg_from_rgb db 'img_from_rgb',0
aimg_decode db 'img_decode',0 aimg_to_rgb db 'img_to_rgb',0
aimg_encode db 'img_encode',0 aimg_to_rgb2 db 'img_to_rgb2',0
aimg_create db 'img_create',0 aimg_decode db 'img_decode',0
aimg_destroy db 'img_destroy',0 aimg_encode db 'img_encode',0
aimg_destroy_layer db 'img_destroy_layer',0 aimg_create db 'img_create',0
aimg_count db 'img_count',0 aimg_destroy db 'img_destroy',0
aimg_lock_bits db 'img_lock_bits',0 aimg_destroy_layer db 'img_destroy_layer',0
aimg_unlock_bits db 'img_unlock_bits',0 aimg_count db 'img_count',0
aimg_flip db 'img_flip',0 aimg_lock_bits db 'img_lock_bits',0
aimg_flip_layer db 'img_flip_layer',0 aimg_unlock_bits db 'img_unlock_bits',0
aimg_rotate db 'img_rotate',0 aimg_flip db 'img_flip',0
aimg_rotate_layer db 'img_rotate_layer',0 aimg_flip_layer db 'img_flip_layer',0
aimg_draw db 'img_draw',0 aimg_rotate db 'img_rotate',0
;--------------------------------------------------------------------- aimg_rotate_layer db 'img_rotate_layer',0
;width,left,top,color,shift_color,focus_border_color,\ aimg_draw db 'img_draw',0
; blur_border_color,text_color,max,text,mouse_variable,flags,size,pos ;---------------------------------------------------------------------
;width,left,top,color,shift_color,focus_border_color,\
rect_input: ; blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
.left edit_box 35,95,5, cl_white,0,0,0,0,5,rect_input_buffer.left, mouse_dd1,ed_figure_only ;+ed_focus
.top edit_box 35,95,25,cl_white,0,0,0,0,5,rect_input_buffer.top, mouse_dd1,ed_figure_only rect_input:
.width edit_box 35,95,45,cl_white,0,0,0,0,5,rect_input_buffer.width, mouse_dd1,ed_figure_only .left edit_box 35,95,5, cl_white,0,0,0,0,5,rect_input_buffer.left, mouse_dd1,ed_figure_only ;+ed_focus
.height edit_box 35,95,65,cl_white,0,0,0,0,5,rect_input_buffer.height,mouse_dd1,ed_figure_only .top edit_box 35,95,25,cl_white,0,0,0,0,5,rect_input_buffer.top, mouse_dd1,ed_figure_only
rect_input_end: .width edit_box 35,95,45,cl_white,0,0,0,0,5,rect_input_buffer.width, mouse_dd1,ed_figure_only
mouse_dd1 rd 1 .height edit_box 35,95,65,cl_white,0,0,0,0,5,rect_input_buffer.height,mouse_dd1,ed_figure_only
rect_input_labels: rect_input_end:
.left label 10,10,0,rect_input_labels_text.left mouse_dd1 rd 1
.top label 10,30,0,rect_input_labels_text.top rect_input_labels:
.width label 10,50,0,rect_input_labels_text.width .left label 10,10,0,rect_input_labels_text.left
.height label 10,70,0,rect_input_labels_text.height .top label 10,30,0,rect_input_labels_text.top
rect_input_labels_end: .width label 10,50,0,rect_input_labels_text.width
.height label 10,70,0,rect_input_labels_text.height
rect_input_labels_text: rect_input_labels_end:
if lang eq ru_RU
.left db 'Žâáâ㯠᫥¢ :',0 rect_input_labels_text:
.top db 'Žâáâ㯠ᢥàåã:',0 if lang eq ru_RU
.width db '˜¨à¨­ :',0 .left db 'Žâáâ㯠᫥¢ :',0
.height db '‚ëá®â :',0 .top db 'Žâáâ㯠ᢥàåã:',0
else .width db '˜¨à¨­ :',0
.left db 'Left:',0 .height db '‚ëá®â :',0
.top db 'Top:',0 else ; Default to en_US
.width db 'Width:',0 .left db 'Left:',0
.height db 'Height:',0 .top db 'Top:',0
end if .width db 'Width:',0
.height db 'Height:',0
riw_check_boxes: end if
use_rect_active_window check_box2 (10 shl 16)+10,(85 shl 16) +10,5,cl_white,0,0,\
riw_check_boxes_text, ch_flag_bottom riw_check_boxes:
riw_check_boxes_end: use_rect_active_window check_box2 (10 shl 16)+10,(85 shl 16) +10,5,cl_white,0,0,\
riw_check_boxes_text, ch_flag_bottom
if lang eq ru_RU riw_check_boxes_end:
riw_check_boxes_text db 'ˆá¯®«ì§®¢ âì ®¡« áâì  ªâ¨¢­®£® ®ª­ ',0
riw_grab_text db 'Š®®à¤¨­ âë ¨ à §¬¥àë ®¡« áâ¨:',0 if lang eq ru_RU
else riw_check_boxes_text db 'ˆá¯®«ì§®¢ âì ®¡« áâì  ªâ¨¢­®£® ®ª­ ',0
riw_check_boxes_text db 'Use area of the active window',0 riw_grab_text db 'Š®®à¤¨­ âë ¨ à §¬¥àë ®¡« áâ¨:',0
riw_grab_text db 'Coordinates and size of the field:',0 else ; Default to en_US
end if riw_check_boxes_text db 'Use area of the active window',0
riw_grab_text db 'Coordinates and size of the field:',0
end if

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,181 +1,183 @@
; ;
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨ ; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨
; à ¡®âë ®ª­  á ­ áâனª ¬¨ ; à ¡®âë ®ª­  á ­ áâனª ¬¨
; ;
wnd_scale_width equ 320 ;è¨à¨­  ®ª­  á ­ áâனª ¬¨ ; Language support for locales: ru_RU (CP866), en_US.
wnd_scale_height equ 150 ;¢ëá®â  ®ª­  á ­ áâனª ¬¨
wnd_scale_width equ 320 ;è¨à¨­  ®ª­  á ­ áâனª ¬¨
align 4 wnd_scale_height equ 150 ;¢ëá®â  ®ª­  á ­ áâனª ¬¨
wnd_run_scale db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
align 4
;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords wnd_run_scale db 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ᮠ᢮©á⢠¬¨ ®¤­®¢à¥¬¥­­®
align 4
start_scale: ;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
pushad align 4
mcall SF_SET_EVENTS_MASK,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩ start_scale:
inc byte[wnd_run_scale] pushad
mcall SF_SET_EVENTS_MASK,0x27 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
edit_boxes_set_sys_color edit3,editboxes_end_sc,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢ inc byte[wnd_run_scale]
call get_scale
popad edit_boxes_set_sys_color edit3,editboxes_end_sc,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
call red_win_scale call get_scale
popad
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩 call red_win_scale
align 4
still_scale: ;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
pushad align 4
still_scale:
mcall SF_WAIT_EVENT_TIMEOUT,10 pushad
or eax,eax
jnz @f mcall SF_WAIT_EVENT_TIMEOUT,10
call timer_funct_scale or eax,eax
jmp .end jnz @f
@@: call timer_funct_scale
jmp .end
cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­  @@:
jne @f
call red_win_scale cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
jmp .end jne @f
@@: call red_win_scale
cmp al,2 jmp .end
jne @f @@:
call key_scale cmp al,2
jmp .end jne @f
@@: call key_scale
cmp al,3 jmp .end
jz button_scale @@:
cmp al,6 cmp al,3
jne @f jz button_scale
call mouse_scale cmp al,6
@@: jne @f
.end: call mouse_scale
popad @@:
jmp still_scale .end:
popad
align 4 jmp still_scale
red_win_scale:
pushad align 4
mcall SF_REDRAW,SSF_BEGIN_DRAW red_win_scale:
pushad
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT mcall SF_REDRAW,SSF_BEGIN_DRAW
mov edi,capt_opt ;children window caption
mov bx,word[procinfo.box.left] mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
add bx,word[buf_0.l] mov edi,capt_opt ;children window caption
add bx,5 ;è¨à¨­  ¡®ª®¢®© à ¬ª¨ mov bx,word[procinfo.box.left]
shl ebx,16 add bx,word[buf_0.l]
mov bx,wnd_scale_width add bx,5 ;è¨à¨­  ¡®ª®¢®© à ¬ª¨
mov cx,word[procinfo.box.top] shl ebx,16
add cx,ax ;add skin height mov bx,wnd_scale_width
add cx,word[buf_0.t] mov cx,word[procinfo.box.top]
shl ecx,16 add cx,ax ;add skin height
mov cx,wnd_scale_height add cx,word[buf_0.t]
mov edx,[sc.work] shl ecx,16
or edx,0x33000000 mov cx,wnd_scale_height
xor eax,eax mov edx,[sc.work]
int 0x40 or edx,0x33000000
xor eax,eax
mov esi,[sc.work_button] int 0x40
;ebx = (l<:)+w, ecx = (t<:)+h
mcall SF_DEFINE_BUTTON, (5 shl 16)+59, (95 shl 16)+20, 3 mov esi,[sc.work_button]
mcall , (75 shl 16)+59, (95 shl 16)+20, 4 ;ebx = (l<:)+w, ecx = (t<:)+h
mcall SF_DEFINE_BUTTON, (5 shl 16)+59, (95 shl 16)+20, 3
mov ecx,[sc.work_text] mcall , (75 shl 16)+59, (95 shl 16)+20, 4
bts ecx,31 ;à¨á㥬 ï áâப  § ª ­ç¨¢ ¥âáï ­ã«ñ¬
mcall SF_DRAW_TEXT, (5 shl 16)+15,, capt_sc mov ecx,[sc.work_text]
bts ecx,31 ;à¨á㥬 ï áâப  § ª ­ç¨¢ ¥âáï ­ã«ñ¬
mov ecx,[sc.work_button_text] mcall SF_DRAW_TEXT, (5 shl 16)+15,, capt_sc
bts ecx,31
mcall , (9 shl 16)+101,, txt_but_cancel mov ecx,[sc.work_button_text]
mov edx,txt_but_apply bts ecx,31
mcall ,(79 shl 16)+101 mcall , (9 shl 16)+101,, txt_but_cancel
mov edx,txt_but_apply
stdcall [edit_box_draw], edit3 mcall ,(79 shl 16)+101
mcall SF_REDRAW,SSF_END_DRAW stdcall [edit_box_draw], edit3
popad
ret mcall SF_REDRAW,SSF_END_DRAW
popad
align 4 ret
proc key_scale uses eax ebx
mcall SF_GET_KEY align 4
proc key_scale uses eax ebx
test word [edit3.flags],10b ;ed_focus mcall SF_GET_KEY
je @f
stdcall [edit_box_key], edit3 test word [edit3.flags],10b ;ed_focus
;jmp .end je @f
@@: stdcall [edit_box_key], edit3
;jmp .end
.end: @@:
ret
endp .end:
ret
align 4 endp
mouse_scale:
stdcall [edit_box_mouse], edit3 align 4
ret mouse_scale:
stdcall [edit_box_mouse], edit3
align 4 ret
button_scale:
mcall SF_GET_BUTTON align 4
button_scale:
cmp ah,3 mcall SF_GET_BUTTON
je .exit
cmp ah,4 cmp ah,3
jne .end_save je .exit
push eax ecx edi esi cmp ah,4
finit jne .end_save
push eax ecx edi esi
mov esi,string3 finit
mov edi,Data_String
cld mov esi,string3
mov ecx,8 mov edi,Data_String
rep movsd cld
call String_to_DoubleFloat mov ecx,8
fld qword[Data_Double] ;áç¨â뢠¥¬ ª ª double rep movsd
fstp qword[Scale1mm] ;á®å࠭塞 ª ª double call String_to_DoubleFloat
fld qword[Data_Double] ;áç¨â뢠¥¬ ª ª double
pop esi edi ecx eax fstp qword[Scale1mm] ;á®å࠭塞 ª ª double
jmp .exit
.end_save: pop esi edi ecx eax
jmp .exit
cmp ah,1 .end_save:
jne still_scale.end
.exit: cmp ah,1
mov byte[wnd_run_scale],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­ jne still_scale.end
mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë .exit:
mov byte[wnd_run_scale],0 ;®¡­ã«ï¥¬ áç¥â稪 ®ª®­
align 4 mcall SF_TERMINATE_PROCESS ;¢ë室 ¨§ ¯à®£à ¬¬ë
get_scale:
;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë align 4
push eax get_scale:
mov word[NumberSymbolsAD],8 ;§ £à㧪  ª®®à¤¨­ â ¢ editbox-ë
finit push eax
fld qword[Scale1mm] mov word[NumberSymbolsAD],8
fstp qword[Data_Double] finit
call DoubleFloat_to_String fld qword[Scale1mm]
call String_crop_0 fstp qword[Data_Double]
stdcall [edit_box_set_text], edit3, Data_String call DoubleFloat_to_String
;stdcall [edit_box_draw], edit3 call String_crop_0
pop eax stdcall [edit_box_set_text], edit3, Data_String
ret ;stdcall [edit_box_draw], edit3
pop eax
align 4 ret
proc timer_funct_scale
;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥­­ãî ª®®à¤¨­ âã align 4
ret proc timer_funct_scale
endp ;¯à®á¬ âਢ ¥¬ ¢ë¤¥«¥­­ãî ª®®à¤¨­ âã
ret
align 4 endp
if lang eq ru_RU
capt_opt db '<27> áâனª¨',0 align 4
capt_sc db 'Œ áèâ ¡:',0 if lang eq ru_RU
else capt_opt db '<27> áâனª¨',0
capt_opt db 'Options',0 capt_sc db 'Œ áèâ ¡:',0
capt_sc db 'Scale:',0 else ; Default to en_US
end if capt_opt db 'Options',0
capt_sc db 'Scale:',0
edit3 edit_box 80, 54, 11, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0 end if
editboxes_end_sc:
edit3 edit_box 80, 54, 11, 0xffd0d0, 0xff, 0x80ff, 0, 0x8000, 34, string3, mouse_dd, 0
string3 rb 34 editboxes_end_sc:
string3 rb 34

View File

@ -19,7 +19,7 @@ use32
dd 0x0 dd 0x0
include "..\..\..\..\macros.inc" include "..\..\..\..\macros.inc"
include "lang.inc" include "lang.inc" ; Language support for locales: de_DE, en_US.
START: START:
call cmdexist call cmdexist
@ -2780,6 +2780,7 @@ title db 'CMD - Command line interpreter',0
smb_cursor db '|' smb_cursor db '|'
prompt db 'CMD>>' prompt db 'CMD>>'
if lang eq de_DE if lang eq de_DE
h1 db ' CMD - Command line interpreter version 0.26 ' h1 db ' CMD - Command line interpreter version 0.26 '
h2 db ' copyleft Chemist - dmitry_gt@tut.by ' h2 db ' copyleft Chemist - dmitry_gt@tut.by '
@ -2823,7 +2824,9 @@ mess14 db 'Datei erfolgreich umbenannt '
mess15 db 'ERROR: Kann Datei nicht umbenennen! ' mess15 db 'ERROR: Kann Datei nicht umbenennen! '
mess16 db 'Scriptname erwartet! ' mess16 db 'Scriptname erwartet! '
mess17 db 'Dieses Kommando ist nur in Scripts zulaessig! ' mess17 db 'Dieses Kommando ist nur in Scripts zulaessig! '
else
else ; Default to en_US
h1 db ' CMD - Command line interpreter version 0.26 ' h1 db ' CMD - Command line interpreter version 0.26 '
h2 db ' copyleft Chemist - dmitry_gt@tut.by ' h2 db ' copyleft Chemist - dmitry_gt@tut.by '
h3 db ' Available commands: ' h3 db ' Available commands: '
@ -2831,7 +2834,7 @@ h4 db ' HELP - Display this text LS - List files '
h5 db ' EXIT - Exit Programm CP - Copy file ' h5 db ' EXIT - Exit Programm CP - Copy file '
h6 db ' CLS - Clear Screen PS - Process info ' h6 db ' CLS - Clear Screen PS - Process info '
h7 db ' KILL - Kill Process RN - Rename File ' h7 db ' KILL - Kill Process RN - Rename File '
h8 db ' VER - Display programm version ' h8 db ' VER - Display program version '
h9 db ' DEL - Delete file from ramdisk ' h9 db ' DEL - Delete file from ramdisk '
h10 db ' SHUTDOWN - Quit Menuet ' h10 db ' SHUTDOWN - Quit Menuet '
h11 db ' PAUSE - Wait for keypress ' h11 db ' PAUSE - Wait for keypress '
@ -2849,7 +2852,7 @@ proc_head db ' PID Name Start Length Proc_NUMB '
proc_hd11 db '-------------------------------------------- ' proc_hd11 db '-------------------------------------------- '
mess1 db 'Press any key to continue (ESC - Cancel)... ' mess1 db 'Press any key to continue (ESC - Cancel)... '
mess2 db 'Plz specify a 4 byte process number (not PID) ' mess2 db 'Specify a 4 byte process number (not PID) '
mess3 db 'Process with number you specified has been ' mess3 db 'Process with number you specified has been '
mess4 db 'terminated. ' mess4 db 'terminated. '
mess5 db 'Usage: del [filename] ' mess5 db 'Usage: del [filename] '

View File

@ -2,38 +2,40 @@
;///// LOCALIZED STRINGS ////////////////////////////////////////////////////// ;///// LOCALIZED STRINGS //////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Language support for locales: ru_RU (CP866), en_US, fr_FR, de_DE.
lsz lname,\ lsz lname,\
ru,'ˆ¬ï',\ ru_RU,'ˆ¬ï',\
en,'Name',\ en_US,'Name',\
fr,'Nom',\ fr_FR,'Nom',\
ge,'Name' de_DE,'Name'
lsz sort_kind,\ lsz sort_kind,\
ru,'¨à',\ ru_RU,'¨à',\
en,'nx',\ en_US,'nx',\
fr,'ne',\ fr_FR,'ne',\
ge,'ne' de_DE,'ne'
lsz btmkeys,\ lsz btmkeys,\
ru,'<27>®¬®éì <20>®«ì§Œ <20>à®á¬ <20>¥¤ ªâ Š®¯¨à ',\ ru_RU,'<27>®¬®éì <20>®«ì§Œ <20>à®á¬ <20>¥¤ ªâ Š®¯¨à ',\
ru,'<27>¥à¥­ <20> ¯ª  “¤ «¥­ Š®­äŒ­ ‚ë室',\ ru_RU,'<27>¥à¥­ <20> ¯ª  “¤ «¥­ Š®­äŒ­ ‚ë室',\
en,'Help UserMn View Edit Copy ',\ en_US,'Help UserMn View Edit Copy ',\
en,'RenMov MkFold Delete ConfMn Quit',\ en_US,'RenMov MkFold Delete ConfMn Quit',\
fr,'Aide UserMn Vue Editer Copier ',\ fr_FR,'Aide UserMn Vue Editer Copier ',\
fr,'RenDep CrÎeRp Efface ConfMn Quitter',\ fr_FR,'RenDep CrÎeRp Efface ConfMn Quitter',\
ge,'Hilfe Menà Anzeig Bearb. Kopie ',\ de_DE,'Hilfe Menà Anzeig Bearb. Kopie ',\
ge,'UmbBew MkDir LÂsche Funkt. Ende' de_DE,'UmbBew MkDir LÂsche Funkt. Ende'
lsz sz_cancel,\ lsz sz_cancel,\
ru,'Žâ¬¥­ ',\ ru_RU,'Žâ¬¥­ ',\
en,'Cancel',\ en_US,'Cancel',\
fr,'Annuler',\ fr_FR,'Annuler',\
ge,'Beenden' de_DE,'Beenden'
;---------- COPY DIALOG ---------- ;---------- COPY DIALOG ----------
lsz sz_copy,\ lsz sz_copy,\
ru,'Š®¯¨à®¢ âì "',\ ru_RU,'Š®¯¨à®¢ âì "',\
en,'Copy "',\ en_US,'Copy "',\
fr,'Copier "',\ fr_FR,'Copier "',\
ge,'Kopiere "' de_DE,'Kopiere "'
lsz sz_copyto,\ lsz sz_copyto,\
ru,'" ¢:',\ ru_RU,'" ¢:',\
en,'" to:',\ en_US,'" to:',\
fr,'" vers:',\ fr_FR,'" vers:',\
ge,'" nach:' de_DE,'" nach:'

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@
dd temp_area , 0x0 ; I_Param , I_Icon dd temp_area , 0x0 ; I_Param , I_Icon
include 'lang.inc' include 'lang.inc'
; Language support for locales: ru_RU (CP866), en_US, de_DE.
include '..\..\..\..\macros.inc' include '..\..\..\..\macros.inc'
include '..\..\..\..\develop\examples\editbox\trunk\editbox.inc' include '..\..\..\..\develop\examples\editbox\trunk\editbox.inc'
;include 'macros.inc' ;include 'macros.inc'
@ -655,9 +656,9 @@ labelt:
db 'MeView v.0.4' db 'MeView v.0.4'
lsz buttext,\ lsz buttext,\
en, ' FILE OPEN INFO BGRD',\ en_US, ' FILE OPEN INFO BGRD',\
ru, ' ”€‰‹ ŽŠ<E28099> ˆ<>”Ž ”Ž<E2809D> ',\ ru_RU, ' ”€‰‹ ŽŠ<E28099> ˆ<>”Ž ”Ž<E2809D> ',\
de, 'DATEI OEFNEN INFO HGRD' de_DE, 'DATEI OEFNEN INFO HGRD'
thread1: ; start of thread1 thread1: ; start of thread1
@ -926,25 +927,25 @@ draw_window2:
; DATA AREA ; DATA AREA
lsz labelt2,\ lsz labelt2,\
en, 'File info',\ en_US, 'File info',\
ru, 'ˆ­ä®à¬ æ¨ï ® ä ©«¥',\ ru_RU, 'ˆ­ä®à¬ æ¨ï ® ä ©«¥',\
de, 'Dateiinfo' de_DE, 'Dateiinfo'
lsz fitext,\ lsz fitext,\
en, 'FILE SIZE ',\ en_US, 'FILE SIZE ',\
en, 'X SIZE ',\ en_US, 'X SIZE ',\
en, 'Y SIZE ',\ en_US, 'Y SIZE ',\
en, 'BITS PER PIXEL',\ en_US, 'BITS PER PIXEL',\
\ \
ru, '<27> §¬¥à ä ©«  ',\ ru_RU, '<27> §¬¥à ä ©«  ',\
ru, '˜¨à¨­  ',\ ru_RU, '˜¨à¨­  ',\
ru, '‚ëá®â  ',\ ru_RU, '‚ëá®â  ',\
ru, '<27>¨â ­  ¯¨ªá¥« ',\ ru_RU, '<27>¨â ­  ¯¨ªá¥« ',\
\ \
de, 'FATEIGROESSE ',\ de_DE, 'FATEIGROESSE ',\
de, 'X GROESSE ',\ de_DE, 'X GROESSE ',\
de, 'Y GROESSE ',\ de_DE, 'Y GROESSE ',\
de, 'BITS PER PIXEL' de_DE, 'BITS PER PIXEL'
thread3: ; start of bgrd thread thread3: ; start of bgrd thread
@ -1114,29 +1115,29 @@ wnd_width dd 210
wnd_height dd 53 wnd_height dd 53
lsz labelt3,\ lsz labelt3,\
en, 'Background set',\ en_US, 'Background set',\
ru, "“áâ ­®¢ª  ä®­ ",\ ru_RU, "“áâ ­®¢ª  ä®­ ",\
de, 'Hintergrund gesetzt' de_DE, 'Hintergrund gesetzt'
lsz bgrdtext,\ lsz bgrdtext,\
en, 'SET AS BACKGROUND:',\ en_US, 'SET AS BACKGROUND:',\
ru, '’¨¯ ®¡®¥¢:',\ ru_RU, '’¨¯ ®¡®¥¢:',\
de, 'ALS HINTERGRUND' de_DE, 'ALS HINTERGRUND'
lsz tiled,\ lsz tiled,\
en, 'TILED',\ en_US, 'TILED',\
ru, '§ ¬®áâ¨âì',\ ru_RU, '§ ¬®áâ¨âì',\
de, 'GEKACHELT' de_DE, 'GEKACHELT'
lsz stretch,\ lsz stretch,\
en, 'STRETCH',\ en_US, 'STRETCH',\
ru, 'à áâï­ãâì',\ ru_RU, 'à áâï­ãâì',\
de, 'GESTRECKT' de_DE, 'GESTRECKT'
lsz ok_btn,\ lsz ok_btn,\
en, 'Ok',\ en_US, 'Ok',\
ru, 'Ok',\ ru_RU, 'Ok',\
de, 'Ok' de_DE, 'Ok'
image_file dd 0 image_file dd 0
image_file_1 dd 0 image_file_1 dd 0

View File

@ -1,393 +1,393 @@
; ;
; DESKTOP CONTEXT MENU ; DESKTOP CONTEXT MENU
; written by Ivan Poddubny ; written by Ivan Poddubny
; ;
; €¢â®à - ˆ¢ ­ <20>®¤¤ã¡­ë© ; €¢â®à - ˆ¢ ­ <20>®¤¤ã¡­ë©
; e-mail: ivan-yar@bk.ru ; e-mail: ivan-yar@bk.ru
; ;
; Compile with flat assembler ; Compile with flat assembler
; ;
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; version: 1.1 ; version: 1.1
; last update: 27/03/2012 ; last update: 27/03/2012
; changed by: Marat Zakiyanov aka Mario79, aka Mario ; changed by: Marat Zakiyanov aka Mario79, aka Mario
; changes: The program uses only 3404 bytes memory is now. ; changes: The program uses only 3404 bytes memory is now.
; Optimisations and code refactoring. ; Optimisations and code refactoring.
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
include 'lang.inc' include 'lang.inc'
include '..\..\..\..\macros.inc' include '..\..\..\..\macros.inc'
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
use32 use32
org 0x0 org 0x0
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
dd 0x01 ; header version dd 0x01 ; header version
dd START ; start of code dd START ; start of code
dd IM_END ; size of image dd IM_END ; size of image
dd I_END ; memory for app dd I_END ; memory for app
dd stack_area ; esp dd stack_area ; esp
dd 0 ; boot parameters dd 0 ; boot parameters
dd 0 ; path dd 0 ; path
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
START: START:
; ¯®«ãç¨âì á¨á⥬­ë¥ æ¢¥â  ; ¯®«ãç¨âì á¨á⥬­ë¥ 梥â 
mcall 48,3,sc,sizeof.system_colors mcall 48,3,sc,sizeof.system_colors
; ãáâ ­®¢¨¬ ¬ áªã ᮡë⨩ - ­ á ¨­â¥à¥áã¥â ⮫쪮 ¬ëèì ; ãáâ ­®¢¨¬ ¬ áªã ᮡë⨩ - ­ á ¨­â¥à¥áã¥â ⮫쪮 ¬ëèì
mcall 40,100000b mcall 40,100000b
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
still: ; £« ¢­ë© 横« ®á­®¢­®£® ¯à®æ¥áá  still: ; £« ¢­ë© 横« ®á­®¢­®£® ¯à®æ¥áá 
mcall 10 ; ¦¤ñ¬ ᮡëâ¨ï mcall 10 ; ¦¤ñ¬ ᮡëâ¨ï
mcall 37,2 ; ª ª¨¥ ­ ¦ âë ª¯®¯ª¨? mcall 37,2 ; ª ª¨¥ ­ ¦ âë ª¯®¯ª¨?
cmp eax,ebx ; ¥á«¨ ­¥ ¯à ¢ ï, ¢®§¢à â cmp eax,ebx ; ¥á«¨ ­¥ ¯à ¢ ï, ¢®§¢à â
jne still jne still
;-------------------------------------- ;--------------------------------------
; íâ® ¤«ï ®â« ¤ª¨ - ¥á«¨ ¬ëèì ¢ â®çª¥ (0;0), § ªà®¥¬áï ; íâ® ¤«ï ®â« ¤ª¨ - ¥á«¨ ¬ëèì ¢ â®çª¥ (0;0), § ªà®¥¬áï
; xor ebx,ebx ; xor ebx,ebx
; mcall 37 ; mcall 37
; test eax,eax ; ªãàá®à ¢ â®çª¥ (0;0), â.¥. eax = 0 ; test eax,eax ; ªãàá®à ¢ â®çª¥ (0;0), â.¥. eax = 0
; je exit ; je exit
;-------------------------------------- ;--------------------------------------
; ª®®à¤¨­ âë ªãàá®à  ; ª®®à¤¨­ âë ªãàá®à 
xor ebx,ebx xor ebx,ebx
mcall 37 mcall 37
mov ebx,eax ; eax = cursor_x mov ebx,eax ; eax = cursor_x
shr eax,16 ; ebx = cursor_y shr eax,16 ; ebx = cursor_y
and ebx,0xffff and ebx,0xffff
mov [curx1],eax ; curx1 = cursor_x mov [curx1],eax ; curx1 = cursor_x
mov [cury1],ebx ; cury1 = cursor_y mov [cury1],ebx ; cury1 = cursor_y
; ª®¬ã ¯à¨­ ¤«¥¦¨â â®çª ? ; ª®¬ã ¯à¨­ ¤«¥¦¨â â®çª ?
mcall 34,[curx1],[cury1] mcall 34,[curx1],[cury1]
cmp al,1 ; 1 - ï¤à® cmp al,1 ; 1 - ï¤à®
jne still jne still
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: ; ¯®¤®¦¤ñ¬, ¯®ª  ¯®«ì§®¢ â¥«ì ­¥ ®â¯ãá⨫ ¯à ¢ãî ª­®¯ªã ¬ëè¨ @@: ; ¯®¤®¦¤ñ¬, ¯®ª  ¯®«ì§®¢ â¥«ì ­¥ ®â¯ãá⨫ ¯à ¢ãî ª­®¯ªã ¬ëè¨
mcall 37,2 ; ­ ¦ âë «¨ ª­®¯ª¨ ¬ëè¨? mcall 37,2 ; ­ ¦ âë «¨ ª­®¯ª¨ ¬ëè¨?
test eax,ebx ; ¥á«¨ ®â¯ãá⨫, (eax != 2) test eax,ebx ; ¥á«¨ ®â¯ãá⨫, (eax != 2)
jz @f ; ¨¤ñ¬ ¢ ­ ç «® £« ¢­®£® 横«  jz @f ; ¨¤ñ¬ ¢ ­ ç «® £« ¢­®£® 横« 
mcall 68,1 ; ¨­ ç¥ ¯¥à¥ª«î稬áï ­  á«¥¤ãî騩 ¯®â®ª á¨áâ¥¬ë ¨ ª®£¤  mcall 68,1 ; ¨­ ç¥ ¯¥à¥ª«î稬áï ­  á«¥¤ãî騩 ¯®â®ª á¨áâ¥¬ë ¨ ª®£¤ 
jmp @b ; ¢ë¯®«­¥­¨¥ ¢¥à­¥âáï í⮬㠯®â®ªã, ¯à®¢¥à¨¬ ¬ëèì ®¯ïâì jmp @b ; ¢ë¯®«­¥­¨¥ ¢¥à­¥âáï í⮬㠯®â®ªã, ¯à®¢¥à¨¬ ¬ëèì ®¯ïâì
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; ¥á«¨ 㦥 ¡ë«® ®âªàëâ® ¬¥­î, ­ã¦­® ¯®¤®¦¤ âì, ¯®ª  ®­® § ªà®¥âáï: ; ¥á«¨ 㦥 ¡ë«® ®âªàëâ® ¬¥­î, ­ã¦­® ¯®¤®¦¤ âì, ¯®ª  ®­® § ªà®¥âáï:
cmp [menu_opened],0 cmp [menu_opened],0
je @f je @f
mcall 68,1 ; ¯¥à¥ª«î稬áï ­  á«¥¤ãî騩 ¯®â®ª á¨á⥬ë mcall 68,1 ; ¯¥à¥ª«î稬áï ­  á«¥¤ãî騩 ¯®â®ª á¨á⥬ë
; ¡®«¥¥ íä䥪⨢­ë© ᯮᮡ § ¤¥à¦ª¨ 祬 mcall 5 ; ¡®«¥¥ íä䥪⨢­ë© ᯮᮡ § ¤¥à¦ª¨ 祬 mcall 5
jmp @b jmp @b
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
;   ⥯¥àì ¬®¦­® ᬥ«® § ¯ã᪠âì ¯à®æ¥áá (¯®â®ª) ¬¥­î ;   ⥯¥àì ¬®¦­® ᬥ«® § ¯ã᪠âì ¯à®æ¥áá (¯®â®ª) ¬¥­î
mcall 51,1,start_wnd,stack_wnd mcall 51,1,start_wnd,stack_wnd
jmp still jmp still
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
exit_menu: ; ¥á«¨ ¢ë室¨¬ ¨§ ¬¥­î, ­ ¤® § ¯¨á âì ¢ [menu_opened] 0 exit_menu: ; ¥á«¨ ¢ë室¨¬ ¨§ ¬¥­î, ­ ¤® § ¯¨á âì ¢ [menu_opened] 0
mov [menu_opened],0 mov [menu_opened],0
;-------------------------------------- ;--------------------------------------
align 4 align 4
exit: ; á ¬ë ¨¤ñ¬, ª®£¤  ¢ë室¨¬ ¨§ ®á­®¢­®£® ¯à®æ¥áá  exit: ; á ¬ë ¨¤ñ¬, ª®£¤  ¢ë室¨¬ ¨§ ®á­®¢­®£® ¯à®æ¥áá 
or eax,-1 ; eax = -1 or eax,-1 ; eax = -1
mcall mcall
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; §¤¥áì áâ àâã¥â ¯à®æ¥áá ¬¥­î ; §¤¥áì áâ àâã¥â ¯à®æ¥áá ¬¥­î
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
start_wnd: start_wnd:
mov [menu_opened],1 mov [menu_opened],1
; ãáâ ­®¢¨¬ ¬ áªã ¦¥« ¥¬ëå ᮡë⨩: ¬¥­î + ª­®¯ª¨ + ¯¥à¥à¨á®¢ª  ; ãáâ ­®¢¨¬ ¬ áªã ¦¥« ¥¬ëå ᮡë⨩: ¬¥­î + ª­®¯ª¨ + ¯¥à¥à¨á®¢ª 
mcall 40,100101b mcall 40,100101b
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
red: red:
call draw_window call draw_window
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
still2: ; £« ¢­ë© 横« ¯à®æ¥áá  ¬¥­î still2: ; £« ¢­ë© 横« ¯à®æ¥áá  ¬¥­î
mcall 10 ; ¦¤ñ¬ ᮡëâ¨ï mcall 10 ; ¦¤ñ¬ ᮡëâ¨ï
cmp eax,1 ; ¯¥à¥à¨á®¢ª ? cmp eax,1 ; ¯¥à¥à¨á®¢ª ?
je red je red
cmp eax,3 ; ª­®¯ª ? cmp eax,3 ; ª­®¯ª ?
je button je button
cmp eax,6 ; ¬ëèì? cmp eax,6 ; ¬ëèì?
je mouse je mouse
jmp still2 ; ¢¥à­ñ¬áï ¢ ­ ç «® £« ¢­®£® 横«  jmp still2 ; ¢¥à­ñ¬áï ¢ ­ ç «® £« ¢­®£® 横« 
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
; Ž<><C5BD><EFBFBD>ŽˆŠ Œ›˜ˆ ; Ž<><C5BD><EFBFBD>ŽˆŠ Œ›˜ˆ
mouse: ; ª®£¤  ¯®«ì§®¢ â¥«ì ­ ¦¬ñâ ª­®¯ªã ¬ëè¨, § ªà®¥¬áï mouse: ; ª®£¤  ¯®«ì§®¢ â¥«ì ­ ¦¬ñâ ª­®¯ªã ¬ëè¨, § ªà®¥¬áï
mcall 37,2 ; ª ª¨¥ ª­®¯ª¨ ­ ¦ âë? mcall 37,2 ; ª ª¨¥ ª­®¯ª¨ ­ ¦ âë?
test eax,eax ; ­¨ª ª¨¥? - ⮣¤  ¯à¥ªà á­®! ¢¥à­ñ¬áï ¢ £« ¢­ë© 横« test eax,eax ; ­¨ª ª¨¥? - ⮣¤  ¯à¥ªà á­®! ¢¥à­ñ¬áï ¢ £« ¢­ë© 横«
jz still2 jz still2
mcall 37,0 mcall 37,0
mov esi, eax mov esi, eax
shr esi, 16 shr esi, 16
movzx edi, ax movzx edi, ax
mcall 9, procinfo, -1 mcall 9, procinfo, -1
mov eax, [procinfo.box.left] mov eax, [procinfo.box.left]
cmp esi, eax cmp esi, eax
jl exit_menu jl exit_menu
add eax, [procinfo.box.width] add eax, [procinfo.box.width]
cmp esi, eax cmp esi, eax
jge exit_menu jge exit_menu
mov eax, [procinfo.box.top] mov eax, [procinfo.box.top]
cmp edi, eax cmp edi, eax
jl exit_menu jl exit_menu
add eax, [procinfo.box.height] add eax, [procinfo.box.height]
cmp edi, eax cmp edi, eax
jge exit_menu jge exit_menu
jmp still2 jmp still2
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
; <20>€†€€ Š<>Ž<EFBFBD>Š€ ; <20>€†€€ Š<>Ž<EFBFBD>Š€
button: button:
mcall 17 ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨ mcall 17 ; ¯®«ãç¨âì ¨¤¥­â¨ä¨ª â®à ­ ¦ â®© ª­®¯ª¨
sub ah,10 ; áà ¢­¨¢ ¥¬ á 10 sub ah,10 ; áà ¢­¨¢ ¥¬ á 10
jl nofuncbtns ; ¥á«¨ ¬¥­ìè¥ - § ªà뢠¥¬ ¬¥­î jl nofuncbtns ; ¥á«¨ ¬¥­ìè¥ - § ªà뢠¥¬ ¬¥­î
movzx ebx,ah ; ¯®«ã稫¨ ­®¬¥à ¯à®£à ¬¬ë ¢ ᯨ᪥ ¢ ebx movzx ebx,ah ; ¯®«ã稫¨ ­®¬¥à ¯à®£à ¬¬ë ¢ ᯨ᪥ ¢ ebx
mov esi,[startapps + ebx*4] mov esi,[startapps + ebx*4]
mov edi,start_info.path mov edi,start_info.path
cld cld
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
lodsb lodsb
stosb stosb
test al,al test al,al
jnz @b jnz @b
mcall 70, start_info mcall 70, start_info
; mov eax,5 ; ¯®¤®¦¤ñ¬, ¯®ª  ¯à®£à ¬¬  § ¯ãáâ¨âìáï ; mov eax,5 ; ¯®¤®¦¤ñ¬, ¯®ª  ¯à®£à ¬¬  § ¯ãáâ¨âìáï
; mov ebx,1 ;   â® ¥ñ ®ª­® ­¥ ¡ã¤¥â ®âà¨á®¢ ­® (¡ £ ¢ ï¤à¥???) ; mov ebx,1 ;   â® ¥ñ ®ª­® ­¥ ¡ã¤¥â ®âà¨á®¢ ­® (¡ £ ¢ ï¤à¥???)
; mcall ; à áª®¬¬¥­â¨àã©â¥ í⨠áâப¨, ¥á«¨ ã ¢ á ¯à®¡«¥¬ë ; mcall ; à áª®¬¬¥­â¨àã©â¥ í⨠áâப¨, ¥á«¨ ã ¢ á ¯à®¡«¥¬ë
; á ®âà¨á®¢ª®© ; á ®âà¨á®¢ª®©
;-------------------------------------- ;--------------------------------------
align 4 align 4
nofuncbtns: ; § ªà뢠¥¬ ¬¥­î nofuncbtns: ; § ªà뢠¥¬ ¬¥­î
jmp exit_menu jmp exit_menu
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
_BTNS_ = 6 ; ª®«¨ç¥á⢮ ª­®¯®ª ("¯ã­ªâ®¢ ¬¥­î") _BTNS_ = 6 ; ª®«¨ç¥á⢮ ª­®¯®ª ("¯ã­ªâ®¢ ¬¥­î")
if lang eq ru_RU if lang eq ru_RU
font = 0x00000000 font = 0x00000000
string_length = 20 ; ¤«¨­  áâப¨ string_length = 20 ; ¤«¨­  áâப¨
wnd_x_size = 133 ; è¨à¨­  ®ª­  wnd_x_size = 133 ; è¨à¨­  ®ª­ 
title_pos = 36 shl 16 + 7 title_pos = 36 shl 16 + 7
else else
font = 0x10000000 font = 0x10000000
string_length = 12 ; ¤«¨­  áâப¨ string_length = 12 ; string length
wnd_x_size = 105 ; è¨à¨­  ®ª­  wnd_x_size = 105 ; window width
title_pos = 23 shl 16 + 7 title_pos = 23 shl 16 + 7
end if end if
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
;******************************* ;*******************************
;******** <20>ˆ“…Œ ŽŠ<C5BD>Ž ******** ;******** <20>ˆ“…Œ ŽŠ<C5BD>Ž ********
;******************************* ;*******************************
draw_window: draw_window:
mcall 12,1 ; ­ ç¨­ ¥¬ "à¨á®¢ âì" mcall 12,1 ; ­ ç¨­ ¥¬ "à¨á®¢ âì"
mov eax,[curx1] ; ⥪ã騥 ª®®à¤¨­ âë ªãàá®à  mov eax,[curx1] ; ⥪ã騥 ª®®à¤¨­ âë ªãàá®à 
mov [curx],eax ; § ¯¨è¥¬ ¢ ª®®à¤¨­ âë ®ª­  mov [curx],eax ; § ¯¨è¥¬ ¢ ª®®à¤¨­ âë ®ª­ 
mov eax,[cury1] mov eax,[cury1]
mov [cury],eax mov [cury],eax
; ⥯¥àì ¡ã¤¥¬ áç¨â âì ª®®à¤¨­ âë ®ª­ , çâ®¡ë ®­® §  ªà © íªà ­  ­¥ ¢ë«¥§«® ; ⥯¥àì ¡ã¤¥¬ áç¨â âì ª®®à¤¨­ âë ®ª­ , çâ®¡ë ®­® §  ªà © íªà ­  ­¥ ¢ë«¥§«®
mcall 14 ; ¯®«ã稬 à §¬¥à íªà ­  mcall 14 ; ¯®«ã稬 à §¬¥à íªà ­ 
mov ebx,eax mov ebx,eax
shr eax,16 ; ¢ eax - x_screen shr eax,16 ; ¢ eax - x_screen
and ebx,0xffff ; ¢ ebx - y_screen and ebx,0xffff ; ¢ ebx - y_screen
add eax,-wnd_x_size ; eax = [x_screen - è¨à¨­  ®ª­ ] add eax,-wnd_x_size ; eax = [x_screen - è¨à¨­  ®ª­ ]
add ebx,-_BTNS_*15-21 ; ebx = [y_screen - ¢ëá®â  ®ª­ ] add ebx,-_BTNS_*15-21 ; ebx = [y_screen - ¢ëá®â  ®ª­ ]
cmp eax,[curx] cmp eax,[curx]
jg .okx ; ¥á«¨ ®ª­® ᫨誮¬ ¡«¨§ª® ª ¯à ¢®¬ã ªà î, jg .okx ; ¥á«¨ ®ª­® ᫨誮¬ ¡«¨§ª® ª ¯à ¢®¬ã ªà î,
add [curx],-wnd_x_size ; ᤢ¨­¥¬ ¥£® ¢«¥¢® ­  100 add [curx],-wnd_x_size ; ᤢ¨­¥¬ ¥£® ¢«¥¢® ­  100
;-------------------------------------- ;--------------------------------------
align 4 align 4
.okx: .okx:
cmp ebx, [cury] cmp ebx, [cury]
jg .oky ; ¯® ¢¥à⨪ «¨ â®ç­® â ª¦¥ jg .oky ; ¯® ¢¥à⨪ «¨ â®ç­® â ª¦¥
add [cury], -_BTNS_*15-21 add [cury], -_BTNS_*15-21
;-------------------------------------- ;--------------------------------------
align 4 align 4
.oky: .oky:
xor eax, eax ; äã­ªæ¨ï 0 - ᮧ¤ âì ®ª­® xor eax, eax ; äã­ªæ¨ï 0 - ᮧ¤ âì ®ª­®
mov ebx, [curx] ; ebx = [ª®®à¤¨­ â  ¯® x] shl 16 + [è¨à¨­ ] mov ebx, [curx] ; ebx = [ª®®à¤¨­ â  ¯® x] shl 16 + [è¨à¨­ ]
shl ebx, 16 shl ebx, 16
add ebx, wnd_x_size add ebx, wnd_x_size
mov ecx, [cury] ; ecx = [ª®®à¤¨­ â  ¯® y] shl 16 + [¢ëá®â ] mov ecx, [cury] ; ecx = [ª®®à¤¨­ â  ¯® y] shl 16 + [¢ëá®â ]
shl ecx, 16 shl ecx, 16
add ecx, _BTNS_*15+21 add ecx, _BTNS_*15+21
mov edx, [sc.work] ; 梥â à ¡®ç¥© ®¡« á⨠mov edx, [sc.work] ; 梥â à ¡®ç¥© ®¡« áâ¨
mov esi, [sc.grab] ; 梥⠧ £®«®¢ª  mov esi, [sc.grab] ; 梥⠧ £®«®¢ª 
or esi, 0x81000000 or esi, 0x81000000
mov edi, [sc.frame] ; 梥â à ¬ª¨ mov edi, [sc.frame] ; 梥â à ¬ª¨
mcall mcall
mov eax, 4 ; § £®«®¢®ª mov eax, 4 ; § £®«®¢®ª
mov ebx, title_pos ; [x] shl 16 + [y] mov ebx, title_pos ; [x] shl 16 + [y]
mov ecx, [sc.grab_text]; èà¨äâ ¨ 梥â (á¥àë©) mov ecx, [sc.grab_text]; èà¨äâ ¨ 梥â (á¥àë©)
or ecx, 0x10000000 or ecx, 0x10000000
push ecx push ecx
push ecx push ecx
xor edx,edx xor edx,edx
;-------------------------------------- ;--------------------------------------
align 4 align 4
.dec_color: .dec_color:
sub byte [esp+edx], 0x33 sub byte [esp+edx], 0x33
jae @f jae @f
mov byte [esp+edx], 0 mov byte [esp+edx], 0
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
inc edx inc edx
jnp .dec_color jnp .dec_color
pop ecx pop ecx
mov edx, title ;  ¤à¥á § £®«®¢ª  mov edx, title ;  ¤à¥á § £®«®¢ª 
mov esi, title.size ; ¤«¨­  § £®«®¢ª  ("M E N U") mov esi, title.size ; ¤«¨­  § £®«®¢ª  ("M E N U")
mcall mcall
pop ecx pop ecx
add ebx, 1 shl 16 ; ᤢ¨­¥¬ ¢¯à ¢® ­  1 add ebx, 1 shl 16 ; ᤢ¨­¥¬ ¢¯à ¢® ­  1
mcall mcall
mov ebx, 1*65536+wnd_x_size-2 ; ­ ç¨­ ¥¬ ¤¥« âì ª­®¯ª¨ mov ebx, 1*65536+wnd_x_size-2 ; ­ ç¨­ ¥¬ ¤¥« âì ª­®¯ª¨
mov ecx, 20*65536+15 mov ecx, 20*65536+15
mov edx, 10 or 0x40000000 ; ¡¨â 30 ãáâ ­®¢«¥­ => ª­®¯ª  ­¥ à¨áã¥âáï mov edx, 10 or 0x40000000 ; ¡¨â 30 ãáâ ­®¢«¥­ => ª­®¯ª  ­¥ à¨áã¥âáï
mov edi,_BTNS_ ; ª®«¨ç¥á⢮ ª­®¯®ª (áçñâ稪) mov edi,_BTNS_ ; ª®«¨ç¥á⢮ ª­®¯®ª (áçñâ稪)
;-------------------------------------- ;--------------------------------------
align 4 align 4
newbtn: ; ­ ç «® 横«  newbtn: ; ­ ç «® 横« 
mcall 8 ; ᮧ¤ ñ¬ ª­®¯ªã mcall 8 ; ᮧ¤ ñ¬ ª­®¯ªã
; ¯¨è¥¬ ⥪áâ ­  ª­®¯ª¥ ; ¯¨è¥¬ ⥪áâ ­  ª­®¯ª¥
pushad ; ᯠᠥ¬ ॣ¨áâàë pushad ; ᯠᠥ¬ ॣ¨áâàë
shr ecx, 16 shr ecx, 16
and ebx, 0xffff0000 and ebx, 0xffff0000
add ebx, ecx ; ebx = [x] shl 16 + [y]; add ebx, ecx ; ebx = [x] shl 16 + [y];
add ebx, 10*65536+4 ; ebx += ᬥ饭¨¥ ®â­®á¨â¥«ì­® ªà ï ª­®¯ª¨; add ebx, 10*65536+4 ; ebx += ᬥ饭¨¥ ®â­®á¨â¥«ì­® ªà ï ª­®¯ª¨;
mov ecx, [sc.work_text] ; èà¨äâ ¨ 梥â mov ecx, [sc.work_text] ; èà¨äâ ¨ 梥â
or ecx, font or ecx, font
add edx, -10 ; edx = ­®¬¥à ª­®¯ª¨; add edx, -10 ; edx = ­®¬¥à ª­®¯ª¨;
imul edx, string_length ; edx *= ¤«¨­  áâப¨; imul edx, string_length ; edx *= ¤«¨­  áâப¨;
add edx, text ; edx += text; ⥯¥àì ¢ edx  ¤à¥á áâப¨ add edx, text ; edx += text; ⥯¥àì ¢ edx  ¤à¥á áâப¨
mov esi, string_length ; ¢ esi - ¤«¨­  áâப¨ mov esi, string_length ; ¢ esi - ¤«¨­  áâப¨
mcall 4 mcall 4
popad popad
inc edx ; ­®¬¥à ª­®¯ª¨++; inc edx ; ­®¬¥à ª­®¯ª¨++;
add ecx,15*65536 ; 㢥«¨ç¨¬ ᬥ饭¨¥ ¯® y add ecx,15*65536 ; 㢥«¨ç¨¬ ᬥ饭¨¥ ¯® y
dec edi ; 㬥­ì訬 áçñâ稪 dec edi ; 㬥­ì訬 áçñâ稪
jnz newbtn ; ¥á«¨ ­¥ ­®«ì, ¯®¢â®à¨¬ ¢áñ ¥éñ à § jnz newbtn ; ¥á«¨ ­¥ ­®«ì, ¯®¢â®à¨¬ ¢áñ ¥éñ à §
mcall 12,2 ; § ª®­ç¨«¨ "à¨á®¢ âì" mcall 12,2 ; § ª®­ç¨«¨ "à¨á®¢ âì"
ret ; ¢®§¢à â ret ; ¢®§¢à â
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
; „€<EFBFBD><EFBFBD><20><>Žƒ<C5BD>€ŒŒ ; PROGRAM DATA
macro strtbl name, [string] macro strtbl name, [string]
{ {
common common
label name dword label name dword
forward forward
local str local str
dd str dd str
forward forward
str db string str db string
} }
strtbl startapps ,\ strtbl startapps ,\
<"/sys/PIC4",0> ,\ <"/sys/PIC4",0> ,\
<"/sys/DESKTOP",0> ,\ <"/sys/DESKTOP",0> ,\
<"/sys/ICON",0>,\ <"/sys/ICON",0>,\
<"/sys/SETUP",0> ,\ <"/sys/SETUP",0> ,\
<"/sys/DEVELOP/BOARD",0> ,\ <"/sys/DEVELOP/BOARD",0> ,\
<"/sys/CPU",0> <"/sys/CPU",0>
sz title, "KolibriOS" sz title, "KolibriOS"
lsz text,\ lsz text,\
en, 'Background ',\ en_US, 'Background ',\
en, 'Desktop ',\ en_US, 'Desktop ',\
en, 'Icon manager',\ en_US, 'Icon manager',\
en, 'Device setup',\ en_US, 'Device setup',\
en, 'Debug board ',\ en_US, 'Debug board ',\
en, 'Processes ',\ en_US, 'Processes ',\
\ \
ru, 'ƒ¥­¥à â®à ®¡®¥¢ ',\ ru_RU, 'ƒ¥­¥à â®à ®¡®¥¢ ',\
ru, '<27> áâனª  ®ª®­ ',\ ru_RU, '<27> áâனª  ®ª®­ ',\
ru, '“¯à ¢«¥­¨¥ ¨ª®­ª ¬¨ ',\ ru_RU, '“¯à ¢«¥­¨¥ ¨ª®­ª ¬¨ ',\
ru, '<27> áâனª  ãáâனá⢠',\ ru_RU, '<27> áâனª  ãáâனá⢠',\
ru, '<27> ­¥«ì ®â« ¤ª¨ ',\ ru_RU, '<27> ­¥«ì ®â« ¤ª¨ ',\
ru, '<27>à®æ¥ááë ',\ ru_RU, '<27>à®æ¥ááë ',\
\ \
et, 'Taust ',\ et_EE, 'Taust ',\
et, 'Töölaud ',\ et_EE, 'Töölaud ',\
et, 'Ikooni hald.',\ et_EE, 'Ikooni hald.',\
et, 'Seadme hald.',\ et_EE, 'Seadme hald.',\
et, 'Silumis aken',\ et_EE, 'Silumis aken',\
et, 'Protsessid ' et_EE, 'Protsessid '
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
start_info: start_info:
.mode dd 7 .mode dd 7
dd 0 dd 0
.params dd 0 .params dd 0
dd 0 dd 0
dd 0 dd 0
db 0 db 0
dd start_info.path dd start_info.path
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IM_END: IM_END:
align 4 align 4
; <20>ˆ<E280A6>ˆˆˆˆ<E280A1>Ž<E2809A><E282AC>… „€<E2809E><E282AC> ; <20>ˆ<E280A6>ˆˆˆˆ<E280A1>Ž<E2809A><E282AC>… „€<E2809E><E282AC>
curx1 dd ? ; ª®®à¤¨­ âë ªãàá®à  curx1 dd ? ; ª®®à¤¨­ âë ªãàá®à 
cury1 dd ? cury1 dd ?
curx dd ? ; ª®®à¤¨­ âë ®ª­  ¬¥­î curx dd ? ; ª®®à¤¨­ âë ®ª­  ¬¥­î
cury dd ? cury dd ?
menu_opened db ? ; ®âªàëâ® ¬¥­î ¨«¨ ­¥â? (1-¤ , 0-­¥â) menu_opened db ? ; ®âªàëâ® ¬¥­î ¨«¨ ­¥â? (1-¤ , 0-­¥â)
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
start_info.path rb 256 start_info.path rb 256
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
sc system_colors ; á¨á⥬­ë¥ æ¢¥â  sc system_colors ; á¨á⥬­ë¥ 梥â 
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
procinfo process_information ; ¨­ä®à¬ æ¨ï ® ¯à®æ¥áᥠprocinfo process_information ; ¨­ä®à¬ æ¨ï ® ¯à®æ¥áá¥
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
rb 512 ; áâíª ¤«ï ®ª­  ¬¥­î - 墠â¨â ¨ 1 Š¡ rb 512 ; áâíª ¤«ï ®ª­  ¬¥­î - 墠â¨â ¨ 1 Š¡
stack_wnd: stack_wnd:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
rb 512 rb 512
stack_area: stack_area:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
I_END: I_END:
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; ŠŽ<C5A0> <20><>Žƒ<C5BD>€ŒŒ ; ŠŽ<C5A0> <20><>Žƒ<C5BD>€ŒŒ
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

View File

@ -1,209 +1,211 @@
; ;
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨ ; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 ­ã¦­ë¥ ¤«ï ᮧ¤ ­¨ï ¨
; à ¡®âë ®ª­  á ¯®¨áª®¬ ¢ ª«î祢ëå á«®¢ å ; à ¡®âë ®ª­  á ¯®¨áª®¬ ¢ ª«î祢ëå á«®¢ å
; ;
prop_wnd_width equ 350 ;è¨à¨­  ®ª­  á ¯®¨áª®¬ ; Language support for locales: ru_RU (CP866), en_US.
SIZE_ONE_FLOAT equ 14
prop_wnd_width equ 350 ;è¨à¨­  ®ª­  á ¯®¨áª®¬
IMAGE_TOOLBAR_ICON_SIZE equ 20*20*3 SIZE_ONE_FLOAT equ 14
wnd_k_words_run dd 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ®¤­®¢à¥¬¥­­® IMAGE_TOOLBAR_ICON_SIZE equ 20*20*3
if lang eq ru_RU wnd_k_words_run dd 0 ;¯¥à¥¬¥­­ ï á«¥¤ïé ï §  ⥬ çâ®-¡ë ­¥ § ¯ã᪠âì ¡®«ìè¥ 1-£® ®ª­  ®¤­®¢à¥¬¥­­®
txt_caption db '<27>®¨áª ¢ ª«î祢ëå á«®¢ å',0
else if lang eq ru_RU
txt_caption db 'Search in keywords',0 txt_caption db '<27>®¨áª ¢ ª«î祢ëå á«®¢ å',0
end if else ; Default to en_US
txt_caption db 'Search in keywords',0
;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords end if
align 4
prop_start: ;¤ ­®¥ ®ª­® (¯à®æ¥áá) ¢ë§ë¢ ¥âìáï ä㭪樥© but_wnd_coords
pushad align 4
mcall SF_SET_EVENTS_MASK,0xC0000027 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩ prop_start:
pushad
;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢ mcall SF_SET_EVENTS_MASK,0xC0000027 ;¬ áª  ®¦¨¤ ¥¬ëå ᮡë⨩
mov dword[tree3.info_max_count],2
mov edi,tedit0 ;­ áâனª  ᯨ᪠ ®¡ê¥ªâ®¢
mov edx,ted_key_words_count mov dword[tree3.info_max_count],2
add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã ª«î祢ëå á«®¢ ¢ ä ©«¥ ¯®¤á¢¥âª¨ (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠) mov edi,tedit0
stdcall [tl_data_init], tree3 mov edx,ted_key_words_count
mov eax,dword[icon_tl_sys] add dword[tree3.info_max_count],edx ;áâ ¢¨¬ ç¨á«® 㧫®¢, à ¢­®¥ ª®««¨ç¥áâ¢ã ª«î祢ëå á«®¢ ¢ ä ©«¥ ¯®¤á¢¥âª¨ (+2 ­  ­ ç «® ¨ ª®­¥æ ᯨ᪠)
mov dword[tree3.data_img],eax stdcall [tl_data_init], tree3
mov eax,dword[tree1.data_img_sys] mov eax,dword[icon_tl_sys]
mov dword[tree3.data_img_sys],eax mov dword[tree3.data_img],eax
mov eax,dword[tree1.data_img_sys]
edit_boxes_set_sys_color edit3,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢ mov dword[tree3.data_img_sys],eax
popad
edit_boxes_set_sys_color edit3,editboxes_end,sc ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
align 4 popad
prop_red_win:
pushad align 4
mcall SF_REDRAW,SSF_BEGIN_DRAW prop_red_win:
pushad
mov bx,word[procinfo.box.left] mcall SF_REDRAW,SSF_BEGIN_DRAW
add bx,5 ;word[buf_0.l]
shl ebx,16 mov bx,word[procinfo.box.left]
mov bx,prop_wnd_width add bx,5 ;word[buf_0.l]
mov cx,word[procinfo.box.top] shl ebx,16
add cx,42 ;word[buf_0.t] mov bx,prop_wnd_width
shl ecx,16 mov cx,word[procinfo.box.top]
mov cx,250 add cx,42 ;word[buf_0.t]
mcall SF_CREATE_WINDOW,,,0x33ffffd0,,txt_caption shl ecx,16
mov cx,250
mcall SF_DEFINE_BUTTON,(5 shl 16)+19,(5 shl 16)+19,3,[sc.work_button] mcall SF_CREATE_WINDOW,,,0x33ffffd0,,txt_caption
add ebx,(25 shl 16)
mcall ,,,4 mcall SF_DEFINE_BUTTON,(5 shl 16)+19,(5 shl 16)+19,3,[sc.work_button]
add ebx,(25 shl 16)
mov ebx,[bmp_icon] mcall ,,,4
add ebx,(ID_BUT_FIND-ID_BUT_0)*IMAGE_TOOLBAR_ICON_SIZE
mcall SF_PUT_IMAGE,,(20 shl 16)+20,(5 shl 16)+5 ;­ ©â¨ mov ebx,[bmp_icon]
add ebx,(ID_BUT_FIND-ID_BUT_0)*IMAGE_TOOLBAR_ICON_SIZE
sub ebx,2*IMAGE_TOOLBAR_ICON_SIZE mcall SF_PUT_IMAGE,,(20 shl 16)+20,(5 shl 16)+5 ;­ ©â¨
mov edx,(30 shl 16)+5 ;ª®¯¨à®¢ âì
int 0x40 sub ebx,2*IMAGE_TOOLBAR_ICON_SIZE
mov edx,(30 shl 16)+5 ;ª®¯¨à®¢ âì
mcall SF_THREAD_INFO,procinfo,-1 int 0x40
mov eax,[procinfo.box.height]
cmp eax,90 mcall SF_THREAD_INFO,procinfo,-1
jge @f mov eax,[procinfo.box.height]
mov eax,90 ;min size cmp eax,90
@@: jge @f
sub eax,58 mov eax,90 ;min size
cmp [tree3.box_height],eax @@:
je @f sub eax,58
mov [tree3.box_height],eax cmp [tree3.box_height],eax
mov word[w_scr_t3.y_size],ax je @f
;need call tb_scrol_resize mov [tree3.box_height],eax
@@: mov word[w_scr_t3.y_size],ax
;need call tb_scrol_resize
mov dword[w_scr_t3.all_redraw],1 @@:
stdcall [scrollbar_ver_draw], w_scr_t3
stdcall [tl_draw], tree3 mov dword[w_scr_t3.all_redraw],1
stdcall [edit_box_draw], edit3 stdcall [scrollbar_ver_draw], w_scr_t3
mcall SF_REDRAW,SSF_END_DRAW stdcall [tl_draw], tree3
popad stdcall [edit_box_draw], edit3
mcall SF_REDRAW,SSF_END_DRAW
;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩 popad
align 4
prop_still: ;­¥ ®âà뢠âì íâã äã­ªæ¨î ®â ¯à¥¤ë¤ã饩
mcall SF_WAIT_EVENT align 4
prop_still:
cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­  mcall SF_WAIT_EVENT
jz prop_red_win
cmp al,2 cmp al,1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
jne @f jz prop_red_win
call prop_key cmp al,2
@@: jne @f
cmp al,3 call prop_key
jne @f @@:
call prop_button cmp al,3
@@: jne @f
cmp al,6 call prop_button
jne @f @@:
call prop_mouse cmp al,6
@@: jne @f
jmp prop_still call prop_mouse
.exit: @@:
mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à jmp prop_still
mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å .exit:
stdcall [tl_data_clear], tree3 mov dword[tree3.data_img],0 ;ç¨á⨬ 㪠§ â¥«¨ ­  ¨ª®­ª¨ çâ®-¡ë ¨å ­¥ 㤠«¨« ¤¥áâàãªâ®à
mov dword[wnd_k_words_run],0 ;®¡­ã«ï¥¬ ID ®ª­  mov dword[tree3.data_img_sys],0 ;â. ª. ®­¨ ¥é¥ ¨á¯®«ì§ãîâìáï ¢ ¤à㣨å í«¥¬¥­â å
mcall SF_TERMINATE_PROCESS stdcall [tl_data_clear], tree3
mov dword[wnd_k_words_run],0 ;®¡­ã«ï¥¬ ID ®ª­ 
align 4 mcall SF_TERMINATE_PROCESS
prop_key:
push eax align 4
mcall SF_GET_KEY prop_key:
stdcall [edit_box_key], edit3 push eax
stdcall [tl_key], tree3 mcall SF_GET_KEY
pop eax stdcall [edit_box_key], edit3
ret stdcall [tl_key], tree3
pop eax
align 4 ret
prop_mouse:
;push ecx edi align 4
stdcall [tl_mouse], tree3 prop_mouse:
stdcall [edit_box_mouse], edit3 ;push ecx edi
;pop edi ecx stdcall [tl_mouse], tree3
ret stdcall [edit_box_mouse], edit3
;pop edi ecx
align 4 ret
prop_button:
pushad align 4
mcall SF_GET_BUTTON prop_button:
pushad
cmp ah,1 mcall SF_GET_BUTTON
je prop_still.exit
cmp ah,1
cmp ah,3 je prop_still.exit
jne @f
;­ ©â¨ á«®¢  cmp ah,3
mov edi,tedit0 jne @f
cmp ted_syntax_file,0 ;­ ©â¨ á«®¢ 
je @f mov edi,tedit0
stdcall [tl_info_clear], tree3 cmp ted_syntax_file,0
and dword[tree3.style], not tl_cursor_pos_limited je @f
stdcall [tl_info_clear], tree3
mov ebx,ted_key_words_data and dword[tree3.style], not tl_cursor_pos_limited
mov ecx,ted_key_words_count
cld mov ebx,ted_key_words_data
.cycle_0: mov ecx,ted_key_words_count
stdcall str_instr, ebx,[edit3.text] cld
test al,al .cycle_0:
jnz .end_add stdcall str_instr, ebx,[edit3.text]
;ª«î祢®¥ á«®¢® test al,al
stdcall [tl_node_add], tree3, (1 shl 16), ebx jnz .end_add
stdcall [tl_cur_next], tree3 ;ª«î祢®¥ á«®¢®
mov edx,[ebx+MAX_COLOR_WORD_LEN] stdcall [tl_node_add], tree3, (1 shl 16), ebx
or edx,edx stdcall [tl_cur_next], tree3
jz .end_add mov edx,[ebx+MAX_COLOR_WORD_LEN]
;á¯à ¢ª  ¯® ª«î祢®¬ã á«®¢ã or edx,edx
add edx,ted_help_text_f1 jz .end_add
stdcall [tl_node_add], tree3, 1, edx ;á¯à ¢ª  ¯® ª«î祢®¬ã á«®¢ã
stdcall [tl_cur_next], tree3 add edx,ted_help_text_f1
.end_add: stdcall [tl_node_add], tree3, 1, edx
add ebx,MAX_COLOR_WORD_LEN+8 ;sizeof.TexColViv stdcall [tl_cur_next], tree3
loop .cycle_0 .end_add:
add ebx,MAX_COLOR_WORD_LEN+8 ;sizeof.TexColViv
stdcall [tl_cur_beg], tree3 loop .cycle_0
or dword[tree3.style], tl_cursor_pos_limited ;®£à ­¨ç¨¢ ¥¬ ¤¢¨¦¥­¨¥ ªãàá®à  ¢ ¯à¥¤¥« å ᯨ᪠
stdcall [tl_draw], tree3 stdcall [tl_cur_beg], tree3
jmp .no_select_0 or dword[tree3.style], tl_cursor_pos_limited ;®£à ­¨ç¨¢ ¥¬ ¤¢¨¦¥­¨¥ ªãàá®à  ¢ ¯à¥¤¥« å ᯨ᪠
@@: stdcall [tl_draw], tree3
cmp ah,4 jmp .no_select_0
jne @f @@:
;ª®¯¨à®¢ âì ¢ ¡ãä¥à cmp ah,4
stdcall [tl_node_get_data],tree3 jne @f
or eax,eax ;ª®¯¨à®¢ âì ¢ ¡ãä¥à
jz .no_select_0 stdcall [tl_node_get_data],tree3
mov esi,eax or eax,eax
mov edi,[tedit0.buffer] jz .no_select_0
mov dword[edi],MAX_COLOR_WORD_LEN mov esi,eax
mov dword[edi+4],0 ;text data mov edi,[tedit0.buffer]
mov dword[edi+8],1 ;code 866 mov dword[edi],MAX_COLOR_WORD_LEN
add edi,12 ;system buffer header size mov dword[edi+4],0 ;text data
mov byte[edi+MAX_COLOR_WORD_LEN],0 mov dword[edi+8],1 ;code 866
mov ecx,MAX_COLOR_WORD_LEN add edi,12 ;system buffer header size
cld mov byte[edi+MAX_COLOR_WORD_LEN],0
rep movsb mov ecx,MAX_COLOR_WORD_LEN
mcall SF_CLIPBOARD,SSF_WRITE_CB,12+MAX_COLOR_WORD_LEN,[tedit0.buffer] cld
.no_select_0: rep movsb
@@: mcall SF_CLIPBOARD,SSF_WRITE_CB,12+MAX_COLOR_WORD_LEN,[tedit0.buffer]
.no_select_0:
popad @@:
ret
popad
;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥ ret
align 4
tree3 tree_list MAX_COLOR_WORD_LEN,3,tl_key_no_edit,\ ;¤¥à¥¢® á ®¡ê¥ªâ ¬¨ ¢ ¯®«ì§®¢ â¥«ì᪮¬ ä ©«¥
16,16, 0x8080ff,0x0000ff,0xffffff, 5,30,300,160, 16, 0,0, el_focus, w_scr_t3,0 align 4
tree3 tree_list MAX_COLOR_WORD_LEN,3,tl_key_no_edit,\
align 4 16,16, 0x8080ff,0x0000ff,0xffffff, 5,30,300,160, 16, 0,0, el_focus, w_scr_t3,0
edit3 edit_box 80, 70, 8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, MAX_COLOR_WORD_LEN+2, string1, mouse_dd, ed_focus
editboxes_end: align 4
edit3 edit_box 80, 70, 8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, MAX_COLOR_WORD_LEN+2, string1, mouse_dd, ed_focus
string1 rb MAX_COLOR_WORD_LEN editboxes_end:
align 4 string1 rb MAX_COLOR_WORD_LEN
w_scr_t3 scrollbar 16,0, 3,0, 15, 100, 0,0, 0xeeeeee, 0xbbddff, 0, 1
align 4
w_scr_t3 scrollbar 16,0, 3,0, 15, 100, 0,0, 0xeeeeee, 0xbbddff, 0, 1

File diff suppressed because it is too large Load Diff

View File

@ -1,321 +1,323 @@
; program data ; program data
curMonth dd ? curMonth dd ?
curYear dd ? curYear dd ?
curDay dd ? curDay dd ?
remainder dd ? remainder dd ?
quotient dd ? quotient dd ?
firstday dd ? firstday dd ?
Year dd ? Year dd ?
Month dd ? Month dd ?
day_sel dd ? day_sel dd ?
datestr dd ? datestr dd ?
leap_year dd ? leap_year dd ?
number dd ? number dd ?
; colors ; colors
COL_WINDOW_BG equ 0x54E7E7E7 COL_WINDOW_BG equ 0x54E7E7E7
COL_TOOLBAR_BG equ 0x555555 COL_TOOLBAR_BG equ 0x555555
COL_ACTIVE_TEXT equ 0x10e7c750 COL_ACTIVE_TEXT equ 0x10e7c750
COL_WEEKDAY_BG equ 0xCCCDDD COL_WEEKDAY_BG equ 0xCCCDDD
COL_DATE_BUTTONS equ 0xF3F3F3 COL_DATE_BUTTONS equ 0xF3F3F3
COL_TIME_BUTTONS equ 0x5555dd COL_TIME_BUTTONS equ 0x5555dd
COL_GO_TODAY_T equ 0xd048c8 COL_GO_TODAY_T equ 0xd048c8
COL_MONTH_YEAR_B equ 0x555555 COL_MONTH_YEAR_B equ 0x555555
COL_DROPDOWN_BG equ 0x666666 COL_DROPDOWN_BG equ 0x666666
COL_DROPDOWN_T equ 0x10CCCccc COL_DROPDOWN_T equ 0x10CCCccc
COL_NEW_STYLE_T equ 0xef3333 COL_NEW_STYLE_T equ 0xef3333
COL_DATE_INACTIVE_1 equ 0x388CAF COL_DATE_INACTIVE_1 equ 0x388CAF
COL_DATE_INACTIVE_2 equ 0x75B9D5 COL_DATE_INACTIVE_2 equ 0x75B9D5
COL_DATE_INACTIVE_3 equ 0x9ECBDF COL_DATE_INACTIVE_3 equ 0x9ECBDF
COL_DATE_INACTIVE_4 equ 0xABD7E8 COL_DATE_INACTIVE_4 equ 0xABD7E8
COL_DATE_ACTIVE_1 equ 0xA57F2C COL_DATE_ACTIVE_1 equ 0xA57F2C
COL_DATE_ACTIVE_2 equ 0xEFB52D COL_DATE_ACTIVE_2 equ 0xEFB52D
COL_DATE_ACTIVE_3 equ 0xFAD84C COL_DATE_ACTIVE_3 equ 0xFAD84C
COL_DATE_ACTIVE_4 equ 0xFAE995 COL_DATE_ACTIVE_4 equ 0xFAE995
COL_DATE_1 equ 0x8C8C8C COL_DATE_1 equ 0x8C8C8C
COL_DATE_2 equ 0xFFFfff COL_DATE_2 equ 0xFFFfff
COL_DATE_3 equ 0xF2F2F2 COL_DATE_3 equ 0xF2F2F2
COL_DATE_4 equ 0xF2F2F2 COL_DATE_4 equ 0xF2F2F2
; definitions ; definitions
WIN_W equ 275 WIN_W equ 275
WIN_H equ 326 WIN_H equ 326
DATE_BUTTON_WIDTH equ 32 DATE_BUTTON_WIDTH equ 32
DATE_BUTTON_HEIGHT equ 30 DATE_BUTTON_HEIGHT equ 30
LINE1 equ 27 shl 16+16 LINE1 equ 27 shl 16+16
B_MONTH_X equ 15 shl 16+158 B_MONTH_X equ 15 shl 16+158
B_Y equ LINE1 B_Y equ LINE1
B_MONTH equ 63 shl 16+27 B_MONTH equ 63 shl 16+27
BT_WBAR_Y equ 283 shl 16+43 BT_WBAR_Y equ 283 shl 16+43
B_WBAR_X equ 1 shl 16+WIN_W-1 B_WBAR_X equ 1 shl 16+WIN_W-1
B_WBAR_Y equ 64 shl 16+20 B_WBAR_Y equ 64 shl 16+20
B_WEEK equ 34 shl 16+66 B_WEEK equ 34 shl 16+66
B_WX_SHIFT equ 32 shl 16 B_WX_SHIFT equ 32 shl 16
B_DROP equ B_MONTH+16 B_DROP equ B_MONTH+16
B_DAYS_Y equ 106 B_DAYS_Y equ 106
B_DAYS_SHIFT equ 30 B_DAYS_SHIFT equ 30
B_YEAR equ 204 shl 16+28 B_YEAR equ 204 shl 16+28
B_SPIN_X equ 186 shl 16+12 B_SPIN_X equ 186 shl 16+12
B_SPIN equ 188 shl 16+28 B_SPIN equ 188 shl 16+28
spinner db '< >' spinner db '< >'
B_TODAY_X equ 25 shl 16 B_TODAY_X equ 25 shl 16
B_TODAY_Y equ 48 shl 16+10 B_TODAY_Y equ 48 shl 16+10
B_TODAY equ 30 shl 16+50 B_TODAY equ 30 shl 16+50
B_NS_X equ 185 shl 16+75 B_NS_X equ 185 shl 16+75
B_NS_Y equ 48 shl 16+10 B_NS_Y equ 48 shl 16+10
B_NS equ 190 shl 16+50 B_NS equ 190 shl 16+50
FOCUSABLE equ 4 FOCUSABLE equ 4
; multilanguage interface - configuratable in lang.inc day_count db 3,0,3,2,3,2,3,3,2,3,2,3
day_count db 3,0,3,2,3,2,3,3,2,3,2,3 Fkeys db 210,211,212,213,214,215,216,217,208,209,228,159
Fkeys db 210,211,212,213,214,215,216,217,208,209,228,159
; Multilanguage interface - configurable in lang.inc
month_name: ; Language support for locales: ru_RU (CP866), de_DE, fr_FR, fi_FI, et_EE, it_IT, en_US
if lang eq ru_RU
db 8 month_name:
db 'Ÿ­¢ àì ' if lang eq ru_RU
db '”¥¢à «ì ' db 8
db 'Œ àâ ' db 'Ÿ­¢ àì '
db '€¯à¥«ì ' db '”¥¢à «ì '
db 'Œ © ' db 'Œ àâ '
db 'ˆî­ì ' db '€¯à¥«ì '
db 'ˆî«ì ' db 'Œ © '
db '€¢£ãáâ ' db 'ˆî­ì '
db '‘¥­âï¡àì' db 'ˆî«ì '
db 'Žªâï¡àì ' db '€¢£ãáâ '
db '<27>®ï¡àì ' db '‘¥­âï¡àì'
db '„¥ª ¡àì ' db 'Žªâï¡àì '
else if lang eq de_DE db '<27>®ï¡àì '
db 9 db '„¥ª ¡àì '
db 'Januar ' else if lang eq de_DE
db 'Februar ' db 9
db 'M+rz ' db 'Januar '
db 'April ' db 'Februar '
db 'Mai ' db 'M+rz '
db 'Juni ' db 'April '
db 'Juli ' db 'Mai '
db 'August ' db 'Juni '
db 'September' db 'Juli '
db 'Oktober ' db 'August '
db 'November ' db 'September'
db 'Dezember ' db 'Oktober '
else if lang eq fr_FR db 'November '
db 9 db 'Dezember '
db 'Janvier ' else if lang eq fr_FR
db 'Fevrier ' db 9
db 'Mars ' db 'Janvier '
db 'Avril ' db 'Fevrier '
db 'Mai ' db 'Mars '
db 'Juin ' db 'Avril '
db 'Juliet ' db 'Mai '
db 'Aout ' db 'Juin '
db 'Septembre' db 'Juliet '
db 'Octobre ' db 'Aout '
db 'Novembre ' db 'Septembre'
db 'Decembre ' db 'Octobre '
else if lang eq fi_FI db 'Novembre '
db 9 db 'Decembre '
db 'Tammikuu ' else if lang eq fi_FI
db 'Helmikuu ' db 9
db 'Maaliskuu' db 'Tammikuu '
db 'Huhtikuu ' db 'Helmikuu '
db 'Toukokuu ' db 'Maaliskuu'
db 'Kes+kuu ' db 'Huhtikuu '
db 'Hein+kuu ' db 'Toukokuu '
db 'Elokuu ' db 'Kes+kuu '
db 'Syyskuu ' db 'Hein+kuu '
db 'Lokakuu ' db 'Elokuu '
db 'Marraskuu' db 'Syyskuu '
db 'Joulukuu ' db 'Lokakuu '
else if lang eq et_EE db 'Marraskuu'
db 9 db 'Joulukuu '
db 'Jaanuar ' else if lang eq et_EE
db 'Veebruar ' db 9
db 'Märts ' db 'Jaanuar '
db 'Aprill ' db 'Veebruar '
db 'Mai ' db 'Märts '
db 'Juuni ' db 'Aprill '
db 'Juuli ' db 'Mai '
db 'August ' db 'Juuni '
db 'September' db 'Juuli '
db 'Oktoober ' db 'August '
db 'November ' db 'September'
db 'Detsember' db 'Oktoober '
else if lang eq it_IT db 'November '
db 9 db 'Detsember'
db 'Gennaio ' else if lang eq it_IT
db 'Febbraio ' db 9
db 'Marzo ' db 'Gennaio '
db 'Aprile ' db 'Febbraio '
db 'Maggio ' db 'Marzo '
db 'Giugno ' db 'Aprile '
db 'Luglio ' db 'Maggio '
db 'Agosto ' db 'Giugno '
db 'Settembre' db 'Luglio '
db 'Ottobre ' db 'Agosto '
db 'Novembre ' db 'Settembre'
db 'Dicembre ' db 'Ottobre '
else db 'Novembre '
db 9 db 'Dicembre '
db 'January ' else ; Default to en_US
db 'February ' db 9
db 'March ' db 'January '
db 'April ' db 'February '
db 'May ' db 'March '
db 'June ' db 'April '
db 'July ' db 'May '
db 'August ' db 'June '
db 'September' db 'July '
db 'October ' db 'August '
db 'November ' db 'September'
db 'December ' db 'October '
end if db 'November '
week_days: db 'December '
if lang eq ru_RU end if
db 2 week_days:
db 1 if lang eq ru_RU
db '<27>­' db 2
db '‚â' db 1
db '‘à' db '<27>­'
db '—â' db '‚â'
db '<27>â' db '‘à'
db '‘¡' db '—â'
db '‚á' db '<27>â'
else if lang eq de_DE db '‘¡'
db 2 db '‚á'
db 7 else if lang eq de_DE
db 'So' db 2
db 'Mo' db 7
db 'Di' db 'So'
db 'Mi' db 'Mo'
db 'Do' db 'Di'
db 'Fr' db 'Mi'
db 'Sa' db 'Do'
else if lang eq fr_FR db 'Fr'
db 3 db 'Sa'
db 7 else if lang eq fr_FR
db 'Dim' db 3
db 'Lun' db 7
db 'Mar' db 'Dim'
db 'Mer' db 'Lun'
db 'Jeu' db 'Mar'
db 'Ven' db 'Mer'
db 'Sam' db 'Jeu'
else if lang eq fi_FI db 'Ven'
db 2 db 'Sam'
db 7 else if lang eq fi_FI
db 'Su' db 2
db 'Ma' db 7
db 'Ti' db 'Su'
db 'Ke' db 'Ma'
db 'To' db 'Ti'
db 'Pe' db 'Ke'
db 'La' db 'To'
else if lang eq et_EE db 'Pe'
db 3 db 'La'
db 7 else if lang eq et_EE
db 'Esm' db 3
db 'Tei' db 7
db 'Kol' db 'Esm'
db 'Nel' db 'Tei'
db 'Ree' db 'Kol'
db 'Lau' db 'Nel'
db 'Püh' db 'Ree'
else if lang eq it_IT db 'Lau'
db 3 db 'Püh'
db 7 else if lang eq it_IT
db 'Dom' db 3
db 'Lun' db 7
db 'Mar' db 'Dom'
db 'Mer' db 'Lun'
db 'Gio' db 'Mar'
db 'Ven' db 'Mer'
db 'Sab' db 'Gio'
else db 'Ven'
db 3 db 'Sab'
db 7 else ; Default to en_US
db 'Sun' db 3
db 'Mon' db 7
db 'Tue' db 'Sun'
db 'Wed' db 'Mon'
db 'Thu' db 'Tue'
db 'Fri' db 'Wed'
db 'Sat' db 'Thu'
end if db 'Fri'
db 'Sat'
title: end if
if lang eq ru_RU
db 'Š «¥­¤ àì',0 title:
else if lang eq de_DE if lang eq ru_RU
db 'Kalender',0 db 'Š «¥­¤ àì',0
else if lang eq fr_FR else if lang eq de_DE
db 'Calendrier',0 db 'Kalender',0
else if lang eq et_EE else if lang eq fr_FR
db 'Kalender',0 db 'Calendrier',0
else if lang eq it_IT else if lang eq et_EE
db 'Calendario',0 db 'Kalender',0
else else if lang eq it_IT
db 'Calendar',0 db 'Calendario',0
end if else ; Default to en_US
db 'Calendar',0
today_msg: end if
if lang eq ru_RU
db '‘¥£®¤­ï' today_msg:
else if lang eq de_DE if lang eq ru_RU
db 'Heute' db '‘¥£®¤­ï'
else if lang eq fr_FR else if lang eq de_DE
db "Aujourd'hui" db 'Heute'
else if lang eq et_EE else if lang eq fr_FR
db 'Täna' db "Aujourd'hui"
else if lang eq it_IT else if lang eq et_EE
db 'Oggi' db 'Täna'
else else if lang eq it_IT
db 'Today' db 'Oggi'
end if else ; Default to en_US
today_end: db 'Today'
focus dd 3 end if
new_style dd 1 today_end:
dropped db 0 focus dd 3
new_style dd 1
sys_text: dropped db 0
if lang eq ru_RU
db '∴•',0 sys_text:
else if lang eq it_IT if lang eq ru_RU
db ' Ora',0 db '∴•',0
else if lang eq et_EE else if lang eq it_IT
db ' Aeg ',0 db ' Ora',0
else else if lang eq et_EE
db ' Time',0 db ' Aeg ',0
end if else ; Default to en_US
separator db ':',0 db ' Time',0
plus db '+',0 end if
minus db '-',0 separator db ':',0
set_date_t: plus db '+',0
if lang eq ru_RU minus db '-',0
db '“áâ ­®¢¨âì ¤ âã',0
else if lang eq it_IT set_date_t:
db ' Impostazioni ',0 if lang eq ru_RU
else if lang eq et_EE db '“áâ ­®¢¨âì ¤ âã',0
db ' Määra kuupäev ',0 else if lang eq it_IT
else db ' Impostazioni ',0
db ' Set date ',0 else if lang eq et_EE
end if db ' Määra kuupäev ',0
else ; Default to en_US
db ' Set date ',0
end if

View File

@ -1,163 +1,165 @@
; ;
; Управление лотками дисковых приводов ATAPI ; Управление лотками дисковых приводов ATAPI
; 22.07.2007 Mario79 исходный вариант ; 22.07.2007 Mario79 исходный вариант
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
use32 ; включить 32-битный режим ассемблера use32 ; включить 32-битный режим ассемблера
org 0x0 ; адресация с нуля org 0x0 ; адресация с нуля
db 'MENUET01' ; 8-байтный идентификатор MenuetOS db 'MENUET01' ; 8-байтный идентификатор MenuetOS
dd 0x01 ; версия заголовка (всегда 1) dd 0x01 ; версия заголовка (всегда 1)
dd START ; адрес первой команды dd START ; адрес первой команды
dd I_END ; размер программы dd I_END ; размер программы
dd 0x11000 ; количество памяти dd 0x11000 ; количество памяти
dd 0x11000 ; адрес вершины стэка dd 0x11000 ; адрес вершины стэка
dd 0x0 ; адрес буфера для параметров (не используется) dd 0x0 ; адрес буфера для параметров (не используется)
dd 0x0 ; зарезервировано dd 0x0 ; зарезервировано
include 'macros.inc' ; макросы облегчают жизнь ассемблерщиков! ; Language support for locales: it_IT, en_US.
;--------------------------------------------------------------------- include 'macros.inc' ; макросы облегчают жизнь ассемблерщиков!
;--- НАЧАЛО ПРОГРАММЫ ----------------------------------------------
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;--- НАЧАЛО ПРОГРАММЫ ----------------------------------------------
START: ;---------------------------------------------------------------------
red: ; перерисовать окно START:
call draw_window ; вызываем процедуру отрисовки окна
red: ; перерисовать окно
;--------------------------------------------------------------------- call draw_window ; вызываем процедуру отрисовки окна
;--- ЦИКЛ ОБРАБОТКИ СОБЫТИЙ ----------------------------------------
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;--- ЦИКЛ ОБРАБОТКИ СОБЫТИЙ ----------------------------------------
still: ;---------------------------------------------------------------------
mcall 10 ; функция 10 - ждать события
still:
cmp eax,1 ; перерисовать окно ? mcall 10 ; функция 10 - ждать события
je red ; если да - на метку red
cmp eax,2 ; нажата клавиша ? cmp eax,1 ; перерисовать окно ?
je key ; если да - на key je red ; если да - на метку red
cmp eax,3 ; нажата кнопка ? cmp eax,2 ; нажата клавиша ?
je button ; если да - на button je key ; если да - на key
cmp eax,3 ; нажата кнопка ?
jmp still ; если другое событие - в начало цикла je button ; если да - на button
jmp still ; если другое событие - в начало цикла
;---------------------------------------------------------------------
;---------------------------------------------------------------------
key: ; нажата клавиша на клавиатуре
mcall 2 ; функция 2 - считать код символа (в ah)
key: ; нажата клавиша на клавиатуре
jmp still ; вернуться к началу цикла mcall 2 ; функция 2 - считать код символа (в ah)
;--------------------------------------------------------------------- jmp still ; вернуться к началу цикла
button: ;---------------------------------------------------------------------
mcall 17 ; 17 - получить идентификатор нажатой кнопки
; кнопки 2,3,4,5 - load tray CD0/CD1/CD2/CD3 button:
movzx ecx, ah mcall 17 ; 17 - получить идентификатор нажатой кнопки
sub ecx, 2 ; кнопки 2,3,4,5 - load tray CD0/CD1/CD2/CD3
cmp ecx, 3 movzx ecx, ah
ja b6 sub ecx, 2
mcall 24,5 cmp ecx, 3
jmp red ja b6
b6: mcall 24,5
; кнопки 6,7,8,9 - eject tray CD0/CD1/CD2/CD3 jmp red
sub ecx, 4 b6:
cmp ecx, 3 ; кнопки 6,7,8,9 - eject tray CD0/CD1/CD2/CD3
ja b1 sub ecx, 4
mcall 24,4 cmp ecx, 3
jmp red ja b1
b1: mcall 24,4
cmp ah, 1 ; если НЕ нажата кнопка с номером 1, jmp red
jne still ; вернуться b1:
cmp ah, 1 ; если НЕ нажата кнопка с номером 1,
.exit: jne still ; вернуться
mcall -1 ; иначе конец программы
.exit:
mcall -1 ; иначе конец программы
;---------------------------------------------------------------------
;--- ОПРЕДЕЛЕНИЕ И ОТРИСОВКА ОКНА ----------------------------------
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;--- ОПРЕДЕЛЕНИЕ И ОТРИСОВКА ОКНА ----------------------------------
draw_window: ;---------------------------------------------------------------------
mcall 12, 1 ; функция 12: сообщить ОС об отрисовке окна
; 1 - начинаем рисовать draw_window:
; СОЗДАиМ ОКНО mcall 12, 1 ; функция 12: сообщить ОС об отрисовке окна
; 1 - начинаем рисовать
if lang eq it_IT ; СОЗДАиМ ОКНО
mcall 0, <100,250>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0
else if lang eq it_IT
mcall 0, <100,230>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0 mcall 0, <100,250>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0
end if else ; Default to en_US
mcall 71, 1 ,header mcall 0, <100,230>, <100,110>, 0x03AABBCC, 0x805080D0, 0x005080D0
mcall 8,<15,42>,<40,20>,2,0xaaaaaa end if
call draw_buttons mcall 71, 1 ,header
mov edx,6 mcall 8,<15,42>,<40,20>,2,0xaaaaaa
add ecx,30 shl 16 call draw_buttons
mcall mov edx,6
call draw_buttons add ecx,30 shl 16
mcall
if lang eq it_IT call draw_buttons
mcall 4, <16,25>, 0x80ffffff,text1
else if lang eq it_IT
mcall 4, <25,25>, 0x80ffffff,text1 mcall 4, <16,25>, 0x80ffffff,text1
end if else ; Default to en_US
mov edx,text2 mcall 4, <25,25>, 0x80ffffff,text1
end if
add ebx,3 shl 16+20 mov edx,text2
mcall
mov edx,text3 add ebx,3 shl 16+20
add ebx,30 mcall
sub ebx,3 shl 16 mov edx,text3
mcall add ebx,30
sub ebx,3 shl 16
mcall 12, 2 ; функция 12: сообщить ОС об отрисовке окна mcall
; 2, закончили рисовать
mcall 12, 2 ; функция 12: сообщить ОС об отрисовке окна
ret ; выходим из процедуры ; 2, закончили рисовать
draw_buttons: ret ; выходим из процедуры
pusha
if lang eq it_IT draw_buttons:
add ebx,60 shl 16 pusha
else if lang eq it_IT
add ebx,50 shl 16 add ebx,60 shl 16
end if else ; Default to en_US
inc edx add ebx,50 shl 16
mcall end if
if lang eq it_IT inc edx
add ebx,60 shl 16 mcall
else if lang eq it_IT
add ebx,50 shl 16 add ebx,60 shl 16
end if else ; Default to en_US
inc edx add ebx,50 shl 16
mcall end if
if lang eq it_IT inc edx
add ebx,60 shl 16 mcall
else if lang eq it_IT
add ebx,50 shl 16 add ebx,60 shl 16
end if else ; Default to en_US
inc edx add ebx,50 shl 16
mcall end if
popa inc edx
ret mcall
;--------------------------------------------------------------------- popa
;--- ДАННЫЕ ПРОГРАММЫ ---------------------------------------------- ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
header db ' ATAPI Device Tray Control',0 ;--- ДАННЫЕ ПРОГРАММЫ ----------------------------------------------
if lang eq it_IT ;---------------------------------------------------------------------
text3 db 'espelli espelli espelli espelli',0 header db ' ATAPI Device Tray Control',0
text2 db 'carica carica carica carica',0 if lang eq it_IT
text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0 text3 db 'espelli espelli espelli espelli',0
else text2 db 'carica carica carica carica',0
text3 db 'eject eject eject eject',0 text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0
text2 db 'load load load load',0 else ; Default to en_US
text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0 text3 db 'eject eject eject eject',0
end if text2 db 'load load load load',0
text1 db '/cd0/ /cd1/ /cd2/ /cd3/',0
;--------------------------------------------------------------------- end if
I_END: ; метка конца программы ;---------------------------------------------------------------------
I_END: ; метка конца программы

View File

@ -6,7 +6,7 @@
use32 use32
org 0x0 org 0x0
db "MENUET01" ; 8 byte id db "MENUET01" ; 8 byte id
dd 0x01 ; header version dd 0x01 ; header version
dd START ; start of code dd START ; start of code
@ -16,7 +16,7 @@
dd 0x0 ; boot parameters dd 0x0 ; boot parameters
dd cur_dir_path ; path dd cur_dir_path ; path
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
include "lang.inc" include "lang.inc" ; Language support for locales (UTF-8): de_DE, et_EE, ru_RU, it_IT, en_US.
include "../../../macros.inc" include "../../../macros.inc"
include "../../../develop/libraries/box_lib/trunk/box_lib.mac" include "../../../develop/libraries/box_lib/trunk/box_lib.mac"
include "../../../KOSfuncs.inc" include "../../../KOSfuncs.inc"
@ -43,7 +43,7 @@ EDITBOX:
.Y = UNDERTABLE.Y + BUTTON.HEIGHT + 20 .Y = UNDERTABLE.Y + BUTTON.HEIGHT + 20
.WIDTH = 465 .WIDTH = 465
.HEIGHT = 23 .HEIGHT = 23
CHECKBOX: CHECKBOX:
.X = PROCESS_TABLE.X .X = PROCESS_TABLE.X
.Y = UNDERTABLE.Y + BUTTON.HEIGHT + 25 .Y = UNDERTABLE.Y + BUTTON.HEIGHT + 25
@ -300,7 +300,7 @@ draw_next_process:
add ebx, BUTTON.WIDTH add ebx, BUTTON.WIDTH
mcall mcall
;create terminate process button ;create terminate process button
;mov ecx,[curposy] ;mov ecx,[curposy]
shl ecx,16 shl ecx,16
mov cx, BUTTON.HEIGHT mov cx, BUTTON.HEIGHT
@ -478,7 +478,7 @@ align 4
;show window y size ;show window y size
movzx eax, word [process_info_buffer.box.top] movzx eax, word [process_info_buffer.box.top]
add ebx, 70 shl 16 add ebx, 70 shl 16
call draw_ra_dec_number call draw_ra_dec_number
pop edi pop edi
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
align 4 align 4
@ -515,36 +515,36 @@ draw_window:
test [window_status],10b ; window is minimized to panel test [window_status],10b ; window is minimized to panel
jnz .exit jnz .exit
mov eax, strings.process_name mov eax, strings.process_name
mov ebx, 130 shl 16 + 5 mov ebx, 130 shl 16 + 5
xor ecx, ecx xor ecx, ecx
call draw_ra_text call draw_ra_text
mov eax, strings.ptid mov eax, strings.ptid
add ebx, 80 shl 16 add ebx, 80 shl 16
call draw_ra_text call draw_ra_text
mov eax, strings.cpu_usage_cycles mov eax, strings.cpu_usage_cycles
add ebx, 100 shl 16 add ebx, 100 shl 16
call draw_ra_text call draw_ra_text
mov eax, strings.cpu_usage_percent mov eax, strings.cpu_usage_percent
add ebx, 55 shl 16 add ebx, 55 shl 16
call draw_ra_text call draw_ra_text
mov eax, strings.memory_usage mov eax, strings.memory_usage
add ebx, 60 shl 16 add ebx, 60 shl 16
call draw_ra_text call draw_ra_text
mov eax, strings.window_stack_pos mov eax, strings.window_stack_pos
add ebx, 70 shl 16 add ebx, 70 shl 16
call draw_ra_text call draw_ra_text
mov eax, strings.window_position.x mov eax, strings.window_position.x
add ebx, 70 shl 16 add ebx, 70 shl 16
call draw_ra_text call draw_ra_text
mov eax, strings.window_position.y mov eax, strings.window_position.y
add ebx, 70 shl 16 add ebx, 70 shl 16
call draw_ra_text call draw_ra_text
@ -621,7 +621,7 @@ align 4
align 4 align 4
.exit: .exit:
ret ret
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
draw_ra_dec_number: draw_ra_dec_number:
@ -638,13 +638,13 @@ draw_ra_dec_number:
ror ebx, 16 ror ebx, 16
mov ebp, eax mov ebp, eax
test edx, edx test edx, edx
jz .no_postfix jz .no_postfix
mov eax, edx mov eax, edx
call count_utf8z_chars call count_utf8z_chars
test eax, eax test eax, eax
jz .no_postfix jz .no_postfix
push ecx push ecx
@ -655,13 +655,13 @@ draw_ra_dec_number:
mcall SF_DRAW_TEXT mcall SF_DRAW_TEXT
ror ebx, 16 ror ebx, 16
pop ecx pop ecx
.no_postfix: .no_postfix:
mov eax, ebp mov eax, ebp
push edx push edx
xor edi, edi xor edi, edi
mov esi, 10 mov esi, 10
@@: @@:
xor edx, edx xor edx, edx
@ -681,7 +681,7 @@ draw_ra_dec_number:
sub dx, ax sub dx, ax
rol edx, 16 rol edx, 16
mcall SF_DRAW_NUMBER, (11 shl 16) or 0x80000000 mcall SF_DRAW_NUMBER, (11 shl 16) or 0x80000000
popa popa
ret ret
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
@ -702,7 +702,7 @@ draw_ra_data_size:
cmp eax, 1024 cmp eax, 1024
ja @f ja @f
jmp .draw_text jmp .draw_text
@@: @@:
cmp eax, 1024*1024 cmp eax, 1024*1024
jae @f jae @f
@ -710,7 +710,7 @@ draw_ra_data_size:
div esi div esi
mov edx, strings.KB mov edx, strings.KB
jmp .draw_text jmp .draw_text
@@: @@:
cmp eax, 1024*1024*1024 cmp eax, 1024*1024*1024
jae @f jae @f
@ -718,15 +718,15 @@ draw_ra_data_size:
div esi div esi
mov edx, strings.MB mov edx, strings.MB
jmp .draw_text jmp .draw_text
@@: @@:
mov esi, 1024*1024*1024 mov esi, 1024*1024*1024
div esi div esi
mov edx, strings.GB mov edx, strings.GB
.draw_text: .draw_text:
call draw_ra_dec_number call draw_ra_dec_number
popa popa
ret ret
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
@ -743,9 +743,9 @@ draw_ra_text:
ror ebx, 16 ror ebx, 16
mov edx, eax mov edx, eax
call count_utf8z_chars call count_utf8z_chars
test eax, eax test eax, eax
jz .ret jz .ret
lea eax, [eax*8] lea eax, [eax*8]
@ -753,7 +753,7 @@ draw_ra_text:
rol ebx, 16 rol ebx, 16
or ecx, 0xB0000000 or ecx, 0xB0000000
mcall SF_DRAW_TEXT mcall SF_DRAW_TEXT
.ret: .ret:
popa popa
ret ret
@ -773,7 +773,7 @@ draw_button_with_caption:
;ebx = x+width shl 16 + y ;ebx = x+width shl 16 + y
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
pusha pusha
xor ebp, ebp xor ebp, ebp
mov edi, eax mov edi, eax
test eax, eax test eax, eax
@ -782,7 +782,7 @@ draw_button_with_caption:
call count_utf8z_chars call count_utf8z_chars
mov ebp, eax mov ebp, eax
.no_caption_0: .no_caption_0:
push ebx esi push ebx esi
lea eax, [ebp*8] lea eax, [ebp*8]
mov esi, edx mov esi, edx
@ -804,7 +804,7 @@ draw_button_with_caption:
mov ecx, esi mov ecx, esi
or ecx, 0xB0000000 or ecx, 0xB0000000
mcall SF_DRAW_TEXT mcall SF_DRAW_TEXT
.no_caption_1: .no_caption_1:
popa popa
ret ret
@ -820,7 +820,7 @@ count_utf8z_chars:
push esi ebx push esi ebx
mov esi, eax mov esi, eax
xor ebx, ebx xor ebx, ebx
.0: .0:
lodsb lodsb
test al, al test al, al
@ -836,25 +836,25 @@ count_utf8z_chars:
ja @f ja @f
inc esi inc esi
jmp .0 jmp .0
@@: @@:
cmp al, 0xEF cmp al, 0xEF
ja @f ja @f
inc esi inc esi
inc esi inc esi
jmp .0 jmp .0
@@: @@:
cmp al, 0xF7 cmp al, 0xF7
ja .err ja .err
add esi, 3 add esi, 3
jmp .0 jmp .0
.ok: .ok:
mov eax, ebx mov eax, ebx
pop ebx esi pop ebx esi
ret ret
.err: .err:
xor eax, eax xor eax, eax
pop ebx esi pop ebx esi
@ -920,7 +920,7 @@ sys_reboot:
strings: strings:
if lang eq de_DE if lang eq de_DE
.window_caption utf8z "Prozesse v0.2.3 - [Ctrl+Alt+Del]" .window_caption utf8z "Prozesse v0.2.3 - [Ctrl+Alt+Del]"
.process_name utf8z "NAME/BEENDEN" .process_name utf8z "NAME/BEENDEN"
.ptid utf8z "PID/TID" .ptid utf8z "PID/TID"
.cpu_usage_cycles utf8z "CPU(ZYKLEN)" .cpu_usage_cycles utf8z "CPU(ZYKLEN)"
@ -929,21 +929,21 @@ if lang eq de_DE
.window_stack_pos utf8z "W-STACK" .window_stack_pos utf8z "W-STACK"
.window_position.x utf8z " WIN-X" .window_position.x utf8z " WIN-X"
.window_position.y utf8z " WIN-Y" .window_position.y utf8z " WIN-Y"
.previous_page utf8z "SEITE ZURUECK" .previous_page utf8z "SEITE ZURUECK"
.next_page utf8z "SEITE VOR" .next_page utf8z "SEITE VOR"
.reboot utf8z "REBOOT SYSTEM" .reboot utf8z "REBOOT SYSTEM"
.run utf8z "START" .run utf8z "START"
.checkbox_caption utf8z "System" .checkbox_caption utf8z "System"
.KB utf8z " KB" .KB utf8z " KB"
.MB utf8z " MB" .MB utf8z " MB"
.GB utf8z " GB" .GB utf8z " GB"
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
else if lang eq et_EE else if lang eq et_EE
.window_caption utf8z "Protsessid v0.2.3 - [Ctrl+Alt+Del]" .window_caption utf8z "Protsessid v0.2.3 - [Ctrl+Alt+Del]"
.process_name utf8z "NIMI/LÕPETA" .process_name utf8z "NIMI/LÕPETA"
.ptid utf8z "PID/TID" .ptid utf8z "PID/TID"
.cpu_usage_cycles utf8z "CPU(TSÜKLID)" .cpu_usage_cycles utf8z "CPU(TSÜKLID)"
@ -952,21 +952,21 @@ else if lang eq et_EE
.window_stack_pos utf8z "W-PUHVER" .window_stack_pos utf8z "W-PUHVER"
.window_position.x utf8z " WIN-X" .window_position.x utf8z " WIN-X"
.window_position.y utf8z " WIN-Y" .window_position.y utf8z " WIN-Y"
.previous_page utf8z "EELMINE LEHT" .previous_page utf8z "EELMINE LEHT"
.next_page utf8z "JÄRGMINE LEHT" .next_page utf8z "JÄRGMINE LEHT"
.reboot utf8z "REBOODI SÜSTEEM" .reboot utf8z "REBOODI SÜSTEEM"
.run utf8z "START" .run utf8z "START"
.checkbox_caption utf8z "System" .checkbox_caption utf8z "System"
.KB utf8z " KB" .KB utf8z " KB"
.MB utf8z " MB" .MB utf8z " MB"
.GB utf8z " GB" .GB utf8z " GB"
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
else if lang eq ru_RU else if lang eq ru_RU
.window_caption utf8z "Диспетчер процессов v0.2.3 - [Ctrl+Alt+Del]" .window_caption utf8z "Диспетчер процессов v0.2.3 - [Ctrl+Alt+Del]"
.process_name utf8z "ИМЯ/ЗАВЕРШИТЬ" .process_name utf8z "ИМЯ/ЗАВЕРШИТЬ"
.ptid utf8z "PID/TID" .ptid utf8z "PID/TID"
.cpu_usage_cycles utf8z "CPU(ТАКТЫ)" .cpu_usage_cycles utf8z "CPU(ТАКТЫ)"
@ -975,21 +975,21 @@ else if lang eq ru_RU
.window_stack_pos utf8z "W-STACK" .window_stack_pos utf8z "W-STACK"
.window_position.x utf8z " WIN-X" .window_position.x utf8z " WIN-X"
.window_position.y utf8z " WIN-Y" .window_position.y utf8z " WIN-Y"
.previous_page utf8z "ПРЕД. СТР." .previous_page utf8z "ПРЕД. СТР."
.next_page utf8z "СЛЕД. СТР." .next_page utf8z "СЛЕД. СТР."
.reboot utf8z "ПЕРЕЗАГРУЗКА" .reboot utf8z "ПЕРЕЗАГРУЗКА"
.run utf8z "ЗАПУСК" .run utf8z "ЗАПУСК"
.checkbox_caption utf8z "Системные" .checkbox_caption utf8z "Системные"
.KB utf8z " КБ" .KB utf8z " КБ"
.MB utf8z " МБ" .MB utf8z " МБ"
.GB utf8z " ГБ" .GB utf8z " ГБ"
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
else if lang eq it_IT else if lang eq it_IT
.window_caption utf8z "Gestore processi v0.2.3 - [Ctrl+Alt+Del]" .window_caption utf8z "Gestore processi v0.2.3 - [Ctrl+Alt+Del]"
.process_name utf8z "NOME-PROGRAMMA" .process_name utf8z "NOME-PROGRAMMA"
.ptid utf8z "PID/TID" .ptid utf8z "PID/TID"
.cpu_usage_cycles utf8z "CPU(CICLI)" .cpu_usage_cycles utf8z "CPU(CICLI)"
@ -998,21 +998,21 @@ else if lang eq it_IT
.window_stack_pos utf8z "W-STACK" .window_stack_pos utf8z "W-STACK"
.window_position.x utf8z " WIN-X" .window_position.x utf8z " WIN-X"
.window_position.y utf8z " WIN-Y" .window_position.y utf8z " WIN-Y"
.previous_page utf8z "INDIETRO" .previous_page utf8z "INDIETRO"
.next_page utf8z "AVANTI" .next_page utf8z "AVANTI"
.reboot utf8z "RIAVVIA SISTEMA" .reboot utf8z "RIAVVIA SISTEMA"
.run utf8z "START" .run utf8z "START"
.checkbox_caption utf8z "System" .checkbox_caption utf8z "System"
.KB utf8z " KB" .KB utf8z " KB"
.MB utf8z " MB" .MB utf8z " MB"
.GB utf8z " GB" .GB utf8z " GB"
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
else else ; Default to en_US
.window_caption utf8z "Process manager v0.2.3 - [Ctrl+Alt+Del]" .window_caption utf8z "Process manager v0.2.3 - [Ctrl+Alt+Del]"
.process_name utf8z "NAME/TERMINATE" .process_name utf8z "NAME/TERMINATE"
.ptid utf8z "PID/TID" .ptid utf8z "PID/TID"
.cpu_usage_cycles utf8z "CPU(CYCLES)" .cpu_usage_cycles utf8z "CPU(CYCLES)"
@ -1021,15 +1021,15 @@ else
.window_stack_pos utf8z "W-STACK" .window_stack_pos utf8z "W-STACK"
.window_position.x utf8z " WIN-X" .window_position.x utf8z " WIN-X"
.window_position.y utf8z " WIN-Y" .window_position.y utf8z " WIN-Y"
.previous_page utf8z "PREV PAGE" .previous_page utf8z "PREV PAGE"
.next_page utf8z "NEXT PAGE" .next_page utf8z "NEXT PAGE"
.reboot utf8z "REBOOT SYSTEM" .reboot utf8z "REBOOT SYSTEM"
.run utf8z "RUN" .run utf8z "RUN"
.checkbox_caption utf8z "System" .checkbox_caption utf8z "System"
.KB utf8z " KB" .KB utf8z " KB"
.MB utf8z " MB" .MB utf8z " MB"
.GB utf8z " GB" .GB utf8z " GB"

View File

@ -1,227 +1,227 @@
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; ;
; DOCPAK FOR KOLIBRI v1.2 ; DOCPAK FOR KOLIBRI v1.2
; Written in pure assembly by Ivushkin Andrey aka Willow ; Written in pure assembly by Ivushkin Andrey aka Willow
; ;
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
FILE_COUNT=0 FILE_COUNT=0
DEF_FILE equ 'g' DEF_FILE equ 'g'
macro embed_docdir_file fn macro embed_docdir_file fn
{ {
forward forward
local label,label2,label3 local label,label2,label3
dd label2-label dd label2-label
dd label-label3 dd label-label3
label3: label3:
db fn db fn
label: label:
file '%DOCDIR%' # fn file '%DOCDIR%' # fn
label2: label2:
FILE_COUNT=FILE_COUNT+1 FILE_COUNT=FILE_COUNT+1
} }
macro embed_local_file fn macro embed_local_file fn
{ {
forward forward
local label,label2,label3 local label,label2,label3
dd label2-label dd label2-label
dd label-label3 dd label-label3
label3: label3:
db fn db fn
label: label:
file fn file fn
label2: label2:
FILE_COUNT=FILE_COUNT+1 FILE_COUNT=FILE_COUNT+1
} }
use32 use32
org 0x0 org 0x0
db 'MENUET01' ; 8 byte id db 'MENUET01' ; 8 byte id
dd 0x01 ; header version dd 0x01 ; header version
dd start ; start of code dd start ; start of code
dd I_END ; size of image dd I_END ; size of image
dd I_END+0x400 ; memory for app dd I_END+0x400 ; memory for app
dd I_END+0x400 ; esp dd I_END+0x400 ; esp
dd my_param , 0x0 ; I_Param , I_Icon dd my_param , 0x0 ; I_Param , I_Icon
include '../../../macros.inc' include '../../../macros.inc'
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU, en_US.
start: start:
cmp [my_param],0 cmp [my_param],0
je red je red
cmp [my_param],'a' cmp [my_param],'a'
jb .par_a jb .par_a
cmp [my_param],'z' cmp [my_param],'z'
jbe .ok2 jbe .ok2
.par_a: .par_a:
mov [my_param],DEF_FILE mov [my_param],DEF_FILE
.ok2: .ok2:
movzx ecx,[my_param] movzx ecx,[my_param]
mov [my_param],'*' mov [my_param],'*'
.open: .open:
sub ecx,'a'-1 sub ecx,'a'-1
mov edx,embedded mov edx,embedded
xor esi,esi xor esi,esi
.list: .list:
lea edx,[edx+esi+8] lea edx,[edx+esi+8]
mov esi,[edx-8] mov esi,[edx-8]
add edx,[edx-4] add edx,[edx-4]
test esi,esi test esi,esi
jz .close jz .close
loop .list loop .list
push edx push edx
; convert number in esi to decimal representation ; convert number in esi to decimal representation
mov ecx, 10 mov ecx, 10
push -'0' push -'0'
mov eax, esi mov eax, esi
@@: @@:
xor edx, edx xor edx, edx
div ecx div ecx
push edx push edx
test eax, eax test eax, eax
jnz @b jnz @b
mov edi, fsize mov edi, fsize
@@: @@:
pop eax pop eax
add al, '0' add al, '0'
stosb stosb
jnz @b jnz @b
mcall 70,fileinfo mcall 70,fileinfo
mov ecx,eax mov ecx,eax
mcall 5,20 mcall 5,20
pop edx pop edx
mcall 60,2 mcall 60,2
cmp [my_param],'*' cmp [my_param],'*'
jne still jne still
.close: .close:
mcall -1 mcall -1
red: red:
mov [my_param],'a' mov [my_param],'a'
mcall 48, 3, sc, sizeof.system_colors mcall 48, 3, sc, sizeof.system_colors
mcall 12,1 mcall 12,1
BTN_H equ 21 BTN_H equ 21
mov edx,[sc.work] mov edx,[sc.work]
or edx,0x34000000 or edx,0x34000000
mcall 0, <220,141>, <30,FILECOUNT*(BTN_H+3)+37>, , ,title mcall 0, <220,141>, <30,FILECOUNT*(BTN_H+3)+37>, , ,title
mov ecx,FILECOUNT mov ecx,FILECOUNT
mov ebx,23 shl 16+100 mov ebx,23 shl 16+100
mov esi,[sc.work_button] mov esi,[sc.work_button]
mov edi,5 shl 16+BTN_H mov edi,5 shl 16+BTN_H
mov edx,10 mov edx,10
mov eax,8 mov eax,8
.btnlp: .btnlp:
push ecx push ecx
mcall ,,edi mcall ,,edi
add edi,(BTN_H+3) shl 16 add edi,(BTN_H+3) shl 16
inc edx inc edx
pop ecx pop ecx
loop .btnlp loop .btnlp
mov ecx,FILECOUNT mov ecx,FILECOUNT
mov edx,embedded mov edx,embedded
xor edi,edi xor edi,edi
mov ebx,30 shl 16+8 mov ebx,30 shl 16+8
mov eax,4 mov eax,4
.list: .list:
lea edx,[edx+edi+8] lea edx,[edx+edi+8]
mov edi,[edx-8] mov edi,[edx-8]
pusha pusha
sub ebx,20 shl 16 sub ebx,20 shl 16
mov ecx, [sc.work_text] mov ecx, [sc.work_text]
or ecx, 0x30000000 or ecx, 0x30000000
mcall ,,,my_param,1 mcall ,,,my_param,1
inc [my_param] inc [my_param]
popa popa
push ecx push ecx
mov esi, [edx-4] mov esi, [edx-4]
sub esi, 4 ;remove .txt extension sub esi, 4 ;remove .txt extension
mov ecx, [sc.work_button_text] mov ecx, [sc.work_button_text]
or ecx, 0x30000000 or ecx, 0x30000000
mcall mcall
pop ecx pop ecx
add esi, 4 add esi, 4
add edx, esi add edx, esi
add ebx,(BTN_H+3) add ebx,(BTN_H+3)
loop .list loop .list
mcall 12,2 mcall 12,2
still: still:
mcall 10 mcall 10
cmp eax,1 cmp eax,1
je red je red
cmp eax,2 cmp eax,2
jne .nokey jne .nokey
mcall 2 mcall 2
cmp ah,27 ;Esc cmp ah,27 ;Esc
je start.close je start.close
cmp ah,'a' cmp ah,'a'
jb still jb still
cmp ah,'a'+FILECOUNT cmp ah,'a'+FILECOUNT
jae still jae still
jmp .cxax jmp .cxax
.nokey: .nokey:
mcall 17 mcall 17
cmp ah,1 cmp ah,1
je start.close je start.close
sub ah,10-'a' sub ah,10-'a'
.cxax: .cxax:
movzx ecx,ah movzx ecx,ah
jmp start.open jmp start.open
fileinfo: fileinfo:
dd 7 dd 7
dd 0 dd 0
dd param dd param
dd 0 ,0 dd 0 ,0
db '/sys/TINYPAD',0 db '/sys/TINYPAD',0
param db '*' param db '*'
fsize: fsize:
times 10 db '0' times 10 db '0'
db 0 db 0
embedded: embedded:
; Please use only filenames w/o path! ; Please use only filenames w/o path!
; -- Start of embedding area ------ ; -- Start of embedding area ------
embed_docdir_file 'CREDITS.TXT' ;a embed_docdir_file 'CREDITS.TXT' ;a
if lang eq ru_RU if lang eq ru_RU
embed_docdir_file 'GNU.TXT' ;b embed_docdir_file 'GNU.TXT' ;b
else else ; Default to en_US
embed_docdir_file 'COPYING.TXT' ;b embed_docdir_file 'COPYING.TXT' ;b
end if end if
embed_docdir_file 'HOT_KEYS.TXT' ;c embed_docdir_file 'HOT_KEYS.TXT' ;c
embed_local_file 'FASM.TXT' ;d embed_local_file 'FASM.TXT' ;d
embed_docdir_file 'MTDBG.TXT' ;e embed_docdir_file 'MTDBG.TXT' ;e
if lang eq ru_RU if lang eq ru_RU
embed_local_file 'SYSFUNCR.TXT' ;f embed_local_file 'SYSFUNCR.TXT' ;f
else else ; Default to en_US
embed_local_file 'SYSFUNCS.TXT' ;f embed_local_file 'SYSFUNCS.TXT' ;f
end if end if
embed_local_file 'STACK.TXT' ;g embed_local_file 'STACK.TXT' ;g
embed_docdir_file 'KFAR_KEYS.TXT' ;h embed_docdir_file 'KFAR_KEYS.TXT' ;h
embed_docdir_file 'INI.TXT' ;i embed_docdir_file 'INI.TXT' ;i
embed_docdir_file 'OPENDIAL.TXT' ;j embed_docdir_file 'OPENDIAL.TXT' ;j
; -- End of embedding area ------- ; -- End of embedding area -------
dd 0 dd 0
FILECOUNT = FILE_COUNT FILECOUNT = FILE_COUNT
if ~ FILECOUNT>0 if ~ FILECOUNT>0
error 'No embedded files' error 'No embedded files'
end if end if
my_param db 0 my_param db 0
rb 256 rb 256
I_END: I_END:
title db 'Doc Pack',0 title db 'Doc Pack',0
sc system_colors sc system_colors

View File

@ -1,68 +1,71 @@
WIN_W = 440 WIN_W = 440
WIN_H = 200 WIN_H = 200
BOT_PANEL_H = 70 BOT_PANEL_H = 70
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
CANCEL_BUTTON_ID = 1+BT_HIDE CANCEL_BUTTON_ID = 1+BT_HIDE
HOME_BUTTON_ID = 2 HOME_BUTTON_ID = 2
REBOOT_BUTTON_ID = 3 REBOOT_BUTTON_ID = 3
POWEROFF_BUTTON_ID = 4 POWEROFF_BUTTON_ID = 4
CHECKBOX_BUTTON_ID = 5+BT_HIDE CHECKBOX_BUTTON_ID = 5+BT_HIDE
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
TEXT_HOME: db 'Home',0 TEXT_HOME: db 'Home',0
TEXT_ENTER: db 'Enter',0 TEXT_ENTER: db 'Enter',0
TEXT_END: db 'End',0 TEXT_END: db 'End',0
TEXT_CANCEL: db 'x',0 TEXT_CANCEL: db 'x',0
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
if lang eq ru_RU
TEXT_WTITLE: db '‡ ¢¥à襭¨¥ à ¡®âë',0 ; Language support for locales: ru_RU (CP866), de_DE, it_IT, en_US
TEXT_RDSAVE1: db '‘®åà ­¨âì ¨§¬¥­¥­¨ï, ᤥ« ­­ë¥ ¢',0
TEXT_RDSAVE2: db '¯à®æ¥áᥠࠡ®âë ¢ á¨á⥬¥ (Ctrl+S)',0 if lang eq ru_RU
TEXT_KERNEL: db 'Ÿ¤à®',0 TEXT_WTITLE: db '‡ ¢¥à襭¨¥ à ¡®âë',0
TEXT_REBOOT: db '<27>¥à¥§ £à㧪 ',0 TEXT_RDSAVE1: db '‘®åà ­¨âì ¨§¬¥­¥­¨ï, ᤥ« ­­ë¥ ¢',0
TEXT_OFF: db '‚몫î祭¨¥',0 TEXT_RDSAVE2: db '¯à®æ¥áᥠࠡ®âë ¢ á¨á⥬¥ (Ctrl+S)',0
TEXT_SAVING: db '‘®åà ­¥­¨¥ ®¡à § ...',0 TEXT_KERNEL: db 'Ÿ¤à®',0
else if lang eq de_DE TEXT_REBOOT: db '<27>¥à¥§ £à㧪 ',0
TEXT_WTITLE: db 'Shutdown computer',0 TEXT_OFF: db '‚몫î祭¨¥',0
TEXT_RDSAVE1: db 'Save all changes that were done',0 TEXT_SAVING: db '‘®åà ­¥­¨¥ ®¡à § ...',0
TEXT_RDSAVE2: db 'during system work (Ctrl+S)',0 else if lang eq de_DE
TEXT_KERNEL: db 'Kernel',0 TEXT_WTITLE: db 'Shutdown computer',0
TEXT_REBOOT: db 'Neustart',0 TEXT_RDSAVE1: db 'Save all changes that were done',0
TEXT_OFF: db 'Beenden',0 TEXT_RDSAVE2: db 'during system work (Ctrl+S)',0
TEXT_SAVING: db 'Saving RAM-drive...',0 TEXT_KERNEL: db 'Kernel',0
else if lang eq it_IT TEXT_REBOOT: db 'Neustart',0
TEXT_WTITLE: db 'Shutdown computer',0 TEXT_OFF: db 'Beenden',0
TEXT_RDSAVE1: db 'Save all changes that were done',0 TEXT_SAVING: db 'Saving RAM-drive...',0
TEXT_RDSAVE2: db 'during system work (Ctrl+S)',0 else if lang eq it_IT
TEXT_KERNEL: db 'Kernel',0 TEXT_WTITLE: db 'Shutdown computer',0
TEXT_REBOOT: db 'Riavvio',0 TEXT_RDSAVE1: db 'Save all changes that were done',0
TEXT_OFF: db 'Spegni',0 TEXT_RDSAVE2: db 'during system work (Ctrl+S)',0
TEXT_SAVING: db 'Saving RAM-drive...',0 TEXT_KERNEL: db 'Kernel',0
else TEXT_REBOOT: db 'Riavvio',0
TEXT_WTITLE: db 'Shutdown computer',0 TEXT_OFF: db 'Spegni',0
TEXT_RDSAVE1: db 'Save all changes that were done',0 TEXT_SAVING: db 'Saving RAM-drive...',0
TEXT_RDSAVE2: db 'during system work (Ctrl+S)',0 else ; Default to en_US
TEXT_KERNEL: db 'Kernel',0 TEXT_WTITLE: db 'Shutdown computer',0
TEXT_REBOOT: db 'Reboot',0 TEXT_RDSAVE1: db 'Save all changes that were done',0
TEXT_OFF: db 'Power off',0 TEXT_RDSAVE2: db 'during system work (Ctrl+S)',0
TEXT_SAVING: db 'Saving RAM-drive...',0 TEXT_KERNEL: db 'Kernel',0
end if TEXT_REBOOT: db 'Reboot',0
;--------------------------------------------------------------------- TEXT_OFF: db 'Power off',0
rdsave: TEXT_SAVING: db 'Saving RAM-drive...',0
dd SSF_START_APP,0,hide,0,0 end if
db '/sys/rdsave',0 ;---------------------------------------------------------------------
hide db 'h',0 rdsave:
asettings db 'settings',0 dd SSF_START_APP,0,hide,0,0
aautosave db 'autosave',0 db '/sys/rdsave',0
ini_file db '/sys/settings/rdsave.ini',0 hide db 'h',0
;--------------------------------------------------------------------- asettings db 'settings',0
importLib: aautosave db 'autosave',0
library \ ini_file db '/sys/settings/rdsave.ini',0
libini, 'libini.obj' ;---------------------------------------------------------------------
importLib:
import libini, \ library \
ini_set_int ,'ini_set_int', \ libini, 'libini.obj'
ini_get_int ,'ini_get_int'
;--------------------------------------------------------------------- import libini, \
checkbox_sharedname db 'CHECKBOX',0 ini_set_int ,'ini_set_int', \
checkbox_img dd ? ini_get_int ,'ini_get_int'
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
checkbox_sharedname db 'CHECKBOX',0
checkbox_img dd ?
;---------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -1,44 +1,45 @@
; ;
; Ghost Monitor - утилита (стресс) тестирования и мониторинга системы ; Ghost Monitor - утилита (стресс) тестирования и мониторинга системы
; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru) ; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru)
; All Right Reserved ; All Right Reserved
; Language support for locales: it_IT, en_US.
mov edx, msg_about
mov ebx, 17 * 65536 + 285 mov edx, msg_about
call show_text mov ebx, 17 * 65536 + 285
jmp redraw call show_text
jmp redraw
if lang eq it_IT
msg_about mls \ if lang eq it_IT
' Ghost Monitor',\ msg_about mls \
'',\ ' Ghost Monitor',\
'strumento per testare il proprio hardware',\ '',\
'',\ 'strumento per testare il proprio hardware',\
'Supported SuperIO : W83627HF,W83697HF',\ '',\
' W83627THF,W83627THF-A,W83627EHF-A,',\ 'Supported SuperIO : W83627HF,W83697HF',\
' W83637THF,IT8705F,IT8712F,SiS950',\ ' W83627THF,W83627THF-A,W83627EHF-A,',\
' ABIT uGuru',\ ' W83637THF,IT8705F,IT8712F,SiS950',\
'',\ ' ABIT uGuru',\
'Test basati su R.J.Redelmeier CPUBurn',\ '',\
'',\ 'Test basati su R.J.Redelmeier CPUBurn',\
'Mailto : ghost.nsk@mail.ru',\ '',\
'',\ 'Mailto : ghost.nsk@mail.ru',\
' *** Usare a prioprio rischio ***' '',\
else ' *** Usare a prioprio rischio ***'
msg_about mls \ ; должна быть хотябы одна строка else ; Default to en_US
' Ghost Monitor',\ msg_about mls \ ; должна быть хотябы одна строка
'',\ ' Ghost Monitor',\
' tool for testing and monitoring hardware',\ '',\
'',\ ' tool for testing and monitoring hardware',\
'Supported SuperIO : W83627HF,W83697HF',\ '',\
' W83627THF,W83627THF-A,W83627EHF-A,',\ 'Supported SuperIO : W83627HF,W83697HF',\
' W83637THF,IT8705F,IT8712F,SiS950',\ ' W83627THF,W83627THF-A,W83627EHF-A,',\
' ABIT uGuru',\ ' W83637THF,IT8705F,IT8712F,SiS950',\
'',\ ' ABIT uGuru',\
'Tests based on R.J.Redelmeier CPUBurn',\ '',\
'',\ 'Tests based on R.J.Redelmeier CPUBurn',\
'Mailto : ghost.nsk@mail.ru',\ '',\
'',\ 'Mailto : ghost.nsk@mail.ru',\
' *** Use at YOUR own RISK ***' '',\
end if ' *** Use at your own risk ***'
end if

View File

@ -1,123 +1,125 @@
; ;
; Ghost Monitor - утилита (стресс) тестирования и мониторинга системы ; Ghost Monitor - утилита (стресс) тестирования и мониторинга системы
; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru) ; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru)
; All Right Reserved ; All Right Reserved
; ;
; Вкладка тестов ; Вкладка тестов
;
; "GenuineIntel" - International Electronics ; Language support for locales: it_IT, en_US.
; "GenuineTMx86" - Transmeta Processor
; "AuthenticAMD" - Advanced Micro Devices ; "GenuineIntel" - International Electronics
; "AMD ISBETTER" - Advanced Micro Devices ; "GenuineTMx86" - Transmeta Processor
; "UMC UMC UMC " - United Microelectronics Corporation ; "AuthenticAMD" - Advanced Micro Devices
; "CyrixInstead" - Cyrix Processor ; "AMD ISBETTER" - Advanced Micro Devices
; "Geode by NSC" - National Semiconductor Processor ; "UMC UMC UMC " - United Microelectronics Corporation
; "SiS SiS SiS " - SiS Processor ; "CyrixInstead" - Cyrix Processor
; "RiseRiseRise" - Rise Processor ; "Geode by NSC" - National Semiconductor Processor
; "NexGenDriven" - NexGen Processor (acquired by AMD) ; "SiS SiS SiS " - SiS Processor
; "CentaurHauls" - IDT/Centaur, now VIA Processor ; "RiseRiseRise" - Rise Processor
; "NexGenDriven" - NexGen Processor (acquired by AMD)
; Pentium (P5) button ; "CentaurHauls" - IDT/Centaur, now VIA Processor
mov eax, 8
mov ebx, 17 * 65536 + 145 ; Pentium (P5) button
mov ecx, 297 * 65536 + 25 mov eax, 8
mov edx, 6 mov ebx, 17 * 65536 + 145
mov esi, tcol mov ecx, 297 * 65536 + 25
cmp byte[Vendor + 11], 'l' mov edx, 6
jne p5n mov esi, tcol
cmp byte[CPU_fam], 5 cmp byte[Vendor + 11], 'l'
jne p5n jne p5n
mov esi, atcol cmp byte[CPU_fam], 5
p5n: int 0x40 jne p5n
; Pentium Pro / II / III (P6) button mov esi, atcol
add ecx, 27 * 65536 p5n: int 0x40
inc edx ; Pentium Pro / II / III (P6) button
mov esi, tcol add ecx, 27 * 65536
cmp byte[Vendor + 11], 'l' inc edx
jne p6n mov esi, tcol
cmp byte[CPU_fam], 6 cmp byte[Vendor + 11], 'l'
jne p6n jne p6n
mov esi, atcol cmp byte[CPU_fam], 6
p6n: int 0x40 jne p6n
; AMD K6 button mov esi, atcol
add ecx, 27 * 65536 p6n: int 0x40
inc edx ; AMD K6 button
mov esi, tcol add ecx, 27 * 65536
cmp byte[Vendor], 'A' inc edx
jne k6n mov esi, tcol
cmp byte[CPU_fam], 5 cmp byte[Vendor], 'A'
jne k6n jne k6n
mov esi, atcol cmp byte[CPU_fam], 5
k6n: int 0x40 jne k6n
; AMD K7 (Athlon / Duron) mov esi, atcol
add ecx, 27 * 65536 k6n: int 0x40
inc edx ; AMD K7 (Athlon / Duron)
mov esi, tcol add ecx, 27 * 65536
cmp byte[Vendor], 'A' inc edx
jne k7n mov esi, tcol
cmp byte[CPU_fam], 6 cmp byte[Vendor], 'A'
jne k7n jne k7n
mov esi, atcol cmp byte[CPU_fam], 6
k7n: int 0x40 jne k7n
; Пишем названия кнопок mov esi, atcol
mov eax, 4 k7n: int 0x40
mov ebx, 30 * 65536 + 307 ; Пишем названия кнопок
mov esi, 7 mov eax, 4
mov edx, tmsg_p ; P5 mov ebx, 30 * 65536 + 307
xor ecx, ecx mov esi, 7
cmp byte[test_id], 6 mov edx, tmsg_p ; P5
jne nr1 xor ecx, ecx
mov ecx, 0xFF0000 cmp byte[test_id], 6
nr1: int 0x40 jne nr1
add ebx, 27 mov ecx, 0xFF0000
mov esi, 20 ; P6 nr1: int 0x40
xor ecx, ecx add ebx, 27
cmp byte[test_id], 7 mov esi, 20 ; P6
jne nr2 xor ecx, ecx
mov ecx, 0xFF0000 cmp byte[test_id], 7
nr2: int 0x40 jne nr2
add ebx, 27 mov ecx, 0xFF0000
mov edx, tmsg_k6 ; K6 nr2: int 0x40
mov esi, 13 add ebx, 27
xor ecx, ecx mov edx, tmsg_k6 ; K6
cmp byte[test_id], 8 mov esi, 13
jne nr3 xor ecx, ecx
mov ecx, 0xFF0000 cmp byte[test_id], 8
nr3: int 0x40 jne nr3
add ebx, 27 mov ecx, 0xFF0000
mov edx, tmsg_k7 ; K7 nr3: int 0x40
mov esi, 15 add ebx, 27
xor ecx, ecx mov edx, tmsg_k7 ; K7
cmp byte[test_id], 9 mov esi, 15
jne nr4 xor ecx, ecx
mov ecx, 0xFF0000 cmp byte[test_id], 9
nr4: int 0x40 jne nr4
xor ecx, ecx mov ecx, 0xFF0000
mov ebx, 190 * 65536 + 420 nr4: int 0x40
mov edx, tmsg_rec xor ecx, ecx
mov esi, 11 mov ebx, 190 * 65536 + 420
int 0x40 mov edx, tmsg_rec
; read about mov esi, 11
mov ebx, 30 * 65536 + 282 int 0x40
mov edx, tmsg_war ; read about
mov esi, 35 mov ebx, 30 * 65536 + 282
mov ecx, 0xFF0000 mov edx, tmsg_war
int 0x40 mov esi, 35
; recommendate color mov ecx, 0xFF0000
mov eax, 13 int 0x40
mov ebx, 170 * 65536 + 10 ; recommendate color
mov ecx, 418 * 65536 + 10 mov eax, 13
mov edx, atcol mov ebx, 170 * 65536 + 10
int 0x40 mov ecx, 418 * 65536 + 10
mov edx, atcol
jmp redraw int 0x40
tmsg_p db 'Pentium (Pro/II/III)' ; 7/20 jmp redraw
tmsg_k6 db 'K6 (I/II/III)' ; 13
tmsg_k7 db 'K7/Athlon/Duron' ; 15 tmsg_p db 'Pentium (Pro/II/III)' ; 7/20
tmsg_rec db 'recommended' ; 11 tmsg_k6 db 'K6 (I/II/III)' ; 13
if lang eq it_IT tmsg_k7 db 'K7/Athlon/Duron' ; 15
tmsg_war db 'Potrebbe danneggiare lo hardware ' tmsg_rec db 'recommended' ; 11
else if lang eq it_IT
tmsg_war db 'May permanently damage the hardware' tmsg_war db 'Potrebbe danneggiare lo hardware '
end if else ; Default to en_US
tmsg_war db 'May permanently damage the hardware'
end if

View File

@ -1,206 +1,209 @@
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
tl dd 8 tl dd 8
yw: dd 51 yw: dd 51
ya dd 0 ya dd 0
cur_btn dd 40 cur_btn dd 40
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; DATA AREA ; DATA AREA
bcolor dd 0x335599 bcolor dd 0x335599
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
icon_table: icon_table:
times 4 db 'xxxx xxxx' times 4 db 'xxxx xxxx'
times 2 db ' ' times 2 db ' '
times 1 db ' ' times 1 db ' '
times 2 db 'xxxx xxxx' times 2 db 'xxxx xxxx'
; times 1 db ' ' ; times 1 db ' '
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
icons_reserved: icons_reserved:
times 9 db ' ' times 9 db ' '
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
if lang eq ru_RU
text: ; Language support for locales: ru_RU (CP866), de_DE, it_IT, en_US
db 255,255,255,0, ' ’…Š‘’ '
db 255,255,255,0, ' <20><>Žƒ<C5BD>€ŒŒ€ ' if lang eq ru_RU
db 255,255,255,0, ' <20><EFBFBD>€Œ…<E280A6> ' text:
db 255,255,255,0, ' <20><>ˆŒ…<C592>ˆœ ' db 255,255,255,0, ' ’…Š‘’ '
db 255,255,255,0, ' „Ž<E2809E>ˆœ “„€‹ˆ’œ ' db 255,255,255,0, ' <20><>Žƒ<C5BD>€ŒŒ€ '
db 0,0,0,0, '<27>€†Œˆ<20><20>Ž‡ˆˆž ˆŠŽ<C5A0>Šˆ „‹Ÿ <20>…„€Šˆ<E28099>Ž<E2809A>ˆŸ ' db 255,255,255,0, ' <20><EFBFBD>€Œ…<E280A6> '
db 'x' ; <- END MARKER, DONT DELETE db 255,255,255,0, ' <20><>ˆŒ…<C592>ˆœ '
db 255,255,255,0, ' „Ž<E2809E>ˆœ “„€‹ˆ’œ '
add_text db '<27>€†Œˆ<20><20>Ž‡ˆˆž <20>ˆ<CB86>Žœ‡“…ŒŽ‰ ˆŠŽ<C5A0>Šˆ ',0 db 0,0,0,0, '<27>€†Œˆ<20><20>Ž‡ˆˆž ˆŠŽ<C5A0>Šˆ „‹Ÿ <20>…„€Šˆ<E28099>Ž<E2809A>ˆŸ '
rem_text db '<27>€†Œˆ<20><20>Ž‡ˆˆž ˆ<CB86>Žœ‡“…ŒŽ‰ ˆŠŽ<C5A0>Šˆ ',0 db 'x' ; <- END MARKER, DO NOT DELETE
title db 'Œ¥­¥¤¦¥à ¨ª®­®ª',0
add_text db '<27>€†Œˆ<20><20>Ž‡ˆˆž <20>ˆ<CB86>Žœ‡“…ŒŽ‰ ˆŠŽ<C5A0>Šˆ ',0
else if lang eq de_DE rem_text db '<27>€†Œˆ<20><20>Ž‡ˆˆž ˆ<CB86>Žœ‡“…ŒŽ‰ ˆŠŽ<C5A0>Šˆ ',0
text: title db 'Œ¥­¥¤¦¥à ¨ª®­®ª',0
db 255,255,255,0, ' TITLE '
db 255,255,255,0, ' APP NAME ' else if lang eq de_DE
db 255,255,255,0, ' PARAMETER ' text:
db 255,255,255,0, ' ANWENDEN ' db 255,255,255,0, ' TITLE '
db 255,255,255,0, ' HINZUFUEGEN ENTFERNEN ' db 255,255,255,0, ' APP NAME '
db 0,0,0,0, 'AUF BUTTON KLICKEN, UM ICON ZU EDITIEREN ' db 255,255,255,0, ' PARAMETER '
db 'x' ; <- END MARKER, DONT DELETE db 255,255,255,0, ' ANWENDEN '
db 255,255,255,0, ' HINZUFUEGEN ENTFERNEN '
add_text db 'AUF UNBENUTZTE ICONPOSITION KLICKEN ',0 db 0,0,0,0, 'AUF BUTTON KLICKEN, UM ICON ZU EDITIEREN '
rem_text db 'ICON ANKLICKEN; DAS GELOESCHT WERDEN SOLL ',0 db 'x' ; <- END MARKER, DO NOT DELETE
title db 'Icon Manager',0
add_text db 'AUF UNBENUTZTE ICONPOSITION KLICKEN ',0
else if lang eq it_IT rem_text db 'ICON ANKLICKEN; DAS GELOESCHT WERDEN SOLL ',0
text: title db 'Icon Manager',0
db 255,255,255,0, 'Titolo '
db 255,255,255,0, 'Nome app ' else if lang eq it_IT
db 255,255,255,0, 'Parametri ' text:
db 255,255,255,0, ' Applica modifiche ' db 255,255,255,0, 'Titolo '
db 255,255,255,0, ' Aggiungi Rimuovi ' db 255,255,255,0, 'Nome app '
db 0,0,0,0, 'Clicca sull icona per effettuare modifiche ' db 255,255,255,0, 'Parametri '
db 'x' ; <- END MARKER, DONT DELETE db 255,255,255,0, ' Applica modifiche '
db 255,255,255,0, ' Aggiungi Rimuovi '
add_text db 'Clicca su una posizione non usata ',0 db 0,0,0,0, 'Clicca sull icona per effettuare modifiche '
rem_text db 'Cliccare sull icona da rimuovere ',0 db 'x' ; <- END MARKER, DO NOT DELETE
title db 'Gestore Icone',0
add_text db 'Clicca su una posizione non usata ',0
else rem_text db 'Cliccare sull icona da rimuovere ',0
text: title db 'Gestore Icone',0
db 255,255,255,0, ' TITLE '
db 255,255,255,0, ' APP NAME ' else ; Default to en_US
db 255,255,255,0, ' PARAMETERS ' text:
db 255,255,255,0, ' APPLY CHANGES ' db 255,255,255,0, ' TITLE '
db 255,255,255,0, ' ADD ICON REMOVE ICON ' db 255,255,255,0, ' APP NAME '
db 0,0,0,0, 'CLICK BUTTON ON ICON POSITION FOR EDIT ' db 255,255,255,0, ' PARAMETERS '
db 'x' ; <- END MARKER, DONT DELETE db 255,255,255,0, ' APPLY CHANGES '
add_text db 'CLICK ON A NOT USED POSITION ',0 db 255,255,255,0, ' ADD ICON REMOVE ICON '
rem_text db 'CLICK ICON POSITION; YOU WANT TO DELETE ',0 db 0,0,0,0, 'CLICK BUTTON ON ICON POSITION FOR EDIT '
title db 'Icon Manager',0 db 'x' ; <- END MARKER, DO NOT DELETE
add_text db 'CLICK ON A NOT USED POSITION ',0
end if rem_text db 'CLICK ICON POSITION; YOU WANT TO DELETE ',0
;------------------------------------------------------------------------------ title db 'Icon Manager',0
arrows db '</>'
;------------------------------------------------------------------------------ end if
iconname: ;------------------------------------------------------------------------------
db ICON_APP,0 arrows db '</>'
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
icon_default: iconname:
db 'AA-CALC -004-/SYS/CALC ' db ICON_APP,0
db '- *' ;------------------------------------------------------------------------------
db 13,10 icon_default:
;------------------------------------------------------------------------------ db 'AA-CALC -004-/SYS/CALC '
rep_text: db '- *'
if lang eq ru_RU db 13,10
db '‡<>€—Šˆ - ˆ‡ , <E2809A><E280BA><EFBFBD> #' ;------------------------------------------------------------------------------
;else if lang eq it_IT rep_text:
; db 'Icone - di , Selezionate' if lang eq ru_RU
else db '‡<>€—Šˆ - ˆ‡ , <E2809A><E280BA><EFBFBD> #'
db 'ICONS - OF , SELECTED' ;else if lang eq it_IT
end if ; db 'Icone - di , Selezionate'
else ; Default to en_US
rep_text_len: db 'ICONS - OF , SELECTED'
;------------------------------------------------------------------------------ end if
align 4
finfo_start: rep_text_len:
dd 7 ;------------------------------------------------------------------------------
dd 0 align 4
.params dd 0 finfo_start:
dd 0 dd 7
dd 0 dd 0
db 0 .params dd 0
dd finfo.path dd 0
;------------------------------------------------------------------------------ dd 0
align 4 db 0
finfo: dd finfo.path
dd 5 ;------------------------------------------------------------------------------
dd 0 align 4
dd 0 finfo:
.size dd 0 dd 5
.point dd procinfo dd 0
.path: dd 0
db ICON_STRIP,0 .size dd 0
rb 31-($-.path) .point dd procinfo
;------------------------------------------------------------------------------ .path:
align 4 db ICON_STRIP,0
positions dd 3,16,47 rb 31-($-.path)
str_lens db 8,30,30 ;------------------------------------------------------------------------------
align 4
current_icon dd icon_data positions dd 3,16,47
str_lens db 8,30,30
iconlst db ICONS_DAT,0
current_icon dd icon_data
;image dd image_area
;------------------------------------------------------------------------------ iconlst db ICONS_DAT,0
; not change this section!!!
; start section ;image dd image_area
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 ; not change this section!!!
image_file dd 0 ;+0 ; start section
raw_pointer dd 0 ;+4 ;------------------------------------------------------------------------------
return_code dd 0 ;+8 align 4
img_size dd 0 ;+12 image_file dd 0 ;+0
deflate_unpack dd 0 ;+16 ; not use for scaling raw_pointer dd 0 ;+4
raw_pointer_2 dd 0 ;+20 ; not use for scaling return_code dd 0 ;+8
;------------------------------------------------------------------------------ img_size dd 0 ;+12
; end section deflate_unpack dd 0 ;+16 ; not use for scaling
;------------------------------------------------------------------------------ raw_pointer_2 dd 0 ;+20 ; not use for scaling
system_dir_CnvPNG db '/sys/lib/cnv_png.obj',0 ;------------------------------------------------------------------------------
system_dir_UNPACK db '/sys/lib/archiver.obj',0 ; end section
;------------------------------------------------------------------------------
;plugins_directory db 'plugins/',0 system_dir_CnvPNG db '/sys/lib/cnv_png.obj',0
plugins_directory db 0 system_dir_UNPACK db '/sys/lib/archiver.obj',0
;------------------------------------------------------------------------------
l_libs_start: ;plugins_directory db 'plugins/',0
plugins_directory db 0
library01 l_libs system_dir_CnvPNG+9,library_path,system_dir_CnvPNG,\ ;------------------------------------------------------------------------------
cnv_png_import,plugins_directory l_libs_start:
library02 l_libs system_dir_UNPACK+9,library_path,system_dir_UNPACK,\ library01 l_libs system_dir_CnvPNG+9,library_path,system_dir_CnvPNG,\
UNPACK_import,plugins_directory cnv_png_import,plugins_directory
end_l_libs: library02 l_libs system_dir_UNPACK+9,library_path,system_dir_UNPACK,\
;--------------------------------------------------------------------- UNPACK_import,plugins_directory
align 4
cnv_png_import: end_l_libs:
.Start dd aCP_Start ;---------------------------------------------------------------------
.Version dd aCP_Version align 4
.Check dd aCP_Check cnv_png_import:
.Assoc dd aCP_Assoc .Start dd aCP_Start
dd 0 .Version dd aCP_Version
dd 0 .Check dd aCP_Check
aCP_Start db 'START',0 .Assoc dd aCP_Assoc
aCP_Version db 'version',0 dd 0
aCP_Check db 'Check_Header',0 dd 0
aCP_Assoc db 'Associations',0 aCP_Start db 'START',0
;--------------------------------------------------------------------- aCP_Version db 'version',0
align 4 aCP_Check db 'Check_Header',0
UNPACK_import: aCP_Assoc db 'Associations',0
;unpack_Version dd aUnpack_Version ;---------------------------------------------------------------------
;unpack_PluginLoad dd aUnpack_PluginLoad align 4
;unpack_OpenFilePlugin dd aUnpack_OpenFilePlugin UNPACK_import:
;unpack_ClosePlugin dd aUnpack_ClosePlugin ;unpack_Version dd aUnpack_Version
;unpack_ReadFolder dd aUnpack_ReadFolder ;unpack_PluginLoad dd aUnpack_PluginLoad
;unpack_SetFolder dd aUnpack_SetFolder ;unpack_OpenFilePlugin dd aUnpack_OpenFilePlugin
;unpack_GetFiles dd aUnpack_GetFiles ;unpack_ClosePlugin dd aUnpack_ClosePlugin
;unpack_GetOpenPluginInfo dd aUnpack_GetOpenPluginInfo ;unpack_ReadFolder dd aUnpack_ReadFolder
;unpack_Getattr dd aUnpack_Getattr ;unpack_SetFolder dd aUnpack_SetFolder
;unpack_Open dd aUnpack_Open ;unpack_GetFiles dd aUnpack_GetFiles
;unpack_Read dd aUnpack_Read ;unpack_GetOpenPluginInfo dd aUnpack_GetOpenPluginInfo
;unpack_Setpos dd aUnpack_Setpos ;unpack_Getattr dd aUnpack_Getattr
;unpack_Close dd aUnpack_Close ;unpack_Open dd aUnpack_Open
;unpack_DeflateUnpack dd aUnpack_DeflateUnpack ;unpack_Read dd aUnpack_Read
unpack_DeflateUnpack2 dd aUnpack_DeflateUnpack2 ;unpack_Setpos dd aUnpack_Setpos
dd 0 ;unpack_Close dd aUnpack_Close
dd 0 ;unpack_DeflateUnpack dd aUnpack_DeflateUnpack
unpack_DeflateUnpack2 dd aUnpack_DeflateUnpack2
;aUnpack_Version db 'version',0 dd 0
;aUnpack_PluginLoad db 'plugin_load',0 dd 0
;aUnpack_OpenFilePlugin db 'OpenFilePlugin',0
;aUnpack_ClosePlugin db 'ClosePlugin',0 ;aUnpack_Version db 'version',0
;aUnpack_ReadFolder db 'ReadFolder',0 ;aUnpack_PluginLoad db 'plugin_load',0
;aUnpack_SetFolder db 'SetFolder',0 ;aUnpack_OpenFilePlugin db 'OpenFilePlugin',0
;aUnpack_GetFiles db 'GetFiles',0 ;aUnpack_ClosePlugin db 'ClosePlugin',0
;aUnpack_GetOpenPluginInfo db 'GetOpenPluginInfo',0 ;aUnpack_ReadFolder db 'ReadFolder',0
;aUnpack_Getattr db 'getattr',0 ;aUnpack_SetFolder db 'SetFolder',0
;aUnpack_Open db 'open',0 ;aUnpack_GetFiles db 'GetFiles',0
;aUnpack_Read db 'read',0 ;aUnpack_GetOpenPluginInfo db 'GetOpenPluginInfo',0
;aUnpack_Setpos db 'setpos',0 ;aUnpack_Getattr db 'getattr',0
;aUnpack_Close db 'close',0 ;aUnpack_Open db 'open',0
;aUnpack_DeflateUnpack db 'deflate_unpack',0 ;aUnpack_Read db 'read',0
aUnpack_DeflateUnpack2 db 'deflate_unpack2',0 ;aUnpack_Setpos db 'setpos',0
;------------------------------------------------------------------------------ ;aUnpack_Close db 'close',0
;aUnpack_DeflateUnpack db 'deflate_unpack',0
aUnpack_DeflateUnpack2 db 'deflate_unpack2',0
;------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,198 +1,198 @@
; Keyboard indicators v0.2 ; Keyboard indicators v0.2
; by Albom and IgorA ; by Albom and IgorA
use32 use32
org 0 org 0
db 'MENUET01' db 'MENUET01'
dd 1 dd 1
dd _start dd _start
dd _end dd _end
dd _memory dd _memory
dd stacktop dd stacktop
dd 0 dd 0
dd sys_path dd sys_path
include '../../macros.inc' include '../../macros.inc'
include '../../proc32.inc' include '../../proc32.inc'
include '../../develop/libraries/box_lib/load_lib.mac' include '../../develop/libraries/box_lib/load_lib.mac'
include '../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../develop/libraries/box_lib/trunk/box_lib.mac'
;include 'mem.inc' ;include 'mem.inc'
;include 'dll.inc' ;include 'dll.inc'
include 'lang.inc' include 'lang.inc' ; Language support for locales: it_IT, en_US.
@use_library ;_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load @use_library ;_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
align 4 align 4
_start: _start:
load_libraries l_libs_start,l_libs_end load_libraries l_libs_start,l_libs_end
mcall 48,3,sc,sizeof.system_colors mcall 48,3,sc,sizeof.system_colors
mcall 40,0x27 mcall 40,0x27
init_checkboxes2 check_boxes,check_boxes_end init_checkboxes2 check_boxes,check_boxes_end
check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc
call _key_set call _key_set
align 4 align 4
red_win: red_win:
call draw_window call draw_window
align 4 align 4
still: still:
mcall 10 mcall 10
cmp al,1 ;èçì. ïîëîæåíèå îêíà cmp al,1 ;èçì. ïîëîæåíèå îêíà
jz red_win jz red_win
cmp al,2 cmp al,2
jz key jz key
cmp al,3 cmp al,3
jz button jz button
;stdcall [check_box_mouse], ch1 ;stdcall [check_box_mouse], ch1
;stdcall [check_box_mouse], ch2 ;stdcall [check_box_mouse], ch2
;stdcall [check_box_mouse], ch3 ;stdcall [check_box_mouse], ch3
jmp still jmp still
;óñòàíîâèòü îáùåñèñòåìíûå "ãîðÿ÷èå êëàâèøè" ;óñòàíîâèòü îáùåñèñòåìíûå "ãîðÿ÷èå êëàâèøè"
align 4 align 4
_key_set: _key_set:
mov eax, 66 mov eax, 66
mov ebx, 4 mov ebx, 4
mov edx, 0 mov edx, 0
mov cl, 69 mov cl, 69
int 0x40 int 0x40
mov eax, 66 mov eax, 66
mov ebx, 4 mov ebx, 4
mov edx, 0 mov edx, 0
mov cl, 58 mov cl, 58
int 0x40 int 0x40
mov eax, 66 mov eax, 66
mov ebx, 4 mov ebx, 4
mov edx, 0 mov edx, 0
mov cl, 70 mov cl, 70
int 0x40 int 0x40
ret ret
align 4 align 4
draw_window: draw_window:
pushad pushad
mcall 12,1 mcall 12,1
mov edx, [sc.work] mov edx, [sc.work]
or edx, 0x34000000 or edx, 0x34000000
mcall 0, (10 shl 16)+100, (10 shl 16)+75 mcall 0, (10 shl 16)+100, (10 shl 16)+75
stdcall [check_box_draw], ch1 stdcall [check_box_draw], ch1
stdcall [check_box_draw], ch2 stdcall [check_box_draw], ch2
stdcall [check_box_draw], ch3 stdcall [check_box_draw], ch3
mcall 12,2 mcall 12,2
popad popad
ret ret
align 4 align 4
key: key:
mcall 2 mcall 2
call _indicators_check call _indicators_check
jmp still jmp still
align 4 align 4
_indicators_check: _indicators_check:
pusha pusha
mov eax, 66 mov eax, 66
mov ebx, 3 mov ebx, 3
int 40h int 40h
test_ins: test_ins:
test eax, 0x80 test eax, 0x80
jz @f jz @f
bts dword[ch1.flags],1 bts dword[ch1.flags],1
jmp test_caps jmp test_caps
@@: @@:
btr dword[ch1.flags],1 btr dword[ch1.flags],1
test_caps: test_caps:
test eax, 0x40 test eax, 0x40
jz @f jz @f
bts dword[ch2.flags],1 bts dword[ch2.flags],1
jmp test_scroll jmp test_scroll
@@: @@:
btr dword[ch2.flags],1 btr dword[ch2.flags],1
test_scroll: test_scroll:
test eax, 0x100 test eax, 0x100
jz @f jz @f
bts dword[ch3.flags],1 bts dword[ch3.flags],1
jmp test_ok jmp test_ok
@@: @@:
btr dword[ch3.flags],1 btr dword[ch3.flags],1
test_ok: test_ok:
call draw_window call draw_window
popa popa
ret ret
align 4 align 4
button: button:
mcall 17 mcall 17
cmp ah,1 cmp ah,1
jne still jne still
.exit: .exit:
mcall -1 mcall -1
check_boxes: check_boxes:
ch1 check_box2 (5 shl 16)+15,(5 shl 16)+10,5, 0xffffff,0x8000,0xff,\ ch1 check_box2 (5 shl 16)+15,(5 shl 16)+10,5, 0xffffff,0x8000,0xff,\
txt_160,0+ch_flag_middle txt_160,0+ch_flag_middle
ch2 check_box2 (5 shl 16)+15,(17 shl 16)+10,5, 0xffffff,0x8000,0xff,\ ch2 check_box2 (5 shl 16)+15,(17 shl 16)+10,5, 0xffffff,0x8000,0xff,\
txt_159,0+ch_flag_middle txt_159,0+ch_flag_middle
ch3 check_box2 (5 shl 16)+15,(29 shl 16)+10,5, 0xffffff,0x8000,0xff,\ ch3 check_box2 (5 shl 16)+15,(29 shl 16)+10,5, 0xffffff,0x8000,0xff,\
txt_158,0+ch_flag_middle txt_158,0+ch_flag_middle
check_boxes_end: check_boxes_end:
if lang eq it_IT if lang eq it_IT
txt_160 db 'Bloc Num',0 txt_160 db 'Bloc Num',0
txt_159 db 'Bloc Maiusc',0 txt_159 db 'Bloc Maiusc',0
txt_158 db 'Bloc Scorr',0 txt_158 db 'Bloc Scorr',0
else else ; Default to en_US
txt_160 db 'Num',0 txt_160 db 'Num',0
txt_159 db 'Caps',0 txt_159 db 'Caps',0
txt_158 db 'Scroll',0 txt_158 db 'Scroll',0
end if end if
head_f_i: head_f_i:
head_f_l db 'Ñèñòåìíàÿ îøèáêà',0 head_f_l db 'Ñèñòåìíàÿ îøèáêà',0
system_dir_0 db '/sys/lib/' system_dir_0 db '/sys/lib/'
lib_name_0 db 'box_lib.obj',0 lib_name_0 db 'box_lib.obj',0
err_msg_found_lib_0 db 'Íå íàéäåíà áèáëèîòåêà box_lib.obj',0 err_msg_found_lib_0 db 'Íå íàéäåíà áèáëèîòåêà box_lib.obj',0
err_msg_import_0 db 'Îøèáêà ïðè èìïîðòå áèáëèîòåêè box_lib',0 err_msg_import_0 db 'Îøèáêà ïðè èìïîðòå áèáëèîòåêè box_lib',0
l_libs_start: l_libs_start:
lib_0 l_libs lib_name_0, sys_path, library_path, system_dir_0,\ lib_0 l_libs lib_name_0, sys_path, library_path, system_dir_0,\
err_msg_found_lib_0,head_f_l,import_box_lib,err_msg_import_0,head_f_i err_msg_found_lib_0,head_f_l,import_box_lib,err_msg_import_0,head_f_i
l_libs_end: l_libs_end:
align 4 align 4
import_box_lib: import_box_lib:
;init dd sz_init ;init dd sz_init
init_checkbox dd sz_init_checkbox init_checkbox dd sz_init_checkbox
check_box_draw dd sz_check_box_draw check_box_draw dd sz_check_box_draw
check_box_mouse dd sz_check_box_mouse check_box_mouse dd sz_check_box_mouse
dd 0,0 dd 0,0
;sz_init db 'lib_init',0 ;sz_init db 'lib_init',0
sz_init_checkbox db 'init_checkbox2',0 sz_init_checkbox db 'init_checkbox2',0
sz_check_box_draw db 'check_box_draw2',0 sz_check_box_draw db 'check_box_draw2',0
sz_check_box_mouse db 'check_box_mouse2',0 sz_check_box_mouse db 'check_box_mouse2',0
;mouse_dd dd 0x0 ;mouse_dd dd 0x0
sc system_colors sc system_colors
_end: _end:
align 32 align 32
rb 2048 rb 2048
stacktop: stacktop:
sys_path rb 1024 sys_path rb 1024
library_path rb 1024 library_path rb 1024
_memory: _memory:

View File

@ -1,468 +1,470 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Copyright (C) Vasiliy Kosenko (vkos), 2009 ;; ;; Copyright (C) Vasiliy Kosenko (vkos), 2009 ;;
;; Launch is free software: you can redistribute it and/or modify it under the terms of the GNU ;; ;; Launch is free software: you can redistribute it and/or modify it under the terms of the GNU ;;
;; General Public License as published by the Free Software Foundation, either version 3 ;; ;; General Public License as published by the Free Software Foundation, either version 3 ;;
;; of the License, or (at your option) any later version. ;; ;; of the License, or (at your option) any later version. ;;
;; ;; ;; ;;
;; Launch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without ;; ;; Launch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without ;;
;; even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; ;; even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;
;; General Public License for more details. ;; ;; General Public License for more details. ;;
;; ;; ;; ;;
;; You should have received a copy of the GNU General Public License along with Launch. ;; ;; You should have received a copy of the GNU General Public License along with Launch. ;;
;; If not, see <http://www.gnu.org/licenses/>. ;; ;; If not, see <http://www.gnu.org/licenses/>. ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Launch finds program in search dirictories and runs it. ;; ;; Launch finds program in search dirictories and runs it. ;;
;; For more details see readme.txt ;; ;; For more details see readme.txt ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
format binary ; Language support for locales: it_IT, en_US.
APP_NAME fix 'Launch' format binary
APP_VERSION fix '0.1.80.1'
APP_NAME fix 'Launch'
use32 APP_VERSION fix '0.1.80.1'
org 0x0
use32
db 'MENUET01' org 0x0
dd 0x01
dd START db 'MENUET01'
dd APP_END dd 0x01
dd MEM_END dd START
dd APP_STACK dd APP_END
dd args dd MEM_END
dd path dd APP_STACK
dd args
define DEBUG_NO 0 dd path
define DEBUG_CONSOLE 1
define DEBUG_BOARD 2 ;; Not used now define DEBUG_NO 0
define DEBUG_CONSOLE 1
define PATH_MAX_LEN 1024 define DEBUG_BOARD 2 ;; Not used now
define DEBUG_MAX_LEN 8
define DEBUG_DEFAULT 0 define PATH_MAX_LEN 1024
define BUFF_SIZE 1024 define DEBUG_MAX_LEN 8
define DEBUG_DEFAULT 0
include 'proc32.inc' define BUFF_SIZE 1024
include 'macros.inc'
include 'libio.inc' include 'proc32.inc'
include 'dll.inc' include 'macros.inc'
include 'libio.inc'
purge mov include 'dll.inc'
include 'thread.inc' purge mov
include 'ipc.inc'
include 'kobra.inc' include 'thread.inc'
include 'ipc.inc'
;;-------------------------------------------------------------------------------------------------- include 'kobra.inc'
;; Basic initialization
START: ;;--------------------------------------------------------------------------------------------------
;; Initialize process heap ;; Basic initialization
mcall 68,11 START:
test eax, eax ;; Initialize process heap
jz exit mcall 68,11
test eax, eax
;; Import modules jz exit
stdcall dll.Load,importTable
test eax, eax ;; Import modules
jnz exit stdcall dll.Load,importTable
test eax, eax
;;-------------------------------------------------------------------------------------------------- jnz exit
;; Reading config
read_ini_path: ;; Read search path ;;--------------------------------------------------------------------------------------------------
;; First read config in /sys/etc ;; Reading config
invoke ini.get_str, etc_cfg, cfg_main, cfg_path, search_path, PATH_MAX_LEN, empty_str read_ini_path: ;; Read search path
;; First read config in /sys/etc
;; Next, read config from current directory invoke ini.get_str, etc_cfg, cfg_main, cfg_path, search_path, PATH_MAX_LEN, empty_str
;; Find end of path string
.find_path_eol: ;; Next, read config from current directory
mov edi, path ;; Find end of path string
mov ecx, PATH_MAX_LEN .find_path_eol:
xor al, al mov edi, path
cld mov ecx, PATH_MAX_LEN
repne scasb xor al, al
cld
;; Append ext to run path (NOTE: this work only when config file has name <launch-file-name>.cfg and ext size is dword) repne scasb
mov eax, dword [cfg_ext]
dec edi ;; Append ext to run path (NOTE: this work only when config file has name <launch-file-name>.cfg and ext size is dword)
mov dword [edi], eax mov eax, dword [cfg_ext]
mov byte [edi+5], 0 dec edi
mov dword [edi], eax
;; Currently there is no checking for repeating pathes, so we should only concatenate two strings mov byte [edi+5], 0
;; So we need to find end of current search_path string
.find_search_eol: ;; Currently there is no checking for repeating pathes, so we should only concatenate two strings
mov edi, search_path ;; So we need to find end of current search_path string
mov ecx, PATH_MAX_LEN .find_search_eol:
xor al, al mov edi, search_path
;cld mov ecx, PATH_MAX_LEN
repne scasb xor al, al
dec edi ;cld
repne scasb
;; Now we need to correct buffer length dec edi
mov eax, path+PATH_MAX_LEN
sub eax, edi ;; Now we need to correct buffer length
;; Read ini mov eax, path+PATH_MAX_LEN
invoke ini.get_str, path, cfg_main, cfg_path, edi, PATH_MAX_LEN, empty_str sub eax, edi
;; Read ini
read_ini_debug: ;; Read debug options invoke ini.get_str, path, cfg_main, cfg_path, edi, PATH_MAX_LEN, empty_str
;; Read debug options from config files
invoke ini.get_option_str, etc_cfg, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, DEBUG_DEFAULT read_ini_debug: ;; Read debug options
invoke ini.get_option_str, path, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, eax ;; Read debug options from config files
mov [debug_option], eax invoke ini.get_option_str, etc_cfg, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, DEBUG_DEFAULT
invoke ini.get_option_str, path, cfg_debug, cfg_debug, debug_strings, DEBUG_MAX_LEN, eax
test eax, eax ;; No console mov [debug_option], eax
je .ok
test eax, eax ;; No console
jmp .con_init je .ok
.console_err: jmp .con_init
mov byte [debug_option], 0
jmp .ok .console_err:
mov byte [debug_option], 0
.con_init: jmp .ok
stdcall dll.Load, consoleImport
test eax, eax .con_init:
jnz .console_err stdcall dll.Load, consoleImport
invoke con.init, -1, -1, -1, -1, window_title test eax, eax
jnz .console_err
.read_level: invoke con.init, -1, -1, -1, -1, window_title
invoke ini.get_int, etc_cfg, cfg_debug, cfg_level, 0
invoke ini.get_int, path, cfg_debug, cfg_level, eax .read_level:
mov byte [debug_level], al invoke ini.get_int, etc_cfg, cfg_debug, cfg_level, 0
.ok: invoke ini.get_int, path, cfg_debug, cfg_level, eax
mov byte [debug_level], al
read_ini_kobra: .ok:
invoke ini.get_bool, etc_cfg, cfg_kobra, cfg_use, 0
invoke ini.get_bool, path, cfg_kobra, cfg_use, eax read_ini_kobra:
invoke ini.get_bool, etc_cfg, cfg_kobra, cfg_use, 0
mov byte [kobra_use], al invoke ini.get_bool, path, cfg_kobra, cfg_use, eax
;;-------------------------------------------------------------------------------------------------- mov byte [kobra_use], al
;; Parse command line options
parse_args: ;;--------------------------------------------------------------------------------------------------
;; Now parse command line arguments ;; Parse command line options
;; TODO: use optparse library parse_args:
;; Currently the only argument to parse is program name with its' arguments ;; Now parse command line arguments
;; TODO: use optparse library
.skip_spaces: ;; Currently the only argument to parse is program name with its' arguments
mov ecx, -1
mov edi, args .skip_spaces:
mov al, ' ' mov ecx, -1
xor bl, bl mov edi, args
;cld mov al, ' '
repe scasb xor bl, bl
;cld
push edi repe scasb
mov ecx, -1 push edi
@@:
scasb mov ecx, -1
je @f @@:
xchg al, bl scasb
dec edi je @f
scasb xchg al, bl
jne @b dec edi
@@: scasb
mov dword [prog_args], edi jne @b
@@:
pop edi mov dword [prog_args], edi
dec edi
;; Now edi = program name pop edi
dec edi
;;-------------------------------------------------------------------------------------------------- ;; Now edi = program name
;; Finding file
search_file: ;;--------------------------------------------------------------------------------------------------
push edi ;; Finding file
mov esi, search_path search_file:
xchg esi, [esp] push edi
.loop: mov esi, search_path
or dl, dl xchg esi, [esp]
je .prn_dbg .loop:
xor dl, dl or dl, dl
jmp .prn_end je .prn_dbg
.prn_dbg: xor dl, dl
push eax jmp .prn_end
mov al, byte [debug_option] .prn_dbg:
; dec al push eax
test al, al mov al, byte [debug_option]
je .prn_stp ; dec al
mov al, byte [debug_level] test al, al
or al, al je .prn_stp
je .prn_stp mov al, byte [debug_level]
dec al or al, al
or al, al je .prn_stp
je .prn_1 dec al
.prn_1: or al, al
cinvoke con.printf, message_dbg_not_found, buff je .prn_1
.prn_1:
.prn_stp: cinvoke con.printf, message_dbg_not_found, buff
pop eax
.prn_end: .prn_stp:
xor eax, eax ;; When we check is proramme launched we are checking for eax pop eax
xchg esi, [esp] .prn_end:
mov edi, buff xor eax, eax ;; When we check is proramme launched we are checking for eax
.copy_path: xchg esi, [esp]
lodsb mov edi, buff
cmp al, ';' .copy_path:
je .copy_file lodsb
or al, al cmp al, ';'
je exit je .copy_file
stosb or al, al
jmp .copy_path je exit
stosb
.copy_file: jmp .copy_path
xchg esi, [esp]
push esi .copy_file:
.cp_file_loop: xchg esi, [esp]
lodsb push esi
or al, al .cp_file_loop:
je .copy_end lodsb
cmp al, ' ' or al, al
je .copy_end je .copy_end
stosb cmp al, ' '
jmp .cp_file_loop je .copy_end
stosb
.copy_end: jmp .cp_file_loop
pop esi
xor al, al .copy_end:
stosb pop esi
xor al, al
;; Try to launch stosb
mov dword [LaunchStruct.Function], 7 ;; Try to launch
push dword [prog_args]
pop dword [LaunchStruct.Arguments] mov dword [LaunchStruct.Function], 7
mov dword [LaunchStruct.Flags], 0 push dword [prog_args]
mov dword [LaunchStruct.Zero], 0 pop dword [LaunchStruct.Arguments]
mov dword [LaunchStruct.FileNameP], buff mov dword [LaunchStruct.Flags], 0
mcall 70, LaunchStruct mov dword [LaunchStruct.Zero], 0
cmp eax, 0 mov dword [LaunchStruct.FileNameP], buff
jl .loop mcall 70, LaunchStruct
cmp eax, 0
;;-------------------------------------------------------------------------------------------------- jl .loop
;; Exit
exit: ;;--------------------------------------------------------------------------------------------------
mov dword [tid], eax ;; Exit
;; If console is present we should write some info exit:
mov al, byte [debug_option] mov dword [tid], eax
cmp al, DEBUG_CONSOLE ;; If console is present we should write some info
jne .kobra mov al, byte [debug_option]
cmp al, DEBUG_CONSOLE
.write_console: jne .kobra
mov eax, dword [tid]
test eax, eax .write_console:
jz .write_error mov eax, dword [tid]
.write_launched: test eax, eax
cinvoke con.printf, message_ok, buff, eax, eax jz .write_error
jmp .wr_end .write_launched:
.write_error: cinvoke con.printf, message_ok, buff, eax, eax
pop edi jmp .wr_end
cinvoke con.printf, message_error, edi .write_error:
.wr_end: pop edi
invoke con.exit, 0 cinvoke con.printf, message_error, edi
.wr_end:
.kobra: invoke con.exit, 0
mov al, byte [kobra_use]
test al, al .kobra:
je .close mov al, byte [kobra_use]
test al, al
.register: je .close
mov dword [IPC_area], buff
call IPC_init .register:
; jnz .close mov dword [IPC_area], buff
call IPC_init
mov dword [thread_find_buff], another_buff ; jnz .close
call kobra_register mov dword [thread_find_buff], another_buff
test eax, eax call kobra_register
jnz .close
test eax, eax
;; Prepare message jnz .close
mov dword [kobra_message], KOBRA_MESSAGE_LAUNCH_STATE
;; Prepare message
mov eax, dword [tid] mov dword [kobra_message], KOBRA_MESSAGE_LAUNCH_STATE
mov dword [kobra_message+4], eax
mov eax, dword [tid]
.kobra_send: mov dword [kobra_message+4], eax
stdcall kobra_send_message, kobra_group_launch_reactive, kobra_message, 8
.kobra_send:
.close: stdcall kobra_send_message, kobra_group_launch_reactive, kobra_message, 8
mcall -1
.close:
;; End of code mcall -1
;;--------------------------------------------------------------------------------------------------
;; End of code
;;-------------------------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------------------
;; Imports
align 16 ;;--------------------------------------------------------------------------------------------------
importTable: ;; Imports
align 16
library libini, 'libconfig.obj' ;, \ importTable:
; libio, 'libio.obj', \
library libini, 'libconfig.obj' ;, \
import libini, \ ; libio, 'libio.obj', \
ini.get_str ,'ini_get_str', \
\; ini.set_str ,'ini_set_str', \ import libini, \
ini.get_int ,'ini_get_int', \ ini.get_str ,'ini_get_str', \
\; ini.set_int ,'ini_set_int', \ \; ini.set_str ,'ini_set_str', \
\; ini.get_color ,'ini_get_color', \ ini.get_int ,'ini_get_int', \
\; ini.set_color ,'ini_set_color', \ \; ini.set_int ,'ini_set_int', \
ini.get_option_str ,'ini_get_option_str', \ \; ini.get_color ,'ini_get_color', \
ini.get_bool ,'ini_get_bool';,\ \; ini.set_color ,'ini_set_color', \
ini.get_option_str ,'ini_get_option_str', \
;import libio, \ ini.get_bool ,'ini_get_bool';,\
; file_find_first,'file_find_first', \
; file_find_next ,'file_find_next', \ ;import libio, \
; file_find_close,'file_find_close', \ ; file_find_first,'file_find_first', \
; file_size ,'file_size', \ ; file_find_next ,'file_find_next', \
; file_open ,'file_open', \ ; file_find_close,'file_find_close', \
; file_read ,'file_read', \ ; file_size ,'file_size', \
; file_write ,'file_write', \ ; file_open ,'file_open', \
; file_seek ,'file_seek', \ ; file_read ,'file_read', \
; file_tell ,'file_tell', \ ; file_write ,'file_write', \
; file_eof? ,'file_eof?', \ ; file_seek ,'file_seek', \
; file_truncate ,'file_truncate', \ ; file_tell ,'file_tell', \
; file_close ,'file_close' ; file_eof? ,'file_eof?', \
; file_truncate ,'file_truncate', \
consoleImport: ; file_close ,'file_close'
library \
conlib, 'console.obj' consoleImport:
library \
import conlib,\ conlib, 'console.obj'
con.init, 'con_init',\
con.exit, 'con_exit',\ import conlib,\
con.printf, 'con_printf' ;,\ con.init, 'con_init',\
; con.write_asciiz, 'con_write_asciiz' con.exit, 'con_exit',\
con.printf, 'con_printf' ;,\
;;-------------------------------------------------------------------------------------------------- ; con.write_asciiz, 'con_write_asciiz'
;; Data
align 16 ;;--------------------------------------------------------------------------------------------------
APP_DATA: ;; Data
align 16
;; Window title APP_DATA:
window_title:
db APP_NAME, ' ', APP_VERSION, 0 ;; Window title
window_title:
;; Messages db APP_NAME, ' ', APP_VERSION, 0
if lang eq it_IT
message_dbg_not_found: ;; Messages
db '%s non trovato', 10, 0 if lang eq it_IT
message_dbg_not_found:
message_error: db '%s non trovato', 10, 0
db 'File (%s) non trovato!', 0
message_error:
message_ok: db 'File (%s) non trovato!', 0
db '%s caricato correttamente. PID: %d (0x%X)', 0
else message_ok:
message_dbg_not_found: db '%s caricato correttamente. PID: %d (0x%X)', 0
db '%s not found', 10, 0 else ; Default to en_US
message_dbg_not_found:
message_error: db '%s not found', 10, 0
db 'File (%s) not found!', 0
message_error:
message_ok: db 'File (%s) not found!', 0
db '%s loaded succesfully. PID: %d (0x%X)', 0
end if message_ok:
;; Configuration path db '%s loaded successfully. PID: %d (0x%X)', 0
etc_cfg: end if
db '/sys/etc/' ;; Configuration path
cfg_name: etc_cfg:
db 'launch' db '/sys/etc/'
cfg_ext: cfg_name:
db '.cfg', 0 db 'launch'
cfg_ext:
;; Strings in config file db '.cfg', 0
cfg_main:
db 'main', 0 ;; Strings in config file
cfg_path: cfg_main:
db 'path', 0 db 'main', 0
cfg_debug: cfg_path:
db 'debug', 0 db 'path', 0
cfg_level: cfg_debug:
db 'level', 0 db 'debug', 0
cfg_kobra: cfg_level:
db 'kobra', 0 db 'level', 0
cfg_use: cfg_kobra:
db 'use', 0 db 'kobra', 0
cfg_use:
;; List of debug modes for parsing debug option db 'use', 0
debug_strings:
dd debug_no ;; List of debug modes for parsing debug option
dd debug_console debug_strings:
dd 0 dd debug_no
dd debug_console
debug_no: dd 0
db 'no', 0
debug_console: debug_no:
db 'console', 0 db 'no', 0
debug_console:
;; Empty string db 'console', 0
empty_str:
db 0 ;; Empty string
empty_str:
kobra_group_launch_reactive: db 0
db 'launch_reactive', 0
kobra_group_launch_reactive:
;;-------------------------------------------------------------------------------------------------- db 'launch_reactive', 0
;; Configuration options
debug_level: ;;--------------------------------------------------------------------------------------------------
db 0 ;; Configuration options
debug_level:
; debug_kobra: db 0
; db 0
; debug_kobra:
;; debug option (bool) ; db 0
debug_option:
db 0 ;; debug option (bool)
debug_option:
kobra_use: db 0
db 0
kobra_use:
;;-------------------------------------------------------------------------------------------------- db 0
tid:
dd 0 ;;--------------------------------------------------------------------------------------------------
tid:
struct FileInfoRun dd 0
Function dd 7
Flags dd ? struct FileInfoRun
Arguments dd 0 Function dd 7
Reserved0 dd ? Flags dd ?
Reserved1 dd ? Arguments dd 0
union Reserved0 dd ?
FileName rb 1024 Reserved1 dd ?
struct union
Zero db 0 FileName rb 1024
FileNameP dd ? struct
ends Zero db 0
ends FileNameP dd ?
ends ends
ends
LaunchStruct FileInfoRun ends
args: db 0 LaunchStruct FileInfoRun
APP_END:
rb 255 args: db 0
APP_END:
prog_args: rb 255
rd 1
path: prog_args:
rb 1024 rd 1
path:
;; Search path will be here rb 1024
search_path:
rb PATH_MAX_LEN ;; Search path will be here
search_path:
;; Buffer rb PATH_MAX_LEN
buff:
rb BUFF_SIZE ;; Buffer
buff:
another_buff: rb BUFF_SIZE
rb 0x1000
another_buff:
kobra_message: rb 0x1000
rb 0x100
kobra_message:
rb 0x1000 ;; 4 Kb stack rb 0x100
APP_STACK:
MEM_END: rb 0x1000 ;; 4 Kb stack
APP_STACK:
MEM_END:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include 'txtbut.inc' include 'txtbut.inc'
include '../../../macros.inc' include '../../../macros.inc'
include 'run.mac' include 'run.mac'
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), it_IT, en_US.
use32 use32
org 0 org 0
db 'MENUET01' db 'MENUET01'
@ -263,7 +263,7 @@ else if lang eq it_IT
run_ok db 'Il programma eseguito correttamente',0 run_ok db 'Il programma eseguito correttamente',0
grab_text db 'RUN',0 grab_text db 'RUN',0
run_but_text db 'Esegui',0 run_but_text db 'Esegui',0
else else ; Default to en_US
hello db 'Enter full path to file and press <Enter>',0 hello db 'Enter full path to file and press <Enter>',0
bad_file_sys db 'Unknown file system',0 ; 3 bad_file_sys db 'Unknown file system',0 ; 3
file_not_find db 'File not found',0 ; 5 file_not_find db 'File not found',0 ; 5

View File

@ -1,387 +1,385 @@
;----------------------------------------------------------------------------- ; Language support for locales: ru_RU (CP866), et_EE, en_US.
text:
if lang eq ru_RU ;-----------------------------------------------------------------------------
db ' Unused1 ' text:
db ' Unused2 ' db ' Unused1 '
db ' 3d ⥬­ ï áâ®à®­  ' db ' Unused2 '
db ' 3d ᢥ⫠ï áâ®à®­  ' if lang eq ru_RU
db ' ‡ £®«®¢®ª ®ª­  ' db ' 3D ⥬­ ï áâ®à®­  '
db ' ”®­ ®ª­  ' db ' 3D ᢥ⫠ï áâ®à®­  '
db ' Š­®¯ª  ' db ' ‡ £®«®¢®ª ®ª­  '
db ' ’¥ªáâ ­  ª­®¯ª¥ ' db ' ”®­ ®ª­  '
db ' ’¥ªáâ ¢ ®ª­¥ ' db ' Š­®¯ª  '
db ' ƒà ä¨ª  ¢ ®ª­¥ ' db ' ’¥ªáâ ­  ª­®¯ª¥ '
db 'x' db ' ’¥ªáâ ¢ ®ª­¥ '
else if lang eq et_EE db ' ƒà ä¨ª  ¢ ®ª­¥ '
db ' Unused1 ' db 'x'
db ' Unused2 ' else if lang eq et_EE
db ' 3d dark ' db ' 3D dark '
db ' 3d light ' db ' 3D light '
db ' Akna pealkiri ' db ' Akna pealkiri '
db ' Akna tööpiirkond ' db ' Akna tööpiirkond '
db ' Akna tööpiirkonna nupp ' db ' Akna tööpiirkonna nupp '
db ' Akna tööpiirkonna nuppu tekst ' db ' Akna tööpiirkonna nuppu tekst '
db ' Akna tööpiirkonna tekst ' db ' Akna tööpiirkonna tekst '
db ' Akna tööpiirkonna graafika ' db ' Akna tööpiirkonna graafika '
db 'x' db 'x'
else else ; Default to en_US
db ' Unused1 ' db ' 3D dark '
db ' Unused2 ' db ' 3D light '
db ' 3d dark ' db ' Window title '
db ' 3d light ' db ' Window background '
db ' Window title ' db ' Button '
db ' Window background ' db ' Button text '
db ' Button ' db ' Window text '
db ' Button text ' db ' Window graph '
db ' Window text ' db 'x'
db ' Window graph ' end if
db 'x' ;-----------------------------------------------------------------------------
end if if lang eq ru_RU
;----------------------------------------------------------------------------- sz t1,'‡€ƒ<E282AC>“‡ˆœ Ž•<C5BD><EFBFBD>ˆœ <20><>ˆŒ…<C592>ˆœ'
if lang eq ru_RU else if lang eq et_EE
sz t1,'‡€ƒ<E282AC>“‡ˆœ Ž•<C5BD><EFBFBD>ˆœ <20><>ˆŒ…<C592>ˆœ' sz t1,' LAADI SALVESTA KINNITA'
else if lang eq et_EE else ; Default to en_US
sz t1,' LAADI SALVESTA KINNITA' sz t1,' LOAD SAVE APPLY'
else end if
sz t1,' LOAD SAVE APPLY' ;-----------------------------------------------------------------------------
end if if lang eq ru_RU
;----------------------------------------------------------------------------- sz t2,'‡€ƒ<E282AC>“‡ˆœ 3D <20>ŽŠˆ<20><>ˆŒ…<C592>ˆœ'
if lang eq ru_RU else if lang eq et_EE
sz t2,'‡€ƒ<E282AC>“‡ˆœ 3D <20>ŽŠˆ<20><>ˆŒ…<C592>ˆœ' sz t2,' LAADI 3D LAME KINNITA'
else if lang eq et_EE else ; Default to en_US
sz t2,' LAADI 3D LAME KINNITA' sz t2,' LOAD 3D FLAT APPLY'
else end if
sz t2,' LOAD 3D FLAT APPLY' ;-----------------------------------------------------------------------------
end if select_dtp_text:
;----------------------------------------------------------------------------- if lang eq ru_RU
select_dtp_text: db ' ‚ë¡®à 梥⮢®£® ®ä®à¬«¥­¨ï: ',0
if lang eq ru_RU else if lang eq et_EE
db ' ‚ë¡®à 梥⮢®£® ®ä®à¬«¥­¨ï: ',0 db ' Valik varviskeeme: ',0
else if lang eq et_EE else ; Default to en_US
db ' Valik varviskeeme: ',0 db ' Choice of color schemes: ',0
else end if
db ' Choice of color schemes: ',0 ;-----------------------------------------------------------------------------
end if select_skin_text:
;----------------------------------------------------------------------------- if lang eq ru_RU
select_skin_text: db ' ‚ë¡®à ᪨­ : ',0
if lang eq ru_RU else if lang eq et_EE
db ' ‚ë¡®à ᪨­ : ',0 db ' Valik nahad: ',0
else if lang eq et_EE else ; Default to en_US
db ' Valik nahad: ',0 db ' Choice of skins: ',0
else end if
db ' Choice of skins: ',0 ;-----------------------------------------------------------------------------
end if if lang eq ru_RU
;----------------------------------------------------------------------------- sz caption_text,'‡ £®«®¢®ª'
if lang eq ru_RU else if lang eq et_EE
sz caption_text,'‡ £®«®¢®ª' sz caption_text,'Pealkiri'
else if lang eq et_EE else ; Default to en_US
sz caption_text,'Pealkiri' sz caption_text,'Caption'
else end if
sz caption_text,'Caption' ;-----------------------------------------------------------------------------
end if sz close_text,'x'
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
sz close_text,'x' if lang eq ru_RU
;----------------------------------------------------------------------------- sz window_text,'’¥ªáâ ¢ ®ª­¥'
if lang eq ru_RU else if lang eq et_EE
sz window_text,'’¥ªáâ ¢ ®ª­¥' sz window_text,'Akna tekst'
else if lang eq et_EE else ; Default to en_US
sz window_text,'Akna tekst' sz window_text,'Window text'
else end if
sz window_text,'Window text' ;-----------------------------------------------------------------------------
end if if lang eq ru_RU
;----------------------------------------------------------------------------- sz button_text,'’¥ªáâ ­  ª­®¯ª¥'
if lang eq ru_RU else if lang eq et_EE
sz button_text,'’¥ªáâ ­  ª­®¯ª¥' sz button_text,'Nupu tekst'
else if lang eq et_EE else ; Default to en_US
sz button_text,'Nupu tekst' sz button_text,'Button text'
else end if
sz button_text,'Button text' ;-----------------------------------------------------------------------------
end if if lang eq ru_RU
;----------------------------------------------------------------------------- title db '<27> áâனª  ®ª®­',0
if lang eq ru_RU else if lang eq et_EE
title db '<27> áâனª  ®ª®­',0 title db 'Akna seaded',0
else if lang eq et_EE else if lang eq it_IT
title db 'Akna seaded',0 title db 'Impostazioni',0
else if lang eq it_IT else ; Default to en_US
title db 'Impostazioni',0 title db 'Windows settings',0
else end if
title db 'Windows settings',0 ;---------------------------------------------------------------------
end if LibIniImportTable:
;--------------------------------------------------------------------- library \
LibIniImportTable: libini, 'libini.obj'
library \
libini, 'libini.obj' import libini, \
ini_set_int ,'ini_set_int'
import libini, \
ini_set_int ,'ini_set_int' aIni db '/sys/settings/system.ini',0
aSectionSkn db 'style',0
aIni db '/sys/settings/system.ini',0 aButtonStyle db 'buttons_gradient',0
aSectionSkn db 'style',0 ;---------------------------------------------------------------------
aButtonStyle db 'buttons_gradient',0 l_libs_start:
;---------------------------------------------------------------------
l_libs_start: library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, \
Box_lib_import
library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, \
Box_lib_import library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, \
ProcLib_import
library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, \
ProcLib_import end_l_libs:
;---------------------------------------------------------------------
end_l_libs: system_dir_Boxlib db '/sys/lib/box_lib.obj',0
;--------------------------------------------------------------------- system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 ;---------------------------------------------------------------------
align 4
;---------------------------------------------------------------------
align 4 ProcLib_import:
OpenDialog_Init dd aOpenDialog_Init
ProcLib_import: OpenDialog_Start dd aOpenDialog_Start
OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start ColorDialog_Init dd aColorDialog_Init
ColorDialog_Start dd aColorDialog_Start
ColorDialog_Init dd aColorDialog_Init ;OpenDialog__Version dd aOpenDialog_Version
ColorDialog_Start dd aColorDialog_Start dd 0
;OpenDialog__Version dd aOpenDialog_Version dd 0
dd 0
dd 0 aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0 aColorDialog_Init db 'ColorDialog_init',0
aColorDialog_Start db 'ColorDialog_start',0
aColorDialog_Init db 'ColorDialog_init',0 ;aOpenDialog_Version db 'Version_OpenDialog',0
aColorDialog_Start db 'ColorDialog_start',0 ;---------------------------------------------------------------------
;aOpenDialog_Version db 'Version_OpenDialog',0 align 4
;--------------------------------------------------------------------- Box_lib_import:
align 4 ;init_lib dd a_init
Box_lib_import: ;version_lib dd a_version
;init_lib dd a_init
;version_lib dd a_version
;edit_box_draw dd aEdit_box_draw
;edit_box_key dd aEdit_box_key
;edit_box_draw dd aEdit_box_draw ;edit_box_mouse dd aEdit_box_mouse
;edit_box_key dd aEdit_box_key ;version_ed dd aVersion_ed
;edit_box_mouse dd aEdit_box_mouse
;version_ed dd aVersion_ed ;check_box_draw dd aCheck_box_draw
;check_box_mouse dd aCheck_box_mouse
;check_box_draw dd aCheck_box_draw ;version_ch dd aVersion_ch
;check_box_mouse dd aCheck_box_mouse
;version_ch dd aVersion_ch ;option_box_draw dd aOption_box_draw
;option_box_mouse dd aOption_box_mouse
;option_box_draw dd aOption_box_draw ;version_op dd aVersion_op
;option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op ;scrollbar_ver_draw dd aScrollbar_ver_draw
;scrollbar_ver_mouse dd aScrollbar_ver_mouse
;scrollbar_ver_draw dd aScrollbar_ver_draw ;scrollbar_hor_draw dd aScrollbar_hor_draw
;scrollbar_ver_mouse dd aScrollbar_ver_mouse ;scrollbar_hor_mouse dd aScrollbar_hor_mouse
;scrollbar_hor_draw dd aScrollbar_hor_draw ;version_scrollbar dd aVersion_scrollbar
;scrollbar_hor_mouse dd aScrollbar_hor_mouse
;version_scrollbar dd aVersion_scrollbar ;dinamic_button_draw dd aDbutton_draw
;dinamic_button_mouse dd aDbutton_mouse
;dinamic_button_draw dd aDbutton_draw ;version_dbutton dd aVersion_dbutton
;dinamic_button_mouse dd aDbutton_mouse
;version_dbutton dd aVersion_dbutton ;menu_bar_draw dd aMenu_bar_draw
;menu_bar_mouse dd aMenu_bar_mouse
;menu_bar_draw dd aMenu_bar_draw ;menu_bar_activate dd aMenu_bar_activate
;menu_bar_mouse dd aMenu_bar_mouse ;version_menu_bar dd aVersion_menu_bar
;menu_bar_activate dd aMenu_bar_activate
;version_menu_bar dd aVersion_menu_bar ;FileBrowser_draw dd aFileBrowser_draw
;FileBrowser_mouse dd aFileBrowser_mouse
;FileBrowser_draw dd aFileBrowser_draw ;FileBrowser_key dd aFileBrowser_key
;FileBrowser_mouse dd aFileBrowser_mouse ;Version_FileBrowser dd aVersion_FileBrowser
;FileBrowser_key dd aFileBrowser_key
;Version_FileBrowser dd aVersion_FileBrowser PathShow_prepare dd sz_PathShow_prepare
PathShow_draw dd sz_PathShow_draw
PathShow_prepare dd sz_PathShow_prepare ;Version_path_show dd szVersion_path_show
PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show Frame_draw dd sz_Frame_draw
;Version_frame dd szVersion_frame
Frame_draw dd sz_Frame_draw
;Version_frame dd szVersion_frame dd 0,0
dd 0,0 ;a_init db 'lib_init',0
;a_version db 'version',0
;a_init db 'lib_init',0
;a_version db 'version',0 ;aEdit_box_draw db 'edit_box_draw',0
;aEdit_box_key db 'edit_box_key',0
;aEdit_box_draw db 'edit_box_draw',0 ;aEdit_box_mouse db 'edit_box_mouse',0
;aEdit_box_key db 'edit_box_key',0 ;aVersion_ed db 'version_ed',0
;aEdit_box_mouse db 'edit_box_mouse',0
;aVersion_ed db 'version_ed',0 ;aCheck_box_draw db 'check_box_draw',0
;aCheck_box_mouse db 'check_box_mouse',0
;aCheck_box_draw db 'check_box_draw',0 ;aVersion_ch db 'version_ch',0
;aCheck_box_mouse db 'check_box_mouse',0
;aVersion_ch db 'version_ch',0 ;aOption_box_draw db 'option_box_draw',0
;aOption_box_mouse db 'option_box_mouse',0
;aOption_box_draw db 'option_box_draw',0 ;aVersion_op db 'version_op',0
;aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0 ;aScrollbar_ver_draw db 'scrollbar_v_draw',0
;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
;aScrollbar_ver_draw db 'scrollbar_v_draw',0 ;aScrollbar_hor_draw db 'scrollbar_h_draw',0
;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 ;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
;aScrollbar_hor_draw db 'scrollbar_h_draw',0 ;aVersion_scrollbar db 'version_scrollbar',0
;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
;aVersion_scrollbar db 'version_scrollbar',0 ;aDbutton_draw db 'dbutton_draw',0
;aDbutton_mouse db 'dbutton_mouse',0
;aDbutton_draw db 'dbutton_draw',0 ;aVersion_dbutton db 'version_dbutton',0
;aDbutton_mouse db 'dbutton_mouse',0
;aVersion_dbutton db 'version_dbutton',0 ;aMenu_bar_draw db 'menu_bar_draw',0
;aMenu_bar_mouse db 'menu_bar_mouse',0
;aMenu_bar_draw db 'menu_bar_draw',0 ;aMenu_bar_activate db 'menu_bar_activate',0
;aMenu_bar_mouse db 'menu_bar_mouse',0 ;aVersion_menu_bar db 'version_menu_bar',0
;aMenu_bar_activate db 'menu_bar_activate',0
;aVersion_menu_bar db 'version_menu_bar',0 ;aFileBrowser_draw db 'FileBrowser_draw',0
;aFileBrowser_mouse db 'FileBrowser_mouse',0
;aFileBrowser_draw db 'FileBrowser_draw',0 ;aFileBrowser_key db 'FileBrowser_key',0
;aFileBrowser_mouse db 'FileBrowser_mouse',0 ;aVersion_FileBrowser db 'version_FileBrowser',0
;aFileBrowser_key db 'FileBrowser_key',0
;aVersion_FileBrowser db 'version_FileBrowser',0 sz_PathShow_prepare db 'PathShow_prepare',0
sz_PathShow_draw db 'PathShow_draw',0
sz_PathShow_prepare db 'PathShow_prepare',0 ;szVersion_path_show db 'version_PathShow',0
sz_PathShow_draw db 'PathShow_draw',0
;szVersion_path_show db 'version_PathShow',0 sz_Frame_draw db 'frame_draw',0
;szVersion_frame db 'version_frame',0
sz_Frame_draw db 'frame_draw',0 ;---------------------------------------------------------------------
;szVersion_frame db 'version_frame',0 PathShow_data_1:
;--------------------------------------------------------------------- .type dd 0 ;+0
PathShow_data_1: .start_y dw frame_1.y+19 ;+4
.type dd 0 ;+0 .start_x dw frame_1.x+15 ;+6
.start_y dw frame_1.y+19 ;+4 .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1
.start_x dw frame_1.x+15 ;+6 .area_size_x dw frame_1.w-28 ;+10
.font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable
.area_size_x dw frame_1.w-28 ;+10 .background_flag dd 0 ;+16
.font_number dd 0 ;+12 ; 0 - monospace, 1 - variable .font_color dd 0x0 ;+20
.background_flag dd 0 ;+16 .background_color dd 0x0 ;+24
.font_color dd 0x0 ;+20 .text_pointer dd dtp_name ;+28
.background_color dd 0x0 ;+24 .work_area_pointer dd text_work_area ;+32
.text_pointer dd dtp_name ;+28 .temp_text_length dd 0 ;+36
.work_area_pointer dd text_work_area ;+32 ;---------------------------------------------------------------------
.temp_text_length dd 0 ;+36 PathShow_data_2:
;--------------------------------------------------------------------- .type dd 0 ;+0
PathShow_data_2: .start_y dw frame_2.y+19 ;+4
.type dd 0 ;+0 .start_x dw frame_2.x+15 ;+6
.start_y dw frame_2.y+19 ;+4 .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1
.start_x dw frame_2.x+15 ;+6 .area_size_x dw frame_2.w-28 ;+10
.font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable
.area_size_x dw frame_2.w-28 ;+10 .background_flag dd 0 ;+16
.font_number dd 0 ;+12 ; 0 - monospace, 1 - variable .font_color dd 0x0 ;+20
.background_flag dd 0 ;+16 .background_color dd 0x0 ;+24
.font_color dd 0x0 ;+20 .text_pointer dd skin_info ;+28
.background_color dd 0x0 ;+24 .work_area_pointer dd text_work_area2 ;+32
.text_pointer dd skin_info ;+28 .temp_text_length dd 0 ;+36
.work_area_pointer dd text_work_area2 ;+32 ;---------------------------------------------------------------------
.temp_text_length dd 0 ;+36 OpenDialog_data:
;--------------------------------------------------------------------- .type dd 0
OpenDialog_data: .procinfo dd procinfo ;+4
.type dd 0 .com_area_name dd communication_area_name ;+8
.procinfo dd procinfo ;+4 .com_area dd 0 ;+12
.com_area_name dd communication_area_name ;+8 .opendir_pach dd temp_dir_pach ;+16
.com_area dd 0 ;+12 .dir_default_pach dd communication_area_default_pach ;+20
.opendir_pach dd temp_dir_pach ;+16 .start_path dd open_dialog_path ;+24
.dir_default_pach dd communication_area_default_pach ;+20 .draw_window dd draw_window ;+28
.start_path dd open_dialog_path ;+24 .status dd 0 ;+32
.draw_window dd draw_window ;+28 .openfile_pach dd dtp_name ;+36
.status dd 0 ;+32 .filename_area dd filename_area ;+40
.openfile_pach dd dtp_name ;+36 .filter_area dd Filter
.filename_area dd filename_area ;+40 .x:
.filter_area dd Filter .x_size dw 420 ;+48 ; Window X size
.x: .x_start dw 10 ;+50 ; Window X position
.x_size dw 420 ;+48 ; Window X size .y:
.x_start dw 10 ;+50 ; Window X position .y_size dw 320 ;+52 ; Window y size
.y: .y_start dw 10 ;+54 ; Window Y position
.y_size dw 320 ;+52 ; Window y size
.y_start dw 10 ;+54 ; Window Y position OpenDialog_data2:
.type dd 0
OpenDialog_data2: .procinfo dd procinfo ;+4
.type dd 0 .com_area_name dd communication_area_name2 ;+8
.procinfo dd procinfo ;+4 .com_area dd 0 ;+12
.com_area_name dd communication_area_name2 ;+8 .opendir_pach dd temp_dir_pach2 ;+16
.com_area dd 0 ;+12 .dir_default_pach dd communication_area_default_pach ;+20
.opendir_pach dd temp_dir_pach2 ;+16 .start_path dd open_dialog_path ;+24
.dir_default_pach dd communication_area_default_pach ;+20 .draw_window dd draw_window ;+28
.start_path dd open_dialog_path ;+24 .status dd 0 ;+32
.draw_window dd draw_window ;+28 .openfile_pach dd skin_info ;+36
.status dd 0 ;+32 .filename_area dd filename_area2 ;+40
.openfile_pach dd skin_info ;+36 .filter_area dd Filter2
.filename_area dd filename_area2 ;+40 .x:
.filter_area dd Filter2 .x_size dw 420 ;+48 ; Window X size
.x: .x_start dw 10 ;+50 ; Window X position
.x_size dw 420 ;+48 ; Window X size .y:
.x_start dw 10 ;+50 ; Window X position .y_size dw 320 ;+52 ; Window y size
.y: .y_start dw 10 ;+54 ; Window Y position
.y_size dw 320 ;+52 ; Window y size
.y_start dw 10 ;+54 ; Window Y position communication_area_name2:
db 'FFFFFFFF_open_dialog',0
communication_area_name2:
db 'FFFFFFFF_open_dialog',0 communication_area_name:
db 'FFFFFFFF_open_dialog2',0
communication_area_name: open_dialog_path:
db 'FFFFFFFF_open_dialog2',0 if __nightbuild eq yes
open_dialog_path: db '/sys/MANAGERS/opendial',0
if __nightbuild eq yes else
db '/sys/MANAGERS/opendial',0 db '/sys/File Managers/opendial',0
else end if
db '/sys/File Managers/opendial',0 communication_area_default_pach:
end if db '/sys',0
communication_area_default_pach:
db '/sys',0 Filter:
dd Filter.end - Filter
Filter: .1:
dd Filter.end - Filter db 'DTP',0
.1: .end:
db 'DTP',0 db 0
.end:
db 0 Filter2:
dd Filter.end - Filter
Filter2: .1:
dd Filter.end - Filter db 'SKN',0
.1: .end:
db 'SKN',0 db 0
.end:
db 0 default_skin:
db '/sys/default.skn',0
default_skin: default_dtp:
db '/sys/default.skn',0 db '/sys/default.dtp',0
default_dtp: ;---------------------------------------------------------------------
db '/sys/default.dtp',0 ColorDialog_data:
;--------------------------------------------------------------------- .type dd 0
ColorDialog_data: .procinfo dd procinfo ;+4
.type dd 0 .com_area_name dd cd_communication_area_name ;+8
.procinfo dd procinfo ;+4 .com_area dd 0 ;+12
.com_area_name dd cd_communication_area_name ;+8 .start_path dd colordialog_path ;+16
.com_area dd 0 ;+12 .draw_window dd draw_window ;+20
.start_path dd colordialog_path ;+16 .status dd 0 ;+24
.draw_window dd draw_window ;+20 .x:
.status dd 0 ;+24 .x_size dw 510 ;+28 ; Window X size
.x: .x_start dw 10 ;+30 ; Window X position
.x_size dw 510 ;+28 ; Window X size .y:
.x_start dw 10 ;+30 ; Window X position .y_size dw 310 ;+32 ; Window y size
.y: .y_start dw 10 ;+34 ; Window Y position
.y_size dw 310 ;+32 ; Window y size .color_type dd 0 ;+36 ; 0- RGB, 1 or other - reserved
.y_start dw 10 ;+34 ; Window Y position .color dd 0 ;+40 ; Selected color
.color_type dd 0 ;+36 ; 0- RGB, 1 or other - reserved
.color dd 0 ;+40 ; Selected color cd_communication_area_name:
db 'FFFFFFFF_color_dialog',0
cd_communication_area_name: colordialog_path:
db 'FFFFFFFF_color_dialog',0 db '/sys/colrdial',0
colordialog_path: ;---------------------------------------------------------------------
db '/sys/colrdial',0 frame_data:
;--------------------------------------------------------------------- .type dd 0 ;+0
frame_data: .x:
.type dd 0 ;+0 .x_size dw 0 ;+4
.x: .x_start dw 0 ;+6
.x_size dw 0 ;+4 .y:
.x_start dw 0 ;+6 .y_size dw 0 ;+8
.y: .y_start dw 0 ;+10
.y_size dw 0 ;+8 .ext_fr_col dd 0x0 ;+12
.y_start dw 0 ;+10 .int_fr_col dd 0xffffff ;+16
.ext_fr_col dd 0x0 ;+12 .draw_text_flag dd 1 ;+20
.int_fr_col dd 0xffffff ;+16 .text_pointer dd 0 ;+24
.draw_text_flag dd 1 ;+20 .text_position dd 0 ;+28
.text_pointer dd 0 ;+24 .font_number dd 1 ;+32
.text_position dd 0 ;+28 .font_size_y dd 14 ;+36
.font_number dd 1 ;+32 .font_color dd 0x0 ;+40
.font_size_y dd 14 ;+36 .font_backgr_color dd 0xffffff ;+44
.font_color dd 0x0 ;+40 ;---------------------------------------------------------------------
.font_backgr_color dd 0xffffff ;+44 IncludeIGlobals
;---------------------------------------------------------------------
IncludeIGlobals

View File

@ -26,7 +26,7 @@
M01header.params: M01header.params:
dd app_param ; parameters dd app_param ; parameters
dd cur_dir_path ; path to file dd cur_dir_path ; path to file
include 'lang.inc' include 'lang.inc'
include '../../../proc32.inc' include '../../../proc32.inc'
include '../../../config.inc' ;for nightbuild include '../../../config.inc' ;for nightbuild
@ -85,7 +85,7 @@ frame_1:
.y = area.y + area.height + 20 .y = area.y + area.height + 20
.w = area.w + 217 .w = area.w + 217
.height = 65 .height = 65
;-------------------------------------- ;--------------------------------------
frame_2: frame_2:
.x = frame_1.x .x = frame_1.x
.y = frame_1.y + frame_1.height + 20 .y = frame_1.y + frame_1.height + 20
@ -99,11 +99,11 @@ win:
START: ; start of execution START: ; start of execution
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
mcall SF_SYS_MISC,SSF_HEAP_INIT mcall SF_SYS_MISC,SSF_HEAP_INIT
test eax,eax
jz close
stdcall dll.Load,LibIniImportTable test eax,eax
jz close
stdcall dll.Load,LibIniImportTable
load_libraries l_libs_start,end_l_libs load_libraries l_libs_start,end_l_libs
;if return code =-1 then exit, else nornary work ;if return code =-1 then exit, else nornary work
@ -125,7 +125,7 @@ load_libraries l_libs_start,end_l_libs
cmp ecx, '.dtp' cmp ecx, '.dtp'
je load_dtp_from_param je load_dtp_from_param
jmp no_param jmp no_param
load_dtp_from_param: load_dtp_from_param:
stdcall string.copy, [M01header.params], dtp_name stdcall string.copy, [M01header.params], dtp_name
call load_dtp_file.1 call load_dtp_file.1
@ -139,8 +139,8 @@ load_skin_from_param:
no_param: no_param:
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,color_table,4*10 ; get current colors mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,color_table,4*10 ; get current colors
call load_skin_file.2 call load_skin_file.2
skin_path_ready: skin_path_ready:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;OpenDialog initialisation ;OpenDialog initialisation
push dword OpenDialog_data push dword OpenDialog_data
@ -156,13 +156,13 @@ skin_path_ready:
; prepare for PathShow ; prepare for PathShow
push dword PathShow_data_1 push dword PathShow_data_1
call [PathShow_prepare] call [PathShow_prepare]
push dword PathShow_data_2 push dword PathShow_data_2
call [PathShow_prepare] call [PathShow_prepare]
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
red: red:
call draw_window ; at first, draw the window call draw_window ; at first, draw the window
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
still: still:
mcall SF_WAIT_EVENT mcall SF_WAIT_EVENT
@ -250,19 +250,19 @@ no_apply_skin:
cmp ah,41 cmp ah,41
jg no_new_colour jg no_new_colour
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.start_ColorDialog: .start_ColorDialog:
push dword ColorDialog_data push dword ColorDialog_data
call [ColorDialog_Start] call [ColorDialog_Start]
; 2 - use another method/not found program ; 2 - use another method/not found program
cmp [ColorDialog_data.status],2 cmp [ColorDialog_data.status],2
je still je still
; 1 - OK, color selected ; 1 - OK, color selected
cmp [ColorDialog_data.status],1 cmp [ColorDialog_data.status],1
jne still jne still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
shr eax,8 shr eax,8
sub eax,31 sub eax,31
shl eax,2 shl eax,2
@ -449,9 +449,9 @@ newcol:
add bx,4 add bx,4
sub ecx,2 shl 16 sub ecx,2 shl 16
add cx,4 add cx,4
mov [frame_data.x],ebx mov [frame_data.x],ebx
mov [frame_data.y],ecx mov [frame_data.y],ecx
push dword frame_data push dword frame_data
call [Frame_draw] call [Frame_draw]
@ -473,7 +473,7 @@ draw_PathShow:
; draw for PathShow ; draw for PathShow
push dword PathShow_data_1 push dword PathShow_data_1
call [PathShow_draw] call [PathShow_draw]
push dword PathShow_data_2 push dword PathShow_data_2
call [PathShow_draw] call [PathShow_draw]
popa popa
@ -498,7 +498,7 @@ draw_window:
mcall ,<110, win.w>,,,,title mcall ,<110, win.w>,,,,title
mcall SF_THREAD_INFO,procinfo,-1 mcall SF_THREAD_INFO,procinfo,-1
mov eax,[procinfo+70] ;status of window mov eax,[procinfo+70] ;status of window
test eax,100b test eax,100b
jne .end jne .end
@ -527,8 +527,8 @@ draw_window:
mcall SF_DEFINE_BUTTON,,,16 ; button 17 mcall SF_DEFINE_BUTTON,,,16 ; button 17
; select color DTP button text ; select color DTP button text
mcall SF_DRAW_TEXT,<frame_1.x+16,frame_1.y+44>,[w_work_button_text],t1,t1.size mcall SF_DRAW_TEXT,<frame_1.x+16,frame_1.y+44>,[w_work_button_text],t1,t1.size
;----------------------------------- ;-----------------------------------
; select skin frame ; select skin frame
; LOAD SKIN BUTTON ; button 17 ; LOAD SKIN BUTTON ; button 17
mcall SF_DEFINE_BUTTON,<frame_2.x+10,load_w>,<frame_2.y+38,18>,17,[w_work_button] mcall SF_DEFINE_BUTTON,<frame_2.x+10,load_w>,<frame_2.y+38,18>,17,[w_work_button]
; 3D ; 3D
@ -543,7 +543,7 @@ draw_window:
mcall ,,,18 ; button 18 mcall ,,,18 ; button 18
; select skin button text ; select skin button text
mcall SF_DRAW_TEXT,<frame_2.x+16,frame_2.y+44>,[w_work_button_text],t2,t2.size mcall SF_DRAW_TEXT,<frame_2.x+16,frame_2.y+44>,[w_work_button_text],t2,t2.size
;----------------------------------- ;-----------------------------------
call draw_button_row call draw_button_row
call draw_button_row_of_texts call draw_button_row_of_texts
call draw_colours call draw_colours
@ -556,7 +556,7 @@ draw_window:
mov eax,[w_work_text] mov eax,[w_work_text]
mov [frame_data.font_color],eax mov [frame_data.font_color],eax
mov [frame_data.draw_text_flag],dword 1 mov [frame_data.draw_text_flag],dword 1
push dword frame_data push dword frame_data
call [Frame_draw] call [Frame_draw]
;----------------------------------- ;-----------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@ no_def_width:
cmp [place_attachment],1 cmp [place_attachment],1
je @f je @f
xor ecx,ecx xor ecx,ecx
mov cx,[height] mov cx,[height]
dec cx dec cx
@ -51,19 +51,19 @@ align 4
;-------------------------------------- ;--------------------------------------
align 4 align 4
.attachment_selected: .attachment_selected:
xor eax,eax ; DEFINE AND DRAW WINDOW xor eax,eax ; DEFINE AND DRAW WINDOW
mov edx, [wcolor] mov edx, [wcolor]
or edx, 0x01000000 ; do not draw the window or edx, 0x01000000 ; do not draw the window
mov esi, [wcolor] mov esi, [wcolor]
or esi, 0x01000000 ; unmovable window or esi, 0x01000000 ; unmovable window
mov edi, [wcolor] mov edi, [wcolor]
mov [panel_x_pos], ebx mov [panel_x_pos], ebx
mov [panel_y_pos], ecx ; Ïîêà ÷òî òàê. mov [panel_y_pos], ecx ; So far ok
mcall mcall
movzx eax,word [screenxy+2] movzx eax,word [screenxy+2]
mov [max_x],eax mov [max_x],eax
call fill_window call fill_window
call minimize_left_button call minimize_left_button
call minimize_right_button call minimize_right_button
@ -78,7 +78,7 @@ align 4
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
fill_window: fill_window:
movzx ebx,word [screenxy+2] movzx ebx,word [screenxy+2]
xor ecx,ecx xor ecx,ecx
mov edx,[wcolor] mov edx,[wcolor]
@ -192,7 +192,7 @@ align 4
.exit: .exit:
ret ret
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
minimize_right_button: minimize_right_button:
cmp [minimize_right],dword 0 cmp [minimize_right],dword 0
je .exit je .exit
@ -247,19 +247,19 @@ align 4
mov ecx, [height] mov ecx, [height]
mov edx, 0x60d1ff01 mov edx, 0x60d1ff01
mcall 8,,,,[wcolor] ; MENU BUTTON mcall 8,,,,[wcolor] ; MENU BUTTON
mov eax,ebx mov eax,ebx
shr eax,16 shr eax,16
mov [menu_button_x.start],eax mov [menu_button_x.start],eax
mov eax,ebx mov eax,ebx
and eax,0xffff and eax,0xffff
mov [menu_button_x.size],eax mov [menu_button_x.size],eax
mov eax,ecx mov eax,ecx
shr eax,16 shr eax,16
mov [menu_button_y.start],eax mov [menu_button_y.start],eax
mov eax,ecx mov eax,ecx
and eax,0xffff and eax,0xffff
mov [menu_button_y.size],eax mov [menu_button_y.size],eax
@ -268,7 +268,7 @@ align 4
mov edx,[MenuButton_color] ;0x44aa44 mov edx,[MenuButton_color] ;0x44aa44
mov esi,[wcolor] mov esi,[wcolor]
add ebx,3 shl 16 - 5 add ebx,3 shl 16 - 5
call draw_appl_button call draw_appl_button
add ebx, 4*65536 add ebx, 4*65536
mov bx,[height] mov bx,[height]
@ -276,7 +276,7 @@ align 4
sub bx,7 sub bx,7
mov ecx,[PanelText_color] mov ecx,[PanelText_color]
or ecx,0x10000000 or ecx,0x10000000
if lang eq et_EE if lang eq et_ET
mcall 4,,,m_text,5 mcall 4,,,m_text,5
else else
mcall 4,,,m_text,4 mcall 4,,,m_text,4
@ -289,7 +289,7 @@ no_menu:
je .exit je .exit
; calculate and draw clean desktop button ; calculate and draw clean desktop button
mov ebx, (0 shl 16) + CLD_SIZE-5 mov ebx, (0 shl 16) + CLD_SIZE-5
; check for left minimize button enabled ; check for left minimize button enabled
cmp [minimize_left],dword 0 cmp [minimize_left],dword 0
je @f je @f
@ -300,7 +300,7 @@ align 4
; check for menu button enabled ; check for menu button enabled
cmp [menu_enable],dword 0 cmp [menu_enable],dword 0
je @f je @f
add ebx, MENU_SIZE shl 16 add ebx, MENU_SIZE shl 16
;-------------------------------------- ;--------------------------------------
align 4 align 4
@ -311,7 +311,7 @@ align 4
mov edx, 0x60000000 + 103 mov edx, 0x60000000 + 103
mov ecx, [height] mov ecx, [height]
mcall 8 ;,,<3,13> mcall 8 ;,,<3,13>
call calculate_button_y_coordinate_and_size call calculate_button_y_coordinate_and_size
mov edx,[CleanDesktopButton_color] ;time_bgr_color mov edx,[CleanDesktopButton_color] ;time_bgr_color
mov esi,[wcolor] mov esi,[wcolor]
@ -354,31 +354,31 @@ align 4
@@: @@:
cmp [clock_enable],dword 0 cmp [clock_enable],dword 0
je @f je @f
sub eax,CLOCK_SIZE sub eax,CLOCK_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [cpu_usage_enable],dword 0 cmp [cpu_usage_enable],dword 0
je @f je @f
sub eax,CPU_USAGE_SIZE sub eax,CPU_USAGE_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [chlang_enable],dword 0 cmp [chlang_enable],dword 0
je @f je @f
sub eax,CHLANG_SIZE sub eax,CHLANG_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
cmp [page_list_enable],dword 0 cmp [page_list_enable],dword 0
je @f je @f
sub eax,PAGE_LIST_SIZE sub eax,PAGE_LIST_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
mov ebx, TAB_SIZE mov ebx, TAB_SIZE
xor edx,edx xor edx,edx
@ -419,11 +419,11 @@ calculate_offset_X:
add eax, ML_SIZE add eax, ML_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4
@@: @@:
; check for menu button enabled ; check for menu button enabled
cmp [menu_enable],dword 0 cmp [menu_enable],dword 0
je @f je @f
add eax, MENU_SIZE add eax, MENU_SIZE
;-------------------------------------- ;--------------------------------------
align 4 align 4

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,301 +1,303 @@
;----------------------------------------------------------------------------- ; Language support for locales: ru_RU (CP866), en_US.
s_text:
if lang eq ru_RU ;-----------------------------------------------------------------------------
db '‚ë¡®à ä ©« ',0 s_text:
else if lang eq ru_RU
db 'Select file',0 db '‚ë¡®à ä ©« ',0
end if else ; Default to en_US
;----------------------------------------------------------------------------- db 'Select file',0
r_text: end if
if lang eq ru_RU ;-----------------------------------------------------------------------------
db '<27>ãáª',0 r_text:
else if lang eq ru_RU
db 'Start',0 db '<27>ãáª',0
end if else ; Default to en_US
;----------------------------------------------------------------------------- db 'Start',0
result_table_text: end if
if lang eq ru_RU ;-----------------------------------------------------------------------------
db '<27> §¬¥à —⥭¨¥ (Š<>/á) ‡ ¯¨áì (Š<>/á)',0 result_table_text:
else if lang eq ru_RU
db 'Size Read (KB/s) Write (KB/s)',0 db '<27> §¬¥à —⥭¨¥ (Š<>/á) ‡ ¯¨áì (Š<>/á)',0
end if else ; Default to en_US
;----------------------------------------------------------------------------- db 'Size Read (KB/s) Write (KB/s)',0
title db 'File Speed v0.3',0 end if
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
include_debug_strings title db 'File Speed v0.3',0
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
l_libs_start: include_debug_strings
;-----------------------------------------------------------------------------
library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, Box_lib_import l_libs_start:
library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, ProcLib_import library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, Box_lib_import
end_l_libs: library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, ProcLib_import
;-----------------------------------------------------------------------------
system_dir_Boxlib db '/sys/lib/box_lib.obj',0 end_l_libs:
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 ;-----------------------------------------------------------------------------
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
;----------------------------------------------------------------------------- system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
align 4
ProcLib_import: ;-----------------------------------------------------------------------------
OpenDialog_Init dd aOpenDialog_Init align 4
OpenDialog_Start dd aOpenDialog_Start ProcLib_import:
;OpenDialog_Version dd aOpenDialog_Version OpenDialog_Init dd aOpenDialog_Init
OpenDialog_Start dd aOpenDialog_Start
;ColorDialog_Init dd aColorDialog_Init ;OpenDialog_Version dd aOpenDialog_Version
;ColorDialog_Start dd aColorDialog_Start
;ColorDialog_Version dd aColorDialog_Version ;ColorDialog_Init dd aColorDialog_Init
;ColorDialog_Start dd aColorDialog_Start
dd 0 ;ColorDialog_Version dd aColorDialog_Version
dd 0
dd 0
aOpenDialog_Init db 'OpenDialog_init',0 dd 0
aOpenDialog_Start db 'OpenDialog_start',0
;aOpenDialog_Version db 'Version_OpenDialog',0 aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
;aColorDialog_Init db 'ColorDialog_init',0 ;aOpenDialog_Version db 'Version_OpenDialog',0
;aColorDialog_Start db 'ColorDialog_start',0
;aColorDialog_Version db 'Version_ColorDialog',0 ;aColorDialog_Init db 'ColorDialog_init',0
;----------------------------------------------------------------------------- ;aColorDialog_Start db 'ColorDialog_start',0
align 4 ;aColorDialog_Version db 'Version_ColorDialog',0
Box_lib_import: ;-----------------------------------------------------------------------------
;init_lib dd a_init align 4
;version_lib dd a_version Box_lib_import:
;init_lib dd a_init
;version_lib dd a_version
;edit_box_draw dd aEdit_box_draw
;edit_box_key dd aEdit_box_key
;edit_box_mouse dd aEdit_box_mouse ;edit_box_draw dd aEdit_box_draw
;version_ed dd aVersion_ed ;edit_box_key dd aEdit_box_key
;edit_box_mouse dd aEdit_box_mouse
init_checkbox dd aInit_checkbox ;version_ed dd aVersion_ed
check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse init_checkbox dd aInit_checkbox
;version_ch dd aVersion_ch check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse
;option_box_draw dd aOption_box_draw ;version_ch dd aVersion_ch
;option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op ;option_box_draw dd aOption_box_draw
;option_box_mouse dd aOption_box_mouse
;scrollbar_ver_draw dd aScrollbar_ver_draw ;version_op dd aVersion_op
;scrollbar_ver_mouse dd aScrollbar_ver_mouse
;scrollbar_hor_draw dd aScrollbar_hor_draw ;scrollbar_ver_draw dd aScrollbar_ver_draw
;scrollbar_hor_mouse dd aScrollbar_hor_mouse ;scrollbar_ver_mouse dd aScrollbar_ver_mouse
;version_scrollbar dd aVersion_scrollbar ;scrollbar_hor_draw dd aScrollbar_hor_draw
;scrollbar_hor_mouse dd aScrollbar_hor_mouse
;dinamic_button_draw dd aDbutton_draw ;version_scrollbar dd aVersion_scrollbar
;dinamic_button_mouse dd aDbutton_mouse
;version_dbutton dd aVersion_dbutton ;dinamic_button_draw dd aDbutton_draw
;dinamic_button_mouse dd aDbutton_mouse
;menu_bar_draw dd aMenu_bar_draw ;version_dbutton dd aVersion_dbutton
;menu_bar_mouse dd aMenu_bar_mouse
;menu_bar_activate dd aMenu_bar_activate ;menu_bar_draw dd aMenu_bar_draw
;version_menu_bar dd aVersion_menu_bar ;menu_bar_mouse dd aMenu_bar_mouse
;menu_bar_activate dd aMenu_bar_activate
;FileBrowser_draw dd aFileBrowser_draw ;version_menu_bar dd aVersion_menu_bar
;FileBrowser_mouse dd aFileBrowser_mouse
;FileBrowser_key dd aFileBrowser_key ;FileBrowser_draw dd aFileBrowser_draw
;Version_FileBrowser dd aVersion_FileBrowser ;FileBrowser_mouse dd aFileBrowser_mouse
;FileBrowser_key dd aFileBrowser_key
PathShow_prepare dd sz_PathShow_prepare ;Version_FileBrowser dd aVersion_FileBrowser
PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show PathShow_prepare dd sz_PathShow_prepare
PathShow_draw dd sz_PathShow_draw
;Frame_draw dd sz_Frame_draw ;Version_path_show dd szVersion_path_show
;Version_frame dd szVersion_frame
;Frame_draw dd sz_Frame_draw
dd 0,0 ;Version_frame dd szVersion_frame
;a_init db 'lib_init',0 dd 0,0
;a_version db 'version',0
;a_init db 'lib_init',0
;aEdit_box_draw db 'edit_box_draw',0 ;a_version db 'version',0
;aEdit_box_key db 'edit_box_key',0
;aEdit_box_mouse db 'edit_box_mouse',0 ;aEdit_box_draw db 'edit_box_draw',0
;aVersion_ed db 'version_ed',0 ;aEdit_box_key db 'edit_box_key',0
;aEdit_box_mouse db 'edit_box_mouse',0
aInit_checkbox db 'init_checkbox2',0 ;aVersion_ed db 'version_ed',0
aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0 aInit_checkbox db 'init_checkbox2',0
;aVersion_ch db 'version_ch2',0 aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0
;aOption_box_draw db 'option_box_draw',0 ;aVersion_ch db 'version_ch2',0
;aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0 ;aOption_box_draw db 'option_box_draw',0
;aOption_box_mouse db 'option_box_mouse',0
;aScrollbar_ver_draw db 'scrollbar_v_draw',0 ;aVersion_op db 'version_op',0
;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
;aScrollbar_hor_draw db 'scrollbar_h_draw',0 ;aScrollbar_ver_draw db 'scrollbar_v_draw',0
;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0 ;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
;aVersion_scrollbar db 'version_scrollbar',0 ;aScrollbar_hor_draw db 'scrollbar_h_draw',0
;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
;aDbutton_draw db 'dbutton_draw',0 ;aVersion_scrollbar db 'version_scrollbar',0
;aDbutton_mouse db 'dbutton_mouse',0
;aVersion_dbutton db 'version_dbutton',0 ;aDbutton_draw db 'dbutton_draw',0
;aDbutton_mouse db 'dbutton_mouse',0
;aMenu_bar_draw db 'menu_bar_draw',0 ;aVersion_dbutton db 'version_dbutton',0
;aMenu_bar_mouse db 'menu_bar_mouse',0
;aMenu_bar_activate db 'menu_bar_activate',0 ;aMenu_bar_draw db 'menu_bar_draw',0
;aVersion_menu_bar db 'version_menu_bar',0 ;aMenu_bar_mouse db 'menu_bar_mouse',0
;aMenu_bar_activate db 'menu_bar_activate',0
;aFileBrowser_draw db 'FileBrowser_draw',0 ;aVersion_menu_bar db 'version_menu_bar',0
;aFileBrowser_mouse db 'FileBrowser_mouse',0
;aFileBrowser_key db 'FileBrowser_key',0 ;aFileBrowser_draw db 'FileBrowser_draw',0
;aVersion_FileBrowser db 'version_FileBrowser',0 ;aFileBrowser_mouse db 'FileBrowser_mouse',0
;aFileBrowser_key db 'FileBrowser_key',0
sz_PathShow_prepare db 'PathShow_prepare',0 ;aVersion_FileBrowser db 'version_FileBrowser',0
sz_PathShow_draw db 'PathShow_draw',0
;szVersion_path_show db 'version_PathShow',0 sz_PathShow_prepare db 'PathShow_prepare',0
sz_PathShow_draw db 'PathShow_draw',0
;sz_Frame_draw db 'frame_draw',0 ;szVersion_path_show db 'version_PathShow',0
;szVersion_frame db 'version_frame',0
;----------------------------------------------------------------------------- ;sz_Frame_draw db 'frame_draw',0
PathShow_data: ;szVersion_frame db 'version_frame',0
.type dd 0 ;+0 ;-----------------------------------------------------------------------------
.start_y dw 5+4 ;+4 PathShow_data:
.start_x dw 5+5 ;+6 .type dd 0 ;+0
.font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 .start_y dw 5+4 ;+4
.area_size_x dw 400-30 ;+10 .start_x dw 5+5 ;+6
.font_number dd 0 ;+12 ; 0 - monospace, 1 - variable .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1
.background_flag dd 0 ;+16 .area_size_x dw 400-30 ;+10
.font_color dd 0x0 ;+20 .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable
.background_color dd 0x0 ;+24 .background_flag dd 0 ;+16
.text_pointer dd fname ;+28 .font_color dd 0x0 ;+20
.work_area_pointer dd text_work_area ;+32 .background_color dd 0x0 ;+24
.temp_text_length dd 0 ;+36 .text_pointer dd fname ;+28
;----------------------------------------------------------------------------- .work_area_pointer dd text_work_area ;+32
check1 check_box2 (100 shl 16)+12,(27 shl 16)+12,6,0xFFFFFF,0,0xffffff,\ .temp_text_length dd 0 ;+36
check_text1,ch_flag_middle ;-----------------------------------------------------------------------------
check1 check_box2 (100 shl 16)+12,(27 shl 16)+12,6,0xFFFFFF,0,0xffffff,\
check_text1: check_text1,ch_flag_middle
if lang eq ru_RU
db '’¥áâ¨à®¢ âì § ¯¨áì',0 check_text1:
else if lang eq ru_RU
db 'Use testing of write',0 db '’¥áâ¨à®¢ âì § ¯¨áì',0
end if else ; Default to en_US
db 'Use testing of write',0
check_box_warning_text: end if
if lang eq ru_RU
db '<>ˆŒ€<C592>ˆ…! <20>஢¥àª  ᪮à®á⨠§ ¯¨á¨ ã­¨ç⮦ ¥â ᮤ¥à¦¨¬®¥ ä ©« !',0 check_box_warning_text:
else if lang eq ru_RU
db 'WARNING! Testing of write speed is destroy contents of file!',0 db '<>ˆŒ€<C592>ˆ…! <20>஢¥àª  ᪮à®á⨠§ ¯¨á¨ ã­¨ç⮦ ¥â ᮤ¥à¦¨¬®¥ ä ©« !',0
end if else ; Default to en_US
;----------------------------------------------------------------------------- db 'WARNING! Testing of write speed will destroy file contents!',0
OpenDialog_data: end if
.type dd 0 ;-----------------------------------------------------------------------------
.procinfo dd process_info ;+4 OpenDialog_data:
.com_area_name dd communication_area_name ;+8 .type dd 0
.com_area dd 0 ;+12 .procinfo dd process_info ;+4
.opendir_pach dd temp_dir_pach ;+16 .com_area_name dd communication_area_name ;+8
.dir_default_pach dd communication_area_default_pach ;+20 .com_area dd 0 ;+12
.start_path dd open_dialog_path ;+24 .opendir_pach dd temp_dir_pach ;+16
.draw_window dd draw_window ;+28 .dir_default_pach dd communication_area_default_pach ;+20
.status dd 0 ;+32 .start_path dd open_dialog_path ;+24
.openfile_pach dd fname ;+36 .draw_window dd draw_window ;+28
.filename_area dd filename_area ;+40 .status dd 0 ;+32
.filter_area dd Filter .openfile_pach dd fname ;+36
.x: .filename_area dd filename_area ;+40
.x_size dw 420 ;+48 ; Window X size .filter_area dd Filter
.x_start dw 10 ;+50 ; Window X position .x:
.y: .x_size dw 420 ;+48 ; Window X size
.y_size dw 320 ;+52 ; Window y size .x_start dw 10 ;+50 ; Window X position
.y_start dw 10 ;+54 ; Window Y position .y:
.y_size dw 320 ;+52 ; Window y size
communication_area_name: .y_start dw 10 ;+54 ; Window Y position
db 'FFFFFFFF_open_dialog2',0
communication_area_name:
open_dialog_path: db 'FFFFFFFF_open_dialog2',0
if __nightbuild eq yes
db '/sys/MANAGERS/opendial',0 open_dialog_path:
else if __nightbuild eq yes
db '/sys/File Managers/opendial',0 db '/sys/MANAGERS/opendial',0
end if else
db '/sys/File Managers/opendial',0
communication_area_default_pach: end if
db '/sys',0
communication_area_default_pach:
Filter: db '/sys',0
dd Filter.end - Filter.1
.1: Filter:
;db 'BIN',0 dd Filter.end - Filter.1
;db 'DAT',0 .1:
.end: ;db 'BIN',0
db 0 ;db 'DAT',0
.end:
start_temp_file_name: db 0
db 'default.dtp',0
start_temp_file_name:
default_dtp: db 'default.dtp',0
db '/sys/default.dtp',0
;----------------------------------------------------------------------------- default_dtp:
sector equ 512 db '/sys/default.dtp',0
;-------------------------------------- ;-----------------------------------------------------------------------------
result_table: sector equ 512
dd a512b, 0, 0, sector*1 ;--------------------------------------
dd a1K, 1, 1, sector*2 result_table:
dd a2K, 2, 2, sector*4 dd a512b, 0, 0, sector*1
dd a4K, 3, 3, sector*8 dd a1K, 1, 1, sector*2
dd a8K, 4, 4, sector*16 dd a2K, 2, 2, sector*4
dd a16K, 5, 5, sector*32 dd a4K, 3, 3, sector*8
dd a32K, 6, 6, sector*64 dd a8K, 4, 4, sector*16
dd a64K, 7, 7, sector*128 dd a16K, 5, 5, sector*32
dd a128K, 8, 8, sector*256 dd a32K, 6, 6, sector*64
dd a256K, 9, 9, sector*512 dd a64K, 7, 7, sector*128
dd a512K, 10, 10, sector*1024 dd a128K, 8, 8, sector*256
dd a1M, 11, 11, sector*2*1024 dd a256K, 9, 9, sector*512
dd a2M, 12, 12, sector*4*1024 dd a512K, 10, 10, sector*1024
dd a4M, 13, 13, sector*8*1024 dd a1M, 11, 11, sector*2*1024
dd a8M, 14, 14, sector*16*1024 dd a2M, 12, 12, sector*4*1024
dd a16M, 15, 15, sector*32*1024 dd a4M, 13, 13, sector*8*1024
dd a32M, 16, 16, sector*64*1024 dd a8M, 14, 14, sector*16*1024
dd a64M, 17, 17, sector*128*1024 dd a16M, 15, 15, sector*32*1024
;----------------------------------------------------------------------------- dd a32M, 16, 16, sector*64*1024
a512b db ' 512',0 dd a64M, 17, 17, sector*128*1024
a1K db ' 1K',0 ;-----------------------------------------------------------------------------
a2K db ' 2K',0 a512b db ' 512',0
a4K db ' 4K',0 a1K db ' 1K',0
a8K db ' 8K',0 a2K db ' 2K',0
a16K db ' 16K',0 a4K db ' 4K',0
a32K db ' 32K',0 a8K db ' 8K',0
a64K db ' 64K',0 a16K db ' 16K',0
a128K db '128K',0 a32K db ' 32K',0
a256K db '256K',0 a64K db ' 64K',0
a512K db '512K',0 a128K db '128K',0
a1M db ' 1M',0 a256K db '256K',0
a2M db ' 2M',0 a512K db '512K',0
a4M db ' 4M',0 a1M db ' 1M',0
a8M db ' 8M',0 a2M db ' 2M',0
a16M db ' 16M',0 a4M db ' 4M',0
a32M db ' 32M',0 a8M db ' 8M',0
a64M db ' 64M',0 a16M db ' 16M',0
;----------------------------------------------------------------------------- a32M db ' 32M',0
align 4 a64M db ' 64M',0
fileinfo: ;-----------------------------------------------------------------------------
.subfunction dd 5 align 4
.offset dd 0 fileinfo:
.offset_1 dd 0 .subfunction dd 5
.size dd 0 .offset dd 0
.return dd file_info .offset_1 dd 0
db 0 .size dd 0
.name: dd fname .return dd file_info
;----------------------------------------------------------------------------- db 0
align 4 .name: dd fname
fileread: ;-----------------------------------------------------------------------------
.subfunction dd 0 align 4
.offset dd 0 fileread:
.offset_1 dd 0 .subfunction dd 0
.size dd 0 .offset dd 0
.return dd process_info .offset_1 dd 0
db 0 .size dd 0
.name: dd fname .return dd process_info
;----------------------------------------------------------------------------- db 0
align 4 .name: dd fname
filewrite: ;-----------------------------------------------------------------------------
.subfunction dd 3 align 4
.offset dd 0 filewrite:
.offset_1 dd 0 .subfunction dd 3
.size dd 0 .offset dd 0
.data dd process_info .offset_1 dd 0
db 0 .size dd 0
.name: dd fname .data dd process_info
;----------------------------------------------------------------------------- db 0
.name: dd fname
;-----------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff