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...
|
182
|
52 #ifdef SPANISH
|
|
53 #define LANGUAGE_FILE "spanish_text.asm"
|
|
54 #endif
|
174
|
55 #ifdef GERMAN
|
|
56 #define LANGUAGE_FILE "german_text.asm"
|
|
57 #endif
|
|
58 #ifdef FRENCH
|
|
59 #define LANGUAGE_FILE "french_text.asm"
|
|
60 #endif
|
424
|
61 #ifdef RUSSIAN
|
|
62 #define LANGUAGE_FILE "russian_text.asm"
|
|
63 #endif
|
495
|
64 #ifdef TURKISH
|
|
65 #define LANGUAGE_FILE "turkish_text.asm"
|
|
66 #endif
|
174
|
67 #ifndef LANGUAGE_FILE
|
|
68 #define LANGUAGE_FILE "english_text.asm"
|
|
69 #endif
|
|
70
|
|
71 ;---- PASS 1 : generate description block ------------------------------------
|
|
72 text_pointer:
|
|
73
|
|
74 tcode_idx set 1
|
|
75 #define TCODE TCODE_1
|
|
76 #include LANGUAGE_FILE
|
|
77 #undefine TCODE
|
|
78
|
|
79 ;---- PASS 2 : generate text contens -----------------------------------------
|
|
80 tcode_idx set 1
|
|
81 #define TCODE TCODE_2
|
|
82 #include LANGUAGE_FILE
|
|
83 #undefine TCODE
|
|
84
|
|
85 code
|
|
86
|