annotate code_part1/OSTC_code_asm_part1/multilang_text.asm @ 718:e633a1aa6b09

chnagelog update
author heinrichsweikamp
date Thu, 23 May 2013 11:07:32 +0200
parents f8239a6279b8
children c50296c3059e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
2 ; OSTC - diving computer code
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
4
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
5 ; This program is free software: you can redistribute it and/or modify
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
6 ; it under the terms of the GNU General Public License as published by
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
7 ; the Free Software Foundation, either version 3 of the License, or
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
8 ; (at your option) any later version.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
9
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
10 ; This program is distributed in the hope that it will be useful,
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
13 ; GNU General Public License for more details.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
14
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
15 ; You should have received a copy of the GNU General Public License
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
17
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
18
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
19 ; hold texts and parameters for the texts
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
21 ; History:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
22 ; 2007/10/13: written
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
23 ; 2008/05/24: Last update Matthias
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
24 ; 2011/02/02: moving texts to english_text.asm to prepare multilingual.
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
25 ; known bugs:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
26 ; ToDo:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
27
187
3b5f81c06db8 French Version Primer.
JeanDo
parents: 182
diff changeset
28 texts code_pack 0x15000
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
29
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
30 TCODE_1 macro x, y, text
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
31 ; Compile-time checking on provided parameters:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
32 If x<0 || x>.159
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
33 Error "Bad X coordinate ", #v(tcode_idx), x
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
34 Endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
35 If y<0 || y>.239
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
36 Error "Bad Y coordinate ", y
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
37 Endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
38 dw tcode_ptr_#v(tcode_idx)
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
39 db 0+x, 0+y
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
40 tcode_idx set tcode_idx+1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
41 endm
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
42
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
43 TCODE_2 macro x, y, text
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
44 tcode_ptr_#v(tcode_idx):
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
45 db text, 0
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
46 tcode_idx set tcode_idx+1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
47 endm
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
48
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
49 ;---- Manage language -------------------------------------------------------
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
50 ; Compile with ASM macro definition GERMAN=1 to use another
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
51 ; file...
604
f8239a6279b8 Italian language support
heinrichsweikamp
parents: 495
diff changeset
52 #ifdef ITALIAN
f8239a6279b8 Italian language support
heinrichsweikamp
parents: 495
diff changeset
53 #define LANGUAGE_FILE "italian_text.asm"
f8239a6279b8 Italian language support
heinrichsweikamp
parents: 495
diff changeset
54 #endif
182
adadccc367a6 added spanish translation
heinrichsweikamp
parents: 174
diff changeset
55 #ifdef SPANISH
adadccc367a6 added spanish translation
heinrichsweikamp
parents: 174
diff changeset
56 #define LANGUAGE_FILE "spanish_text.asm"
adadccc367a6 added spanish translation
heinrichsweikamp
parents: 174
diff changeset
57 #endif
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
58 #ifdef GERMAN
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
59 #define LANGUAGE_FILE "german_text.asm"
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
60 #endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
61 #ifdef FRENCH
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
62 #define LANGUAGE_FILE "french_text.asm"
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
63 #endif
424
8147c35da3ca added russian text version
heinrichsweikamp
parents: 187
diff changeset
64 #ifdef RUSSIAN
8147c35da3ca added russian text version
heinrichsweikamp
parents: 187
diff changeset
65 #define LANGUAGE_FILE "russian_text.asm"
8147c35da3ca added russian text version
heinrichsweikamp
parents: 187
diff changeset
66 #endif
495
a5235ae970af Turkish language added
heinrichsweikamp
parents: 424
diff changeset
67 #ifdef TURKISH
a5235ae970af Turkish language added
heinrichsweikamp
parents: 424
diff changeset
68 #define LANGUAGE_FILE "turkish_text.asm"
a5235ae970af Turkish language added
heinrichsweikamp
parents: 424
diff changeset
69 #endif
174
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
70 #ifndef LANGUAGE_FILE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
71 #define LANGUAGE_FILE "english_text.asm"
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
72 #endif
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
73
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
74 ;---- PASS 1 : generate description block ------------------------------------
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
75 text_pointer:
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
76
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
77 tcode_idx set 1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
78 #define TCODE TCODE_1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
79 #include LANGUAGE_FILE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
80 #undefine TCODE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
81
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
82 ;---- PASS 2 : generate text contens -----------------------------------------
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
83 tcode_idx set 1
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
84 #define TCODE TCODE_2
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
85 #include LANGUAGE_FILE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
86 #undefine TCODE
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
87
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
88 code
53b16a746166 Multi-lang
JeanDo
parents:
diff changeset
89