84bbd123 |
1 | /* |
2 | * Elite - The New Kind. |
3 | * |
4 | * Reverse engineered from the BBC disk version of Elite. |
5 | * Additional material by C.J.Pinder. |
6 | * |
7 | * The original Elite code is (C) I.Bell & D.Braben 1984. |
8 | * This version re-engineered in C by C.J.Pinder 1999-2001. |
9 | * |
10 | * email: <christian@newkind.co.uk> |
11 | * |
12 | * |
13 | */ |
14 | |
15 | #ifndef ELITE_H |
16 | #define ELITE_H |
17 | |
18 | #include "planet.h" |
19 | #include "trade.h" |
20 | |
21 | |
22 | #define SCR_INTRO_ONE 1 |
23 | #define SCR_INTRO_TWO 2 |
24 | #define SCR_GALACTIC_CHART 3 |
25 | #define SCR_SHORT_RANGE 4 |
26 | #define SCR_PLANET_DATA 5 |
27 | #define SCR_MARKET_PRICES 6 |
28 | #define SCR_CMDR_STATUS 7 |
29 | #define SCR_FRONT_VIEW 8 |
30 | #define SCR_REAR_VIEW 9 |
31 | #define SCR_LEFT_VIEW 10 |
32 | #define SCR_RIGHT_VIEW 11 |
33 | #define SCR_BREAK_PATTERN 12 |
34 | #define SCR_INVENTORY 13 |
35 | #define SCR_EQUIP_SHIP 14 |
36 | #define SCR_OPTIONS 15 |
37 | #define SCR_LOAD_CMDR 16 |
38 | #define SCR_SAVE_CMDR 17 |
39 | #define SCR_QUIT 18 |
40 | #define SCR_GAME_OVER 19 |
41 | #define SCR_SETTINGS 20 |
42 | #define SCR_ESCAPE_POD 21 |
43 | |
44 | |
45 | #define PULSE_LASER 0x0F |
46 | #define BEAM_LASER 0x8F |
47 | #define MILITARY_LASER 0x97 |
48 | #define MINING_LASER 0x32 |
49 | |
50 | |
51 | #define FLG_DEAD (1) |
52 | #define FLG_REMOVE (2) |
53 | #define FLG_EXPLOSION (4) |
54 | #define FLG_ANGRY (8) |
55 | #define FLG_FIRING (16) |
56 | #define FLG_HAS_ECM (32) |
57 | #define FLG_HOSTILE (64) |
58 | #define FLG_CLOAKED (128) |
59 | #define FLG_FLY_TO_PLANET (256) |
60 | #define FLG_FLY_TO_STATION (512) |
61 | #define FLG_INACTIVE (1024) |
62 | #define FLG_SLOW (2048) |
63 | #define FLG_BOLD (4096) |
64 | #define FLG_POLICE (8192) |
1a8abebd |
65 | #define FLG_TACTICAL (16384) |
66 | #define FLG_TARGET (32768) |
84bbd123 |
67 | |
68 | #define MAX_UNIV_OBJECTS 20 |
69 | |
70 | |
71 | struct commander |
72 | { |
73 | char name[32]; |
74 | int mission; |
75 | int ship_x; |
76 | int ship_y; |
77 | struct galaxy_seed galaxy; |
78 | int credits; |
79 | int fuel; |
80 | int unused1; |
81 | int galaxy_number; |
82 | int front_laser; |
83 | int rear_laser; |
84 | int left_laser; |
85 | int right_laser; |
86 | int unused2; |
87 | int unused3; |
88 | int cargo_capacity; |
89 | int current_cargo[NO_OF_STOCK_ITEMS]; |
90 | int ecm; |
91 | int fuel_scoop; |
92 | int energy_bomb; |
93 | int energy_unit; |
94 | int docking_computer; |
95 | int galactic_hyperdrive; |
96 | int escape_pod; |
97 | int unused4; |
98 | int unused5; |
99 | int unused6; |
100 | int unused7; |
101 | int missiles; |
102 | int legal_status; |
103 | int station_stock[NO_OF_STOCK_ITEMS]; |
104 | int market_rnd; |
105 | int score; |
106 | int saved; |
107 | }; |
108 | |
109 | struct player_ship |
110 | { |
111 | int max_speed; |
112 | int max_roll; |
113 | int max_climb; |
114 | int max_fuel; |
115 | int altitude; |
116 | int cabtemp; |
117 | }; |
118 | |
119 | extern struct player_ship myship; |
120 | |
121 | |
122 | extern struct commander cmdr; |
123 | extern struct commander saved_cmdr; |
124 | |
125 | extern struct galaxy_seed docked_planet; |
126 | |
127 | extern struct galaxy_seed hyperspace_planet; |
128 | |
129 | extern struct planet_data current_planet_data; |
130 | |
131 | extern int carry_flag; |
132 | extern int current_screen; |
133 | |
134 | extern struct ship_data *ship_list[]; |
135 | |
136 | extern int wireframe; |
137 | extern int anti_alias_gfx; |
138 | extern char scanner_filename[256]; |
139 | extern int hoopy_casinos; |
140 | extern int instant_dock; |
141 | extern int speed_cap; |
142 | extern int scanner_cx; |
143 | extern int scanner_cy; |
144 | extern int compass_centre_x; |
145 | extern int compass_centre_y; |
1a8abebd |
146 | extern int prefer_window; |
147 | extern int condition_x, condition_y, condition_r; |
148 | extern int zoom_x, zoom_y; |
149 | |
150 | extern int condition; |
151 | enum { |
152 | COND_DOCKED, COND_GREEN, COND_YELLOW, COND_RED, COND_ALERT |
153 | }; |
84bbd123 |
154 | |
155 | extern int planet_render_style; |
156 | |
157 | extern int game_over; |
158 | extern int docked; |
159 | extern int finish; |
160 | extern int flight_speed; |
161 | extern int flight_roll; |
162 | extern int flight_climb; |
163 | extern int front_shield; |
164 | extern int aft_shield; |
165 | extern int energy; |
166 | extern int laser_temp; |
167 | extern int mcount; |
168 | extern int detonate_bomb; |
169 | extern int witchspace; |
170 | extern int auto_pilot; |
1a8abebd |
171 | extern int identify; |
172 | extern int scanner_zoom; |
84bbd123 |
173 | |
174 | void restore_saved_commander (void); |
175 | |
176 | |
177 | #endif |