Updates to cg_public.h and surfaceflags.h

This commit is contained in:
Walter Julius Hennecke 2014-11-02 17:24:12 +01:00
parent ce76bfa8d4
commit ffa2d6c377
2 changed files with 71 additions and 63 deletions

View File

@ -9,14 +9,18 @@
#ifndef CG_PUBLIC_H_ #ifndef CG_PUBLIC_H_
#define CG_PUBLIC_H_ #define CG_PUBLIC_H_
#define CMD_BACKUP 64 enum cgPublicCmd_e {
#define CMD_MASK (CMD_BACKUP - 1) CMD_BACKUP = 64,
CMD_MASK = (CMD_BACKUP - 1)
};
// allow a lot of command backups for very fast systems // allow a lot of command backups for very fast systems
// multiple commands may be combined into a single packet, so this // multiple commands may be combined into a single packet, so this
// needs to be larger than PACKET_BACKUP // needs to be larger than PACKET_BACKUP
enum cgPublicLimits_e {
#define MAX_ENTITIES_IN_SNAPSHOT 256 MAX_ENTITIES_IN_SNAPSHOT = 256
};
// snapshots are a view of the server at a given time // snapshots are a view of the server at a given time
@ -49,7 +53,7 @@ functions imported from the main executable
================================================================== ==================================================================
*/ */
#define CGAME_IMPORT_API_VERSION 3 static const uint32_t CGAME_IMPORT_API_VERSION = 3;
//these must match up with cg_syscalls.asm //these must match up with cg_syscalls.asm
typedef enum { typedef enum {
@ -112,8 +116,8 @@ typedef enum {
CG_SETUSERCMDVALUE, CG_SETUSERCMDVALUE,
CG_R_REGISTERSHADERNOMIP, CG_R_REGISTERSHADERNOMIP,
CG_MEMORY_REMAINING, CG_MEMORY_REMAINING,
CG_R_REGISTERSHADER3D, //59 CG_R_REGISTERSHADER3D, //59
CG_CVAR_SET_NO_MODIFY, // 60 CG_CVAR_SET_NO_MODIFY, // 60
CG_R_REMAP_SHADER, CG_R_REMAP_SHADER,
CG_MEMSET = 100, CG_MEMSET = 100,
@ -142,7 +146,7 @@ functions exported to the main executable
typedef enum { typedef enum {
CG_INIT, CG_INIT,
// void CG_Init( int32_t serverMessageNum, int32_t serverCommandSequence ) // void CG_Init( int32_t serverMessageNum, int32_t serverCommandSequence )
// called when the level loads or when the renderer is restarted // called when the level loads or when the renderer is restarted
// all media should be registered at this time // all media should be registered at this time
// cgame will display loading status by calling SCR_Update, which // cgame will display loading status by calling SCR_Update, which
@ -151,26 +155,26 @@ typedef enum {
// demos, tourney restarts, or vid_restarts // demos, tourney restarts, or vid_restarts
CG_SHUTDOWN, CG_SHUTDOWN,
// void (*CG_Shutdown)( void ); // void (*CG_Shutdown)( void );
// oportunity to flush and close any open files // oportunity to flush and close any open files
CG_CONSOLE_COMMAND, CG_CONSOLE_COMMAND,
// qboolean (*CG_ConsoleCommand)( void ); // qboolean (*CG_ConsoleCommand)( void );
// a console command has been issued locally that is not recognized by the // a console command has been issued locally that is not recognized by the
// main game system. // main game system.
// use Cmd_Argc() / Cmd_Argv() to read the command, return qfalse if the // use Cmd_Argc() / Cmd_Argv() to read the command, return qfalse if the
// command is not known to the game // command is not known to the game
CG_DRAW_ACTIVE_FRAME, CG_DRAW_ACTIVE_FRAME,
// void (*CG_DrawActiveFrame)( int32_t serverTime, stereoFrame_t stereoView, qboolean demoPlayback ); // void (*CG_DrawActiveFrame)( int32_t serverTime, stereoFrame_t stereoView, qboolean demoPlayback );
// Generates and draws a game scene and status information at the given time. // Generates and draws a game scene and status information at the given time.
// If demoPlayback is set, local movement prediction will not be enabled // If demoPlayback is set, local movement prediction will not be enabled
CG_CROSSHAIR_PLAYER, CG_CROSSHAIR_PLAYER,
// int32_t (*CG_CrosshairPlayer)( void ); // int32_t (*CG_CrosshairPlayer)( void );
CG_LAST_ATTACKER CG_LAST_ATTACKER
// int32_t (*CG_LastAttacker)( void ); // int32_t (*CG_LastAttacker)( void );
} cgameExport_t; } cgameExport_t;
//---------------------------------------------- //----------------------------------------------

View File

@ -10,62 +10,66 @@
#ifndef SURFACEFLAGS_H_ #ifndef SURFACEFLAGS_H_
#define SURFACEFLAGS_H_ #define SURFACEFLAGS_H_
#define CONTENTS_NONE 0 enum contents_e {
#define CONTENTS_SOLID 1 // an eye is never valid in a solid CONTENTS_NONE = 0,
#define CONTENTS_LAVA 8 CONTENTS_SOLID = 1, // an eye is never valid in a solid
#define CONTENTS_SLIME 16 CONTENTS_LAVA = 8,
#define CONTENTS_WATER 32 CONTENTS_SLIME = 16,
#define CONTENTS_FOG 64 CONTENTS_WATER = 32,
#define CONTENTS_LADDER 128 CONTENTS_FOG = 64,
CONTENTS_LADDER = 128,
#define CONTENTS_AREAPORTAL 0x8000 CONTENTS_AREAPORTAL = 0x8000,
#define CONTENTS_PLAYERCLIP 0x10000 CONTENTS_PLAYERCLIP = 0x10000,
#define CONTENTS_MONSTERCLIP 0x20000 CONTENTS_MONSTERCLIP = 0x20000,
#define CONTENTS_SHOTCLIP 0x40000 //!< These are not needed if CONTENTS_SOLID is included CONTENTS_SHOTCLIP = 0x40000, //!< These are not needed if CONTENTS_SOLID is included
//q3 bot specific contents types //q3 bot specific contents types
#define CONTENTS_TELEPORTER 0x40000 CONTENTS_TELEPORTER = 0x40000,
#define CONTENTS_JUMPPAD 0x80000 //!< needed for bspc CONTENTS_JUMPPAD = 0x80000, //!< needed for bspc
#define CONTENTS_ITEM 0x80000 //!< Items can be touched but do not block movement (like triggers) but can be hit by the infoString trace CONTENTS_ITEM = 0x80000, //!< Items can be touched but do not block movement (like triggers) but can be hit by the infoString trace
#define CONTENTS_CLUSTERPORTAL 0x100000 CONTENTS_CLUSTERPORTAL = 0x100000,
#define CONTENTS_DONOTENTER 0x200000 CONTENTS_DONOTENTER = 0x200000,
#define CONTENTS_BOTCLIP 0x400000 CONTENTS_BOTCLIP = 0x400000,
#define CONTENTS_ORIGIN 0x1000000 //!< removed before bsping an entity CONTENTS_ORIGIN = 0x1000000, //!< removed before bsping an entity
#define CONTENTS_BODY 0x2000000 //!< should never be on a brush, only in game CONTENTS_BODY = 0x2000000, //!< should never be on a brush, only in game
#define CONTENTS_CORPSE 0x4000000 CONTENTS_CORPSE = 0x4000000,
#define CONTENTS_DETAIL 0x8000000 //!< brushes not used for the bsp CONTENTS_DETAIL = 0x8000000, //!< brushes not used for the bsp
#define CONTENTS_STRUCTURAL 0x10000000 //!< brushes used for the bsp CONTENTS_STRUCTURAL = 0x10000000, //!< brushes used for the bsp
#define CONTENTS_TRANSLUCENT 0x20000000 //!< don't consume surface fragments inside CONTENTS_TRANSLUCENT = 0x20000000, //!< don't consume surface fragments inside
#define CONTENTS_TRIGGER 0x40000000 CONTENTS_TRIGGER = 0x40000000,
#define CONTENTS_NODROP 0x80000000 //!< don't leave bodies or items (death fog, lava) CONTENTS_NODROP = 0x80000000 //!< don't leave bodies or items (death fog, lava)
};
#define SURF_NODAMAGE 0x1 //!< never give falling damage enum surfaceFlags_e {
#define SURF_SLICK 0x2 //!< effects game physics SURF_NODAMAGE = 0x1, //!< never give falling damage
#define SURF_SKY 0x4 //!< lighting from environment map SURF_SLICK = 0x2, //!< effects game physics
#define SURF_NOIMPACT 0x10 //!< don't make missile explosions SURF_SKY = 0x4, //!< lighting from environment map
#define SURF_NOMARKS 0x20 //!< don't leave missile marks SURF_NOIMPACT = 0x10, //!< don't make missile explosions
#define SURF_FLESH 0x40 //!< make flesh sounds and effects SURF_NOMARKS = 0x20, //!< don't leave missile marks
#define SURF_NODRAW 0x80 //!< don't generate a drawsurface at all SURF_FLESH = 0x40, //!< make flesh sounds and effects
#define SURF_HINT 0x100 //!< make a primary bsp splitter SURF_NODRAW = 0x80, //!< don't generate a drawsurface at all
#define SURF_SKIP 0x200 //!< completely ignore, allowing non-closed brushes SURF_HINT = 0x100, //!< make a primary bsp splitter
#define SURF_NOLIGHTMAP 0x400 //!< surface doesn't need a lightmap SURF_SKIP = 0x200, //!< completely ignore, allowing non-closed brushes
#define SURF_POINTLIGHT 0x800 //!< generate lighting info at vertexes SURF_NOLIGHTMAP = 0x400, //!< surface doesn't need a lightmap
#define SURF_METALSTEPS 0x1000 //!< clanking footsteps SURF_POINTLIGHT = 0x800, //!< generate lighting info at vertexes
#define SURF_NOSTEPS 0x2000 //!< no footstep sounds SURF_METALSTEPS = 0x1000, //!< clanking footsteps
#define SURF_NONSOLID 0x4000 //!< don't collide against curves with this set SURF_NOSTEPS = 0x2000, //!< no footstep sounds
#define SURF_LIGHTFILTER 0x8000 //!< act as a light filter during q3map -light SURF_NONSOLID = 0x4000, //!< don't collide against curves with this set
#define SURF_ALPHASHADOW 0x10000 //!< do per-pixel light shadow casting in q3map SURF_LIGHTFILTER = 0x8000, //!< act as a light filter during q3map -light
#define SURF_NODLIGHT 0x20000 //!< don't dlight even if solid (solid lava, skies) SURF_ALPHASHADOW = 0x10000, //!< do per-pixel light shadow casting in q3map
#define SURF_FORCEFIELD 0x40000 //!< the surface in question is a forcefield SURF_NODLIGHT = 0x20000, //!< don't dlight even if solid (solid lava, skies)
//RPG-X | GSIO01 | 20/05/2009 | START MOD SURF_FORCEFIELD = 0x40000, //!< the surface in question is a forcefield
#define SURF_GRASS 0x80000 //!< grass, use grass footsteps etc. //RPG-X | GSIO01 | 20/05/2009 | START MOD
#define SURF_GRAVEL 0x100000 //!< gravel, use grass footsteps etc. SURF_GRASS = 0x80000, //!< grass, use grass footsteps etc.
#define SURF_SNOW 0x200000 //!< snow, use grass footsteps etc. SURF_GRAVEL = 0x100000, //!< gravel, use grass footsteps etc.
#define SURF_WOOD 0x400000 //!< wood, use grass footsteps etc. SURF_SNOW = 0x200000, //!< snow, use grass footsteps etc.
//RPG-X | GSIO01 | 20/05/2009 | END MOD SURF_WOOD = 0x400000 //!< wood, use grass footsteps etc.
//RPG-X | GSIO01 | 20/05/2009 | END MOD
};
#endif /* SURFACEFLAGS_H_ */ #endif /* SURFACEFLAGS_H_ */