Conflict resolving

This commit is contained in:
Walter Julius Hennecke 2014-11-07 19:12:02 +01:00
parent 2176c18d4e
commit 60a8acbe05

View file

@ -1,182 +1,182 @@
// Copyright (C) 1999-2000 Id Software, Inc. // Copyright (C) 1999-2000 Id Software, Inc.
// //
#ifndef CG_PUBLIC_H_ #ifndef CG_PUBLIC_H_
#define CG_PUBLIC_H_ #define CG_PUBLIC_H_
enum cg_publicCMD_e { enum cg_publicCMD_e {
CMD_BACKUP = 64, CMD_BACKUP = 64,
CMD_MASK = (CMD_BACKUP - 1) 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 cg_publicLimits_e { enum cg_publicLimits_e {
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
// Snapshots are generated at regular time intervals by the server, // Snapshots are generated at regular time intervals by the server,
// but they may not be sent if a client's rate level is exceeded, or // but they may not be sent if a client's rate level is exceeded, or
// they may be dropped by the network. // they may be dropped by the network.
typedef struct { typedef struct {
int32_t snapFlags; // SNAPFLAG_RATE_DELAYED, etc int32_t snapFlags; // SNAPFLAG_RATE_DELAYED, etc
int32_t ping; int32_t ping;
int32_t serverTime; // server time the message is valid for (in msec) int32_t serverTime; // server time the message is valid for (in msec)
byte areamask[MAX_MAP_AREA_BYTES]; // portalarea visibility bits byte areamask[MAX_MAP_AREA_BYTES]; // portalarea visibility bits
playerState_t ps; // complete information about the current player at this time playerState_t ps; // complete information about the current player at this time
int32_t numEntities; // all of the entities that need to be presented int32_t numEntities; // all of the entities that need to be presented
entityState_t entities[MAX_ENTITIES_IN_SNAPSHOT]; // at the time of this snapshot entityState_t entities[MAX_ENTITIES_IN_SNAPSHOT]; // at the time of this snapshot
int32_t numServerCommands; // text based server commands to execute when this int32_t numServerCommands; // text based server commands to execute when this
int32_t serverCommandSequence; // snapshot becomes current int32_t serverCommandSequence; // snapshot becomes current
} snapshot_t; } snapshot_t;
/* /*
================================================================== ==================================================================
functions imported from the main executable functions imported from the main executable
================================================================== ==================================================================
*/ */
static const uint32_t 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 {
CG_PRINT, CG_PRINT,
CG_ERROR, CG_ERROR,
CG_MILLISECONDS, CG_MILLISECONDS,
CG_CVAR_REGISTER, CG_CVAR_REGISTER,
CG_CVAR_UPDATE, CG_CVAR_UPDATE,
CG_CVAR_SET, CG_CVAR_SET,
CG_CVAR_VARIABLESTRINGBUFFER, CG_CVAR_VARIABLESTRINGBUFFER,
CG_ARGC, CG_ARGC,
CG_ARGV, CG_ARGV,
CG_ARGS, CG_ARGS,
CG_FS_FOPENFILE, CG_FS_FOPENFILE,
CG_FS_READ, CG_FS_READ,
CG_FS_WRITE, CG_FS_WRITE,
CG_FS_FCLOSEFILE, CG_FS_FCLOSEFILE,
CG_SENDCONSOLECOMMAND, CG_SENDCONSOLECOMMAND,
CG_ADDCOMMAND, CG_ADDCOMMAND,
CG_SENDCLIENTCOMMAND, CG_SENDCLIENTCOMMAND,
CG_UPDATESCREEN, CG_UPDATESCREEN,
CG_CM_LOADMAP, CG_CM_LOADMAP,
CG_CM_NUMINLINEMODELS, CG_CM_NUMINLINEMODELS,
CG_CM_INLINEMODEL, CG_CM_INLINEMODEL,
CG_CM_LOADMODEL, CG_CM_LOADMODEL,
CG_CM_TEMPBOXMODEL, CG_CM_TEMPBOXMODEL,
CG_CM_POINTCONTENTS, CG_CM_POINTCONTENTS,
CG_CM_TRANSFORMEDPOINTCONTENTS, CG_CM_TRANSFORMEDPOINTCONTENTS,
CG_CM_BOXTRACE, CG_CM_BOXTRACE,
CG_CM_TRANSFORMEDBOXTRACE, CG_CM_TRANSFORMEDBOXTRACE,
CG_CM_MARKFRAGMENTS, CG_CM_MARKFRAGMENTS,
CG_S_STARTSOUND, CG_S_STARTSOUND,
CG_S_STARTLOCALSOUND, CG_S_STARTLOCALSOUND,
CG_S_CLEARLOOPINGSOUNDS, CG_S_CLEARLOOPINGSOUNDS,
CG_S_ADDLOOPINGSOUND, CG_S_ADDLOOPINGSOUND,
CG_S_UPDATEENTITYPOSITION, CG_S_UPDATEENTITYPOSITION,
CG_S_RESPATIALIZE, CG_S_RESPATIALIZE,
CG_S_REGISTERSOUND, CG_S_REGISTERSOUND,
CG_S_STARTBACKGROUNDTRACK, CG_S_STARTBACKGROUNDTRACK,
CG_R_LOADWORLDMAP, CG_R_LOADWORLDMAP,
CG_R_REGISTERMODEL, CG_R_REGISTERMODEL,
CG_R_REGISTERSKIN, CG_R_REGISTERSKIN,
CG_R_REGISTERSHADER, CG_R_REGISTERSHADER,
CG_R_CLEARSCENE, CG_R_CLEARSCENE,
CG_R_ADDREFENTITYTOSCENE, CG_R_ADDREFENTITYTOSCENE,
CG_R_ADDPOLYTOSCENE, CG_R_ADDPOLYTOSCENE,
CG_R_ADDLIGHTTOSCENE, CG_R_ADDLIGHTTOSCENE,
CG_R_RENDERSCENE, CG_R_RENDERSCENE,
CG_R_SETCOLOR, CG_R_SETCOLOR,
CG_R_DRAWSTRETCHPIC, CG_R_DRAWSTRETCHPIC,
CG_R_MODELBOUNDS, CG_R_MODELBOUNDS,
CG_R_LERPTAG, CG_R_LERPTAG,
CG_GETGLCONFIG, CG_GETGLCONFIG,
CG_GETGAMESTATE, CG_GETGAMESTATE,
CG_GETCURRENTSNAPSHOTNUMBER, CG_GETCURRENTSNAPSHOTNUMBER,
CG_GETSNAPSHOT, CG_GETSNAPSHOT,
CG_GETSERVERCOMMAND, CG_GETSERVERCOMMAND,
CG_GETCURRENTCMDNUMBER, CG_GETCURRENTCMDNUMBER,
CG_GETUSERCMD, CG_GETUSERCMD,
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,
CG_MEMCPY, CG_MEMCPY,
CG_STRNCPY, CG_STRNCPY,
CG_SIN, CG_SIN,
CG_COS, CG_COS,
CG_ATAN2, CG_ATAN2,
CG_SQRT, CG_SQRT,
CG_FLOOR, CG_FLOOR,
CG_CEIL, CG_CEIL,
CG_TESTPRINTINT, CG_TESTPRINTINT,
CG_TESTPRINTFLOAT, CG_TESTPRINTFLOAT,
} cgameImport_t; } cgameImport_t;
//these must match up with cg_syscalls.asm //these must match up with cg_syscalls.asm
/* /*
================================================================== ==================================================================
functions exported to the main executable 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
// will call CG_DrawInformation during the loading process // will call CG_DrawInformation during the loading process
// reliableCommandSequence will be 0 on fresh loads, but higher for // reliableCommandSequence will be 0 on fresh loads, but higher for
// 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;
//---------------------------------------------- //----------------------------------------------
#endif /* CG_PUBLIC_H_ */ #endif /* CG_PUBLIC_H_ */