4
(c) Richard Thrippleton
5
Licensing terms are in the 'LICENSE' file
6
If that file is not included with this source then permission is not given to use this source in any way whatsoever.
14
class presence //Client side view of the universe and its simple objects
17
enum {ISIZE=2048}; //Size of presence object index
18
static void init(); //Initialise the presence system datastructures
19
static void purgeall(); //Purge all presence data after use
20
static void feed(unsigned char* buf); //Update/create a presence from a buffer
21
static void interpolateall(); //Run interpolation on all the presence objects
22
static presence* get(int indx); //Return the presence object of given index
23
static void render(); //Render client/presence info, such as realtime information indicators
24
static void controls(); //Run the in game ship controls
26
void drawat(int sx,short sy,short zout); //Draw at the given screen location with the given zoom-out scaling
28
static presence* me; //Presence played by this client
29
static presence* trg; //Personal target
30
static presence* hl; //Hilight target
31
static int hul,pow,shd,ful; //Hull, power, shield and fuel percentages
32
static ipol vel; //Velocity of self
33
static long srng,lrng; //Sensor range and long range
35
int self; //Presence object self index
36
int typ; //Object type
37
char nam[65]; //Name of object
38
char anno[65]; //Annotative data, e.g. alliance
40
ivect mov; //Motion vector
41
bool enem; //Is enemy?
44
presence(int self,unsigned char* buf); //Create a new object with a given network buffer input and given self index
45
~presence(); //Delete this presence object
47
static presence* gettarget(int typ,short dir,box cov,bool out,bool enem); //Flip through targets of given type, flicking either forwards or backwards(dir -1 or +1) through them, within the given bounding box, out refers to outside the box or not, enem if you want hostiles only
48
static void updself(unsigned char* buf); //Update self data with given buffer
50
void name(unsigned char* buf); //Name the object with given network buffer
51
void update(unsigned char* buf); //Update an object with given buffer
52
void interpolate(); //Run motion interpolation on this presence
54
static presence* objs[ISIZE]; //Index of presence objects
55
static int hltm; //Hilight time remaining
57
graphic* spr; //Sprite
58
int col; //Colour (makes it a beam)
59
int vis; //Visibility percentage (for cloaking stuff)
60
int ang; //Angle of orientation
61
int age; //Age of presence object
62
presence* link; //Link to another presence, for example owner of a frag