From 4915dae5a6d9f3a138b6573f22457d57bfc2627e Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Wed, 15 May 2013 20:48:18 +0000 Subject: [PATCH] nasm: use preprocessor-time defines for lang git-svn-id: svn://kolibrios.org@3510 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/eng/lang_nasm.inc | 2 +- data/it/lang_nasm.inc | 2 +- data/rus/lang_nasm.inc | 2 +- data/sp/lang_nasm.inc | 2 +- programs/games/c4/trunk/c4.asm | 18 +++++++++--------- programs/games/c4/trunk/makefile | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/data/eng/lang_nasm.inc b/data/eng/lang_nasm.inc index f7459c9526..dbfde88817 100644 --- a/data/eng/lang_nasm.inc +++ b/data/eng/lang_nasm.inc @@ -1 +1 @@ -lang equ 'en' \ No newline at end of file +%define lang 'en' diff --git a/data/it/lang_nasm.inc b/data/it/lang_nasm.inc index 19fa012fea..a229bc9eef 100644 --- a/data/it/lang_nasm.inc +++ b/data/it/lang_nasm.inc @@ -1 +1 @@ -lang equ 'it' \ No newline at end of file +%define lang 'it' diff --git a/data/rus/lang_nasm.inc b/data/rus/lang_nasm.inc index 0dc4a556e5..b0ad4180f8 100644 --- a/data/rus/lang_nasm.inc +++ b/data/rus/lang_nasm.inc @@ -1 +1 @@ -lang equ 'ru' \ No newline at end of file +%define lang 'ru' diff --git a/data/sp/lang_nasm.inc b/data/sp/lang_nasm.inc index 0a3e1db1c3..2ddd45d33e 100644 --- a/data/sp/lang_nasm.inc +++ b/data/sp/lang_nasm.inc @@ -1 +1 @@ -lang equ 'sp' \ No newline at end of file +%define lang 'sp' diff --git a/programs/games/c4/trunk/c4.asm b/programs/games/c4/trunk/c4.asm index 071d43c017..a103858047 100644 --- a/programs/games/c4/trunk/c4.asm +++ b/programs/games/c4/trunk/c4.asm @@ -46,7 +46,7 @@ BUTTON_HEIGHT equ 12 BUTTON_NEW_X equ 14 BUTTON_NEW_Y equ 30 -%if lang = 'it' +%ifidn lang, 'it' BUTTON_NEW_WIDTH equ 56 + 28 %else BUTTON_NEW_WIDTH equ 56 @@ -64,7 +64,7 @@ BUTTON_PL2UP_X equ (BUTTON_PL2DN_X + BUTTON_SPIN_WIDTH + 1) BUTTON_PL2UP_Y equ BUTTON_PL2DN_Y ; label dimensions -%if lang = 'it' +%ifidn lang, 'it' LABEL_PL1_X equ 90 + 10 %else LABEL_PL1_X equ 90 @@ -72,7 +72,7 @@ BUTTON_PL2UP_Y equ BUTTON_PL2DN_Y LABEL_PL1_Y equ (1 + BUTTON_PL1DN_Y + (BUTTON_HEIGHT-8)/2) LABEL_PL2_X equ LABEL_PL1_X LABEL_PL2_Y equ (1 + BUTTON_PL2DN_Y + (BUTTON_HEIGHT-8)/2) -%if lang = 'it' +%ifidn lang, 'it' LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*6 - 4) %else LABEL_PL1TYPE_X equ (LABEL_PL1_X + 10*6) @@ -777,14 +777,14 @@ NBUTTONS equ (($-buttons)/BUTTON_size) ; ; label table ; -%if lang = 'it' +%ifidn lang, 'it' newgame db "Nuova partita",0 %else newgame db "New game",0 %endif down db "<",0 up db ">",0 -%if lang = 'it' +%ifidn lang, 'it' pl1 db "Giocatore 1:",0 pl2 db "Giocatore 2:",0 %else @@ -792,7 +792,7 @@ up db ">",0 pl2 db "Player 2:",0 %endif -%if lang = 'it' +%ifidn lang, 'it' playertypes: db "Umano",0 PLAYERTYPELEN equ ($ - playertypes) @@ -882,7 +882,7 @@ iend label_pl1type: istruc LABEL at LABEL.position - %if lang = 'it' + %ifidn lang, 'it' dd MOS_DWORD(LABEL_PL1TYPE_X + 18,LABEL_PL1TYPE_Y) %else dd MOS_DWORD(LABEL_PL1TYPE_X,LABEL_PL1TYPE_Y) @@ -894,7 +894,7 @@ iend label_pl2type: istruc LABEL at LABEL.position - %if lang = 'it' + %ifidn lang, 'it' dd MOS_DWORD(LABEL_PL2TYPE_X + 18,LABEL_PL2TYPE_Y) %else dd MOS_DWORD(LABEL_PL2TYPE_X,LABEL_PL2TYPE_Y) @@ -912,7 +912,7 @@ player2_type dd PL2TYPE_INIT ; status messages -%if lang = 'it' +%ifidn lang, 'it' player1hmnprmpt db "Turno del giocatore 1",0 player2hmnprmpt db "Turno del giocatore 2",0 player1cpuprmpt db "Attendi, giocatore 1 sta pensando...",0 diff --git a/programs/games/c4/trunk/makefile b/programs/games/c4/trunk/makefile index 4a4e57e048..2c2856a85d 100644 --- a/programs/games/c4/trunk/makefile +++ b/programs/games/c4/trunk/makefile @@ -12,11 +12,11 @@ OUT=${FILE}.bin all:en en: - echo "lang equ 'en'" > lang_nasm.inc + echo "%define lang 'en'" > lang_nasm.inc ${NASM} -f bin -o ${OUT} ${SOURCE} it: - echo "lang equ 'it'" > lang_nasm.inc + echo "%define lang 'it'" > lang_nasm.inc ${NASM} -f bin -o ${OUT} ${SOURCE} clean: