/[projet1]/users/chema/TINE/data.s
Defence Force logotype

Contents of /users/chema/TINE/data.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 177 - (show annotations)
Tue Dec 22 19:21:26 2009 UTC (10 years, 5 months ago) by Chema
File size: 8218 byte(s)
Corrected a bug where thargons were not given the ECM. Also thargoids carried are random (0-3).

Tested that it is possible to fight a thargon. It is, if well equipped, but the trick of firing a missile when very close is quite helpful.

Adapted the ship size to the scaled-down versions.

Corrected the bug where planet_distance was not correctly set at the first frame. Now you can't jump just after undocking.

Corrected the visibility distance, so it is no more possible that a ship in front of you fires, while it is not visible (lasers incorrectly drawn).

Added shipdatal.xls (with the scaling factor and size) to the repository.
1
2 #include "oobj3d/obj3d.h"
3 #include "tine.h"
4 #include "ships.h"
5
6
7 ; Player workspace (for saving)
8
9 ;unsigned char name[32]="Jameson"; /* Commander's name */
10 ;unsigned int shipshold[lasttrade+1]; /* Contents of cargo bay */
11 ;unsigned char currentplanet; /* Current planet */
12 ;unsigned char galaxynum=1; /* Galaxy number (1-8) */
13 ;unsigned char cash[4]={0xd0,0x07,0,0}; /* four bytes for cash */
14 ;unsigned char fuel=70; /* Amount of fuel, can this be a byte? */
15 ;unsigned char fluct; /* price fluctuation */
16 ;unsigned int holdspace=20; /* Current space used? */
17 ;unsigned char legal_status=50; /* Current legal status 0=Clean, <50=Offender, >50=Fugitive */
18 ;unsigned int score=60000; /* Score. Can this be just two bytes? */
19 ;unsigned char mission=0; /* Current mission */
20 ;unsigned int equip=0xfff; /* Equipment flags */
21
22
23 __commander_data_start
24 _name .asc "Jameson" ; Commander's name (10 chars plus ending 0)
25 .byt 00
26 .dsb 3
27 _shipshold .dsb 17 ; Contents of cargo bay
28 _currentplanet .byt 7 ; Current planet
29 _galaxynum .byt 1 ; Galaxy number (1-8)
30 _cash .byt $d0,$07 ; Four bytes for cash
31 .byt $10,$00
32 _fuel .byt 70 ; Amount of fuel
33 _fluct .byt 0 ; Price fluctuation
34 _holdspace .byt 20 ; Current space left in cargo bay
35 _legal_status .byt 00 ; Legal status 0=Clean, <50=Offender, >50=Fugitive
36 _score_rem .byt 00 ; Score, remainder
37 _score .word 00000 ; Current score
38 _mission .byt 0 ; Current mission
39 _equip .word $0001 ; Equipment flags
40 _ship_type .byt SHIP_COBRA3 ; Current player's ship
41 _missiles_left .byt 4 ; Number of missiles
42
43 ; Stats for player's ship. Initially the basic for the ship, but may vary with equipment
44 _p_maxspeed .byt 0
45 _p_maxenergy .byt 0
46 _p_maxmissiles .byt 0
47 _p_laserdamage .byt 0
48 __commander_data_end
49
50
51 ; Default commander's data
52 _default_commander
53 .asc "Jameson" ; Commander's name
54 .byt 00
55 .dsb 3
56 .dsb 17 ; Contents of cargo bay
57 .byt 7 ; Current planet
58 .byt 1 ; Galaxy number (1-8)
59 .byt $d0,$07 ; Four bytes for cash (200.0)
60 .byt $00,$00
61 .byt 70 ; Amount of fuel
62 .byt 0 ; Price fluctuation
63 .byt 20 ; Current space left in cargo bay
64 .byt 00 ; Legal status 0=Clean, <50=Offender, >50=Fugitive
65 .byt 00 ; Score, remainder
66 .word 00000 ; Current score
67 .byt 0 ; Current mission
68 .word $0001 ; Equipment flags
69 .byt SHIP_COBRA3 ; Current player's ship
70 .byt 4 ; Number of missiles
71
72 ; Stats for player's ship. Initially the basic for the ship, but may vary with equipment
73 .byt 0
74 .byt 0
75 .byt 0
76 .byt 0
77 _default_commander_end
78
79
80 ; Other player variables
81 _front_shield .byt 22
82 _rear_shield .byt 22
83 _missile_armed .byt 0
84 _ptla .byt 0
85 _ptsh .byt 0
86
87 ;Is ECM active?
88 _ecm_counter .byt 0
89
90 ;typedef struct
91 ;{ char a,b,c,d;
92 ;} fastseedtype; /* four byte random number used for planet description */
93
94 ;typedef struct
95 ;{ int w0;
96 ; int w1;
97 ; int w2;
98 ;} seedtype; /* six byte random number used as seed for planets */
99
100 ;typedef struct
101 ;{
102 ; unsigned char x;
103 ; unsigned char y; /* One byte unsigned */
104 ; unsigned char economy; /* These two are actually only 0-7 */
105 ; unsigned char govtype;
106 ; unsigned char techlev; /* 0-16 i think */
107 ; unsigned char population; /* One byte */
108 ; unsigned int productivity; /* Two byte */
109 ; unsigned int radius; /* Two byte (not used by game at all) */
110 ; fastseedtype goatsoupseed;
111 ; char name[12];
112 ;} plansys ;
113
114
115 ; plansys cpl_system, hyp_system
116 _cpl_system .dsb 26
117 _hyp_system .dsb 26
118
119
120 ;unsigned char quantities[lasttrade+1];
121 ;unsigned int prices[lasttrade+1];
122
123 _prices .dsb 34
124 _quantities .dsb 17
125
126
127 _dest_num .byt 7 ; So we start at LAVE
128 _dest_dist .word 0 ; Distance to target planet
129 _current_screen .byt 0
130 _docked .byt 255
131 _planet_dist .byt 255
132
133
134 ; Variables to mantain for each space object
135
136 _rotx .dsb MAXSHIPS
137 _roty .dsb MAXSHIPS
138 _rotz .dsb MAXSHIPS
139 _accel .dsb MAXSHIPS
140 _speed .dsb MAXSHIPS
141 _target .dsb MAXSHIPS
142 _flags .dsb MAXSHIPS
143 _ttl .dsb MAXSHIPS
144 _energy .dsb MAXSHIPS
145 _missiles .dsb MAXSHIPS
146 _ai_state .dsb MAXSHIPS
147 _vertexXLO .dsb MAXSHIPS
148 _vertexXHI .dsb MAXSHIPS
149 _vertexYLO .dsb MAXSHIPS
150 _vertexYHI .dsb MAXSHIPS
151
152
153 ; Some more variables
154
155 thargoid_counter .byt 00
156 police_counter .byt 00
157 asteroid_counter .byt 00
158
159 police_ids .dsb MAXCOPS
160
161 ; Digrams
162
163 _pairs0 .asc "ABOUSEITILETSTONLONUTHNO"
164 _pairs .asc "..LEXEGEZACEBISO"
165 .asc "USESARMAINDIREA."
166 .asc "ERATENBERALAVETI"
167 .asc "EDORQUANTEISRION"
168
169
170 ; Goat soup dictionary
171
172 ; Call entry string
173 gs_init_str
174 .byt $0f
175 .asc " is "
176 .byt $17
177 .asc "."
178 .byt 0
179
180
181 ian_str
182 .asc "ian"
183 .byt 0
184
185
186 gs_jump_lo .byt <gs_planet_name,<gs_planet_nameian,<gs_random_name
187 gs_jump_hi .byt >gs_planet_name,>gs_planet_nameian,>gs_random_name
188
189
190 #define USEPAGE4
191 #ifdef USEPAGE4
192 .bss
193 *=$400
194 #endif
195
196 ; From galaxy.s
197
198 ; Some vars for loops, etc...
199 count2 .byt 0 ; used in genmarket & displaymarket
200 num .byt 0 ; used in infoplanet
201 index .byt 00 ; These two usedin gs_randomname
202 lowcase .byt 00
203
204 ; For plotting charts
205
206 scroll .byt 0 ; Are we scrolling?
207
208 names .dsb 24
209 col .byt 00
210 row .byt 00
211 plotX .byt 00
212 plotY .byt 00
213
214
215 ; Buffer for strings, so they can be centered or justified. Main use is goatsup texts.
216 ; The speccy version has room for 4 lines of 30 character (120 in total), AND
217 ; performs justification of texts (which adds more spaces). I guess that is
218 ; a good limit for the buffer. As we print 38 characters per line we'd need 152
219 ; bytes, but I guess 120 should be enough.
220 ; Also used for inflight messages.
221
222 str_buffer .dsb 120
223
224
225 ; For naming planets
226 ; Uses a temporal seed
227 temp_seed .dsb 6
228 ; Use temporal buffer for name
229 temp_name .dsb 9
230
231
232 ; For market
233 ; Current selection
234 _cur_sel .byt $ff
235
236 ; These are filled when accessing the equip list screen
237
238 equip_items .byt 0 ; Number of possible items (for selection)
239 equip_flags .word 00 ; Flags with 1's when an item is available
240
241
242 ;From tinefuncs.s
243 ;; Some Global Variables
244 ;; that can be used from C
245
246 ;; General coordinate variables
247 _VX .byt 0
248 _VY .byt 0
249 _VZ .byt 0
250
251 ;; A vector definition: Should be contiguous!
252 _VectX .byt 0,0
253 _VectY .byt 0,0
254 _VectZ .byt 0,0
255
256 ;; Position of a ship: Should be contiguous!
257 _PosX .byt 0,0
258 _PosY .byt 0,0
259 _PosZ .byt 0,0
260
261
262 ; From tactics.s
263 ; fly_to_ship
264 A1 .word 0
265 oX .word 0
266 oY .word 0
267 oZ .word 0
268
269 ; AIMain
270 AIShipID .byt 00 ; Current ship's ID
271 AIShipType .byt 00 ; Current ship's type
272 AITarget .byt 00 ; Current ship's target
273 AIIsAngry .byt 00 ; Angry status (with target)
274
275 #ifdef USEPAGE4
276 .text
277 #endif
278
279 ;From radar.s
280 ; To store objects for plotting the radar
281 savX .dsb MAXSHIPS
282 savY .dsb MAXSHIPS
283
284 ; From tactics.s
285
286 ;; Some variables to decouple firing and drawing the lasers
287 _numlasers .byt 00
288 _laser_source .dsb 4
289 _laser_target .dsb 4
290
291
292 ; For displaying the market
293 mkstrslo
294 .byt <(str_mktunit)
295 .byt <(str_mktquant)
296 .byt <(str_mktin)
297 .byt <(str_mktlist)
298 .byt <(str_mktunit)
299 .byt <(str_mktprice)
300 .byt <(str_mktsale)
301 .byt <(str_mktcargo)
302 mkstrshi
303 .byt >(str_mktunit)
304 .byt >(str_mktquant)
305 .byt >(str_mktin)
306 .byt >(str_mktlist)
307 .byt >(str_mktunit)
308 .byt >(str_mktprice)
309 .byt >(str_mktsale)
310 .byt >(str_mktcargo)
311
312 positionsX
313 .byt 20*6, 26*6, 35*6, 2*6, 14*6, 20*6, 26*6, 35*6
314
315
316 #echo Commander's data:
317 #print (__commander_data_end - __commander_data_start)
318
319
320
321
322
323
324

  ViewVC Help
Powered by ViewVC 1.1.26