4 changed files with 83 additions and 157 deletions
@ -1,81 +0,0 @@
@@ -1,81 +0,0 @@
|
||||
#include "game.hh" |
||||
|
||||
namespace entities |
||||
{ |
||||
using namespace game; |
||||
|
||||
int extraentinfosize() { return 0; } // size in bytes of what the 2 methods below read/write... so it can be skipped by other games
|
||||
|
||||
void writeent(entity &e, char *buf) // write any additional data to disk (except for ET_ ents)
|
||||
{ |
||||
} |
||||
|
||||
void readent(entity &e, char *buf, int ver) // read from disk, and init
|
||||
{ |
||||
} |
||||
|
||||
vector<extentity *> ents; |
||||
|
||||
vector<extentity *> &getents() { return ents; } |
||||
|
||||
bool mayattach(extentity &e) { return false; } |
||||
bool attachent(extentity &e, extentity &a) { return false; } |
||||
|
||||
const char *entmodel(const entity &e) |
||||
{ |
||||
return NULL; |
||||
} |
||||
|
||||
void preloadentities() |
||||
{ |
||||
} |
||||
|
||||
void renderentities() |
||||
{ |
||||
} |
||||
|
||||
extentity *newentity() { return new extentity(); } |
||||
void deleteentity(extentity *e) { delete e; } |
||||
|
||||
void clearents() |
||||
{ |
||||
while(ents.length()) deleteentity(ents.pop()); |
||||
} |
||||
|
||||
void animatemapmodel(const extentity &e, int &anim, int &basetime) |
||||
{ |
||||
} |
||||
|
||||
void fixentity(extentity &e) |
||||
{ |
||||
} |
||||
|
||||
void entradius(extentity &e, bool color) |
||||
{ |
||||
} |
||||
|
||||
bool printent(extentity &e, char *buf, int len) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
const char *entnameinfo(entity &e) { return ""; } |
||||
const char *entname(int i) |
||||
{ |
||||
static const char * const entnames[MAXENTTYPES] = |
||||
{ |
||||
"none?", "light", "mapmodel", "playerstart", "envmap", "particles", "sound", "spotlight", "decal", |
||||
}; |
||||
return i>=0 && size_t(i)<sizeof(entnames)/sizeof(entnames[0]) ? entnames[i] : ""; |
||||
} |
||||
|
||||
void editent(int i, bool local) |
||||
{ |
||||
} |
||||
|
||||
float dropheight(entity &e) |
||||
{ |
||||
return 4.0f; |
||||
} |
||||
} |
||||
|
@ -1,55 +0,0 @@
@@ -1,55 +0,0 @@
|
||||
#ifndef __GAME_H__ |
||||
#define __GAME_H__ |
||||
|
||||
#include "cube.hh" |
||||
|
||||
// console message types
|
||||
|
||||
enum
|
||||
{ |
||||
CON_CHAT = 1<<8 |
||||
}; |
||||
|
||||
enum // static entity types |
||||
{ |
||||
NOTUSED = ET_EMPTY, // entity slot not in use in map
|
||||
LIGHT = ET_LIGHT, // lightsource, attr1 = radius, attr2 = intensity
|
||||
MAPMODEL = ET_MAPMODEL, // attr1 = idx, attr2 = yaw, attr3 = pitch, attr4 = roll, attr5 = scale
|
||||
PLAYERSTART, // attr1 = angle, attr2 = team
|
||||
ENVMAP = ET_ENVMAP, // attr1 = radius
|
||||
PARTICLES = ET_PARTICLES, |
||||
MAPSOUND = ET_SOUND, |
||||
SPOTLIGHT = ET_SPOTLIGHT, |
||||
DECAL = ET_DECAL, |
||||
MAXENTTYPES, |
||||
|
||||
I_FIRST = 0, |
||||
I_LAST = -1 |
||||
}; |
||||
|
||||
#define MAXNAMELEN 15 |
||||
|
||||
namespace entities |
||||
{ |
||||
extern vector<extentity *> ents; |
||||
extern void preloadentities(); |
||||
} |
||||
|
||||
namespace game |
||||
{ |
||||
// game
|
||||
extern string clientmap; |
||||
|
||||
extern dynent *player1; |
||||
|
||||
// client
|
||||
extern bool connected; |
||||
|
||||
// render
|
||||
|
||||
extern void saveragdoll(dynent *d); |
||||
extern void clearragdolls(); |
||||
extern void moveragdolls(); |
||||
} |
||||
|
||||
#endif |
Loading…
Reference in new issue