Update locale code

- Fixes for new locale codes.
- Correct en_US translations.
- Some whitespace clean-up.
This commit is contained in:
Andrew 2024-06-05 11:56:38 +01:00
parent b6a0bf7729
commit d1ecd626b0
8 changed files with 380 additions and 380 deletions

View File

@ -1,294 +1,295 @@
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; Screen Ruler v1.0 ; Screen Ruler v1.0
; Version for KolibriOS 2005-2023 ; Version for KolibriOS 2005-2023
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; last update: 11.09.2023 ; last update: 11.09.2023
; created by: Subbotin Anton aka Spaceraven ; created by: Subbotin Anton aka Spaceraven
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
use32 use32
org 0x0 org 0x0
db 'MENUET01'; 8 byte id db 'MENUET01'; 8 byte id
dd 1 ; header version dd 1 ; header version
dd START ; program start dd START ; program start
dd I_END ; program image size dd I_END ; program image size
dd 0x1000 ; required amount of memory dd 0x1000 ; required amount of memory
dd 0x1000 ; esp dd 0x1000 ; esp
dd 0, 0 ; no parameters, no path dd 0, 0 ; no parameters, no path
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (UTF-8), en_US.
include '..\..\macros.inc' include '..\..\macros.inc'
delay = 20 delay = 20
magnify_width = 48 magnify_width = 48
magnify_height = 30 magnify_height = 30
magnify_halfwidth = magnify_width / 2 magnify_halfwidth = magnify_width / 2
magnify_halfheight = magnify_height / 2 magnify_halfheight = magnify_height / 2
aim0 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth - 1 aim0 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth - 1
aim1 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth + 1 aim1 = (magnify_halfheight - 1) * 65536 + magnify_halfwidth + 1
aim2 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth - 1 aim2 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth - 1
aim3 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth + 1 aim3 = (magnify_halfheight + 1) * 65536 + magnify_halfwidth + 1
;------------------------- Main cycle ;------------------------- Main cycle
START: START:
redraw: redraw:
call draw_window call draw_window
still: still:
call draw_magnify call draw_magnify
wtevent: wtevent:
mcall 23, delay ; wait here for event with timeout mcall 23, delay ; wait here for event with timeout
dec eax dec eax
js still js still
jz redraw jz redraw
dec eax dec eax
jnz button jnz button
; key in buffer ; key in buffer
mov eax, 2 mov eax, 2
mcall mcall
cmp ah, 32 cmp ah, 32
jnz wtevent jnz wtevent
mov eax, [mouse_x] mov eax, [mouse_x]
mov [pix1_x], eax mov [pix1_x], eax
mov eax, [mouse_y] mov eax, [mouse_y]
mov [pix1_y], eax mov [pix1_y], eax
jmp wtevent jmp wtevent
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
button: button:
; we have only one button, close ; we have only one button, close
or eax, -1 or eax, -1
mcall mcall
;------------------------- Window draw ;------------------------- Window draw
draw_window: draw_window:
mcall 12, 1 mcall 12, 1
mov al, 48 ; function 48 : graphics parameters mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height mov bl, 4 ; subfunction 4 : get skin height
mcall mcall
; DRAW WINDOW ; DRAW WINDOW
mov ebx, 100*65536 + 4*magnify_width + 9 mov ebx, 100*65536 + 4*magnify_width + 9
lea ecx, [eax + 100*65536 + 4*magnify_height + 128] lea ecx, [eax + 100*65536 + 4*magnify_height + 128]
mov edx, 0x34000000 ; color of work area RRGGBB mov edx, 0x34000000 ; color of work area RRGGBB
mov edi, labelt ; header mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window xor eax, eax ; function 0 : define and draw window
mcall mcall
mcall 71, 1, labelt mcall 71, 1, labelt
mcall 12,2 mcall 12,2
ret ret
;------------------------- Magnify draw ;------------------------- Magnify draw
draw_magnify: draw_magnify:
mcall 9, procinfo, -1 mcall 9, 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
mcall 14 ; get screen size mcall 14 ; get screen size
movzx ecx, ax movzx ecx, ax
inc ecx inc ecx
mov [screen_size_y], ecx mov [screen_size_y], ecx
shr eax, 16 shr eax, 16
inc eax inc eax
mov [screen_size_x], eax mov [screen_size_x], eax
xor ebx, ebx xor ebx, ebx
mcall 37 ; get mouse coordinates mcall 37 ; get mouse coordinates
mov ecx, eax mov ecx, eax
shr ecx, 16 ; ecx = x shr ecx, 16 ; ecx = x
movzx edx, ax ; edx = y movzx edx, ax ; edx = y
mov [mouse_x], ecx mov [mouse_x], ecx
mov [mouse_y], edx mov [mouse_y], edx
add ecx, magnify_halfwidth add ecx, magnify_halfwidth
add edx, magnify_halfheight add edx, magnify_halfheight
mov [magnify_area_end_x], ecx mov [magnify_area_end_x], ecx
mov [magnify_area_end_y], edx mov [magnify_area_end_y], edx
sub ecx, magnify_width sub ecx, magnify_width
sub edx, magnify_height sub edx, magnify_height
mov [magnify_area_start_x], ecx mov [magnify_area_start_x], ecx
mov [magnify_area_start_y], edx mov [magnify_area_start_y], edx
.loop_y: .loop_y:
.loop_x: .loop_x:
xor eax, eax ; assume black color for invalid pixels xor eax, eax ; assume black color for invalid pixels
test ecx, ecx test ecx, ecx
js .nopix js .nopix
cmp ecx, [screen_size_x] cmp ecx, [screen_size_x]
jge .nopix jge .nopix
test edx, edx test edx, edx
js .nopix js .nopix
cmp edx, [screen_size_y] cmp edx, [screen_size_y]
jge .nopix jge .nopix
mov ebx, edx mov ebx, edx
sub ebx, [magnify_area_start_y] sub ebx, [magnify_area_start_y]
shl ebx, 16 shl ebx, 16
mov bx, cx mov bx, cx
sub ebx, [magnify_area_start_x] sub ebx, [magnify_area_start_x]
cmp ebx, aim0 cmp ebx, aim0
jz .nopix jz .nopix
cmp ebx, aim1 cmp ebx, aim1
jz .nopix jz .nopix
cmp ebx, aim2 cmp ebx, aim2
jz .nopix jz .nopix
cmp ebx, aim3 cmp ebx, aim3
jz .nopix jz .nopix
mov ebx, edx mov ebx, edx
imul ebx, [screen_size_x] imul ebx, [screen_size_x]
add ebx, ecx add ebx, ecx
mcall 35 ; read pixel mcall 35 ; read pixel
.nopix: .nopix:
push ecx edx push ecx edx
sub ecx, [magnify_area_start_x] sub ecx, [magnify_area_start_x]
sub edx, [magnify_area_start_y] sub edx, [magnify_area_start_y]
mov ebx, ecx mov ebx, ecx
shl ebx, 2+16 shl ebx, 2+16
mov bl, 4 mov bl, 4
mov ecx, edx mov ecx, edx
shl ecx, 2+16 shl ecx, 2+16
mov cl, 4 mov cl, 4
mov edx, eax mov edx, eax
mcall 13 ; draw rectangle 8x8 mcall 13 ; draw rectangle 8x8
pop edx ecx pop edx ecx
inc ecx inc ecx
cmp ecx, [magnify_area_end_x] cmp ecx, [magnify_area_end_x]
jnz .loop_x jnz .loop_x
mov ecx, [magnify_area_start_x] mov ecx, [magnify_area_start_x]
inc edx inc edx
cmp edx, [magnify_area_end_y] cmp edx, [magnify_area_end_y]
jnz .loop_y jnz .loop_y
;------------------------- Measure labels draw ;------------------------- Measure labels draw
mov eax, 4 mov eax, 4
mov ebx, 8*65536 + 124 mov ebx, 8*65536 + 124
mov ecx, 11110000111100001111000011110000b mov ecx, 11110000111100001111000011110000b
mov edx, start_pix mov edx, start_pix
xor edi, edi xor edi, edi
mcall 4 mcall 4
add ebx, 20 add ebx, 20
mov edx, end_pix mov edx, end_pix
mcall 4 mcall 4
add ebx, 20 add ebx, 20
mov edx, measure_x mov edx, measure_x
mcall 4 mcall 4
add ebx, 20 add ebx, 20
mov edx, measure_y mov edx, measure_y
mcall 4 mcall 4
add ebx, 20 add ebx, 20
mov edx, measure_d mov edx, measure_d
mcall 4 mcall 4
add ebx, 20 add ebx, 20
mov edx, inf mov edx, inf
mcall 4 mcall 4
mov ebx, 0x80040000 mov ebx, 0x80040000
mov ecx, [mouse_x] mov ecx, [mouse_x]
mov edx, 12*8*65536 + 144 mov edx, 12*8*65536 + 144
mov esi, 0x50FFFFFF mov esi, 0x50FFFFFF
xor edi, edi xor edi, edi
mcall 47 mcall 47
sub ecx, [pix1_x] sub ecx, [pix1_x]
jns .sign1 jns .sign1
neg ecx neg ecx
.sign1: .sign1:
mov edx, 14*8*65536 + 164 mov edx, 14*8*65536 + 164
mov [dist_x], ecx mov [dist_x], ecx
mcall 47 mcall 47
mov ecx, [mouse_y] mov ecx, [mouse_y]
mov edx, 18*8*65536 + 144 mov edx, 18*8*65536 + 144
mcall 47 mcall 47
sub ecx, [pix1_y] sub ecx, [pix1_y]
jns .sign2 jns .sign2
neg ecx neg ecx
.sign2: .sign2:
mov [dist_y], ecx mov [dist_y], ecx
mov edx, 14*8*65536 + 184 mov edx, 14*8*65536 + 184
mcall 47 mcall 47
mov ecx, [pix1_y] mov ecx, [pix1_y]
mov edx, 18*8*65536 + 124 mov edx, 18*8*65536 + 124
mcall 47 mcall 47
mov ecx, [pix1_x] mov ecx, [pix1_x]
mov edx, 12*8*65536 + 124 mov edx, 12*8*65536 + 124
mcall 47 mcall 47
mov eax, [dist_x] mov eax, [dist_x]
mov ebx, eax mov ebx, eax
mul bx mul bx
mov cx, dx mov cx, dx
shl ecx, 16 shl ecx, 16
mov cx, ax mov cx, ax
mov eax, [dist_y] mov eax, [dist_y]
mov ebx, eax mov ebx, eax
mul bx mul bx
mov si, dx mov si, dx
shl esi, 16 shl esi, 16
mov si, ax mov si, ax
add ecx, esi add ecx, esi
mov [diag_l], ecx mov [diag_l], ecx
finit finit
fild [diag_l] fild [diag_l]
fsqrt fsqrt
fistp [diag_l] fistp [diag_l]
mov ebx, 0x80040000 mov ebx, 0x80040000
mov ecx, [diag_l] mov ecx, [diag_l]
mov edx, 12*8*65536 + 204 mov edx, 12*8*65536 + 204
mov esi, 0x50FFFFFF mov esi, 0x50FFFFFF
xor edi, edi xor edi, edi
mcall 47 mcall 47
.end: .end:
ret ret
;------------------------- Data area ;------------------------- Data area
if lang eq ru_RU if lang eq ru_RU
labelt: labelt:
db 3, 'Измеритель', 0 db 3, 'Измеритель', 0
start_pix: start_pix:
db 'Пиксель 1 ( , )', 0 db 'Пиксель 1 ( , )', 0
end_pix: end_pix:
db 'Пиксель 2 ( , )', 0 db 'Пиксель 2 ( , )', 0
measure_x: measure_x:
db 'Дистанция x ( )', 0 db 'Дистанция x ( )', 0
measure_y: measure_y:
db 'Дистанция y ( )', 0 db 'Дистанция y ( )', 0
measure_d: measure_d:
db 'Диагональ ( )', 0 db 'Диагональ ( )', 0
inf: inf:
db 'Нажмите пробел', 0 db 'Нажмите пробел', 0
else else ; Default to en_US
labelt: labelt:
db 3, 'Ruler', 0 db 3, 'Ruler', 0
start_pix: start_pix:
db 'Pixel 1 ( , )', 0 db 'Pixel 1 ( , )', 0
end_pix: end_pix:
db 'Pixel 2 ( , )', 0 db 'Pixel 2 ( , )', 0
measure_x: measure_x:
db 'Distance x ( )', 0 db 'Distance x ( )', 0
measure_y: measure_y:
db 'Distance y ( )', 0 db 'Distance y ( )', 0
measure_d: measure_d:
db 'Diagonal ( )', 0 db 'Diagonal ( )', 0
inf: inf:
db 'Press Space', 0 db 'Press Space', 0
end if end if
I_END:
align 4 I_END:
magnify_area_start_x dd ? align 4
magnify_area_start_y dd ? magnify_area_start_x dd ?
magnify_area_end_x dd ? magnify_area_start_y dd ?
magnify_area_end_y dd ? magnify_area_end_x dd ?
screen_size_x dd ? magnify_area_end_y dd ?
screen_size_y dd ? screen_size_x dd ?
mouse_x dd ? screen_size_y dd ?
mouse_y dd ? mouse_x dd ?
pix1_x dd 0 mouse_y dd ?
pix1_y dd 0 pix1_x dd 0
dist_x dd 0 pix1_y dd 0
dist_y dd 0 dist_x dd 0
diag_l dd 0 dist_y dd 0
;--------------------------------------------------------------------- diag_l dd 0
procinfo: ;---------------------------------------------------------------------
rb 1024 procinfo:
;--------------------------------------------------------------------- rb 1024
;---------------------------------------------------------------------

View File

@ -19,7 +19,7 @@
dd 0x1000 ; esp dd 0x1000 ; esp
dd 0, 0 ; no parameters, no path dd 0, 0 ; no parameters, no path
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
delay equ 20 delay equ 20
@ -52,7 +52,7 @@ button:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
draw_window: draw_window:
mcall 12,1 mcall 12,1
mov al, 48 ; function 48 : graphics parameters mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height mov bl, 4 ; subfunction 4 : get skin height
mcall mcall
@ -63,7 +63,7 @@ draw_window:
mov edi, labelt ; header mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window xor eax, eax ; function 0 : define and draw window
mcall mcall
mcall 12,2 mcall 12,2
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
@ -80,7 +80,7 @@ draw_magnify:
shr eax, 16 shr eax, 16
inc eax inc eax
mov [size_x], eax mov [size_x], eax
xor ebx, ebx xor ebx, ebx
mcall 37 ; get mouse coordinates mcall 37 ; get mouse coordinates
mov ecx, eax mov ecx, eax
@ -137,7 +137,7 @@ draw_magnify:
if lang eq ru_RU if lang eq ru_RU
labelt: labelt:
db 'Magnifier - <20>ªà ­­ ï «ã¯ ', 0 db 'Magnifier - <20>ªà ­­ ï «ã¯ ', 0
else else ; Default to en_US
labelt: labelt:
db 'Magnifier', 0 db 'Magnifier', 0
end if end if

View File

@ -16,7 +16,7 @@ use32
dd 0x1000 ; esp dd 0x1000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include '..\..\..\macros.inc' include '..\..\..\macros.inc'
START: ; start of execution START: ; start of execution
@ -139,7 +139,7 @@ draw_window:
if lang eq ru_RU if lang eq ru_RU
title db '€‰Œ…<C592>',0 title db '€‰Œ…<C592>',0
else else ; Default to en_US
title db 'TIMER',0 title db 'TIMER',0
end if end if

View File

@ -5,10 +5,10 @@
; last update: 1/03/2007 ; last update: 1/03/2007
; written by: Ivan Poddubny ; written by: Ivan Poddubny
; e-mail: ivan-yar@bk.ru ; e-mail: ivan-yar@bk.ru
;modified by: Heavyiron, maxcodehack ; modified by: Heavyiron, maxcodehack
; <--- include all KolibriOS stuff ---> ; <--- include all KolibriOS stuff --->
include "lang.inc" include "lang.inc" ; Language support for locales: ru_RU (CP866), fr_FR, en_US.
include "..\..\..\..\macros.inc" include "..\..\..\..\macros.inc"
@ -62,7 +62,7 @@ CODE
xor eax, eax ; create and draw the window xor eax, eax ; create and draw the window
mov ebx, 100*65536+200 ; (window_cx)*65536+(window_sx) mov ebx, 100*65536+200 ; (window_cx)*65536+(window_sx)
mov ecx, 100*65536+100 ; (window_cy)*65536+(window_sy) mov ecx, 100*65536+100 ; (window_cy)*65536+(window_sy)
mov edx, [sc.work] ; work area color mov edx, [sc.work] ; work area color
or edx, 0x33000000 ; & window type 3 or edx, 0x33000000 ; & window type 3
mov edi, title ; window title mov edi, title ; window title
int 0x40 int 0x40
@ -80,7 +80,7 @@ if lang eq ru_RU
title db '˜ ¡«®­ ¯à®£à ¬¬ë',0 title db '˜ ¡«®­ ¯à®£à ¬¬ë',0
else if lang eq fr_FR else if lang eq fr_FR
title db 'La programme poncive',0 title db 'La programme poncive',0
else else ; Default to en_US
title db 'Template program',0 title db 'Template program',0
end if end if

View File

@ -15,7 +15,7 @@
dd 0x2000 ; esp dd 0x2000 ; esp
dd 0x0 , 0x0 ; I_Param , I_Icon dd 0x0 , 0x0 ; I_Param , I_Icon
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include '..\..\..\..\macros.inc' include '..\..\..\..\macros.inc'
@ -97,7 +97,7 @@ draw_window:
mov edi,title ; WINDOW LABEL mov edi,title ; WINDOW LABEL
mcall mcall
mov eax,8 ; NEW THREAD BUTTON mov eax,8 ; NEW THREAD BUTTON
mov ebx,20*65536+128 mov ebx,20*65536+128
mov ecx,63*65536+20 mov ecx,63*65536+20
@ -136,11 +136,11 @@ if lang eq ru_RU
db '<27> ¬ïâì ¤«ï ¢á¥å ¯®â®ª®¢ ®¡é ï. ' db '<27> ¬ïâì ¤«ï ¢á¥å ¯®â®ª®¢ ®¡é ï. '
db ' ' db ' '
db ' ‘Ž‡„€’œ <20>Ž<20>ŽŽŠ ' db ' ‘Ž‡„€’œ <20>Ž<20>ŽŽŠ '
db 'x' ; <- END MARKER, DONT DELETE db 'x' ; <- END MARKER, DO NOT DELETE
title db '<27>ਬ¥à ¨á¯®«ì§®¢ ­¨ï ¯®â®ª®¢',0 title db '<27>ਬ¥à ¨á¯®«ì§®¢ ­¨ï ¯®â®ª®¢',0
else else ; Default to en_US
text: text:
db 'THIS EXAMPLE CREATES THREADS BY RUNNING ' db 'THIS EXAMPLE CREATES THREADS BY RUNNING '
db 'THE SAME CODE MULTIPLE TIMES. ALL WE ' db 'THE SAME CODE MULTIPLE TIMES. ALL WE '
@ -149,7 +149,7 @@ else
db ' ' db ' '
db ' ' db ' '
db ' CREATE NEW THREAD ' db ' CREATE NEW THREAD '
db 'x' ; <- END MARKER, DONT DELETE db 'x' ; <- END MARKER, DO NOT DELETE
title db 'THREAD EXAMPLE',0 title db 'THREAD EXAMPLE',0

View File

@ -1,43 +1,42 @@
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
text db ' ‚å” ©«:','‚ëå” ©«:',' <20>ãâì:' text db ' ‚å” ©«:','‚ëå” ©«:',' <20>ãâì:'
.line_size = ($-text)/3 .line_size = ($-text)/3
s_compile db 'Š®¬¯¨«.' s_compile db 'Š®¬¯¨«.'
s_run db ' <20>ã᪠' s_run db ' <20>ã᪠'
s_debug db 'Žâ« ¤ª ' s_debug db 'Žâ« ¤ª '
s_dbgdescr db '‘®§¤ ¢ âì ®â« ¤®ç­ãî ¨­ä®à¬ æ¨î',0 s_dbgdescr db '‘®§¤ ¢ âì ®â« ¤®ç­ãî ¨­ä®à¬ æ¨î',0
sz_EPnotFound db 'Not found entry point to ',0 sz_EPnotFound db 'Not found entry point to ',0
sizeof.sz_EPnotFound = $-sz_EPnotFound sizeof.sz_EPnotFound = $-sz_EPnotFound
sz_cantLL db 'Can not load library ',0 sz_cantLL db 'Cannot load library ',0
sizeof.sz_cantLL = $-sz_cantLL sizeof.sz_cantLL = $-sz_cantLL
sz_system_error db 'System error: ',0 sz_system_error db 'System error: ',0
sizeof.sz_system_error = $-sz_system_error sizeof.sz_system_error = $-sz_system_error
else else ; Default to en_US
text db ' InFile:','OutFile:',' Path:' text db ' InFile:','OutFile:',' Path:'
.line_size = ($-text)/3 .line_size = ($-text)/3
s_compile db 'COMPILE' s_compile db 'COMPILE'
s_run db ' RUN ' s_run db ' RUN '
s_debug db ' DEBUG ' s_debug db ' DEBUG '
s_dbgdescr db 'Generate debug information',0 s_dbgdescr db 'Generate debug information',0
sz_EPnotFound db 'Not found entry point to ',0 sz_EPnotFound db 'Not found entry point to ',0
sizeof.sz_EPnotFound = $-sz_EPnotFound sizeof.sz_EPnotFound = $-sz_EPnotFound
sz_cantLL db 'Can not load library ',0 sz_cantLL db 'Cannot load library ',0
sizeof.sz_cantLL = $-sz_cantLL sizeof.sz_cantLL = $-sz_cantLL
sz_system_error db 'System error: ',0 sz_system_error db 'System error: ',0
sizeof.sz_system_error = $-sz_system_error sizeof.sz_system_error = $-sz_system_error
end if end if

View File

@ -22,7 +22,7 @@ include '../../../macros.inc' ;
include '../../../KOSfuncs.inc' include '../../../KOSfuncs.inc'
include '../../../load_lib.mac' include '../../../load_lib.mac'
include '../../../develop/libraries/box_lib/trunk/box_lib.mac' include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
@use_library @use_library
@ -170,7 +170,7 @@ draw_window:
;or esi, [sys_colors.grab_text] ;or esi, [sys_colors.grab_text]
mcall SF_CREATE_WINDOW, 200*65536+WIN_W, 200*65536+179, ,,title mcall SF_CREATE_WINDOW, 200*65536+WIN_W, 200*65536+179, ,,title
mcall SF_DEFINE_BUTTON, 15*65536+42,106*65536+ 21, 2, [sys_colors.work_button] ; ª­®¯ª  shl mcall SF_DEFINE_BUTTON, 15*65536+42,106*65536+ 21, 2, [sys_colors.work_button] ; ª­®¯ª  shl
mcall , 70*65536+42, , , ; ª­®¯ª  sal mcall , 70*65536+42, , , ; ª­®¯ª  sal
mcall , (WIN_W-55)*65536+42, , 3, ; ª­®¯ª  shr mcall , (WIN_W-55)*65536+42, , 3, ; ª­®¯ª  shr
@ -196,7 +196,7 @@ draw_window:
mcall SF_DRAW_NUMBER, 10*65536, ,(WIN_W-92)*65536+62, ; 10-­ ï á® §­ ª®¬ mcall SF_DRAW_NUMBER, 10*65536, ,(WIN_W-92)*65536+62, ; 10-­ ï á® §­ ª®¬
BIN_LINE_BLOCK_W = 76 BIN_LINE_BLOCK_W = 76
mcall SF_DRAW_NUMBER, 8*65536+512,,(WIN_W-BIN_LINE_BLOCK_W)*65536+30 ; 2-­ ï mcall SF_DRAW_NUMBER, 8*65536+512,,(WIN_W-BIN_LINE_BLOCK_W)*65536+30 ; 2-­ ï
ror ecx, 8 ror ecx, 8
mov edx, (WIN_W-BIN_LINE_BLOCK_W*2)*65536+30 mov edx, (WIN_W-BIN_LINE_BLOCK_W*2)*65536+30
mcall mcall
@ -275,7 +275,7 @@ string1_end:
if lang eq ru_RU if lang eq ru_RU
numstr db '—¨á«®:',0 numstr db '—¨á«®:',0
Okstr db '‚¢®¤',0 Okstr db '‚¢®¤',0
else else ; Default to en_US
numstr db 'Number:',0 numstr db 'Number:',0
Okstr db 'Enter',0 Okstr db 'Enter',0
end if end if

View File

@ -13,7 +13,7 @@
; Marat Zakiyanov aka Mario79, aka Mario ; Marat Zakiyanov aka Mario79, aka Mario
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
; v.014 05.02.2010 ; v.014 05.02.2010
; ;
; PageUp, PageDown - áâà ­¨æ  ¢¢¥àå/¢­¨§ ; PageUp, PageDown - áâà ­¨æ  ¢¢¥àå/¢­¨§
; Ctrl+UP, Ctrl+Down - ¯à®ªàã⪠ áâà ­¨æë ­  áâப㠢¢¥àå/¢­¨§ ¡¥§ ᬥ饭¨ï ªãàá®à  ; Ctrl+UP, Ctrl+Down - ¯à®ªàã⪠ áâà ­¨æë ­  áâப㠢¢¥àå/¢­¨§ ¡¥§ ᬥ饭¨ï ªãàá®à 
; Home,End - ¢ ­ ç «®/ª®­¥æ áâப¨ ; Home,End - ¢ ­ ç «®/ª®­¥æ áâப¨
@ -59,9 +59,9 @@ use32
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
_title equ 'HeEd 0.16', 0 _title equ 'HeEd 0.16', 0
include 'lang.inc' include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
include '../../../KOSfuncs.inc' include '../../../KOSfuncs.inc'
include '../../../config.inc' ;for nightbuild include '../../../config.inc' ; for nightbuild
include '../../../macros.inc' include '../../../macros.inc'
include '../../libraries/box_lib/trunk/box_lib.mac' include '../../libraries/box_lib/trunk/box_lib.mac'
include '../../../load_lib.mac' include '../../../load_lib.mac'
@ -108,25 +108,25 @@ load_libraries l_libs_start,end_l_libs
;OpenDialog initialisation ;OpenDialog initialisation
push dword OpenDialog_data push dword OpenDialog_data
call [OpenDialog_Init] call [OpenDialog_Init]
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
mov esi,fname_buf mov esi,fname_buf
cmp [esi],byte 0 cmp [esi],byte 0
je .start_temp_file_name je .start_temp_file_name
cld cld
@@: @@:
lodsb lodsb
test al,al test al,al
jne @b jne @b
std std
@@: @@:
lodsb lodsb
cmp al,'/' cmp al,'/'
jne @b jne @b
add esi,2 add esi,2
jmp .selected_start_file_name jmp .selected_start_file_name
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
.start_temp_file_name: .start_temp_file_name:
mov esi,start_temp_file_name mov esi,start_temp_file_name
.selected_start_file_name: .selected_start_file_name:
@ -1068,7 +1068,7 @@ main_area:
mov ecx,edx mov ecx,edx
mov edx,frgrd_color mov edx,frgrd_color
movzx ebx,[scroll_bar_data_vertical.x_pos] movzx ebx,[scroll_bar_data_vertical.x_pos]
mov ax,[scroll_bar_data_vertical.x_size] mov ax,[scroll_bar_data_vertical.x_size]
test ax,ax test ax,ax
jnz .no_inc_ebx jnz .no_inc_ebx
@ -1091,7 +1091,7 @@ main_area:
shl ebx,16 shl ebx,16
mov bx,ax mov bx,ax
mov cx,16 mov cx,16
mov ax,[scroll_bar_data_vertical.x_size] mov ax,[scroll_bar_data_vertical.x_size]
test ax,ax test ax,ax
jnz .no_inc_ebx_2 jnz .no_inc_ebx_2
@ -1938,13 +1938,13 @@ draw_ed_box: ;
cmp al,1 cmp al,1
jne .2 jne .2
call draw_window call draw_window
mov eax,[threath_buf+70] mov eax,[threath_buf+70]
test eax,10b test eax,10b
jnz .2 jnz .2
test eax,100b test eax,100b
jnz .2 jnz .2
call main_area call main_area
bt [flags],2 bt [flags],2
jnc @f jnc @f
@ -2805,7 +2805,7 @@ Ctrl_V:
mov [shblock_end],eax mov [shblock_end],eax
jmp red jmp red
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
;¥á«¨ ¡«®ª ­¥ ¢ë¤¥«¥­, â® ¢áâ ¢«ï¥¬ ¡«®ª ¯¥à¥¤ ªãàá®à®¬ ;¥á«¨ ¡«®ª ­¥ ¢ë¤¥«¥­, â® ¢áâ ¢«ï¥¬ ¡«®ª ¯¥à¥¤ ªãàá®à®¬
.past_kurs: .past_kurs:
; bt [flags],1 ; bt [flags],1
; jnc still ; jnc still
@ -2965,7 +2965,7 @@ menu_data_1:
.x1: .x1:
if lang eq ru_RU if lang eq ru_RU
.size_x1 dw 4*2+9*6 ;+32 .size_x1 dw 4*2+9*6 ;+32
else else ; Default to en_US
.size_x1 dw 40 ;+32 .size_x1 dw 40 ;+32
end if end if
.start_x1 dw 2 ;+34 .start_x1 dw 2 ;+34
@ -3000,7 +3000,7 @@ if lang eq ru_RU
db 'Žâªàëâì',0 db 'Žâªàëâì',0
db '‘®åà ­¨âì',0 db '‘®åà ­¨âì',0
db '‚ë室',0 db '‚ë室',0
else else ; Default to en_US
db 'File',0 db 'File',0
.1: .1:
db 'Open',0 db 'Open',0
@ -3056,7 +3056,7 @@ menu_text_area_2:
if lang eq ru_RU if lang eq ru_RU
db '‚¨¤',0 db '‚¨¤',0
.1: .1:
else else ; Default to en_US
db 'View',0 db 'View',0
.1: .1:
end if end if
@ -3074,7 +3074,7 @@ menu_data_3:
.x: .x:
if lang eq ru_RU if lang eq ru_RU
.size_x dw 4*2+7*6 ;+32 .size_x dw 4*2+7*6 ;+32
else else ; Default to en_US
.size_x dw 40 ;+4 .size_x dw 40 ;+4
end if end if
.start_x dw 84 ;+6 .start_x dw 84 ;+6
@ -3089,7 +3089,7 @@ end if
.x1: .x1:
if lang eq ru_RU if lang eq ru_RU
.size_x1 dw 4*2+7*6 ;+32 .size_x1 dw 4*2+7*6 ;+32
else else ; Default to en_US
.size_x1 dw 40 ;+32 .size_x1 dw 40 ;+32
end if end if
.start_x1 dw 84 ;+34 .start_x1 dw 84 ;+34
@ -3122,7 +3122,7 @@ if lang eq ru_RU
db '‘¯à ¢ª ',0 db '‘¯à ¢ª ',0
.1: .1:
db '‘¯à ¢ª ',0 db '‘¯à ¢ª ',0
else else ; Default to en_US
db 'Help',0 db 'Help',0
.1: .1:
db 'Help',0 db 'Help',0
@ -3155,7 +3155,7 @@ if lang eq ru_RU
.e2: .e2:
.3 db '<27> § ¤' .3 db '<27> § ¤'
.e3: .e3:
else else ; Default to en_US
.1 db 'Absolutely' .1 db 'Absolutely'
.e1: .e1:
.2 db 'Forward' .2 db 'Forward'
@ -3181,7 +3181,7 @@ head_f_i:
if lang eq ru_RU if lang eq ru_RU
error_open_file_string db "” ©« ­¥ ­ ©¤¥­!",0 error_open_file_string db "” ©« ­¥ ­ ©¤¥­!",0
error_save_file_string db "” ©« ­¥ á®åà ­¥­!",0 error_save_file_string db "” ©« ­¥ á®åà ­¥­!",0
else else ; Default to en_US
error_open_file_string db "Isn't found!",0 error_open_file_string db "Isn't found!",0
error_save_file_string db "Isn't saved!",0 error_save_file_string db "Isn't saved!",0
end if end if
@ -3240,7 +3240,7 @@ if lang eq ru_RU
db 'Ctrl+C - ª®¯¨à®¢ âì ¡«®ª ' db 'Ctrl+C - ª®¯¨à®¢ âì ¡«®ª '
db 'Ctrl+V - ¢áâ ¢¨âì ¢ ¢ë¤¥«¥­­ãî ®¡« áâì' db 'Ctrl+V - ¢áâ ¢¨âì ¢ ¢ë¤¥«¥­­ãî ®¡« áâì'
db 'Ctrl+X - ¢ë१ âì ¢ ¡ãä¥à ' db 'Ctrl+X - ¢ë१ âì ¢ ¡ãä¥à '
else else ; Default to en_US
db 'Ctrl+O - open file ' db 'Ctrl+O - open file '
db 'Ctrl+S - save file ' db 'Ctrl+S - save file '
db 'PageUp, PageDown - page up/down ' db 'PageUp, PageDown - page up/down '
@ -3268,7 +3268,7 @@ help_end:
;align 4096 ;align 4096
font_buffer file 'cp866-8x16' ;ASCII+cp866 (+ð,ñ) font_buffer file 'cp866-8x16' ;ASCII+cp866 (+ð,ñ)
cp1251 file 'cp1251-8x16' cp1251 file 'cp1251-8x16'
koi8_r file 'koi8-r-8x16' koi8_r file 'koi8-r-8x16'
title db _title title db _title
;--------------------------------------------------------------------- ;---------------------------------------------------------------------