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) |
65 | |
66 | |
67 | #define MAX_UNIV_OBJECTS 20 |
68 | |
69 | |
70 | struct commander |
71 | { |
72 | char name[32]; |
73 | int mission; |
74 | int ship_x; |
75 | int ship_y; |
76 | struct galaxy_seed galaxy; |
77 | int credits; |
78 | int fuel; |
79 | int unused1; |
80 | int galaxy_number; |
81 | int front_laser; |
82 | int rear_laser; |
83 | int left_laser; |
84 | int right_laser; |
85 | int unused2; |
86 | int unused3; |
87 | int cargo_capacity; |
88 | int current_cargo[NO_OF_STOCK_ITEMS]; |
89 | int ecm; |
90 | int fuel_scoop; |
91 | int energy_bomb; |
92 | int energy_unit; |
93 | int docking_computer; |
94 | int galactic_hyperdrive; |
95 | int escape_pod; |
96 | int unused4; |
97 | int unused5; |
98 | int unused6; |
99 | int unused7; |
100 | int missiles; |
101 | int legal_status; |
102 | int station_stock[NO_OF_STOCK_ITEMS]; |
103 | int market_rnd; |
104 | int score; |
105 | int saved; |
106 | }; |
107 | |
108 | struct player_ship |
109 | { |
110 | int max_speed; |
111 | int max_roll; |
112 | int max_climb; |
113 | int max_fuel; |
114 | int altitude; |
115 | int cabtemp; |
116 | }; |
117 | |
118 | extern struct player_ship myship; |
119 | |
120 | |
121 | extern struct commander cmdr; |
122 | extern struct commander saved_cmdr; |
123 | |
124 | extern struct galaxy_seed docked_planet; |
125 | |
126 | extern struct galaxy_seed hyperspace_planet; |
127 | |
128 | extern struct planet_data current_planet_data; |
129 | |
130 | extern int carry_flag; |
131 | extern int current_screen; |
132 | |
133 | extern struct ship_data *ship_list[]; |
134 | |
135 | extern int wireframe; |
136 | extern int anti_alias_gfx; |
137 | extern char scanner_filename[256]; |
138 | extern int hoopy_casinos; |
139 | extern int instant_dock; |
140 | extern int speed_cap; |
141 | extern int scanner_cx; |
142 | extern int scanner_cy; |
143 | extern int compass_centre_x; |
144 | extern int compass_centre_y; |
145 | |
146 | extern int planet_render_style; |
147 | |
148 | extern int game_over; |
149 | extern int docked; |
150 | extern int finish; |
151 | extern int flight_speed; |
152 | extern int flight_roll; |
153 | extern int flight_climb; |
154 | extern int front_shield; |
155 | extern int aft_shield; |
156 | extern int energy; |
157 | extern int laser_temp; |
158 | extern int mcount; |
159 | extern int detonate_bomb; |
160 | extern int witchspace; |
161 | extern int auto_pilot; |
162 | |
163 | |
164 | void restore_saved_commander (void); |
165 | |
166 | |
167 | #endif |