Compare commits
14 Commits
rewrite_id
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
975284f5f3 | ||
8ece779b4b | |||
a218a83bd5 | |||
c762489408 | |||
3d02856efe | |||
4a166ede82 | |||
46e816c366 | |||
65239bc359 | |||
f222e98a09 | |||
c0324e5907 | |||
415eaef8db | |||
4f08d0ad8b | |||
b6a0bf7729 | |||
412e42a342 |
@ -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',
|
If the compiler produces an error "file not found" regarding 'lang.inc',
|
||||||
the program can be compiled using different languages of interface.
|
the program can be compiled using different languages of interface.
|
||||||
Create a file 'lang.inc' in the same folder as <input.asm> like follows:
|
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
|
Here the last word selects the language. Valid languages are
|
||||||
en, ru, et, it, sp. Not all programs provide all translations,
|
en_US, ru_RU, et_EE, it_IT, es_ES, ca_ES. Not all programs provide all
|
||||||
en should always be available, ru is the most frequent after en.
|
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/.
|
* For a NASM program, get NASM at http://www.nasm.us/.
|
||||||
To compile, find the main .asm file of the program and run
|
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
|
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,
|
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:
|
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.
|
Read the entry about fasm for description of valid languages.
|
||||||
|
|
||||||
* For a c-- program, try to avoid compiling it and instead rewrite the code
|
* For a c-- program, try to avoid compiling it and instead rewrite the code
|
||||||
|
@ -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)
|
KOSAPI void ksys_draw_bitmap_palette(void* bitmap, int x, int y, int w, int h, int bpp, void* palette, int offset)
|
||||||
{
|
{
|
||||||
asm_inline(
|
asm_inline(
|
||||||
"pushl %%ebp,\n\t" // save EBP register
|
"pushl %%ebp\n\t" // save EBP register
|
||||||
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
|
"movl 0x24(%%ebp), %%ebp\n\t" // 0x24 - "offset" param
|
||||||
"int $0x40\n\t"
|
"int $0x40\n\t"
|
||||||
"popl %%ebp" // restore EBP register
|
"popl %%ebp" // restore EBP register
|
||||||
:
|
:
|
||||||
: "a"(65),
|
: "a"(65),
|
||||||
"b"(bitmap),
|
"b"(bitmap),
|
||||||
|
@ -884,13 +884,17 @@ for i,v in ipairs(img_files) do
|
|||||||
if tup.getconfig("INSERT_COMMIT_ID") ~= ""
|
if tup.getconfig("INSERT_COMMIT_ID") ~= ""
|
||||||
then
|
then
|
||||||
if build_type == "ru_RU"
|
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)'
|
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, r$(get-current-cmtid)]")'
|
else str='$(date -u +"[auto-build %d %b %Y %R, $(get-current-cmtid|grep -oE [a-z0-9]{7}$)]")'
|
||||||
end
|
end
|
||||||
str = string.gsub(str, "%$", "\\$") -- escape $ as \$
|
str = string.gsub(str, "%$", "\\$") -- escape $ as \$
|
||||||
str = string.gsub(str, "%%", "%%%%") -- escape % as %%
|
str = string.gsub(str, "%%", "%%%%") -- escape % as %%
|
||||||
cmd += " && str=" .. str
|
cmd += " && str=" .. str
|
||||||
cmd += ' && echo -n $str | dd status=none of=%o bs=1 seek=`expr 274 - length "$str"` conv=notrunc'
|
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
|
end
|
||||||
local_file = VAR_KERNEL .. "/.kernel.mnt"
|
local_file = VAR_KERNEL .. "/.kernel.mnt"
|
||||||
tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}}
|
tup.definerule{inputs = {v[2]}, command = cmd, outputs = {local_file}}
|
||||||
|
@ -1 +1 @@
|
|||||||
lang fix ca
|
lang fix ca_ES
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
KolibriOS
|
KolibriOS
|
||||||
version 0770
|
version 0770
|
||||||
svnr 4483
|
svnr 4483
|
||||||
language ca
|
language ca_ES
|
||||||
|
|
||||||
;just comment
|
;just comment
|
||||||
; Hi, curious person! :-)
|
; Hi, curious person! :-)
|
||||||
|
@ -1 +1 @@
|
|||||||
lang fix en
|
lang fix en_US
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
KolibriOS
|
KolibriOS
|
||||||
version 0770
|
version 0770
|
||||||
svnr 4483
|
svnr 4483
|
||||||
language EN
|
language en_US
|
||||||
|
|
||||||
;just comment
|
;just comment
|
||||||
; Hi, curious person! :-)
|
; Hi, curious person! :-)
|
||||||
|
@ -1 +1 @@
|
|||||||
lang fix sp
|
lang fix es_ES
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
KolibriOS
|
KolibriOS
|
||||||
version 0770
|
version 0770
|
||||||
svnr 4483
|
svnr 4483
|
||||||
language SP
|
language es_ES
|
||||||
|
|
||||||
;just comment
|
;just comment
|
||||||
; Hi, curious person! :-)
|
; Hi, curious person! :-)
|
||||||
|
@ -1 +1 @@
|
|||||||
lang fix et
|
lang fix et_EE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
KolibriOS
|
KolibriOS
|
||||||
version 0770
|
version 0770
|
||||||
svnr 4483
|
svnr 4483
|
||||||
language ET
|
language et_EE
|
||||||
|
|
||||||
;just comment
|
;just comment
|
||||||
; Hi, curious person! :-)
|
; Hi, curious person! :-)
|
||||||
|
@ -1 +1 @@
|
|||||||
lang fix it
|
lang fix it_IT
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
KolibriOS
|
KolibriOS
|
||||||
version 0770
|
version 0770
|
||||||
svnr 4483
|
svnr 4483
|
||||||
language IT
|
language it_IT
|
||||||
|
|
||||||
;just comment
|
;just comment
|
||||||
; Hi, curious person! :-)
|
; Hi, curious person! :-)
|
||||||
|
@ -1 +1 @@
|
|||||||
lang fix ru
|
lang fix ru_RU
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
KolibriOS
|
KolibriOS
|
||||||
version 0770
|
version 0770
|
||||||
svnr 4483
|
svnr 4483
|
||||||
language RU
|
language ru_RU
|
||||||
|
|
||||||
;just comment
|
;just comment
|
||||||
; Hi, curious person! :-)
|
; Hi, curious person! :-)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
FASM=fasm
|
FASM=fasm
|
||||||
FLAGS=-m 65536
|
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
|
.PHONY: all kernel bootloader clean
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ end if
|
|||||||
int 0x10
|
int 0x10
|
||||||
|
|
||||||
if lang eq ru_RU
|
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 bp, RU_FNT1 ; RU_FNT1 - First part
|
||||||
mov bx, 1000h ; 768 bytes
|
mov bx, 1000h ; 768 bytes
|
||||||
mov cx, 30h ; 48 symbols
|
mov cx, 30h ; 48 symbols
|
||||||
@ -329,8 +329,8 @@ if lang eq ru_RU
|
|||||||
mov dx, 0E0h ; 224 - position of first symbol
|
mov dx, 0E0h ; 224 - position of first symbol
|
||||||
mov ax, 1100h
|
mov ax, 1100h
|
||||||
int 10h
|
int 10h
|
||||||
; End set VGA russian font
|
|
||||||
else if lang eq et_EE
|
else if lang eq et_EE
|
||||||
|
; Load & set Estonian VGA font 'bootfont-et_EE'
|
||||||
mov bp, ET_FNT ; ET_FNT1
|
mov bp, ET_FNT ; ET_FNT1
|
||||||
mov bx, 1000h ;
|
mov bx, 1000h ;
|
||||||
mov cx, 255 ; 256 symbols
|
mov cx, 255 ; 256 symbols
|
||||||
|
@ -24,24 +24,25 @@ org 0
|
|||||||
; struct kernel_header
|
; struct kernel_header
|
||||||
jmp start_of_code ; jump
|
jmp start_of_code ; jump
|
||||||
db 'KolibriOS ' ; signature
|
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
|
dd B32-KERNEL_BASE ; offset of the kernel's 32-bit entry point
|
||||||
|
|
||||||
include "boot/bootstr.inc" ; language-independent boot messages
|
include "boot/bootstr.inc" ; language-independent boot messages
|
||||||
include "boot/preboot.inc"
|
include "boot/preboot.inc"
|
||||||
|
|
||||||
|
; Language support for locales: de_DE, es_ES, ru_RU (CP866), et_EE, en_US.
|
||||||
if lang eq de_DE
|
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
|
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
|
else if lang eq ru_RU
|
||||||
include "boot/bootru.inc" ; russian system boot messages
|
include "boot/bootstr-ru_RU.inc" ; Russian system boot messages
|
||||||
include "boot/ru.inc" ; Russian font
|
include "boot/bootfont-ru_RU.inc" ; Russian font
|
||||||
else if lang eq et_EE
|
else if lang eq et_EE
|
||||||
include "boot/bootet.inc" ; estonian system boot messages
|
include "boot/bootstr-et_EE.inc" ; Estonian system boot messages
|
||||||
include "boot/et.inc" ; Estonian font
|
include "boot/bootfont-et_EE.inc" ; Estonian font
|
||||||
else
|
else
|
||||||
include "boot/booten.inc" ; english system boot messages
|
include "boot/bootstr-en_US.inc" ; English system boot messages (default)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
include "boot/bootcode.inc" ; 16 bit system boot code
|
include "boot/bootcode.inc" ; 16 bit system boot code
|
||||||
|
@ -11,8 +11,8 @@ pause
|
|||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:Target_kernel
|
:Target_kernel
|
||||||
rem valid languages: en ru ge et sp
|
rem valid languages: en_US ru_RU de_DE et_EE es_ES
|
||||||
set lang=en
|
set lang=en_US
|
||||||
|
|
||||||
echo *** building kernel with language '%lang%' ...
|
echo *** building kernel with language '%lang%' ...
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ KERPACK=$HOME/kolibrios/programs/other/kpack/kerpack_linux/kerpack
|
|||||||
KOLIBRI_IMG=$HOME/nightly/kolibri.img
|
KOLIBRI_IMG=$HOME/nightly/kolibri.img
|
||||||
|
|
||||||
replace=0; # Replace kernel in the image file?
|
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 bootbios.asm bootbios.bin
|
||||||
fasm -m 65536 kernel.asm kernel.mnt
|
fasm -m 65536 kernel.asm kernel.mnt
|
||||||
$KERPACK kernel.mnt kernel.mnt
|
$KERPACK kernel.mnt kernel.mnt
|
||||||
|
@ -45,6 +45,7 @@ keymap_alt:
|
|||||||
db 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
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
|
if lang eq ru_RU
|
||||||
boot_initirq cp866 'Инициализация IRQ',0
|
boot_initirq cp866 'Инициализация IRQ',0
|
||||||
@ -92,7 +93,7 @@ else if lang eq es_ES
|
|||||||
include 'data32sp.inc'
|
include 'data32sp.inc'
|
||||||
else if lang eq et_EE
|
else if lang eq et_EE
|
||||||
include 'data32et.inc'
|
include 'data32et.inc'
|
||||||
else
|
else ; Default to en_US
|
||||||
boot_initirq db 'Initialize IRQ',0
|
boot_initirq db 'Initialize IRQ',0
|
||||||
boot_picinit db 'Initialize PIC',0
|
boot_picinit db 'Initialize PIC',0
|
||||||
boot_v86machine db 'Initialize system V86 machine',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
|
dll_cur_addr dd MIN_DEFAULT_DLL_ADDR
|
||||||
|
|
||||||
|
|
||||||
if lang eq en_US
|
if lang eq en_US ; English (American)
|
||||||
SYSLANG = 1
|
SYSLANG = 1
|
||||||
else if lang eq fi_FI
|
else if lang eq fi_FI ; Finnish
|
||||||
SYSLANG = 2
|
SYSLANG = 2
|
||||||
else if lang eq de_DE
|
else if lang eq de_DE ; German
|
||||||
SYSLANG = 3
|
SYSLANG = 3
|
||||||
else if lang eq ru_RU
|
else if lang eq ru_RU ; Russian
|
||||||
SYSLANG = 4
|
SYSLANG = 4
|
||||||
else if lang eq fr_FR
|
else if lang eq fr_FR ; French
|
||||||
SYSLANG = 5
|
SYSLANG = 5
|
||||||
else if lang eq et_EE
|
else if lang eq et_EE ; Estonian
|
||||||
SYSLANG = 6
|
SYSLANG = 6
|
||||||
else if lang eq uk_UA
|
else if lang eq uk_UA ; Ukrainian
|
||||||
SYSLANG = 7
|
SYSLANG = 7
|
||||||
else if lang eq it_IT
|
else if lang eq it_IT ; Italian
|
||||||
SYSLANG = 8
|
SYSLANG = 8
|
||||||
else if lang eq nl_BE
|
else if lang eq nl_BE ; Flemish
|
||||||
SYSLANG = 9
|
SYSLANG = 9
|
||||||
else if lang eq es_ES
|
else if lang eq es_ES ; Spanish
|
||||||
SYSLANG = 10
|
SYSLANG = 10
|
||||||
else if lang eq ca_ES
|
else if lang eq ca_ES ; Catalan
|
||||||
SYSLANG = 11
|
SYSLANG = 11
|
||||||
else
|
else
|
||||||
display 'unsupported language specified',13,10
|
display 'unsupported language specified',13,10
|
||||||
|
@ -2288,7 +2288,7 @@ endg
|
|||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
version_inf:
|
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
|
db 0
|
||||||
.rev dd __REV__
|
.rev dd __REV__
|
||||||
.size = $ - version_inf
|
.size = $ - version_inf
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
|
|
||||||
; Éste archivo debe ser editado con codificación CP866
|
; É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,$
|
diff16 "fin del código del kernel",0,$
|
||||||
|
@ -37,7 +37,7 @@ goto :eof
|
|||||||
|
|
||||||
|
|
||||||
:MAIN
|
:MAIN
|
||||||
set languages=en ru ge et
|
set languages=en_US ru_RU de_DE et_EE
|
||||||
set __CPU_type=p5 p6 k6
|
set __CPU_type=p5 p6 k6
|
||||||
set BIN=bin
|
set BIN=bin
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ char *actions[] = {
|
|||||||
#define T_FD "„¨áª¥â "
|
#define T_FD "„¨áª¥â "
|
||||||
#define T_HD "†¥á⪨© ¤¨áª "
|
#define T_HD "†¥á⪨© ¤¨áª "
|
||||||
#define T_SATA "SATA ¤¨áª "
|
#define T_SATA "SATA ¤¨áª "
|
||||||
|
#define T_NVME "NVMe disk "
|
||||||
#define T_USB "USB ¤¨áª "
|
#define T_USB "USB ¤¨áª "
|
||||||
#define T_RAM "RAM ¤¨áª "
|
#define T_RAM "RAM ¤¨áª "
|
||||||
#define T_UNC "<22>¥¨§¢¥áâ® "
|
#define T_UNC "<22>¥¨§¢¥áâ® "
|
||||||
@ -160,6 +161,7 @@ char *actions[] = {
|
|||||||
#define T_FD "Floppy disk "
|
#define T_FD "Floppy disk "
|
||||||
#define T_HD "Hard disk "
|
#define T_HD "Hard disk "
|
||||||
#define T_SATA "SATA disk "
|
#define T_SATA "SATA disk "
|
||||||
|
#define T_NVME "NVMe disk "
|
||||||
#define T_USB "USB disk "
|
#define T_USB "USB disk "
|
||||||
#define T_RAM "RAM disk "
|
#define T_RAM "RAM disk "
|
||||||
#define T_UNC "Unknown "
|
#define T_UNC "Unknown "
|
||||||
@ -252,6 +254,7 @@ char *devinfo = {
|
|||||||
"hd", 4, T_HD,
|
"hd", 4, T_HD,
|
||||||
"bd", 4, T_HD,
|
"bd", 4, T_HD,
|
||||||
"sd", 4, T_SATA,
|
"sd", 4, T_SATA,
|
||||||
|
"nv", 4, T_NVME,
|
||||||
"tm", 5, T_RAM,
|
"tm", 5, T_RAM,
|
||||||
"us", 6, T_USB,
|
"us", 6, T_USB,
|
||||||
0
|
0
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"3DCUBE2.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DCUBE2")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
lang equ ru
|
lang equ ru_RU
|
||||||
|
|
||||||
;
|
;
|
||||||
; Assembler
|
; Assembler
|
||||||
|
@ -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
|
; Assembler
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm 3dcube2.asm 3dcube2
|
@fasm 3dcube2.asm 3dcube2
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@kpack 3dcube2
|
@kpack 3dcube2
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm 3dcube2.asm 3dcube2
|
@fasm 3dcube2.asm 3dcube2
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@kpack 3dcube2
|
@kpack 3dcube2
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"3DETX60B.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DETX60B")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
lang equ ru
|
lang equ ru_RU
|
||||||
|
|
||||||
;
|
;
|
||||||
; Assembler
|
; Assembler
|
||||||
|
@ -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
|
; Assembler
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm 3detx60b.asm 3detx60b
|
@fasm 3detx60b.asm 3detx60b
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm 3detx60b.asm 3detx60b
|
@fasm 3detx60b.asm 3detx60b
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"3DTCUB10.ASM", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "3DTCUB10")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm 3dtcub10.asm 3dtcub10
|
@fasm 3dtcub10.asm 3dtcub10
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm 3dtcub10.asm 3dtcub10
|
@fasm 3dtcub10.asm 3dtcub10
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm ScreenRuler.asm ScreenRuler
|
@fasm ScreenRuler.asm ScreenRuler
|
||||||
@kpack ScreenRuler
|
@kpack ScreenRuler
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm ScreenRuler.asm ScreenRuler
|
@fasm ScreenRuler.asm ScreenRuler
|
||||||
@kpack ScreenRuler
|
@kpack ScreenRuler
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -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
|
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
|
||||||
|
;---------------------------------------------------------------------
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"ScreenRuler.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "ScreenRuler")
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"bcdclk.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "bcdclk")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm bcdclk.asm bcdclk
|
@fasm bcdclk.asm bcdclk
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm bcdclk.asm bcdclk
|
@fasm bcdclk.asm bcdclk
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"colorref.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "colorref")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm colorref.asm colorref
|
@fasm colorref.asm colorref
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm colorref.asm colorref
|
@fasm colorref.asm colorref
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"crownscr.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "crownscr")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm crownscr.asm crownscr
|
@fasm crownscr.asm crownscr
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm crownscr.asm crownscr
|
@fasm crownscr.asm crownscr
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"cslide.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "cslide")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm cslide.asm cslide
|
@fasm cslide.asm cslide
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm cslide.asm cslide
|
@fasm cslide.asm cslide
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"eyes.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "eyes")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm eyes.asm eyes
|
@fasm eyes.asm eyes
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm eyes.asm eyes
|
@fasm eyes.asm eyes
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"free3d04.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "free3d04")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm free3d04.asm free3d04
|
@fasm free3d04.asm free3d04
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm free3d04.asm free3d04
|
@fasm free3d04.asm free3d04
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -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
|
; Assembler
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm life.asm life
|
@fasm life.asm life
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm life.asm life
|
@fasm life.asm life
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"magnify.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "magnify")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm magnify.asm magnify
|
@fasm magnify.asm magnify
|
||||||
@kpack magnify
|
@kpack magnify
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm magnify.asm magnify
|
@fasm magnify.asm magnify
|
||||||
@kpack magnify
|
@kpack magnify
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -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
|
||||||
@ -134,10 +134,10 @@ draw_magnify:
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
; DATA AREA
|
; DATA AREA
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
if lang eq 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
|
||||||
@ -153,4 +153,4 @@ size_y dd ?
|
|||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
procinfo:
|
procinfo:
|
||||||
rb 1024
|
rb 1024
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"movback.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "movback")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm movback.asm movback
|
@fasm movback.asm movback
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm movback.asm movback
|
@fasm movback.asm movback
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"plasma.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "plasma")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm plasma.asm plasma
|
@fasm plasma.asm plasma
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm plasma.asm plasma
|
@fasm plasma.asm plasma
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"ray.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "ray")
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"timer.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "timer")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm timer.asm timer
|
@fasm timer.asm timer
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm timer.asm timer
|
@fasm timer.asm timer
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -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
|
||||||
@ -137,9 +137,9 @@ draw_window:
|
|||||||
|
|
||||||
; DATA AREA
|
; DATA AREA
|
||||||
|
|
||||||
if lang eq 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
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"tinyfrac.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "tinyfrac")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm tinyfrac.asm tinyfrac
|
@fasm tinyfrac.asm tinyfrac
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm tinyfrac.asm tinyfrac
|
@fasm tinyfrac.asm tinyfrac
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"transp.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "transp")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm transp.asm transp
|
@fasm transp.asm transp
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm transp.asm transp
|
@fasm transp.asm transp
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"trantest.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "trantest")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
lang equ ru
|
lang equ ru_RU
|
||||||
|
|
||||||
;
|
;
|
||||||
; Assembler
|
; Assembler
|
||||||
|
@ -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
|
; Assembler
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm trantest.asm trantest
|
@fasm trantest.asm trantest
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm trantest.asm trantest
|
@fasm trantest.asm trantest
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix en >lang.inc
|
@echo lang fix en_US >lang.inc
|
||||||
@fasm tube.asm tube
|
@fasm tube.asm tube
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@echo lang fix ru >lang.inc
|
@echo lang fix ru_RU >lang.inc
|
||||||
@fasm tube.asm tube
|
@fasm tube.asm tube
|
||||||
@erase lang.inc
|
@erase lang.inc
|
||||||
@pause
|
@pause
|
||||||
|
@ -3,5 +3,5 @@ HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HEL
|
|||||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||||
add_include(tup.getvariantdir())
|
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")
|
tup.rule({"use_mb.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "use_mb")
|
||||||
|
@ -168,7 +168,7 @@ but_5:
|
|||||||
stdcall [mb_reinit],msgbox_5_2
|
stdcall [mb_reinit],msgbox_5_2
|
||||||
jmp still
|
jmp still
|
||||||
|
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
txt1 db '¯à®á⮥',0
|
txt1 db '¯à®á⮥',0
|
||||||
txt2 db '3 ª®¯ª¨',0
|
txt2 db '3 ª®¯ª¨',0
|
||||||
txt3 db '3 áâப¨',0
|
txt3 db '3 áâப¨',0
|
||||||
@ -190,7 +190,7 @@ end if
|
|||||||
msgbox_1:
|
msgbox_1:
|
||||||
dw 0
|
dw 0
|
||||||
db 'MBox',0 ;+2 = +MB_TEXT_OFFSET
|
db 'MBox',0 ;+2 = +MB_TEXT_OFFSET
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
db '<27>ਬ¥à',0
|
db '<27>ਬ¥à',0
|
||||||
db '‚¨¦ã',0 ;button1
|
db '‚¨¦ã',0 ;button1
|
||||||
else
|
else
|
||||||
@ -201,7 +201,7 @@ end if
|
|||||||
msgbox_2:
|
msgbox_2:
|
||||||
dw 0
|
dw 0
|
||||||
db 'MBox 3 buttons',0 ;+2 = +MB_TEXT_OFFSET
|
db 'MBox 3 buttons',0 ;+2 = +MB_TEXT_OFFSET
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
db '<27>ਬ¥à á 3-¬ï ª®¯ª ¬¨',0
|
db '<27>ਬ¥à á 3-¬ï ª®¯ª ¬¨',0
|
||||||
db '„ ',0 ;button1
|
db '„ ',0 ;button1
|
||||||
db 'Žâ¬¥ ',0 ;button2
|
db 'Žâ¬¥ ',0 ;button2
|
||||||
@ -219,7 +219,7 @@ msgbox_2_funct:
|
|||||||
msgbox_3:
|
msgbox_3:
|
||||||
dw 0
|
dw 0
|
||||||
db 'MBox 3 lines',0 ;+2 = +MB_TEXT_OFFSET
|
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 '‘âப 1',13,'‘âப 2',13,'‘âப 3',0
|
||||||
db '2020 £.',0 ;button1
|
db '2020 £.',0 ;button1
|
||||||
else
|
else
|
||||||
@ -229,7 +229,7 @@ end if
|
|||||||
db 0
|
db 0
|
||||||
msgbox_4:
|
msgbox_4:
|
||||||
dw 0
|
dw 0
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
db '‚¢¥¤¨â¥ ¤¥ì',0 ;+2 = +MB_TEXT_OFFSET
|
db '‚¢¥¤¨â¥ ¤¥ì',0 ;+2 = +MB_TEXT_OFFSET
|
||||||
else
|
else
|
||||||
db 'Select day',0 ;+2 = +MB_TEXT_OFFSET
|
db 'Select day',0 ;+2 = +MB_TEXT_OFFSET
|
||||||
@ -253,7 +253,7 @@ end if
|
|||||||
db ' @......@....@..@....@.....@@..@',13
|
db ' @......@....@..@....@.....@@..@',13
|
||||||
db ' @......@....@..@....@.........@',13
|
db ' @......@....@..@....@.........@',13
|
||||||
db ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@',0
|
db ' @@@@@@@@@@@@@@@@@@@@@@@@@@@@@',0
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
db '<27>',0,'‚â',0,'‘à',0,'—â',0,'<27>â',0,'‘¡',0,'‚®áªà¥á¥¨¥',0
|
db '<27>',0,'‚â',0,'‘à',0,'—â',0,'<27>â',0,'‘¡',0,'‚®áªà¥á¥¨¥',0
|
||||||
else
|
else
|
||||||
db 'Sun',0,'Mon',0,'Tue',0,'Wed',0,'Thu',0,'Fri',0,'Sat',0
|
db 'Sun',0,'Mon',0,'Tue',0,'Wed',0,'Thu',0,'Fri',0,'Sat',0
|
||||||
@ -261,7 +261,7 @@ end if
|
|||||||
db 0
|
db 0
|
||||||
msgbox_5:
|
msgbox_5:
|
||||||
dw 0
|
dw 0
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
db '‘®®¡é¥¨¥',0 ;+2 = +MB_TEXT_OFFSET
|
db '‘®®¡é¥¨¥',0 ;+2 = +MB_TEXT_OFFSET
|
||||||
db '‚믮«ïî ¯à®æ¥áá ...',0
|
db '‚믮«ïî ¯à®æ¥áá ...',0
|
||||||
db 'Žáâ ®¢¨âì',0
|
db 'Žáâ ®¢¨âì',0
|
||||||
@ -275,7 +275,7 @@ end if
|
|||||||
db 0
|
db 0
|
||||||
msgbox_5_2:
|
msgbox_5_2:
|
||||||
dw 0
|
dw 0
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
db '‘®®¡é¥¨¥',0 ;+2 = +MB_TEXT_OFFSET
|
db '‘®®¡é¥¨¥',0 ;+2 = +MB_TEXT_OFFSET
|
||||||
db '‚ᥠ§ ª®ç¥®',0
|
db '‚ᥠ§ ª®ç¥®',0
|
||||||
db '‡ ªàëâì ®ª®',0
|
db '‡ ªàëâì ®ª®',0
|
||||||
@ -326,7 +326,7 @@ fun_show_help:
|
|||||||
call draw_square
|
call draw_square
|
||||||
ret
|
ret
|
||||||
sh_help db 0
|
sh_help db 0
|
||||||
if lang eq ru
|
if lang eq ru_RU
|
||||||
txt_help db '<27>®¬®éì...'
|
txt_help db '<27>®¬®éì...'
|
||||||
else
|
else
|
||||||
txt_help db 'Help...'
|
txt_help db 'Help...'
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user