From 725dfe17a1dd41b8833d3e988ef5203881d823a0 Mon Sep 17 00:00:00 2001 From: Walter Julius 'GSIO01' Hennecke Date: Sun, 9 Sep 2012 09:16:07 +0200 Subject: [PATCH] Sync with RPG-X rpgxEF edition repo --- code/cgame/cg_draw.c | 74 +++++++++++++++++++++++++++++++++------ code/cgame/cg_drawtools.c | 12 +++++-- code/cgame/cg_ents.c | 2 +- code/cgame/cg_env.c | 38 ++++++++++---------- code/cgame/cg_info.c | 6 ++-- code/cgame/cg_local.h | 4 +-- code/cgame/cg_main.c | 10 +++--- code/cgame/cg_players.c | 3 +- code/cgame/cg_screenfx.h | 2 +- code/game/g_cinematic.cpp | 2 -- code/game/g_cinematic.h | 10 ------ code/game/g_local.h | 4 +-- code/game/g_public.h | 1 - code/game/list.h | 2 +- code/game/q_shared.h | 19 ++-------- 15 files changed, 113 insertions(+), 76 deletions(-) delete mode 100644 code/game/g_cinematic.cpp delete mode 100644 code/game/g_cinematic.h diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index 9515022..24eb8d1 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -31,9 +31,9 @@ int infoStringCount; static qboolean drawCrosshairName=qfalse; -extern void InitPostGameMenuStruct(void); +extern void InitPostGameMenuStruct(); -static void CG_InterfaceStartup(void); +static void CG_InterfaceStartup(); char *ingame_text[IGT_MAX]; /* Holds pointers to ingame text */ @@ -748,6 +748,7 @@ Used for both the status bar and the scoreboard void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t headAngles ) { clipHandle_t cm; + centity_t *cent; clientInfo_t *ci; playerState_t *ps; float value; @@ -755,6 +756,7 @@ void CG_DrawHead( float x, float y, float w, float h, int clientNum, vec3_t head vec3_t origin; vec3_t mins, maxs; + cent = &cg_entities[ clientNum ]; ci = &cgs.clientinfo[ clientNum ]; ps = &cg.snap->ps; @@ -953,6 +955,15 @@ CG_DrawAmmo */ static void CG_DrawAmmo(centity_t *cent) { + float value; +// float xLength; + playerState_t *ps; +// int max,brightColor_i,darkColor_i,numColor_i; + + ps = &cg.snap->ps; + + value = ps->ammo[cent->currentState.weapon]; + return; } @@ -1246,16 +1257,17 @@ CG_DrawStatusBar static void CG_DrawStatusBar( void ) { centity_t *cent; + playerState_t *ps; vec3_t angles; - int y=0; - vec4_t whiteA; - int x, z, i, h, yZ; - vec3_t tmpVec, eAngle, forward, dAngle; + int y=0; + vec4_t whiteA; + int x, z, i, h, yZ; + vec3_t tmpVec, eAngle, forward, dAngle; //RPG-X: Redtechie - for the HACK code below - //int rpg_shakemycamera; - int healthBarWidth; - //float rpg_shakemycamera_intensity; - //const char *info; + //int rpg_shakemycamera; + int healthBarWidth; + //float rpg_shakemycamera_intensity; + //const char *info; /*static float colors[4][4] = { @@ -1283,6 +1295,8 @@ static void CG_DrawStatusBar( void ) // draw the team background CG_DrawTeamBackground( 0, 420, 640, 60, 0.33, cg.snap->ps.persistant[PERS_TEAM], qfalse ); + ps = &cg.snap->ps; + VectorClear( angles ); // draw any 3D icons first, so the changes back to 2D are minimized @@ -2127,7 +2141,16 @@ Draw the small two score display */ static float CG_DrawScores( float y ) { - float y1; +// const char *s; + int s1, s2; //, score; +// int x, w; +// int v; +// vec4_t color; + float y1; +// gitem_t *item; + + s1 = cgs.scores1; + s2 = cgs.scores2; y -= BIGCHAR_HEIGHT + 8; y1 = y; @@ -3200,6 +3223,7 @@ CG_LabelCrosshairEntity static void CG_LabelViewEntity( int clientNum, vec3_t origin, vec3_t entMins, vec3_t entMaxs, char *name, qboolean scanAll, vec4_t color, qboolean drawHealth, int health, char *pClass, char *rank, char *race, char* age, char *height, char *weight, char *weapon ) {//ID teammates, ID enemies, ID objectives, etc. + centity_t *cent; //clientInfo_t *ci; vec3_t center, maxs, mins, top, bottom, topLeft, topRight, bottomLeft, bottomRight; vec3_t worldEast = {1.0f, 0, 0}, worldNorth = {0, 1.0f, 0}, worldUp = {0, 0, 1.0f}; @@ -3226,6 +3250,8 @@ static void CG_LabelViewEntity( int clientNum, vec3_t origin, vec3_t entMins, ve char showAge[1024]; char showClass[1024]; //char *health = "100"; + + cent = &cg_entities[clientNum]; /*if ( clientNum < MAX_CLIENTS ) { ci = &cgs.clientinfo[clientNum]; @@ -4293,6 +4319,7 @@ static void CG_DrawWarmup( void ) { int sec; int i; clientInfo_t *ci1, *ci2; + int cw; const char *s; sec = cg.warmup; @@ -4330,6 +4357,11 @@ static void CG_DrawWarmup( void ) { // w = CG_DrawStrlen( s ); w = UI_ProportionalStringWidth(s,UI_BIGFONT); + if ( w > 640 / BIGCHAR_WIDTH ) { + cw = 640 / w; + } else { + cw = BIGCHAR_WIDTH; + } // CG_DrawStringExt( 320 - w * cw/2, 20,s, colorWhite, // qfalse, qtrue, cw, (int)(cw * 1.5), 0 ); UI_DrawProportionalString( (SCREEN_WIDTH/2), 20,s, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]); @@ -4354,6 +4386,12 @@ static void CG_DrawWarmup( void ) { w = UI_ProportionalStringWidth(s,UI_BIGFONT); + if ( w > 640 / BIGCHAR_WIDTH ) { + cw = 640 / w; + } else { + cw = BIGCHAR_WIDTH; + } + UI_DrawProportionalString((SCREEN_WIDTH/2) , 20,gamename, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]); } @@ -4378,6 +4416,20 @@ static void CG_DrawWarmup( void ) { break; } } + switch ( cg.warmupCount ) { + case 0: + cw = 28; + break; + case 1: + cw = 24; + break; + case 2: + cw = 20; + break; + default: + cw = 16; + break; + } // w = CG_DrawStrlen( s ); // CG_DrawStringExt( 320 - w * cw/2, 70, s, colorWhite, diff --git a/code/cgame/cg_drawtools.c b/code/cgame/cg_drawtools.c index e7544eb..4a9c460 100644 --- a/code/cgame/cg_drawtools.c +++ b/code/cgame/cg_drawtools.c @@ -750,9 +750,15 @@ static void UI_DrawProportionalString2( int x, int y, const char* str, vec4_t co float fcol; float fwidth; float fheight; + vec4_t givenColor; int colorI; int special; + givenColor[0] = color[0]; + givenColor[1] = color[1]; + givenColor[2] = color[2]; + givenColor[3] = color[3]; + // draw the colored text trap_R_SetColor( color ); @@ -1446,7 +1452,7 @@ qboolean CG_ParseRankData( char **data, rankMenuData_t* rankMenuData ) { } } else { - Com_Printf( S_COLOR_RED "Could not find { in current rankset file.\n" ); + Com_Printf( S_COLOR_RED, "Could not find { in current rankset file.\n" ); return qtrue; } } @@ -1461,7 +1467,7 @@ qboolean CG_LoadRanks( void ) { fileHandle_t file; int file_len; char charText[32000]; - char *textPtr; + char *textPtr, *prevValue; char fileName[MAX_QPATH]; int i; int rankCount=0; @@ -1517,6 +1523,7 @@ qboolean CG_LoadRanks( void ) { //DEFAULT I SAY! IT'S SPECIAL! //WE NEED A DEFAULT FOR ERRORS! NO DEFAULT NO RANK FOR YOU! while ( 1 ) { + prevValue = textPtr; token = COM_Parse( &textPtr ); if ( !token[0] ) { @@ -1583,6 +1590,7 @@ qboolean CG_LoadRanks( void ) { else { //Parse.Rank.Data? :) *sigh* if only rofl while (1) { + prevValue = textPtr; token = COM_Parse( &textPtr ); if ( !token[0] ) { break; diff --git a/code/cgame/cg_ents.c b/code/cgame/cg_ents.c index 0f337d7..b5aba67 100644 --- a/code/cgame/cg_ents.c +++ b/code/cgame/cg_ents.c @@ -871,7 +871,7 @@ Also called by client movement prediction code void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out ) { centity_t *cent; vec3_t oldOrigin, origin, deltaOrigin; - vec3_t oldAngles, angles, UNUSED_VAR deltaAngles; + vec3_t oldAngles, angles, deltaAngles; if ( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { VectorCopy( in, out ); diff --git a/code/cgame/cg_env.c b/code/cgame/cg_env.c index 9b3f0a9..8abb726 100644 --- a/code/cgame/cg_env.c +++ b/code/cgame/cg_env.c @@ -671,7 +671,7 @@ void CG_FountainSpurt( vec3_t org, vec3_t end ) //vec3_t rgb = { 0.4f, 0.7f, 0.8f }; //float distance; //FXBezier *fxb; - localEntity_t UNUSED_VAR *le; + localEntity_t *le; // offset table, could have used sin/cos, I suppose //TiM - This was for the 4-way fountain. not needed no more @@ -800,10 +800,10 @@ void electric_spark( vec3_t pos, vec3_t normal, vec3_t dir, vec3_t user ) void CG_ElectricalExplosion( vec3_t start, vec3_t dir, float radius ) { localEntity_t *le; - localEntity_t UNUSED_VAR *particle; //FXTrail + localEntity_t *particle; //FXTrail vec3_t pos, temp/*, angles*/; int i, numSparks; - float scale; + float scale, dscale; // Spawn some delayed smoke /*FX_AddSpawner( start, dir, NULL, NULL, 150, 40, qfalse, 9000, smoke_puffs ); @@ -816,6 +816,7 @@ void CG_ElectricalExplosion( vec3_t start, vec3_t dir, float radius ) for ( i = 0; i < numSparks; i++ ) { scale = 0.7f + random(); //0.2 + dscale = -scale*2; particle = FX_AddTrail( start, NULL, @@ -918,7 +919,7 @@ void CG_PhaserFX(centity_t *cent) { qboolean TorpedoQFX_Think(localEntity_t *le) { - vec3_t line1end, line2end, axis[3], vel, dis; + vec3_t line1end, line2end, axis[3], rgb, vel, dis; float dist; VectorSubtract(le->refEntity.origin, le->addOrigin, dis); @@ -957,6 +958,8 @@ qboolean TorpedoQFX_Think(localEntity_t *le) FX_AddLine( line1end, line2end, 1.0f, random() * 25 + 2, 0.0f, /*0.1 + random() * 0.2*/0.0f, 0.0f, 1, cgs.media.quantumGlow); //FX_AddSprite(line1end, NULL, qfalse, random() * 90 + 30, 4, 1.0f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonStar); + VectorSet( rgb, 1.0f, 0.45f, 0.15f ); // orange + FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 60 + 30, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.quantumRays); //FX_AddSprite2(le->refEntity.origin, NULL,qfalse,random() * 10 + 60, 0.0f, 0.1f, 0.1f, rgb, rgb, 0.0f, 0.0f, 1, cgs.media.whiteRingShader); FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 40 + 8, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.quantumGlow ); @@ -972,7 +975,7 @@ qboolean TorpedoQFX_Think(localEntity_t *le) qboolean TorpedoPFX_Think(localEntity_t *le) { - vec3_t line1end, line2end, axis[3], vel, dis; + vec3_t line1end, line2end, axis[3], rgb, vel, dis; float dist; VectorSubtract(le->refEntity.origin, le->addOrigin, dis); @@ -1011,6 +1014,8 @@ qboolean TorpedoPFX_Think(localEntity_t *le) FX_AddLine( line1end, line2end, 1.0f, random() * 25 + 2, 0.0f, /*0.1 + random() * 0.2*/0.0f, 0.0f, 1, cgs.media.photonGlow); //FX_AddSprite(line1end, NULL, qfalse, random() * 90 + 30, 4, 1.0f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonStar); + VectorSet( rgb, 1.0f, 0.45f, 0.15f ); // orange + FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 60 + 30, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonRay); //FX_AddSprite2(le->refEntity.origin, NULL,qfalse,random() * 10 + 60, 0.0f, 0.1f, 0.1f, rgb, rgb, 0.0f, 0.0f, 1, cgs.media.whiteRingShader); FX_AddSprite( le->refEntity.origin, NULL,qfalse,random() * 40 + 8, 4, 0.5f, 0.0f, 0, 0.0f, 1.0f, cgs.media.photonGlow ); @@ -1082,7 +1087,7 @@ qboolean ParticleFire_Think(localEntity_t *le) { } void CG_ParticleFire(vec3_t origin, int killtime, int size) { - localEntity_t UNUSED_VAR *le; + localEntity_t *le; le = FX_AddSpawner(origin, NULL, NULL, NULL, qfalse, 0, 0, killtime, ParticleFire_Think, 10); //le->data.spawner.data1 = size; } @@ -1555,8 +1560,7 @@ Creates an orange electricity bolt effect with a pulse that travels down the bea ====================== */ -#if 0 -void ForgeBoltFireback( vec3_t start, vec3_t end, vec3_t velocity, vec3_t user ) +/*void ForgeBoltFireback( vec3_t start, vec3_t end, vec3_t velocity, vec3_t user ) { FX_AddElectricity( start, end, 1.0, user[DATA_RADIUS], 5.0, 1.0, 0.0, 200, cgs.media.pjBoltShader, (int)user[DATA_EFFECTS], user[DATA_CHAOS] ); @@ -1610,7 +1614,7 @@ bool ForgeBoltPulse( FXPrimitive *fx, centity_t *ent ) } //----------------------------- -void CG_ForgeBolt( centity_t *cent ) +/*void CG_ForgeBolt( centity_t *cent ) { qboolean pulse; int effects; @@ -1672,7 +1676,6 @@ void CG_ForgeBolt( centity_t *cent ) BoltSparkSpew( cent->currentState.origin2, dir, cgs.media.dkorangeParticleShader ); } } -#endif /* =========================== @@ -1684,8 +1687,8 @@ Create directed and scaled plasma jet void CG_Plasma( vec3_t start, vec3_t end, vec3_t sRGB, vec3_t eRGB, int startalpha, int endalpha ) { - vec3_t v; - float len, salpha = (startalpha / 255) , ealpha = (endalpha / 255); + vec3_t v, sp; + float detail, len, salpha = (startalpha / 255) , ealpha = (endalpha / 255); //detail = FX_DetailLevel( start, 16, 1200 ); //if ( detail == 0 ) @@ -1694,6 +1697,7 @@ void CG_Plasma( vec3_t start, vec3_t end, vec3_t sRGB, vec3_t eRGB, int startalp // Orient the plasma VectorSubtract( end, start, v ); len = VectorNormalize( v ); + VectorMA( start, 0.5f, v, sp ); // Stash a quad at the base to make the effect look a bit more solid //FX_AddQuad( sp, v, NULL, NULL, len * 0.36f, 0.0f, salpha, salpha, sRGB, sRGB, 0.0f, 45.0f, 0.0f, 200, cgs.media.prifleImpactShader ); @@ -1720,8 +1724,7 @@ particle stream fx for STASIS level ====================== */ -#if 0 -bool particle_stream_think( FXPrimitive *fx, centity_t *ent ) +/*bool particle_stream_think( FXPrimitive *fx, centity_t *ent ) { vec3_t old_org; @@ -1791,7 +1794,7 @@ The particles will accelerate up to the half-way point of the cylinder, then dec ====================== */ -void CG_TransporterStream( centity_t *cent ) +/*void CG_TransporterStream( centity_t *cent ) { vec3_t vel, accel, dir, pos, right, up; float len, time, acceleration, scale, dis, vf; @@ -1875,7 +1878,7 @@ CG_ExplosionTrail ------------------------- */ -qboolean explosionTrailThink( localEntity_t *fx ) +/*qboolean explosionTrailThink( localEntity_t *fx ) { localEntity_t *le=0; vec3_t direction, origin, new_org, angles, dir; @@ -1952,7 +1955,7 @@ A scanning type beam ---------------------- */ -void CG_BorgEnergyBeam( centity_t *cent ) +/*void CG_BorgEnergyBeam( centity_t *cent ) { vec3_t normal, angles, base, dir, dir2, rgb; float len, alpha; @@ -2015,7 +2018,6 @@ void CG_BorgEnergyBeam( centity_t *cent ) VectorCopy( base, cent->gent->pos1 ); cent->gent->angle += cent->gent->speed * 0.08f; } -#endif /* ---------------------- diff --git a/code/cgame/cg_info.c b/code/cgame/cg_info.c index f8281e7..1ab7c78 100644 --- a/code/cgame/cg_info.c +++ b/code/cgame/cg_info.c @@ -558,7 +558,7 @@ static void ObjectivePrint_Line(int strIndex,int color,centity_t *cent) int y,pixelLen,charLen; char holdText[1024], holdText2[2]; char finalText[MAX_OBJ_LENGTH]; - int len,maxPixLength,charHeight; + int len,len_s,maxPixLength,charHeight; assert(cgs.objectives[strIndex].text); @@ -567,6 +567,7 @@ static void ObjectivePrint_Line(int strIndex,int color,centity_t *cent) len = strlen(str); len++; Q_strncpyz(finalText,str,len); + len_s = strlen(str); pixelLen = UI_ProportionalStringWidth(finalText,UI_SMALLFONT); @@ -657,7 +658,7 @@ static int Objective_LineCnt(int strIndex,centity_t *cent) int pixelLen,charLen; char holdText[1024], holdText2[2]; char finalText[MAX_OBJ_LENGTH]; - int len,maxPixLength; + int len,len_s,maxPixLength; int lineCnt; assert(cgs.objectives[strIndex].text); @@ -666,6 +667,7 @@ static int Objective_LineCnt(int strIndex,centity_t *cent) len = strlen(str); len++; Q_strncpyz(finalText,str,len); + len_s = strlen(str); pixelLen = UI_ProportionalStringWidth(finalText,UI_SMALLFONT); lineCnt = 0; diff --git a/code/cgame/cg_local.h b/code/cgame/cg_local.h index d24871b..9ff47f5 100644 --- a/code/cgame/cg_local.h +++ b/code/cgame/cg_local.h @@ -1838,8 +1838,8 @@ qboolean CG_Cvar_ClampInt( const char *name, vmCvar_t *vmCvar, int min, int max const char *CG_ConfigString( int index ); const char *CG_Argv( int arg ); -void QDECL CG_Printf( const char *msg, ... ) __attribute__ ((format(printf, 1, 2))); -void QDECL CG_Error( const char *msg, ... ) __attribute__ ((format(printf, 1, 2))); +void QDECL CG_Printf( const char *msg, ... ); +void QDECL CG_Error( const char *msg, ... ); void CG_StartMusic( void ); void CG_UpdateCvars( void ); diff --git a/code/cgame/cg_main.c b/code/cgame/cg_main.c index 08c0159..2794963 100644 --- a/code/cgame/cg_main.c +++ b/code/cgame/cg_main.c @@ -433,7 +433,7 @@ void QDECL CG_Printf( const char *msg, ... ) { char *msgPtr; va_start (argptr, msg); - Q_vsnprintf(text, sizeof(text), msg, argptr); + vsprintf (text, msg, argptr); va_end (argptr); if ( cg_chatColor.integer > 0 && cg_chatColor.integer < 8 ) @@ -496,7 +496,7 @@ void QDECL CG_Error( const char *msg, ... ) { char text[1024]; va_start (argptr, msg); - Q_vsnprintf (text,sizeof(text), msg, argptr); + vsprintf (text, msg, argptr); va_end (argptr); trap_Error( text ); @@ -510,7 +510,7 @@ void QDECL Com_Error( int level, const char *error, ... ) { char text[1024]; va_start (argptr, error); - Q_vsnprintf (text,sizeof(text), error, argptr); + vsprintf (text, error, argptr); va_end (argptr); CG_Error( "%s", text); @@ -521,7 +521,7 @@ void QDECL Com_Printf( const char *msg, ... ) { char text[1024]; va_start (argptr, msg); - Q_vsnprintf (text, sizeof(text), msg, argptr); + vsprintf (text, msg, argptr); va_end (argptr); CG_Printf ("%s", text); @@ -2312,7 +2312,7 @@ qboolean CG_LoadUsablesStrings( void ) token = COM_Parse( &textPtr ); if ( Q_strncmp( token, "{", 1 ) != 0 ) { - CG_Printf( S_COLOR_RED "ERROR: UsableDescriptions had no opening brace ( { )!\n" ); + CG_Printf( S_COLOR_RED "ERROR: UsableDescriptions had no opening brace ( { )!\n", fileRoute ); continue; } diff --git a/code/cgame/cg_players.c b/code/cgame/cg_players.c index 5760938..e880c82 100644 --- a/code/cgame/cg_players.c +++ b/code/cgame/cg_players.c @@ -952,7 +952,7 @@ static qboolean CG_ParseModelDataFile( clientInfo_t *ci, const char *charName, fileHandle_t file; int file_len; char charText[20000]; - char *textPtr; + char *textPtr, *prevValue; char fileName[MAX_QPATH]; //char animPath[MAX_QPATH]; int i, n; @@ -1017,6 +1017,7 @@ static qboolean CG_ParseModelDataFile( clientInfo_t *ci, const char *charName, } while ( 1 ) { + prevValue = textPtr; //set a backup token = COM_Parse( &textPtr ); if (!token[0] || !token ) { //we've hit the end of the file. w00t! exit! diff --git a/code/cgame/cg_screenfx.h b/code/cgame/cg_screenfx.h index f6c784a..fc43a60 100644 --- a/code/cgame/cg_screenfx.h +++ b/code/cgame/cg_screenfx.h @@ -24,5 +24,5 @@ extern screenFX_t theScreenFX; void CG_AddFullScreenEffect(int screenfx, int clientNum); -void CG_DrawFullScreenFX(void); +void CG_DrawFullScreenFX(); diff --git a/code/game/g_cinematic.cpp b/code/game/g_cinematic.cpp deleted file mode 100644 index e4e5b25..0000000 --- a/code/game/g_cinematic.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "g_cinematic.h" - diff --git a/code/game/g_cinematic.h b/code/game/g_cinematic.h deleted file mode 100644 index 954d883..0000000 --- a/code/game/g_cinematic.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _G_CIN_H_ -#define _G_CIN_H_ -#include "g_local.h" - -void Cinematic_ActivateCameraMode(gentity_t *ent, gentity_t *target); -void Cinematic_DeactivateCameraMode(gentity_t *ent); -void Cinematic_ActivateGlobalCameraMode(gentity_t *target); -void Cinematic_DeactivateGlobalCameraMode(void); - -#endif //_G_CIN_H_ diff --git a/code/game/g_local.h b/code/game/g_local.h index 8c0f5de..0fa97dc 100644 --- a/code/game/g_local.h +++ b/code/game/g_local.h @@ -1280,8 +1280,8 @@ qboolean LuaHook_G_EntityReached(char *function, int entnum); qboolean LuaHook_G_EntityReachedAngular(char *function, int entnum); void G_LuaStatus(gentity_t * ent); -qboolean G_LuaInit(void); -void G_LuaShutdown(void); +qboolean G_LuaInit(); +void G_LuaShutdown(); extern vmCvar_t g_debugLua; extern vmCvar_t lua_allowedModules; diff --git a/code/game/g_public.h b/code/game/g_public.h index b5f2566..5c8edf8 100644 --- a/code/game/g_public.h +++ b/code/game/g_public.h @@ -11,7 +11,6 @@ // special server behaviors #define SVF_NOCLIENT 0x00000001 // don't send entity to clients, even if it has effects #define SVF_SHIELD_BBOX 0x00000002 // signals that SV_LinkEntity needs to use special client-side bbox encoding -#define SVF_CLIENTMASK 0x00000004 #define SVF_BOT 0x00000008 #define SVF_ELIMINATED 0x00000010 // Just so we know he's been eliminated without adding the EF_ELIMINATED flag which has all sorts of side effects #define SVF_BROADCAST 0x00000020 // send to all connected clients diff --git a/code/game/list.h b/code/game/list.h index 7316772..eaf845e 100644 --- a/code/game/list.h +++ b/code/game/list.h @@ -54,7 +54,7 @@ typedef struct list_iter * list_iter_p; /* Create a linked_list object. This pointer is created on the heap and must be cleared with a call to destroy_list to avoid memory leaks */ -list_p create_list(void); +list_p create_list(); /* Create a list_iter object for the linked_list list. The flag init can be either FRONT or BACK and indicates whether to start the iterator from the first diff --git a/code/game/q_shared.h b/code/game/q_shared.h index 0e3782e..7b4b1d1 100644 --- a/code/game/q_shared.h +++ b/code/game/q_shared.h @@ -37,20 +37,6 @@ #endif - -//Ignore __attribute__ on non-gcc platforms -#ifndef __GNUC__ -#ifndef __attribute__ -#define __attribute__(x) -#endif -#endif - -#ifdef __GNUC__ -#define UNUSED_VAR __attribute__((unused)) -#else -#define UNUSED_VAR -#endif - /********************************************************************** VM Considerations @@ -88,7 +74,6 @@ #include #include -#define Q_vsnprintf vsnprintf #endif #ifdef _WIN32 @@ -755,8 +740,8 @@ qboolean Info_Validate( const char *s ); void Info_NextPair( const char **s, char key[MAX_INFO_KEY], char value[MAX_INFO_VALUE] ); // this is only here so the functions in q_shared.c and bg_*.c can link -void QDECL Com_Error( int errlevel, const char *error, ... ) __attribute__ ((format(printf, 2, 3))); -void QDECL Com_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2))); +void QDECL Com_Error( int errlevel, const char *error, ... ); +void QDECL Com_Printf( const char *msg, ... ); /*