Updates tu multiple headers

This commit is contained in:
Walter Julius Hennecke 2014-11-07 19:04:38 +01:00
parent ce76bfa8d4
commit a75a108485
9 changed files with 769 additions and 756 deletions

View file

@ -9,14 +9,18 @@
#ifndef CG_PUBLIC_H_
#define CG_PUBLIC_H_
#define CMD_BACKUP 64
#define CMD_MASK (CMD_BACKUP - 1)
enum cg_publicCMD_e {
CMD_BACKUP = 64,
CMD_MASK = (CMD_BACKUP - 1)
};
// allow a lot of command backups for very fast systems
// multiple commands may be combined into a single packet, so this
// needs to be larger than PACKET_BACKUP
#define MAX_ENTITIES_IN_SNAPSHOT 256
enum cg_publicLimits_e {
MAX_ENTITIES_IN_SNAPSHOT = 256
};
// snapshots are a view of the server at a given time
@ -29,12 +33,12 @@ typedef struct {
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
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 serverCommandSequence; // snapshot becomes current
@ -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
typedef enum {
@ -112,8 +116,8 @@ typedef enum {
CG_SETUSERCMDVALUE,
CG_R_REGISTERSHADERNOMIP,
CG_MEMORY_REMAINING,
CG_R_REGISTERSHADER3D, //59
CG_CVAR_SET_NO_MODIFY, // 60
CG_R_REGISTERSHADER3D, //59
CG_CVAR_SET_NO_MODIFY, // 60
CG_R_REMAP_SHADER,
CG_MEMSET = 100,
@ -142,7 +146,7 @@ functions exported to the main executable
typedef enum {
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
// all media should be registered at this time
// cgame will display loading status by calling SCR_Update, which
@ -151,26 +155,26 @@ typedef enum {
// demos, tourney restarts, or vid_restarts
CG_SHUTDOWN,
// void (*CG_Shutdown)( void );
// void (*CG_Shutdown)( void );
// oportunity to flush and close any open files
CG_CONSOLE_COMMAND,
// qboolean (*CG_ConsoleCommand)( void );
// qboolean (*CG_ConsoleCommand)( void );
// a console command has been issued locally that is not recognized by the
// main game system.
// use Cmd_Argc() / Cmd_Argv() to read the command, return qfalse if the
// command is not known to the game
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.
// If demoPlayback is set, local movement prediction will not be enabled
CG_CROSSHAIR_PLAYER,
// int32_t (*CG_CrosshairPlayer)( void );
// int32_t (*CG_CrosshairPlayer)( void );
CG_LAST_ATTACKER
// int32_t (*CG_LastAttacker)( void );
// int32_t (*CG_LastAttacker)( void );
} cgameExport_t;
//----------------------------------------------

View file

@ -241,6 +241,6 @@ typedef enum
} ingameTextType_t;
extern char *ingame_text[IGT_MAX];
extern char* ingame_text[IGT_MAX];
#endif //__CG_TEXT_H__

View file

@ -106,9 +106,11 @@
#else
#ifdef _MSC_VER
#include <stddef.h>
#include <stdint.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#else
#include <stdint.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#endif
#endif

View file

@ -2988,7 +2988,7 @@ void UI_SecurityCodeSetup ( void )
if ( !code )
UI_Logger( LL_ERROR, "No data was able to be loaded\n" );
else
UI_Logger( LL_ERROR, "ID was %lu, should be %u\n", code->ID, SECURITY_ID );
UI_Logger( LL_ERROR, "ID was %"PRIu64", should be %u\n", code->ID, SECURITY_ID );
UI_ConfirmMenu( menu_normal_text[MNT_ID_INVALID], 0, SecurityFeedback );
UI_LogFuncEnd();
@ -3055,14 +3055,14 @@ void UI_SecurityCodeSetup ( void )
trap_FS_Write( code, SECURITY_SIZE, wf );
trap_FS_FCloseFile( wf );
trap_Cvar_Set( "sv_securityHash", va( "%lu", code->hash ) );
trap_Cvar_Set( "sv_securityHash", va( "%"PRIu64, code->hash ) );
}
/*
* update the security code value and lock it each time
* from here, it is subsequently sent to the server on player connect
*/
trap_Cvar_Set( "sv_securityCode", va( "%lu", code->playerID ) );
trap_Cvar_Set( "sv_securityCode", va( "%"PRIu64, code->playerID ) );
UI_LogFuncEnd();
}

View file

@ -3039,7 +3039,7 @@ static void ControlsMouseJoyStick_MenuInit( void )
s_controls.sensitivity.height = 32;
s_controls.sensitivity.focusWidth = 145;
s_controls.sensitivity.focusHeight = 18;
s_controls.sensitivity.picName = GRAPHIC_SQUARE;
s_controls.sensitivity.picName = (char*)GRAPHIC_SQUARE;
s_controls.sensitivity.picX = x;
s_controls.sensitivity.picY = y;
s_controls.sensitivity.picWidth = MENU_BUTTON_MED_WIDTH + 21;
@ -3122,7 +3122,7 @@ static void ControlsMouseJoyStick_MenuInit( void )
s_controls.joythreshold.height = 32;
s_controls.joythreshold.focusWidth = 145;
s_controls.joythreshold.focusHeight = 18;
s_controls.joythreshold.picName = GRAPHIC_SQUARE;
s_controls.joythreshold.picName = (char*)GRAPHIC_SQUARE;
s_controls.joythreshold.picX = x;
s_controls.joythreshold.picY = y;
s_controls.joythreshold.picWidth = MENU_BUTTON_MED_WIDTH + 21;
@ -3519,7 +3519,7 @@ static void ControlsOther_MenuInit( void )
s_keyturnspeed_slider.height = 32;
s_keyturnspeed_slider.focusWidth = 145;
s_keyturnspeed_slider.focusHeight = 18;
s_keyturnspeed_slider.picName = GRAPHIC_SQUARE;
s_keyturnspeed_slider.picName = (char*)GRAPHIC_SQUARE;
s_keyturnspeed_slider.picX = x;
s_keyturnspeed_slider.picY = y;
s_keyturnspeed_slider.picWidth = MENU_BUTTON_MED_WIDTH + 21;

File diff suppressed because it is too large Load diff

View file

@ -812,7 +812,7 @@ static void InitialSetupMenu_Init( void )
s_initialsetup.gamma.textEnum = MBT_BRIGHTNESS;
s_initialsetup.gamma.textcolor = CT_BLACK;
s_initialsetup.gamma.textcolor2 = CT_BLACK; //CT_WHITE;
s_initialsetup.gamma.thumbName = GRAPHIC_BUTTONSLIDER;
s_initialsetup.gamma.thumbName = (char*)GRAPHIC_BUTTONSLIDER;
s_initialsetup.gamma.thumbHeight = 32;
s_initialsetup.gamma.thumbWidth = 16;
s_initialsetup.gamma.thumbGraphicWidth = 9;

View file

@ -887,7 +887,7 @@ static void PlayerSettings_MenuInit(int32_t menuFrom)
s_playersettings.height.height = 32;
s_playersettings.height.focusWidth = 145; //145
s_playersettings.height.focusHeight = 18;
s_playersettings.height.picName = GRAPHIC_SQUARE;
s_playersettings.height.picName = (char*)GRAPHIC_SQUARE;
s_playersettings.height.picX = 115;
s_playersettings.height.picY = y;
s_playersettings.height.picWidth = 85; //MENU_BUTTON_MED_WIDTH + 21;
@ -921,7 +921,7 @@ static void PlayerSettings_MenuInit(int32_t menuFrom)
s_playersettings.weight.height = 32;
s_playersettings.weight.focusWidth = 145;
s_playersettings.weight.focusHeight = 18;
s_playersettings.weight.picName = GRAPHIC_SQUARE;
s_playersettings.weight.picName = (char*)GRAPHIC_SQUARE;
s_playersettings.weight.picX = 115;
s_playersettings.weight.picY = y;
s_playersettings.weight.picWidth = 85; //MENU_BUTTON_MED_WIDTH + 21;

View file

@ -2305,7 +2305,7 @@ static void VideoData2_MenuInit( void )
s_videodata2.gamma_slider.height = 32;
s_videodata2.gamma_slider.focusWidth = 145;
s_videodata2.gamma_slider.focusHeight = 18;
s_videodata2.gamma_slider.picName = GRAPHIC_SQUARE;
s_videodata2.gamma_slider.picName = (char*)GRAPHIC_SQUARE;
s_videodata2.gamma_slider.picX = x;
s_videodata2.gamma_slider.picY = y;
s_videodata2.gamma_slider.picWidth = MENU_BUTTON_MED_WIDTH + 21;
@ -2354,7 +2354,7 @@ static void VideoData2_MenuInit( void )
s_videodata2.screensize_slider.height = 32;
s_videodata2.screensize_slider.focusWidth = 145;
s_videodata2.screensize_slider.focusHeight = 18;
s_videodata2.screensize_slider.picName = GRAPHIC_SQUARE;
s_videodata2.screensize_slider.picName = (char*)GRAPHIC_SQUARE;
s_videodata2.screensize_slider.picX = x;
s_videodata2.screensize_slider.picY = y;
s_videodata2.screensize_slider.picWidth = MENU_BUTTON_MED_WIDTH + 21;