Compare commits

...

14 Commits

Author SHA1 Message Date
Serhii Sakhno
975284f5f3 Eolite: provide label for NVMe disks on left panel
Signed-off-by: Serhii Sakhno <serhii.sakhno.jr@gmail.com>
2024-08-01 22:29:57 +03:00
8ece779b4b Merge pull request 'Extra comma in ksys.h' (#79) from Egor00f/kolibrios:main into main
Reviewed-on: #79
Reviewed-by: Gleb Zaharov <sweetbread@coders-squad.com>
2024-07-23 00:41:58 +02:00
a218a83bd5 Fix ksys.h
Extra comma in ksys_draw_bitmap_palette function
2024-07-22 22:18:31 +00:00
c762489408 Merge pull request 'Correction of error' (#80) from Spaceraven/kolibrios:main into main
Reviewed-on: #80
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
2024-07-17 20:42:05 +02:00
3d02856efe Correction of error 2024-07-17 18:00:55 +05:00
4a166ede82 Another fix for locale names 2024-07-11 09:00:28 +01:00
46e816c366 Fix locale codes for kernel build scripts 2024-07-10 17:42:26 +01:00
65239bc359 [taskbar] Fix context menu strings 2024-07-10 05:02:08 +01:00
f222e98a09 All: Update locale codes (Part 2) (#76)
- Update language codes and add comments.
- Correct `en_US` translations.
- Some whitespace clean-up (mainly EOL sanitation).

Reviewed-on: #76
Co-authored-by: Andrew <dent.ace@gmail.com>
Co-committed-by: Andrew <dent.ace@gmail.com>
2024-06-14 10:35:46 +02:00
c0324e5907 Обновить programs/media/animage/trunk/menu_instruments.inc
animage use system buffer ClipBoard from Copy | Paste
2024-06-09 21:19:46 +02:00
415eaef8db [Boot] Update for locales
- Fixes for new locale codes.
- Some whitespace clean-up.

Reviewed-on: #73
Reviewed-by: Gleb Zaharov <sweetbread@coders-squad.com>
2024-06-05 13:45:06 +02:00
4f08d0ad8b [Boot] Update for locales
- Fixes for new locale codes.
- Some whitespace clean-up.
2024-06-05 10:00:06 +01:00
b6a0bf7729 Fix autobuild text on the blue boot screen 2024-06-03 04:03:51 +01:00
412e42a342 Most of language code fixes 2024-06-03 00:34:02 +01:00
608 changed files with 63086 additions and 62269 deletions

View File

@ -31,10 +31,11 @@ A1. Fine. You will need a corresponding compiler, obviously.
If the compiler produces an error "file not found" regarding 'lang.inc',
the program can be compiled using different languages of interface.
Create a file 'lang.inc' in the same folder as <input.asm> like follows:
lang fix en
lang fix en_US
Here the last word selects the language. Valid languages are
en, ru, et, it, sp. Not all programs provide all translations,
en should always be available, ru is the most frequent after en.
en_US, ru_RU, et_EE, it_IT, es_ES, ca_ES. Not all programs provide all
translations, en_US should always be available, ru_RU is the most frequent
after en_US.
* For a NASM program, get NASM at http://www.nasm.us/.
To compile, find the main .asm file of the program and run
@ -42,7 +43,7 @@ A1. Fine. You will need a corresponding compiler, obviously.
Multi-language is rarely supported in this category, but you could still
see sometimes an error "file not found" regarding 'lang_nasm.inc'. If so,
create a file 'lang_nasm.inc' in the same folder as <input.asm> like follows:
%define lang 'en'
%define lang 'en_US'
Read the entry about fasm for description of valid languages.
* For a c-- program, try to avoid compiling it and instead rewrite the code

View File

@ -1223,10 +1223,10 @@ KOSAPI void _ksys_debug_puts(const char* s)
KOSAPI void ksys_draw_bitmap_palette(void* bitmap, int x, int y, int w, int h, int bpp, void* palette, int offset)
{
asm_inline(
"pushl %%ebp,\n\t" // save EBP register
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
"pushl %%ebp\n\t" // save EBP register
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
"int $0x40\n\t"
"popl %%ebp" // restore EBP register
"popl %%ebp" // restore EBP register
:
: "a"(65),
"b"(bitmap),

View File

@ -884,13 +884,17 @@ for i,v in ipairs(img_files) do
if tup.getconfig("INSERT_COMMIT_ID") ~= ""
then
if build_type == "ru_RU"
then str='$(LANG=ru_RU.utf8 date -u +"[автосборка %d %b %Y %R, r$(get-current-cmtid)]"|iconv -f utf8 -t cp866)'
else str='$(date -u +"[auto-build %d %b %Y %R, r$(get-current-cmtid)]")'
then str='$(LANG=ru_RU.utf8 date -u +"[автосборка %d %b %Y %R, $(get-current-cmtid|grep -oE [a-z0-9]{7}$)]"|iconv -f utf8 -t cp866)'
else str='$(date -u +"[auto-build %d %b %Y %R, $(get-current-cmtid|grep -oE [a-z0-9]{7}$)]")'
end
str = string.gsub(str, "%$", "\\$") -- escape $ as \$
str = string.gsub(str, "%%", "%%%%") -- escape % as %%
cmd += " && str=" .. str
cmd += ' && echo -n $str | dd status=none of=%o bs=1 seek=`expr 274 - length "$str"` conv=notrunc'
str2='$(get-current-cmtid|grep -oE "\\+[0-9]+")'
str2 = string.gsub(str2, "%$", "\\$") -- escape $ as \$
cmd += " && str2=" .. str2
cmd += ' && echo -n $str2 | dd status=none of=%o bs=1 seek=216 conv=notrunc'
end
local_file = VAR_KERNEL .. "/.kernel.mnt"
tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}}

View File

@ -1 +1 @@
lang fix ca
lang fix ca_ES

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language ca
language ca_ES
;just comment
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix en
lang fix en_US

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language EN
language en_US
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix sp
lang fix es_ES

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language SP
language es_ES
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix et
lang fix et_EE

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language ET
language et_EE
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix it
lang fix it_IT

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language IT
language it_IT
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1 +1 @@
lang fix ru
lang fix ru_RU

View File

@ -1,7 +1,7 @@
KolibriOS
version 0770
svnr 4483
language RU
language ru_RU
;just comment
; Hi, curious person! :-)
; Hi, curious person! :-)

View File

@ -1,6 +1,6 @@
FASM=fasm
FLAGS=-m 65536
languages=en|ru|ge|et|sp
languages=en_US|ru_RU|de_DE|et_EE|es_ES
.PHONY: all kernel bootloader clean

View File

@ -315,7 +315,7 @@ end if
int 0x10
if lang eq ru_RU
; Load & set russian VGA font (RU.INC)
; Load & set Russian VGA font 'bootfont-ru_RU'
mov bp, RU_FNT1 ; RU_FNT1 - First part
mov bx, 1000h ; 768 bytes
mov cx, 30h ; 48 symbols
@ -329,8 +329,8 @@ if lang eq ru_RU
mov dx, 0E0h ; 224 - position of first symbol
mov ax, 1100h
int 10h
; End set VGA russian font
else if lang eq et_EE
; Load & set Estonian VGA font 'bootfont-et_EE'
mov bp, ET_FNT ; ET_FNT1
mov bx, 1000h ;
mov cx, 255 ; 256 symbols

View File

@ -24,24 +24,25 @@ org 0
; struct kernel_header
jmp start_of_code ; jump
db 'KolibriOS ' ; signature
db 'v0.7.7.0+ ',13,10,13,10,0 ; version
db 'v0.7.7.0 ',13,10,13,10,0 ; FIXME: get distribution version from git tag
dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point
include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc"
; Language support for locales: de_DE, es_ES, ru_RU (CP866), et_EE, en_US.
if lang eq de_DE
include "boot/bootge.inc" ; german system boot messages
include "boot/bootstr-de_DE.inc" ; German system boot messages
else if lang eq es_ES
include "boot/bootsp.inc" ; spanish system boot messages
include "boot/bootstr-es_ES.inc" ; Spanish system boot messages
else if lang eq ru_RU
include "boot/bootru.inc" ; russian system boot messages
include "boot/ru.inc" ; Russian font
include "boot/bootstr-ru_RU.inc" ; Russian system boot messages
include "boot/bootfont-ru_RU.inc" ; Russian font
else if lang eq et_EE
include "boot/bootet.inc" ; estonian system boot messages
include "boot/et.inc" ; Estonian font
include "boot/bootstr-et_EE.inc" ; Estonian system boot messages
include "boot/bootfont-et_EE.inc" ; Estonian font
else
include "boot/booten.inc" ; english system boot messages
include "boot/bootstr-en_US.inc" ; English system boot messages (default)
end if
include "boot/bootcode.inc" ; 16 bit system boot code

View File

@ -11,8 +11,8 @@ pause
goto :eof
:Target_kernel
rem valid languages: en ru ge et sp
set lang=en
rem valid languages: en_US ru_RU de_DE et_EE es_ES
set lang=en_US
echo *** building kernel with language '%lang%' ...

View File

@ -6,7 +6,7 @@ KERPACK=$HOME/kolibrios/programs/other/kpack/kerpack_linux/kerpack
KOLIBRI_IMG=$HOME/nightly/kolibri.img
replace=0; # Replace kernel in the image file?
echo 'lang fix en' > lang.inc
echo 'lang fix en_US' > lang.inc
fasm -m 65536 bootbios.asm bootbios.bin
fasm -m 65536 kernel.asm kernel.mnt
$KERPACK kernel.mnt kernel.mnt

View File

@ -45,6 +45,7 @@ keymap_alt:
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; Language support for locales: ru_RU (UTF-8), es_ES (data32sp.inc), et_EE (data32et.inc), en_US.
if lang eq ru_RU
boot_initirq cp866 'Инициализация IRQ',0
@ -92,7 +93,7 @@ else if lang eq es_ES
include 'data32sp.inc'
else if lang eq et_EE
include 'data32et.inc'
else
else ; Default to en_US
boot_initirq db 'Initialize IRQ',0
boot_picinit db 'Initialize PIC',0
boot_v86machine db 'Initialize system V86 machine',0
@ -198,27 +199,27 @@ MIN_DEFAULT_DLL_ADDR = 0x70000000
dll_cur_addr dd MIN_DEFAULT_DLL_ADDR
if lang eq en_US
if lang eq en_US ; English (American)
SYSLANG = 1
else if lang eq fi_FI
else if lang eq fi_FI ; Finnish
SYSLANG = 2
else if lang eq de_DE
else if lang eq de_DE ; German
SYSLANG = 3
else if lang eq ru_RU
else if lang eq ru_RU ; Russian
SYSLANG = 4
else if lang eq fr_FR
else if lang eq fr_FR ; French
SYSLANG = 5
else if lang eq et_EE
else if lang eq et_EE ; Estonian
SYSLANG = 6
else if lang eq uk_UA
else if lang eq uk_UA ; Ukrainian
SYSLANG = 7
else if lang eq it_IT
else if lang eq it_IT ; Italian
SYSLANG = 8
else if lang eq nl_BE
else if lang eq nl_BE ; Flemish
SYSLANG = 9
else if lang eq es_ES
else if lang eq es_ES ; Spanish
SYSLANG = 10
else if lang eq ca_ES
else if lang eq ca_ES ; Catalan
SYSLANG = 11
else
display 'unsupported language specified',13,10

View File

@ -2288,7 +2288,7 @@ endg
iglobal
version_inf:
db 0,7,7,0 ; version 0.7.7.0
db 0,7,7,0 ; FIXME: Get distribution version from git tag
db 0
.rev dd __REV__
.size = $ - version_inf

View File

@ -8,5 +8,5 @@
; Éste archivo debe ser editado con codificación CP866
version cp850 'KolibriOS versión 0.7.7.0+ ',13,10,13,10,0
version cp850 'KolibriOS versión 0.7.7.0 ',13,10,13,10,0 ; FIXME: Get distribution version from git tag
diff16 "fin del código del kernel",0,$

View File

@ -37,7 +37,7 @@ goto :eof
:MAIN
set languages=en ru ge et
set languages=en_US ru_RU de_DE et_EE
set __CPU_type=p5 p6 k6
set BIN=bin

View File

@ -62,6 +62,7 @@ char *actions[] = {
#define T_FD "„¨áª¥â  "
#define T_HD "†¥á⪨© ¤¨áª "
#define T_SATA "SATA ¤¨áª "
#define T_NVME "NVMe disk "
#define T_USB "USB ¤¨áª "
#define T_RAM "RAM ¤¨áª "
#define T_UNC "<22>¥¨§¢¥áâ­® "
@ -160,6 +161,7 @@ char *actions[] = {
#define T_FD "Floppy disk "
#define T_HD "Hard disk "
#define T_SATA "SATA disk "
#define T_NVME "NVMe disk "
#define T_USB "USB disk "
#define T_RAM "RAM disk "
#define T_UNC "Unknown "
@ -252,6 +254,7 @@ char *devinfo = {
"hd", 4, T_HD,
"bd", 4, T_HD,
"sd", 4, T_SATA,
"nv", 4, T_NVME,
"tm", 5, T_RAM,
"us", 6, T_USB,
0

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DCUBE2.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")

View File

@ -1,4 +1,4 @@
lang equ ru
lang equ ru_RU
;
; Assembler

View File

@ -1,4 +1,4 @@
lang equ ru ; ru en fr ge fi
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
;
; Assembler

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm 3dcube2.asm 3dcube2
@erase lang.inc
@kpack 3dcube2
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DETX60B.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DETX60B")

View File

@ -1,4 +1,4 @@
lang equ ru
lang equ ru_RU
;
; Assembler

View File

@ -1,4 +1,4 @@
lang equ ru ; ru en fr ge fi
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
;
; Assembler

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm 3detx60b.asm 3detx60b
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm 3detx60b.asm 3detx60b
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"3DTCUB10.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DTCUB10")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm 3dtcub10.asm 3dtcub10
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm 3dtcub10.asm 3dtcub10
@erase lang.inc
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm ScreenRuler.asm ScreenRuler
@kpack ScreenRuler
@erase lang.inc
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm ScreenRuler.asm ScreenRuler
@kpack ScreenRuler
@erase lang.inc
@pause
@pause

View File

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

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"ScreenRuler.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "ScreenRuler")

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"bcdclk.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "bcdclk")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm bcdclk.asm bcdclk
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm bcdclk.asm bcdclk
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"colorref.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "colorref")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm colorref.asm colorref
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm colorref.asm colorref
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"crownscr.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "crownscr")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm crownscr.asm crownscr
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm crownscr.asm crownscr
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"cslide.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "cslide")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm cslide.asm cslide
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"eyes.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "eyes")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm eyes.asm eyes
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm eyes.asm eyes
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"free3d04.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "free3d04")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm free3d04.asm free3d04
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm free3d04.asm free3d04
@erase lang.inc
@pause
@pause

View File

@ -1,4 +1,4 @@
lang equ ru ; ru en fr ge fi
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
;
; Assembler

View File

@ -1,4 +1,4 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm life.asm life
@pause
@pause

View File

@ -1,4 +1,4 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm life.asm life
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"magnify.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "magnify")

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm magnify.asm magnify
@kpack magnify
@erase lang.inc
@pause
@pause

View File

@ -1,6 +1,6 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm magnify.asm magnify
@kpack magnify
@erase lang.inc
@pause
@pause

View File

@ -19,7 +19,7 @@
dd 0x1000 ; esp
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'
delay equ 20
@ -52,7 +52,7 @@ button:
;---------------------------------------------------------------------
draw_window:
mcall 12,1
mov al, 48 ; function 48 : graphics parameters
mov bl, 4 ; subfunction 4 : get skin height
mcall
@ -63,7 +63,7 @@ draw_window:
mov edi, labelt ; header
xor eax, eax ; function 0 : define and draw window
mcall
mcall 12,2
ret
;---------------------------------------------------------------------
@ -80,7 +80,7 @@ draw_magnify:
shr eax, 16
inc eax
mov [size_x], eax
xor ebx, ebx
mcall 37 ; get mouse coordinates
mov ecx, eax
@ -134,10 +134,10 @@ draw_magnify:
;---------------------------------------------------------------------
; DATA AREA
;---------------------------------------------------------------------
if lang eq ru
if lang eq ru_RU
labelt:
db 'Magnifier - <20>ªà ­­ ï «ã¯ ', 0
else
else ; Default to en_US
labelt:
db 'Magnifier', 0
end if
@ -153,4 +153,4 @@ size_y dd ?
;---------------------------------------------------------------------
procinfo:
rb 1024
;---------------------------------------------------------------------
;---------------------------------------------------------------------

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"movback.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "movback")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm movback.asm movback
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"plasma.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "plasma")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm plasma.asm plasma
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"ray.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "ray")

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"timer.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "timer")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm timer.asm timer
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm timer.asm timer
@erase lang.inc
@pause
@pause

View File

@ -16,7 +16,7 @@ use32
dd 0x1000 ; esp
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'
START: ; start of execution
@ -137,9 +137,9 @@ draw_window:
; DATA AREA
if lang eq ru
if lang eq ru_RU
title db '€‰Œ…<C592>',0
else
else ; Default to en_US
title db 'TIMER',0
end if

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"tinyfrac.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "tinyfrac")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm tinyfrac.asm tinyfrac
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm tinyfrac.asm tinyfrac
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"transp.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "transp")

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm transp.asm transp
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm transp.asm transp
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"trantest.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "trantest")

View File

@ -1,4 +1,4 @@
lang equ ru
lang equ ru_RU
;
; Assembler

View File

@ -1,4 +1,4 @@
lang equ ru ; ru en fr ge fi
lang equ ru_RU ; ru_RU en_US fr_FR de_DE fi_FI
;
; Assembler

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm trantest.asm trantest
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm trantest.asm trantest
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix en >lang.inc
@echo lang fix en_US >lang.inc
@fasm tube.asm tube
@erase lang.inc
@pause
@pause

View File

@ -1,5 +1,5 @@
@erase lang.inc
@echo lang fix ru >lang.inc
@echo lang fix ru_RU >lang.inc
@fasm tube.asm tube
@erase lang.inc
@pause
@pause

View File

@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
tup.rule({"use_mb.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "use_mb")

View File

@ -168,7 +168,7 @@ but_5:
stdcall [mb_reinit],msgbox_5_2
jmp still
if lang eq ru
if lang eq ru_RU
txt1 db '¯à®á⮥',0
txt2 db '3 ª­®¯ª¨',0
txt3 db '3 áâப¨',0
@ -190,7 +190,7 @@ end if
msgbox_1:
dw 0
db 'MBox',0 ;+2 = +MB_TEXT_OFFSET
if lang eq ru
if lang eq ru_RU
db '<27>ਬ¥à',0
db '‚¨¦ã',0 ;button1
else
@ -201,7 +201,7 @@ end if
msgbox_2:
dw 0
db 'MBox 3 buttons',0 ;+2 = +MB_TEXT_OFFSET
if lang eq ru
if lang eq ru_RU
db '<27>ਬ¥à á 3-¬ï ª­®¯ª ¬¨',0
db '„ ',0 ;button1
db 'Žâ¬¥­ ',0 ;button2
@ -219,7 +219,7 @@ msgbox_2_funct:
msgbox_3:
dw 0
db 'MBox 3 lines',0 ;+2 = +MB_TEXT_OFFSET
if lang eq ru
if lang eq ru_RU
db '‘âப  1',13,'‘âப  2',13,'‘âப  3',0
db '2020 £.',0 ;button1
else
@ -229,7 +229,7 @@ end if
db 0
msgbox_4:
dw 0
if lang eq ru
if lang eq ru_RU
db '‚¢¥¤¨â¥ ¤¥­ì',0 ;+2 = +MB_TEXT_OFFSET
else
db 'Select day',0 ;+2 = +MB_TEXT_OFFSET
@ -253,7 +253,7 @@ end if
db ' @......@....@..@....@.....@@..@',13
db ' @......@....@..@....@.........@',13
db ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@',0
if lang eq ru
if lang eq ru_RU
db '<27>­',0,'‚â',0,'‘à',0,'—â',0,'<27>â',0,'‘¡',0,'‚®áªà¥á¥­¨¥',0
else
db 'Sun',0,'Mon',0,'Tue',0,'Wed',0,'Thu',0,'Fri',0,'Sat',0
@ -261,7 +261,7 @@ end if
db 0
msgbox_5:
dw 0
if lang eq ru
if lang eq ru_RU
db '‘®®¡é¥­¨¥',0 ;+2 = +MB_TEXT_OFFSET
db '‚믮«­ïî ¯à®æ¥áá ...',0
db 'Žáâ ­®¢¨âì',0
@ -275,7 +275,7 @@ end if
db 0
msgbox_5_2:
dw 0
if lang eq ru
if lang eq ru_RU
db '‘®®¡é¥­¨¥',0 ;+2 = +MB_TEXT_OFFSET
db '‚ᥠ§ ª®­ç¥­®',0
db '‡ ªàëâì ®ª­®',0
@ -326,7 +326,7 @@ fun_show_help:
call draw_square
ret
sh_help db 0
if lang eq ru
if lang eq ru_RU
txt_help db '<27>®¬®éì...'
else
txt_help db 'Help...'

Some files were not shown because too many files have changed in this diff Show More