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