mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-02 08:51:57 +00:00
Merge remote-tracking branch 'DanielGibson/linux' into linux
This commit is contained in:
commit
2952f227ea
50 changed files with 112 additions and 101 deletions
|
@ -109,8 +109,8 @@ idAchievementManager::idAchievementManager
|
|||
========================
|
||||
*/
|
||||
idAchievementManager::idAchievementManager() :
|
||||
lastImpKilledTime( 0 ),
|
||||
lastPlayerKilledTime( 0 ),
|
||||
lastImpKilledTime( 0 ),
|
||||
playerTookDamage( false )
|
||||
{
|
||||
counts.Zero();
|
||||
|
|
|
@ -491,7 +491,7 @@ idActor::idActor()
|
|||
|
||||
waitState = "";
|
||||
|
||||
blink_anim = NULL;
|
||||
blink_anim = 0;
|
||||
blink_time = 0;
|
||||
blink_min = 0;
|
||||
blink_max = 0;
|
||||
|
@ -3679,7 +3679,7 @@ idActor::Event_HasAnim
|
|||
*/
|
||||
void idActor::Event_HasAnim( int channel, const char* animname )
|
||||
{
|
||||
if( GetAnim( channel, animname ) != NULL )
|
||||
if( GetAnim( channel, animname ) != 0 )
|
||||
{
|
||||
idThread::ReturnFloat( 1.0f );
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ void idEntity::UpdateChangeableSpawnArgs( const idDict* source )
|
|||
}
|
||||
cameraTarget = NULL;
|
||||
target = source->GetString( "cameraTarget" );
|
||||
if( target != NULL && target[0] != NULL )
|
||||
if( target != NULL && target[0] != '\0' )
|
||||
{
|
||||
// update the camera taget
|
||||
PostEventMS( &EV_UpdateCameraTarget, 0 );
|
||||
|
@ -560,7 +560,7 @@ void idEntity::Spawn()
|
|||
|
||||
cameraTarget = NULL;
|
||||
temp = spawnArgs.GetString( "cameraTarget" );
|
||||
if( temp != NULL && temp[0] != NULL )
|
||||
if( temp != NULL && temp[0] != '\0' )
|
||||
{
|
||||
// update the camera taget
|
||||
PostEventMS( &EV_UpdateCameraTarget, 0 );
|
||||
|
@ -624,7 +624,7 @@ void idEntity::Spawn()
|
|||
SetAxis( axis );
|
||||
|
||||
temp = spawnArgs.GetString( "model" );
|
||||
if( temp != NULL && *temp != NULL )
|
||||
if( temp != NULL && *temp != '\0' )
|
||||
{
|
||||
SetModel( temp );
|
||||
}
|
||||
|
|
|
@ -1210,7 +1210,7 @@ int idGameEdit::MapGetUniqueMatchingKeyVals( const char* key, const char* list[]
|
|||
if( ent )
|
||||
{
|
||||
const char* k = ent->epairs.GetString( key );
|
||||
if( k != NULL && *k != NULL && count < max )
|
||||
if( k != NULL && *k != '\0' && count < max )
|
||||
{
|
||||
list[count++] = k;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ idCVar net_usercmd_timing_debug( "net_usercmd_timing_debug", "0", CVAR_BOOL, "Pr
|
|||
|
||||
|
||||
// List of all defs used by the player that will stay on the fast timeline
|
||||
static char* fastEntityList[] =
|
||||
static const char* fastEntityList[] =
|
||||
{
|
||||
"player_doommarine",
|
||||
"weapon_chainsaw",
|
||||
|
@ -744,7 +744,7 @@ void idGameLocal::SetPersistentPlayerInfo( int clientNum, const idDict& playerIn
|
|||
idGameLocal::Printf
|
||||
============
|
||||
*/
|
||||
void idGameLocal::Printf( const char* fmt, ... ) const
|
||||
void idGameLocal::Printf( const char* fmt, ... ) const // DG: FIXME: printf-annotation
|
||||
{
|
||||
va_list argptr;
|
||||
char text[MAX_STRING_CHARS];
|
||||
|
|
|
@ -471,7 +471,7 @@ bool idItem::Pickup( idPlayer* player )
|
|||
if( respawn && !dropped && !no_respawn )
|
||||
{
|
||||
const char* sfx = spawnArgs.GetString( "fxRespawn" );
|
||||
if( sfx != NULL && *sfx != NULL )
|
||||
if( sfx != NULL && *sfx != '\0' )
|
||||
{
|
||||
PostEventSec( &EV_RespawnFx, respawn - 0.5f );
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ void idItem::Event_RespawnFx()
|
|||
ServerSendEvent( EVENT_RESPAWNFX, NULL, false );
|
||||
}
|
||||
const char* sfx = spawnArgs.GetString( "fxRespawn" );
|
||||
if( sfx != NULL && *sfx != NULL )
|
||||
if( sfx != NULL && *sfx != '\0' )
|
||||
{
|
||||
idEntityFx::StartFx( sfx, NULL, NULL, this, true );
|
||||
}
|
||||
|
@ -888,7 +888,7 @@ void idItemTeam::Spawn()
|
|||
idItemTeam::LoadScript
|
||||
===============
|
||||
*/
|
||||
function_t* idItemTeam::LoadScript( char* script )
|
||||
function_t* idItemTeam::LoadScript( const char* script )
|
||||
{
|
||||
function_t* function = NULL;
|
||||
idStr funcname = spawnArgs.GetString( script, "" );
|
||||
|
|
|
@ -282,7 +282,7 @@ private:
|
|||
void Event_FlagCapture();
|
||||
|
||||
void PrivateReturn();
|
||||
function_t* LoadScript( char* script );
|
||||
function_t* LoadScript( const char* script );
|
||||
|
||||
void SpawnNugget( idVec3 pos );
|
||||
void UpdateGuis();
|
||||
|
|
|
@ -756,7 +756,7 @@ void idLight::BecomeBroken( idEntity* activator )
|
|||
|
||||
// if the light has a sound, either start the alternate (broken) sound, or stop the sound
|
||||
const char* parm = spawnArgs.GetString( "snd_broken" );
|
||||
if( refSound.shader || ( parm != NULL && *parm != NULL ) )
|
||||
if( refSound.shader || ( parm != NULL && *parm != '\0' ) )
|
||||
{
|
||||
StopSound( SND_CHANNEL_ANY, false );
|
||||
const idSoundShader* alternate = refSound.shader ? refSound.shader->GetAltSound() : declManager->FindSound( parm );
|
||||
|
@ -768,7 +768,7 @@ void idLight::BecomeBroken( idEntity* activator )
|
|||
}
|
||||
|
||||
parm = spawnArgs.GetString( "mtr_broken" );
|
||||
if( parm != NULL && *parm != NULL )
|
||||
if( parm != NULL && *parm != '\0' )
|
||||
{
|
||||
SetShader( parm );
|
||||
}
|
||||
|
|
|
@ -2226,7 +2226,7 @@ void idFuncSplat::Event_Splat()
|
|||
for( int i = 0; i < count; i++ )
|
||||
{
|
||||
splat = spawnArgs.RandomPrefix( "mtr_splat", gameLocal.random );
|
||||
if( splat != NULL && *splat != NULL )
|
||||
if( splat != NULL && *splat != '\0' )
|
||||
{
|
||||
float size = spawnArgs.GetFloat( "splatSize", "128" );
|
||||
float dist = spawnArgs.GetFloat( "splatDistance", "128" );
|
||||
|
@ -3512,7 +3512,7 @@ void idFuncRadioChatter::Event_Activate( idEntity* activator )
|
|||
}
|
||||
|
||||
const char* sound = spawnArgs.GetString( "snd_radiochatter", "" );
|
||||
if( sound != NULL && *sound != NULL )
|
||||
if( sound != NULL && *sound != '\0' )
|
||||
{
|
||||
const idSoundShader* shader = declManager->FindSound( sound );
|
||||
int length = 0;
|
||||
|
|
|
@ -1298,7 +1298,7 @@ void idExplodingBarrel::Killed( idEntity* inflictor, idEntity* attacker, int dam
|
|||
physicsObj.SetContents( 0 );
|
||||
|
||||
const char* splash = spawnArgs.GetString( "def_splash_damage", "damage_explosion" );
|
||||
if( splash != NULL && *splash != NULL )
|
||||
if( splash != NULL && *splash != '\0' )
|
||||
{
|
||||
gameLocal.RadiusDamage( GetPhysics()->GetOrigin(), this, attacker, this, this, splash );
|
||||
}
|
||||
|
@ -1451,7 +1451,7 @@ void idExplodingBarrel::Event_Respawn()
|
|||
}
|
||||
}
|
||||
const char* temp = spawnArgs.GetString( "model" );
|
||||
if( temp != NULL && *temp != NULL )
|
||||
if( temp != NULL && *temp != '\0' )
|
||||
{
|
||||
SetModel( temp );
|
||||
}
|
||||
|
|
|
@ -4110,7 +4110,7 @@ void idDoor::Lock( int f )
|
|||
{
|
||||
// in this case the sound trigger never got spawned
|
||||
const char* sndtemp = door->spawnArgs.GetString( "snd_locked" );
|
||||
if( sndtemp != NULL && *sndtemp != NULL )
|
||||
if( sndtemp != NULL && *sndtemp != '\0' )
|
||||
{
|
||||
door->PostEventMS( &EV_Door_SpawnSoundTrigger, 0 );
|
||||
}
|
||||
|
@ -4298,7 +4298,7 @@ void idDoor::Event_SpawnDoorTrigger()
|
|||
}
|
||||
|
||||
const char* sndtemp = spawnArgs.GetString( "snd_locked" );
|
||||
if( spawnArgs.GetInt( "locked" ) && sndtemp != NULL && *sndtemp != NULL )
|
||||
if( spawnArgs.GetInt( "locked" ) && sndtemp != NULL && *sndtemp != '\0' )
|
||||
{
|
||||
PostEventMS( &EV_Door_SpawnSoundTrigger, 0 );
|
||||
}
|
||||
|
|
|
@ -3736,7 +3736,7 @@ idMultiplayerGame::GetTeamFlag
|
|||
*/
|
||||
void idMultiplayerGame::FindTeamFlags()
|
||||
{
|
||||
char* flagDefs[2] =
|
||||
const char* flagDefs[2] =
|
||||
{
|
||||
"team_CTF_redflag",
|
||||
"team_CTF_blueflag"
|
||||
|
|
|
@ -1729,7 +1729,7 @@ void idPlayer::SetupWeaponEntity()
|
|||
for( w = 0; w < MAX_WEAPONS; w++ )
|
||||
{
|
||||
weap = spawnArgs.GetString( va( "def_weapon%d", w ) );
|
||||
if( weap != NULL && *weap != NULL )
|
||||
if( weap != NULL && *weap != '\0' )
|
||||
{
|
||||
idWeapon::CacheWeapon( weap );
|
||||
}
|
||||
|
@ -4936,7 +4936,7 @@ idDict* idPlayer::FindInventoryItem( const char* name )
|
|||
for( int i = 0; i < inventory.items.Num(); i++ )
|
||||
{
|
||||
const char* iname = inventory.items[i]->GetString( "inv_name" );
|
||||
if( iname != NULL && *iname != NULL )
|
||||
if( iname != NULL && *iname != '\0' )
|
||||
{
|
||||
if( idStr::Icmp( name, iname ) == 0 )
|
||||
{
|
||||
|
|
|
@ -942,7 +942,7 @@ void idProjectile::Fizzle()
|
|||
|
||||
// fizzle FX
|
||||
const char* psystem = spawnArgs.GetString( "smoke_fuse" );
|
||||
if( psystem != NULL && *psystem != NULL )
|
||||
if( psystem != NULL && *psystem != '\0' )
|
||||
{
|
||||
//FIXME:SMOKE gameLocal.particles->SpawnParticles( GetPhysics()->GetOrigin(), vec3_origin, psystem );
|
||||
}
|
||||
|
@ -1114,7 +1114,7 @@ void idProjectile::Explode( const trace_t& collision, idEntity* ignore )
|
|||
}
|
||||
|
||||
int surfaceType = collision.c.material != NULL ? collision.c.material->GetSurfaceType() : SURFTYPE_METAL;
|
||||
if( !( fxname != NULL && *fxname != NULL ) )
|
||||
if( !( fxname != NULL && *fxname != '\0' ) )
|
||||
{
|
||||
if( ( surfaceType == SURFTYPE_NONE ) || ( surfaceType == SURFTYPE_METAL ) || ( surfaceType == SURFTYPE_STONE ) )
|
||||
{
|
||||
|
@ -2328,7 +2328,7 @@ void idBFGProjectile::Spawn()
|
|||
memset( &secondModel, 0, sizeof( secondModel ) );
|
||||
secondModelDefHandle = -1;
|
||||
const char* temp = spawnArgs.GetString( "model_two" );
|
||||
if( temp != NULL && *temp != NULL )
|
||||
if( temp != NULL && *temp != '\0' )
|
||||
{
|
||||
secondModel.hModel = renderModelManager->FindModel( temp );
|
||||
secondModel.bounds = secondModel.hModel->Bounds( &secondModel );
|
||||
|
@ -2551,7 +2551,7 @@ void idBFGProjectile::Launch( const idVec3& start, const idVec3& dir, const idVe
|
|||
memset( &secondModel, 0, sizeof( secondModel ) );
|
||||
secondModelDefHandle = -1;
|
||||
const char* temp = spawnArgs.GetString( "model_two" );
|
||||
if( temp != NULL && *temp != NULL )
|
||||
if( temp != NULL && *temp != '\0' )
|
||||
{
|
||||
secondModel.hModel = renderModelManager->FindModel( temp );
|
||||
secondModel.bounds = secondModel.hModel->Bounds( &secondModel );
|
||||
|
|
|
@ -1238,7 +1238,7 @@ void idTarget_SetInfluence::Event_Activate( idEntity* activator )
|
|||
}
|
||||
|
||||
parm = spawnArgs.GetString( "snd_influence" );
|
||||
if( parm != NULL && *parm != NULL )
|
||||
if( parm != NULL && *parm != '\0' )
|
||||
{
|
||||
PostEventSec( &EV_StartSoundShader, flashIn, parm, SND_CHANNEL_ANY );
|
||||
}
|
||||
|
@ -1356,7 +1356,7 @@ void idTarget_SetInfluence::Event_Activate( idEntity* activator )
|
|||
}
|
||||
|
||||
parm = spawnArgs.GetString( "mtrWorld" );
|
||||
if( parm != NULL && *parm != NULL )
|
||||
if( parm != NULL && *parm != '\0' )
|
||||
{
|
||||
gameLocal.SetGlobalMaterial( declManager->FindMaterial( parm ) );
|
||||
}
|
||||
|
@ -1809,7 +1809,7 @@ void idTarget_EnableLevelWeapons::Event_Activate( idEntity* activator )
|
|||
if( gameLocal.entities[ i ] )
|
||||
{
|
||||
gameLocal.entities[ i ]->ProcessEvent( &EV_Player_EnableWeapon );
|
||||
if( weap != NULL && weap[ 0 ] != NULL )
|
||||
if( weap != NULL && weap[ 0 ] != '\0' )
|
||||
{
|
||||
gameLocal.entities[ i ]->PostEventSec( &EV_Player_SelectWeapon, 0.5f, weap );
|
||||
}
|
||||
|
|
|
@ -4630,7 +4630,7 @@ void idWeapon::Event_Melee()
|
|||
const char* decal;
|
||||
// project decal
|
||||
decal = weaponDef->dict.GetString( "mtr_strike" );
|
||||
if( decal != NULL && *decal != NULL )
|
||||
if( decal != NULL && *decal != '\0' )
|
||||
{
|
||||
gameLocal.ProjectDecal( tr.c.point, -tr.c.normal, 8.0f, true, 6.0, decal );
|
||||
}
|
||||
|
|
|
@ -5033,7 +5033,7 @@ void idAI::DirectDamage( const char* meleeDefName, idEntity* ent )
|
|||
// do the damage
|
||||
//
|
||||
p = meleeDef->GetString( "snd_hit" );
|
||||
if( p != NULL && *p != NULL )
|
||||
if( p != NULL && *p != '\0' )
|
||||
{
|
||||
shader = declManager->FindSound( p );
|
||||
StartSoundShader( shader, SND_CHANNEL_DAMAGE, 0, false, NULL );
|
||||
|
@ -5135,7 +5135,7 @@ bool idAI::AttackMelee( const char* meleeDefName )
|
|||
if( enemyEnt == NULL )
|
||||
{
|
||||
p = meleeDef->GetString( "snd_miss" );
|
||||
if( p != NULL && *p != NULL )
|
||||
if( p != NULL && *p != '\0' )
|
||||
{
|
||||
shader = declManager->FindSound( p );
|
||||
StartSoundShader( shader, SND_CHANNEL_DAMAGE, 0, false, NULL );
|
||||
|
@ -5173,7 +5173,7 @@ bool idAI::AttackMelee( const char* meleeDefName )
|
|||
{
|
||||
// missed
|
||||
p = meleeDef->GetString( "snd_miss" );
|
||||
if( p != NULL && *p != NULL )
|
||||
if( p != NULL && *p != '\0' )
|
||||
{
|
||||
shader = declManager->FindSound( p );
|
||||
StartSoundShader( shader, SND_CHANNEL_DAMAGE, 0, false, NULL );
|
||||
|
@ -5185,7 +5185,7 @@ bool idAI::AttackMelee( const char* meleeDefName )
|
|||
// do the damage
|
||||
//
|
||||
p = meleeDef->GetString( "snd_hit" );
|
||||
if( p != NULL && *p != NULL )
|
||||
if( p != NULL && *p != '\0' )
|
||||
{
|
||||
shader = declManager->FindSound( p );
|
||||
StartSoundShader( shader, SND_CHANNEL_DAMAGE, 0, false, NULL );
|
||||
|
@ -5429,7 +5429,7 @@ void idAI::SetChatSound()
|
|||
snd = NULL;
|
||||
}
|
||||
|
||||
if( snd != NULL && *snd != NULL )
|
||||
if( snd != NULL && *snd != '\0' )
|
||||
{
|
||||
chat_snd = declManager->FindSound( snd );
|
||||
|
||||
|
|
|
@ -544,7 +544,7 @@ argv(0) god
|
|||
*/
|
||||
void Cmd_God_f( const idCmdArgs& args )
|
||||
{
|
||||
char* msg;
|
||||
const char* msg;
|
||||
idPlayer* player;
|
||||
|
||||
player = gameLocal.GetLocalPlayer();
|
||||
|
@ -578,7 +578,7 @@ argv(0) notarget
|
|||
*/
|
||||
void Cmd_Notarget_f( const idCmdArgs& args )
|
||||
{
|
||||
char* msg;
|
||||
const char* msg;
|
||||
idPlayer* player;
|
||||
|
||||
player = gameLocal.GetLocalPlayer();
|
||||
|
@ -610,7 +610,7 @@ argv(0) noclip
|
|||
*/
|
||||
void Cmd_Noclip_f( const idCmdArgs& args )
|
||||
{
|
||||
char* msg;
|
||||
const char* msg;
|
||||
idPlayer* player;
|
||||
|
||||
player = gameLocal.GetLocalPlayer();
|
||||
|
|
|
@ -317,7 +317,7 @@ void idMenuHandler_PDA::Initialize( const char* swfFile, idSoundWorld* sw )
|
|||
{
|
||||
const char* weaponDefName = va( "def_weapon%d", j );
|
||||
const char* weap = player->spawnArgs.GetString( weaponDefName );
|
||||
if( weap != NULL && *weap != NULL )
|
||||
if( weap != NULL && *weap != '\0' )
|
||||
{
|
||||
const idDeclEntityDef* weaponDef = gameLocal.FindEntityDef( weap, false );
|
||||
if( weaponDef != NULL )
|
||||
|
|
|
@ -545,7 +545,7 @@ void idMenuScreen_HUD::GiveWeapon( idPlayer* player, int weaponIndex )
|
|||
|
||||
const char* weapnum = va( "def_weapon%d", weaponIndex );
|
||||
const char* weap = player->spawnArgs.GetString( weapnum );
|
||||
if( weap != NULL && *weap != NULL )
|
||||
if( weap != NULL && *weap != '\0' )
|
||||
{
|
||||
const idDeclEntityDef* weaponDef = gameLocal.FindEntityDef( weap, false );
|
||||
if( weaponDef != NULL )
|
||||
|
@ -1141,7 +1141,7 @@ void idMenuScreen_HUD::UpdateWeaponStates( idPlayer* player, bool weaponChanged
|
|||
const idMaterial* hudIcon = NULL;
|
||||
const char* weapNum = weaponDefNames[ weaponIndex ];
|
||||
const char* weap = player->spawnArgs.GetString( weapNum );
|
||||
if( weap != NULL && *weap != NULL )
|
||||
if( weap != NULL && *weap != '\0' )
|
||||
{
|
||||
const idDeclEntityDef* weaponDef = gameLocal.FindEntityDef( weap, false );
|
||||
if( weaponDef != NULL )
|
||||
|
@ -1205,7 +1205,7 @@ void idMenuScreen_HUD::UpdateWeaponStates( idPlayer* player, bool weaponChanged
|
|||
{
|
||||
hasWeapons = true;
|
||||
const char* weap = player->spawnArgs.GetString( weapnum );
|
||||
if( weap != NULL && *weap != NULL )
|
||||
if( weap != NULL && *weap != '\0' )
|
||||
{
|
||||
weapstate++;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ void idMenuScreen_PDA_Inventory::ShowScreen( const mainMenuTransition_t transiti
|
|||
{
|
||||
|
||||
const char* weap = GetWeaponName( j );
|
||||
if( weap == NULL || *weap == NULL )
|
||||
if( weap == NULL || *weap == '\0' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ void idMenuScreen_PDA_Inventory::Update()
|
|||
{
|
||||
|
||||
const char* weap = GetWeaponName( j );
|
||||
if( weap == NULL || *weap == NULL )
|
||||
if( weap == NULL || *weap == '\0' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ void idMenuScreen_PDA_Inventory::EquipWeapon()
|
|||
{
|
||||
|
||||
const char* weap = GetWeaponName( j );
|
||||
if( weap == NULL || *weap == NULL )
|
||||
if( weap == NULL || *weap == '\0' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -36,15 +36,15 @@ idMenuWidget::idMenuWidget
|
|||
========================
|
||||
*/
|
||||
idMenuWidget::idMenuWidget() :
|
||||
handlerIsParent( false ),
|
||||
menuData( NULL ),
|
||||
swfObj( NULL ),
|
||||
boundSprite( NULL ),
|
||||
parent( NULL ),
|
||||
dataSource( NULL ),
|
||||
dataSourceFieldIndex( 0 ),
|
||||
focusIndex( 0 ),
|
||||
widgetState( WIDGET_STATE_NORMAL ),
|
||||
menuData( NULL ),
|
||||
swfObj( NULL ),
|
||||
handlerIsParent( false ),
|
||||
refCount( 0 ),
|
||||
noAutoFree( false )
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ void idMenuWidget_PDA_UserData::Update()
|
|||
if( txtClearance != NULL )
|
||||
{
|
||||
const char* security = pda->GetSecurity();
|
||||
if( *security == NULL )
|
||||
if( *security == '\0' )
|
||||
{
|
||||
txtClearance->SetText( idLocalization::GetString( "#str_00066" ) );
|
||||
}
|
||||
|
|
|
@ -121,9 +121,9 @@ idCommonLocal::idCommonLocal
|
|||
idCommonLocal::idCommonLocal() :
|
||||
readSnapshotIndex( 0 ),
|
||||
writeSnapshotIndex( 0 ),
|
||||
optimalPCTBuffer( 0.5f ),
|
||||
optimalTimeBuffered( 0.0f ),
|
||||
optimalTimeBufferedWindow( 0.0f ),
|
||||
optimalPCTBuffer( 0.5f ),
|
||||
lastPacifierSessionTime( 0 ),
|
||||
lastPacifierGuiTime( 0 ),
|
||||
lastPacifierDialogState( false ),
|
||||
|
|
|
@ -102,7 +102,7 @@ public:
|
|||
|
||||
#define SCOPED_PROFILE_EVENT( x ) idScopedProfileEvent scopedProfileEvent_##__LINE__( x )
|
||||
|
||||
ID_INLINE bool BeginTraceRecording( char* szName )
|
||||
ID_INLINE bool BeginTraceRecording( const char* szName )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -42,11 +42,11 @@ idDebugGraph::idDebugGraph
|
|||
idDebugGraph::idDebugGraph( int numItems ) :
|
||||
bgColor( 0.0f, 0.0f, 0.0f, 0.5f ),
|
||||
fontColor( 1.0f, 1.0f, 1.0f, 1.0f ),
|
||||
enable( true ),
|
||||
mode( GRAPH_FILL ),
|
||||
sideways( false ),
|
||||
border( 0.0f ),
|
||||
position( 100.0f, 100.0f, 100.0f, 100.0f )
|
||||
position( 100.0f, 100.0f, 100.0f, 100.0f ),
|
||||
enable( true )
|
||||
{
|
||||
|
||||
Init( numItems );
|
||||
|
|
|
@ -475,10 +475,12 @@ static int unzlocal_GetCurrentFileInfoInternal( unzFile file,
|
|||
|
||||
/* we check the magic */
|
||||
if( err == UNZ_OK )
|
||||
{
|
||||
if( unzlocal_getLong( s->file, &uMagic ) != UNZ_OK )
|
||||
err = UNZ_ERRNO;
|
||||
else if( uMagic != 0x02014b50 )
|
||||
err = UNZ_BADZIPFILE;
|
||||
}
|
||||
|
||||
if( unzlocal_getShort( s->file, &file_info.version ) != UNZ_OK )
|
||||
err = UNZ_ERRNO;
|
||||
|
@ -555,10 +557,12 @@ static int unzlocal_GetCurrentFileInfoInternal( unzFile file,
|
|||
uSizeRead = extraFieldBufferSize;
|
||||
|
||||
if( lSeek != 0 )
|
||||
{
|
||||
if( s->file->Seek( lSeek, FS_SEEK_CUR ) == 0 )
|
||||
lSeek = 0;
|
||||
else
|
||||
err = UNZ_ERRNO;
|
||||
}
|
||||
if( ( file_info.size_file_extra > 0 ) && ( extraFieldBufferSize > 0 ) )
|
||||
if( s->file->Read( extraField, uSizeRead ) != ( int )uSizeRead )
|
||||
err = UNZ_ERRNO;
|
||||
|
@ -580,10 +584,12 @@ static int unzlocal_GetCurrentFileInfoInternal( unzFile file,
|
|||
uSizeRead = commentBufferSize;
|
||||
|
||||
if( lSeek != 0 )
|
||||
{
|
||||
if( s->file->Seek( lSeek, FS_SEEK_CUR ) == 0 )
|
||||
lSeek = 0;
|
||||
else
|
||||
err = UNZ_ERRNO;
|
||||
}
|
||||
if( ( file_info.size_file_comment > 0 ) && ( commentBufferSize > 0 ) )
|
||||
if( s->file->Read( szComment, uSizeRead ) != ( int )uSizeRead )
|
||||
err = UNZ_ERRNO;
|
||||
|
@ -778,10 +784,12 @@ static int unzlocal_CheckCurrentFileCoherencyHeader( unz_s* s, uInt* piSizeVar,
|
|||
|
||||
|
||||
if( err == UNZ_OK )
|
||||
{
|
||||
if( unzlocal_getLong( s->file, &uMagic ) != UNZ_OK )
|
||||
err = UNZ_ERRNO;
|
||||
else if( uMagic != 0x04034b50 )
|
||||
err = UNZ_BADZIPFILE;
|
||||
}
|
||||
|
||||
if( unzlocal_getShort( s->file, &uData ) != UNZ_OK )
|
||||
err = UNZ_ERRNO;
|
||||
|
|
|
@ -881,7 +881,7 @@ bool idDict::ReadFromIniFile( idFile* f )
|
|||
{
|
||||
return false;
|
||||
}
|
||||
buffer[length - 1] = NULL; // Since the .ini files are not null terminated, make sure we mark where the end of the .ini file is in our read buffer
|
||||
buffer[length - 1] = '\0'; // Since the .ini files are not null terminated, make sure we mark where the end of the .ini file is in our read buffer
|
||||
|
||||
idLexer parser( LEXFL_NOFATALERRORS | LEXFL_ALLOWPATHNAMES /*| LEXFL_ONLYSTRINGS */ );
|
||||
idStr name = f->GetName();
|
||||
|
|
|
@ -1038,7 +1038,7 @@ idLexer::ReadPunctuation
|
|||
int idLexer::ReadPunctuation( idToken* token )
|
||||
{
|
||||
int l, n, i;
|
||||
char* p;
|
||||
const char* p;
|
||||
const punctuation_t* punc;
|
||||
|
||||
#ifdef PUNCTABLE
|
||||
|
|
|
@ -130,7 +130,7 @@ typedef enum
|
|||
// punctuation
|
||||
typedef struct punctuation_s
|
||||
{
|
||||
char* p; // punctuation character(s)
|
||||
const char* p; // punctuation character(s)
|
||||
int n; // punctuation id
|
||||
} punctuation_t;
|
||||
|
||||
|
|
|
@ -706,7 +706,7 @@ void idParser::AddBuiltinDefines()
|
|||
define_t* define;
|
||||
struct builtin
|
||||
{
|
||||
char* string;
|
||||
const char* string;
|
||||
int id;
|
||||
} builtin[] =
|
||||
{
|
||||
|
|
|
@ -167,7 +167,7 @@ void idSurface_SweptSpline::Tessellate( const int splineSubdivisions, const int
|
|||
|
||||
// calculate the points and first derivatives for the swept spline
|
||||
totalTime = sweptSpline->GetTime( sweptSpline->GetNumValues() - 1 ) - sweptSpline->GetTime( 0 ) + sweptSpline->GetCloseTime();
|
||||
sweptSplineDiv = sweptSpline->GetBoundaryType() == idCurve_Spline<idVec3>::BT_CLOSED ? sweptSplineSubdivisions : sweptSplineSubdivisions - 1;
|
||||
sweptSplineDiv = sweptSpline->GetBoundaryType() == idCurve_Spline<idVec4>::BT_CLOSED ? sweptSplineSubdivisions : sweptSplineSubdivisions - 1;
|
||||
baseOffset = ( splineSubdivisions - 1 ) * sweptSplineSubdivisions;
|
||||
for( i = 0; i < sweptSplineSubdivisions; i++ )
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ void idSurface_SweptSpline::Tessellate( const int splineSubdivisions, const int
|
|||
|
||||
// sweep the spline
|
||||
totalTime = spline->GetTime( spline->GetNumValues() - 1 ) - spline->GetTime( 0 ) + spline->GetCloseTime();
|
||||
splineDiv = spline->GetBoundaryType() == idCurve_Spline<idVec3>::BT_CLOSED ? splineSubdivisions : splineSubdivisions - 1;
|
||||
splineDiv = spline->GetBoundaryType() == idCurve_Spline<idVec4>::BT_CLOSED ? splineSubdivisions : splineSubdivisions - 1;
|
||||
splineMat.Identity();
|
||||
idVec3 tempNormal;
|
||||
for( i = 0; i < splineSubdivisions; i++ )
|
||||
|
|
|
@ -186,7 +186,7 @@ double ticksPerNanosecond;
|
|||
PrintClocks
|
||||
============
|
||||
*/
|
||||
void PrintClocks( char *string, int dataCount, int clocks, int otherClocks = 0 ) {
|
||||
void PrintClocks( const char *string, int dataCount, int clocks, int otherClocks = 0 ) {
|
||||
int i;
|
||||
|
||||
idLib::common->Printf( string );
|
||||
|
|
|
@ -41,7 +41,9 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
#include <xmmintrin.h>
|
||||
|
||||
#ifndef M_PI // DG: this is already defined in math.h
|
||||
#define M_PI 3.14159265358979323846f
|
||||
#endif
|
||||
|
||||
/*
|
||||
============
|
||||
|
|
|
@ -726,13 +726,13 @@ Loads six files with proper extensions
|
|||
bool R_LoadCubeImages( const char* imgName, cubeFiles_t extensions, byte* pics[6], int* outSize, ID_TIME_T* timestamp )
|
||||
{
|
||||
int i, j;
|
||||
char* cameraSides[6] = { "_forward.tga", "_back.tga", "_left.tga", "_right.tga",
|
||||
const char* cameraSides[6] = { "_forward.tga", "_back.tga", "_left.tga", "_right.tga",
|
||||
"_up.tga", "_down.tga"
|
||||
};
|
||||
char* axisSides[6] = { "_px.tga", "_nx.tga", "_py.tga", "_ny.tga",
|
||||
const char* axisSides[6] = { "_px.tga", "_nx.tga", "_py.tga", "_ny.tga",
|
||||
"_pz.tga", "_nz.tga"
|
||||
};
|
||||
char** sides;
|
||||
const char** sides;
|
||||
char fullName[MAX_IMAGE_NAME];
|
||||
int width, height, size = 0;
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ idImage* idMaterial::GetEditorImage() const
|
|||
// info parms
|
||||
typedef struct
|
||||
{
|
||||
char* name;
|
||||
const char* name;
|
||||
int clearSolid, surfaceFlags, contents;
|
||||
} infoParm_t;
|
||||
|
||||
|
@ -2847,7 +2847,7 @@ bool idMaterial::Parse( const char* text, const int textLength, bool allowBinary
|
|||
idMaterial::Print
|
||||
===================
|
||||
*/
|
||||
char* opNames[] =
|
||||
const char* opNames[] =
|
||||
{
|
||||
"OP_TYPE_ADD",
|
||||
"OP_TYPE_SUBTRACT",
|
||||
|
|
|
@ -1299,7 +1299,7 @@ bool idRenderModelStatic::ConvertASEToModelSurfaces( const struct aseModel_s* as
|
|||
// completely ignore any explict normals on surfaces with a renderbump command
|
||||
// which will guarantee the best contours and least vertexes.
|
||||
const char* rb = im1->GetRenderBump();
|
||||
if( rb != NULL && rb[0] != NULL )
|
||||
if( rb != NULL && rb[0] != '\0' )
|
||||
{
|
||||
normalsParsed = false;
|
||||
}
|
||||
|
@ -2303,7 +2303,7 @@ bool idRenderModelStatic::ConvertMAToModelSurfaces( const struct maModel_s* ma )
|
|||
// completely ignore any explict normals on surfaces with a renderbump command
|
||||
// which will guarantee the best contours and least vertexes.
|
||||
const char* rb = im1->GetRenderBump();
|
||||
if( rb != NULL && rb[0] != NULL )
|
||||
if( rb != NULL && rb[0] != '\0' )
|
||||
{
|
||||
normalsParsed = false;
|
||||
}
|
||||
|
|
|
@ -2311,7 +2311,7 @@ int lwGetPolygons5( idFile* fp, int cksize, lwPolygonList* plist, int ptoffset )
|
|||
bp += 2;
|
||||
}
|
||||
j -= 1;
|
||||
pp->surf = ( lwSurface* ) j;
|
||||
pp->surf = ( lwSurface* ) j; // DG: FIXME: cast int to pointer?!
|
||||
|
||||
pp++;
|
||||
pv += nv;
|
||||
|
@ -3054,7 +3054,7 @@ int lwGetPolygonTags( idFile* fp, int cksize, lwTagList* tlist, lwPolygonList* p
|
|||
switch( type )
|
||||
{
|
||||
case ID_SURF:
|
||||
plist->pol[ i ].surf = ( lwSurface* ) j;
|
||||
plist->pol[ i ].surf = ( lwSurface* ) j; // DG: FIXME: cast int to pointer?!
|
||||
break;
|
||||
case ID_PART:
|
||||
plist->pol[ i ].part = j;
|
||||
|
|
|
@ -1658,7 +1658,7 @@ void R_MakeAmbientMap_f( const idCmdArgs& args )
|
|||
renderView_t ref;
|
||||
viewDef_t primary;
|
||||
int downSample;
|
||||
char* extensions[6] = { "_px.tga", "_nx.tga", "_py.tga", "_ny.tga",
|
||||
const char* extensions[6] = { "_px.tga", "_nx.tga", "_py.tga", "_ny.tga",
|
||||
"_pz.tga", "_nz.tga"
|
||||
};
|
||||
int outSize;
|
||||
|
|
|
@ -587,7 +587,7 @@ void R_AddSingleModel( viewEntity_t* vEntity )
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if( tri->numIndexes == NULL )
|
||||
if( tri->numIndexes == 0 )
|
||||
{
|
||||
continue; // happens for particles
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ idSWFScriptObject::swfNamedVar_t& idSWFScriptObject::swfNamedVar_t::operator=( c
|
|||
idSWFScriptObject::idSWFScriptObject
|
||||
========================
|
||||
*/
|
||||
idSWFScriptObject::idSWFScriptObject() : prototype( NULL ), refCount( 1 ), noAutoDelete( false ), objectType( SWF_OBJECT_OBJECT )
|
||||
idSWFScriptObject::idSWFScriptObject() : refCount( 1 ), noAutoDelete( false ), prototype( NULL ), objectType( SWF_OBJECT_OBJECT )
|
||||
{
|
||||
data.sprite = NULL;
|
||||
data.text = NULL;
|
||||
|
|
|
@ -36,13 +36,15 @@ idSWFSpriteInstance::idSWFSpriteInstance
|
|||
========================
|
||||
*/
|
||||
idSWFSpriteInstance::idSWFSpriteInstance() :
|
||||
sprite( NULL ),
|
||||
parent( NULL ),
|
||||
depth( 0 ),
|
||||
isPlaying( true ),
|
||||
isVisible( true ),
|
||||
childrenRunning( true ),
|
||||
firstRun( false ),
|
||||
currentFrame( 0 ),
|
||||
frameCount( 0 ),
|
||||
sprite( NULL ),
|
||||
parent( NULL ),
|
||||
depth( 0 ),
|
||||
itemIndex( 0 ),
|
||||
materialOverride( NULL ),
|
||||
materialWidth( 0 ),
|
||||
|
@ -52,7 +54,6 @@ idSWFSpriteInstance::idSWFSpriteInstance() :
|
|||
moveToXScale( 1.0f ),
|
||||
moveToYScale( 1.0f ),
|
||||
moveToSpeed( 1.0f ),
|
||||
firstRun( false ),
|
||||
stereoDepth( 0 )
|
||||
{
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ cpuid_t Sys_GetCPUId()
|
|||
|
||||
typedef struct bitFlag_s
|
||||
{
|
||||
char* name;
|
||||
const char* name;
|
||||
int bit;
|
||||
} bitFlag_t;
|
||||
|
||||
|
@ -265,14 +265,14 @@ static bitFlag_t controlWordFlags[] =
|
|||
{ "Infinity control", 12 },
|
||||
{ "", 0 }
|
||||
};
|
||||
static char* precisionControlField[] =
|
||||
static const char* precisionControlField[] =
|
||||
{
|
||||
"Single Precision (24-bits)",
|
||||
"Reserved",
|
||||
"Double Precision (53-bits)",
|
||||
"Double Extended Precision (64-bits)"
|
||||
};
|
||||
static char* roundingControlField[] =
|
||||
static const char* roundingControlField[] =
|
||||
{
|
||||
"Round to nearest",
|
||||
"Round down",
|
||||
|
|
|
@ -248,7 +248,7 @@ void idSaveGameDetails::Clear()
|
|||
descriptors.Clear();
|
||||
damaged = false;
|
||||
date = 0;
|
||||
slotName[0] = NULL;
|
||||
slotName[0] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -409,7 +409,7 @@ idSaveGameProcessor
|
|||
idSaveGameProcessor::idSaveGameProcessor
|
||||
========================
|
||||
*/
|
||||
idSaveGameProcessor::idSaveGameProcessor() : working( false ), init( false )
|
||||
idSaveGameProcessor::idSaveGameProcessor() : init( false ), working( false )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -685,7 +685,7 @@ idSaveGameManager::RetrySave
|
|||
*/
|
||||
void idSaveGameManager::RetrySave()
|
||||
{
|
||||
if( DeviceSelectorWaitingOnSaveRetry() && !common->Dialog().HasDialogMsg( GDM_WARNING_FOR_NEW_DEVICE_ABOUT_TO_LOSE_PROGRESS, false ) )
|
||||
if( DeviceSelectorWaitingOnSaveRetry() && !common->Dialog().HasDialogMsg( GDM_WARNING_FOR_NEW_DEVICE_ABOUT_TO_LOSE_PROGRESS, NULL ) )
|
||||
{
|
||||
cmdSystem->AppendCommandText( "savegame autosave\n" );
|
||||
}
|
||||
|
|
|
@ -4392,8 +4392,8 @@ idNetSessionPort::idNetSessionPort
|
|||
========================
|
||||
*/
|
||||
idNetSessionPort::idNetSessionPort() :
|
||||
forcePacketDropPrev( 0.0f ),
|
||||
forcePacketDropCurr( 0.0f )
|
||||
forcePacketDropCurr( 0.0f ),
|
||||
forcePacketDropPrev( 0.0f )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -669,13 +669,13 @@ static idStr GetDeviceName( const int deviceNum )
|
|||
&device,
|
||||
0 /* dwFlags */ ) )
|
||||
{
|
||||
return false;
|
||||
return idStr();
|
||||
}
|
||||
|
||||
// get the monitor for this display
|
||||
if( !( device.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP ) )
|
||||
{
|
||||
return false;
|
||||
return idStr();
|
||||
}
|
||||
|
||||
return idStr( device.DeviceName );
|
||||
|
|
|
@ -37,7 +37,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include <io.h>
|
||||
#include <conio.h>
|
||||
#include <mapi.h>
|
||||
#include <shellAPI.h>
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#ifndef __MRC__
|
||||
|
|
|
@ -93,7 +93,7 @@ net_interface netint[MAX_INTERFACES];
|
|||
NET_ErrorString
|
||||
========================
|
||||
*/
|
||||
char* NET_ErrorString()
|
||||
const char* NET_ErrorString()
|
||||
{
|
||||
int code;
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ const char* idEditWindow::HandleEvent( const sysEvent_t* event, bool* updateVisu
|
|||
{
|
||||
// need to call this to allow proper focus and capturing on embedded children
|
||||
const char* ret = idWindow::HandleEvent( event, updateVisuals );
|
||||
if( ret != NULL && *ret != NULL )
|
||||
if( ret != NULL && *ret != '\0' )
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -844,7 +844,7 @@ const char* idWindow::HandleEvent( const sysEvent_t* event, bool* updateVisuals
|
|||
//}
|
||||
SetFocus( child );
|
||||
const char* childRet = child->HandleEvent( event, updateVisuals );
|
||||
if( childRet != NULL && *childRet != NULL )
|
||||
if( childRet != NULL && *childRet != '\0' )
|
||||
{
|
||||
return childRet;
|
||||
}
|
||||
|
@ -1083,7 +1083,7 @@ const char* idWindow::HandleEvent( const sysEvent_t* event, bool* updateVisuals
|
|||
*updateVisuals = true;
|
||||
}
|
||||
const char* mouseRet = RouteMouseCoords( event->evValue, event->evValue2 );
|
||||
if( mouseRet != NULL && *mouseRet != NULL )
|
||||
if( mouseRet != NULL && *mouseRet != '\0' )
|
||||
{
|
||||
return mouseRet;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue