Proper Subversion configuration.
[newkind] / space.h
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 * space.h
16 */
17
18 #ifndef SPACE_H
19 #define SPACE_H
20
21 #include "vector.h"
22 #include "shipdata.h"
23
24 struct point
25 {
26 int x;
27 int y;
28 int z;
29 };
30
31
32 struct univ_object
33 {
34 int type;
35 Vector location;
36 Matrix rotmat;
37 int rotx;
38 int rotz;
39 int flags;
40 int energy;
41 int velocity;
42 int acceleration;
43 int missiles;
44 int target;
45 int bravery;
46 int exp_delta;
47 int exp_seed;
48 int distance;
49 };
50
51 #define MAX_UNIV_OBJECTS 20
52
53 extern struct univ_object universe[MAX_UNIV_OBJECTS];
54 extern int ship_count[NO_OF_SHIPS + 1]; /* many */
55
56
57
58 void clear_universe (void);
59 int add_new_ship (int ship_type, int x, int y, int z, struct vector *rotmat, int rotx, int rotz);
60 void add_new_station (double sx, double sy, double sz, Matrix rotmat);
61 void remove_ship (int un);
62 void move_univ_object (struct univ_object *obj);
63 void update_universe (void);
64
65 void update_console (void);
66
67 void update_altitude (void);
68 void update_cabin_temp (void);
69 void regenerate_shields (void);
70
71 void increase_flight_roll (void);
72 void decrease_flight_roll (void);
73 void increase_flight_climb (void);
74 void decrease_flight_climb (void);
75 void dock_player (void);
76
77 void damage_ship (int damage, int front);
78 void decrease_energy (int amount);
79
80 extern int hyper_ready;
81
82 void start_hyperspace (void);
83 void start_galactic_hyperspace (void);
84 void display_hyper_status (void);
85 void countdown_hyperspace (void);
86 void jump_warp (void);
87 void launch_player (void);
88
89 void engage_docking_computer (void);
90 void display_condition(void);
91 void update_condition(void);
92
93 #endif
94