mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-17 11:00:38 +02:00
Added setAnim to camera. Added global fog set via worldspawn.
This commit is contained in:
@@ -229,11 +229,13 @@ void idCameraView::GetViewParms( renderView_t *view ) {
|
||||
|
||||
const idEventDef EV_Camera_Start( "start", NULL );
|
||||
const idEventDef EV_Camera_Stop( "stop", NULL );
|
||||
const idEventDef EV_Camera_SetAnim( "setAnim", "s" );
|
||||
|
||||
CLASS_DECLARATION( idCamera, idCameraAnim )
|
||||
EVENT( EV_Thread_SetCallback, idCameraAnim::Event_SetCallback )
|
||||
EVENT( EV_Camera_Stop, idCameraAnim::Event_Stop )
|
||||
EVENT( EV_Camera_Start, idCameraAnim::Event_Start )
|
||||
EVENT( EV_Camera_SetAnim, idCameraAnim::Event_SetAnim )
|
||||
EVENT( EV_Activate, idCameraAnim::Event_Activate )
|
||||
END_CLASS
|
||||
|
||||
@@ -704,6 +706,25 @@ void idCameraAnim::Event_Stop( void ) {
|
||||
Stop();
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
idCameraAnim::Event_SetAnim
|
||||
===============
|
||||
*/
|
||||
void idCameraAnim::Event_SetAnim( const char *animName ) {
|
||||
if ( !animName || !animName[ 0 ] ) {
|
||||
gameLocal.Warning( "idCameraAnim::setAnim called with an empty anim on '%s'", name.c_str() );
|
||||
return;
|
||||
}
|
||||
|
||||
spawnArgs.Set( "anim", animName );
|
||||
LoadAnim();
|
||||
|
||||
if ( gameLocal.GetCamera() == this ) {
|
||||
starttime = gameLocal.time;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCameraAnim::Event_SetCallback
|
||||
|
||||
@@ -125,6 +125,7 @@ private:
|
||||
void LoadAnim( void );
|
||||
void Event_Start( void );
|
||||
void Event_Stop( void );
|
||||
void Event_SetAnim( const char *animName );
|
||||
void Event_SetCallback( void );
|
||||
void Event_Activate( idEntity *activator );
|
||||
};
|
||||
|
||||
@@ -1497,6 +1497,7 @@ renderView_t *idEntity::GetRenderView( void ) {
|
||||
for( int i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
renderView->shaderParms[ i ] = gameLocal.globalShaderParms[ i ];
|
||||
}
|
||||
renderView->globalFog = gameLocal.globalFogParms;
|
||||
|
||||
renderView->globalMaterial = gameLocal.GetGlobalMaterial();
|
||||
|
||||
|
||||
@@ -181,6 +181,11 @@ void idGameLocal::Clear( void ) {
|
||||
sortTeamMasters = false;
|
||||
persistentLevelInfo.Clear();
|
||||
memset( globalShaderParms, 0, sizeof( globalShaderParms ) );
|
||||
memset( &globalFogParms, 0, sizeof( globalFogParms ) );
|
||||
globalFogParms.mode = RENDER_GLOBAL_FOG_EXP;
|
||||
globalFogParms.density = 1.0f;
|
||||
globalFogParms.end = 1.0f;
|
||||
globalFogParms.color.Set( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
random.SetSeed( 0 );
|
||||
world = NULL;
|
||||
frameCommandThread = NULL;
|
||||
@@ -500,6 +505,12 @@ void idGameLocal::SaveGame( idFile *f ) {
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
savegame.WriteFloat( globalShaderParms[ i ] );
|
||||
}
|
||||
savegame.WriteBool( globalFogParms.enabled );
|
||||
savegame.WriteInt( globalFogParms.mode );
|
||||
savegame.WriteFloat( globalFogParms.density );
|
||||
savegame.WriteFloat( globalFogParms.start );
|
||||
savegame.WriteFloat( globalFogParms.end );
|
||||
savegame.WriteVec4( globalFogParms.color );
|
||||
|
||||
savegame.WriteInt( random.GetSeed() );
|
||||
savegame.WriteObject( frameCommandThread );
|
||||
@@ -888,6 +899,11 @@ void idGameLocal::LoadMap( const char *mapName, int randseed ) {
|
||||
globalMaterial = NULL;
|
||||
|
||||
memset( globalShaderParms, 0, sizeof( globalShaderParms ) );
|
||||
memset( &globalFogParms, 0, sizeof( globalFogParms ) );
|
||||
globalFogParms.mode = RENDER_GLOBAL_FOG_EXP;
|
||||
globalFogParms.density = 1.0f;
|
||||
globalFogParms.end = 1.0f;
|
||||
globalFogParms.color.Set( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
|
||||
// always leave room for the max number of clients,
|
||||
// even if they aren't all used, so numbers inside that
|
||||
@@ -1331,6 +1347,12 @@ bool idGameLocal::InitFromSaveGame( const char *mapName, idRenderWorld *renderWo
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
savegame.ReadFloat( globalShaderParms[ i ] );
|
||||
}
|
||||
savegame.ReadBool( globalFogParms.enabled );
|
||||
savegame.ReadInt( (int &)globalFogParms.mode );
|
||||
savegame.ReadFloat( globalFogParms.density );
|
||||
savegame.ReadFloat( globalFogParms.start );
|
||||
savegame.ReadFloat( globalFogParms.end );
|
||||
savegame.ReadVec4( globalFogParms.color );
|
||||
|
||||
savegame.ReadInt( i );
|
||||
random.SetSeed( i );
|
||||
@@ -4434,4 +4456,4 @@ idEntity* idGameLocal::Spawn(const char* classname)
|
||||
dict.Set("classname", classname);
|
||||
gameLocal.SpawnEntityDef(dict, &ent);
|
||||
return ent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +268,8 @@ public:
|
||||
idDict persistentLevelInfo; // contains args that are kept around between levels
|
||||
|
||||
// can be used to automatically effect every material in the world that references globalParms
|
||||
float globalShaderParms[ MAX_GLOBAL_SHADER_PARMS ];
|
||||
float globalShaderParms[ MAX_GLOBAL_SHADER_PARMS ];
|
||||
renderGlobalFog_t globalFogParms;
|
||||
|
||||
idRandom random; // random number generator used throughout the game
|
||||
|
||||
|
||||
@@ -531,6 +531,14 @@ void idGameLocal::WriteGameStateToSnapshot( idBitMsgDelta &msg ) const {
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
msg.WriteFloat( globalShaderParms[i] );
|
||||
}
|
||||
msg.WriteBits( globalFogParms.enabled ? 1 : 0, 1 );
|
||||
msg.WriteBits( globalFogParms.mode, 2 );
|
||||
msg.WriteFloat( globalFogParms.density );
|
||||
msg.WriteFloat( globalFogParms.start );
|
||||
msg.WriteFloat( globalFogParms.end );
|
||||
for( i = 0; i < 4; i++ ) {
|
||||
msg.WriteFloat( globalFogParms.color[i] );
|
||||
}
|
||||
|
||||
mpGame.WriteToSnapshot( msg );
|
||||
}
|
||||
@@ -546,6 +554,14 @@ void idGameLocal::ReadGameStateFromSnapshot( const idBitMsgDelta &msg ) {
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
globalShaderParms[i] = msg.ReadFloat();
|
||||
}
|
||||
globalFogParms.enabled = msg.ReadBits( 1 ) != 0;
|
||||
globalFogParms.mode = (renderGlobalFogMode_t)msg.ReadBits( 2 );
|
||||
globalFogParms.density = msg.ReadFloat();
|
||||
globalFogParms.start = msg.ReadFloat();
|
||||
globalFogParms.end = msg.ReadFloat();
|
||||
for( i = 0; i < 4; i++ ) {
|
||||
globalFogParms.color[i] = msg.ReadFloat();
|
||||
}
|
||||
|
||||
mpGame.ReadFromSnapshot( msg );
|
||||
}
|
||||
@@ -1909,4 +1925,4 @@ void idGameLocal::AlertBots(idPlayer* player, idVec3 alert_position)
|
||||
bot->SetEnemy(player, player->GetOrigin());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7315,6 +7315,7 @@ void idPlayer::CalculateRenderView( void ) {
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
renderView->shaderParms[ i ] = gameLocal.globalShaderParms[ i ];
|
||||
}
|
||||
renderView->globalFog = gameLocal.globalFogParms;
|
||||
renderView->globalMaterial = gameLocal.GetGlobalMaterial();
|
||||
renderView->time = gameLocal.time;
|
||||
|
||||
@@ -8556,4 +8557,4 @@ float idPlayer::GetViewHeight(void)
|
||||
}
|
||||
|
||||
return newEyeOffset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ void idTarget_WaitForButton::Think( void ) {
|
||||
|
||||
if ( thinkFlags & TH_THINK ) {
|
||||
player = gameLocal.GetLocalPlayer();
|
||||
if ( player && ( !player->oldButtons & BUTTON_ATTACK ) && ( player->usercmd.buttons & BUTTON_ATTACK ) ) {
|
||||
if ( player && !( player->oldButtons & BUTTON_ATTACK ) && ( player->usercmd.buttons & BUTTON_ATTACK ) ) {
|
||||
player->usercmd.buttons &= ~BUTTON_ATTACK;
|
||||
BecomeInactive( TH_THINK );
|
||||
ActivateTargets( player );
|
||||
@@ -1762,4 +1762,3 @@ void idTarget_FadeSoundClass::Event_RestoreVolume() {
|
||||
// restore volume
|
||||
gameSoundWorld->FadeSoundClasses( 0, fadeDB, fadeTime );
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,41 @@ CLASS_DECLARATION( idEntity, idWorldspawn )
|
||||
EVENT( EV_SafeRemove, idWorldspawn::Event_Remove )
|
||||
END_CLASS
|
||||
|
||||
static renderGlobalFogMode_t ParseGlobalFogMode( const char *mode ) {
|
||||
if ( !idStr::Icmp( mode, "linear" ) ) {
|
||||
return RENDER_GLOBAL_FOG_LINEAR;
|
||||
}
|
||||
if ( !idStr::Icmp( mode, "exp2" ) ) {
|
||||
return RENDER_GLOBAL_FOG_EXP2;
|
||||
}
|
||||
return RENDER_GLOBAL_FOG_EXP;
|
||||
}
|
||||
|
||||
static void SetWorldspawnGlobalFogParms( const idDict &spawnArgs ) {
|
||||
idVec3 color;
|
||||
idStr mode;
|
||||
|
||||
memset( &gameLocal.globalFogParms, 0, sizeof( gameLocal.globalFogParms ) );
|
||||
gameLocal.globalFogParms.mode = RENDER_GLOBAL_FOG_EXP;
|
||||
gameLocal.globalFogParms.density = 1.0f;
|
||||
gameLocal.globalFogParms.end = 1.0f;
|
||||
gameLocal.globalFogParms.color.Set( 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
|
||||
gameLocal.globalFogParms.enabled = spawnArgs.GetBool( "globalFog", spawnArgs.GetString( "fog_global", "0" ) );
|
||||
|
||||
if ( spawnArgs.GetString( "globalFogMode", "", mode ) || spawnArgs.GetString( "fog_mode", "", mode ) ) {
|
||||
gameLocal.globalFogParms.mode = ParseGlobalFogMode( mode.c_str() );
|
||||
}
|
||||
|
||||
gameLocal.globalFogParms.density = spawnArgs.GetFloat( "globalFogDensity", spawnArgs.GetString( "fog_density", va( "%f", gameLocal.globalFogParms.density ) ) );
|
||||
gameLocal.globalFogParms.start = spawnArgs.GetFloat( "globalFogStart", spawnArgs.GetString( "fog_start", va( "%f", gameLocal.globalFogParms.start ) ) );
|
||||
gameLocal.globalFogParms.end = spawnArgs.GetFloat( "globalFogEnd", spawnArgs.GetString( "fog_end", va( "%f", gameLocal.globalFogParms.end ) ) );
|
||||
|
||||
if ( spawnArgs.GetVector( "globalFogColor", spawnArgs.GetString( "fog_color", "0 0 0" ), color ) ) {
|
||||
gameLocal.globalFogParms.color.Set( color.x, color.y, color.z, spawnArgs.GetFloat( "globalFogAlpha", spawnArgs.GetString( "fog_alpha", "1" ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idWorldspawn::Spawn
|
||||
@@ -64,6 +99,7 @@ void idWorldspawn::Spawn( void ) {
|
||||
gameLocal.world = this;
|
||||
|
||||
g_gravity.SetFloat( spawnArgs.GetFloat( "gravity", va( "%f", DEFAULT_GRAVITY ) ) );
|
||||
SetWorldspawnGlobalFogParms( spawnArgs );
|
||||
|
||||
// disable stamina on hell levels
|
||||
if ( spawnArgs.GetBool( "no_stamina" ) ) {
|
||||
@@ -115,6 +151,7 @@ void idWorldspawn::Restore( idRestoreGame *savefile ) {
|
||||
assert( gameLocal.world == this );
|
||||
|
||||
g_gravity.SetFloat( spawnArgs.GetFloat( "gravity", va( "%f", DEFAULT_GRAVITY ) ) );
|
||||
SetWorldspawnGlobalFogParms( spawnArgs );
|
||||
|
||||
// disable stamina on hell levels
|
||||
if ( spawnArgs.GetBool( "no_stamina" ) ) {
|
||||
|
||||
@@ -307,7 +307,8 @@ const char *idAnim::AddFrameCommand( const idDeclModelDef *modelDef, int framenu
|
||||
fc.type = FC_SCRIPTFUNCTION;
|
||||
fc.function = gameLocal.program.FindFunction( token );
|
||||
if ( !fc.function ) {
|
||||
return va( "Function '%s' not found", token.c_str() );
|
||||
gameLocal.Warning( "Ignoring frame command call to missing function '%s' on anim '%s'", token.c_str(), FullName() );
|
||||
return NULL;
|
||||
}
|
||||
} else if ( token == "object_call" ) {
|
||||
if( !src.ReadTokenOnLine( &token ) ) {
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
This file has been generated with the Type Info Generator v1.1 (c) 2004 id Software
|
||||
|
||||
1182 constants
|
||||
132 enums
|
||||
578 classes/structs/unions
|
||||
1185 constants
|
||||
133 enums
|
||||
579 classes/structs/unions
|
||||
38 templates
|
||||
7 max inheritance level for 'idAI_Vagary'
|
||||
|
||||
@@ -596,6 +596,9 @@ static constantInfo_t constantInfo[] = {
|
||||
{ "const int", "SHADERPARM_SPRITE_HEIGHT", "9" },
|
||||
{ "const int", "SHADERPARM_PARTICLE_STOPTIME", "8" },
|
||||
{ "const int", "MAX_RENDERENTITY_GUI", "3" },
|
||||
{ "int", "RENDER_GLOBAL_FOG_LINEAR", "0" },
|
||||
{ "int", "RENDER_GLOBAL_FOG_EXP", "1" },
|
||||
{ "int", "RENDER_GLOBAL_FOG_EXP2", "2" },
|
||||
{ "static const int", "NUM_PORTAL_ATTRIBUTES", "3" },
|
||||
{ "int", "PS_BLOCK_NONE", "0" },
|
||||
{ "int", "PS_BLOCK_VIEW", "1" },
|
||||
@@ -1916,6 +1919,13 @@ static enumValueInfo_t dxrWorldId_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t renderGlobalFogMode_t_typeInfo[] = {
|
||||
{ "RENDER_GLOBAL_FOG_LINEAR", 0 },
|
||||
{ "RENDER_GLOBAL_FOG_EXP", 1 },
|
||||
{ "RENDER_GLOBAL_FOG_EXP2", 2 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t portalConnection_t_typeInfo[] = {
|
||||
{ "PS_BLOCK_NONE", 0 },
|
||||
{ "PS_BLOCK_VIEW", 1 },
|
||||
@@ -1925,21 +1935,21 @@ static enumValueInfo_t portalConnection_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idDeviceContext_enum_66_typeInfo[] = {
|
||||
static enumValueInfo_t idDeviceContext_enum_67_typeInfo[] = {
|
||||
{ "CURSOR_ARROW", 0 },
|
||||
{ "CURSOR_HAND", 1 },
|
||||
{ "CURSOR_COUNT", 2 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idDeviceContext_enum_67_typeInfo[] = {
|
||||
static enumValueInfo_t idDeviceContext_enum_68_typeInfo[] = {
|
||||
{ "ALIGN_LEFT", 0 },
|
||||
{ "ALIGN_CENTER", 1 },
|
||||
{ "ALIGN_RIGHT", 2 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idDeviceContext_enum_68_typeInfo[] = {
|
||||
static enumValueInfo_t idDeviceContext_enum_69_typeInfo[] = {
|
||||
{ "SCROLLBAR_HBACK", 0 },
|
||||
{ "SCROLLBAR_VBACK", 1 },
|
||||
{ "SCROLLBAR_THUMB", 2 },
|
||||
@@ -1974,7 +1984,7 @@ static enumValueInfo_t escReply_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_72_typeInfo[] = {
|
||||
static enumValueInfo_t enum_73_typeInfo[] = {
|
||||
{ "TEST_PARTICLE_MODEL", 0 },
|
||||
{ "TEST_PARTICLE_IMPACT", 1 },
|
||||
{ "TEST_PARTICLE_MUZZLE", 2 },
|
||||
@@ -2036,7 +2046,7 @@ static enumValueInfo_t idVarDef_initialized_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t statement_s_enum_77_typeInfo[] = {
|
||||
static enumValueInfo_t statement_s_enum_78_typeInfo[] = {
|
||||
{ "FLAG_OBJECTCALL_IMPL_NOT_PARSED_YET", 1 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
@@ -2102,7 +2112,7 @@ static enumValueInfo_t AFJointModType_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_81_typeInfo[] = {
|
||||
static enumValueInfo_t enum_82_typeInfo[] = {
|
||||
{ "PATHTYPE_WALK", 0 },
|
||||
{ "PATHTYPE_WALKOFFLEDGE", 1 },
|
||||
{ "PATHTYPE_BARRIERJUMP", 2 },
|
||||
@@ -2204,7 +2214,7 @@ static enumValueInfo_t idMultiplayerGame_vote_result_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_90_typeInfo[] = {
|
||||
static enumValueInfo_t enum_91_typeInfo[] = {
|
||||
{ "GAME_RELIABLE_MESSAGE_INIT_DECL_REMAP", 0 },
|
||||
{ "GAME_RELIABLE_MESSAGE_REMAP_DECL", 1 },
|
||||
{ "GAME_RELIABLE_MESSAGE_SPAWN_PLAYER", 2 },
|
||||
@@ -2327,7 +2337,7 @@ static enumValueInfo_t constraintType_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_100_typeInfo[] = {
|
||||
static enumValueInfo_t enum_101_typeInfo[] = {
|
||||
{ "TH_ALL", -1 },
|
||||
{ "TH_THINK", 1 },
|
||||
{ "TH_PHYSICS", 2 },
|
||||
@@ -2352,26 +2362,26 @@ static enumValueInfo_t signalNum_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idEntity_enum_102_typeInfo[] = {
|
||||
static enumValueInfo_t idEntity_enum_103_typeInfo[] = {
|
||||
{ "EVENT_STARTSOUNDSHADER", 0 },
|
||||
{ "EVENT_STOPSOUNDSHADER", 1 },
|
||||
{ "EVENT_MAXEVENTS", 2 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idAnimatedEntity_enum_103_typeInfo[] = {
|
||||
static enumValueInfo_t idAnimatedEntity_enum_104_typeInfo[] = {
|
||||
{ "EVENT_ADD_DAMAGE_EFFECT", 2 },
|
||||
{ "EVENT_MAXEVENTS", 3 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idPlayerStart_enum_104_typeInfo[] = {
|
||||
static enumValueInfo_t idPlayerStart_enum_105_typeInfo[] = {
|
||||
{ "EVENT_TELEPORTPLAYER", 2 },
|
||||
{ "EVENT_MAXEVENTS", 3 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idProjectile_enum_105_typeInfo[] = {
|
||||
static enumValueInfo_t idProjectile_enum_106_typeInfo[] = {
|
||||
{ "EVENT_DAMAGE_EFFECT", 2 },
|
||||
{ "EVENT_MAXEVENTS", 3 },
|
||||
{ NULL, 0 }
|
||||
@@ -2386,7 +2396,7 @@ static enumValueInfo_t idProjectile_projectileState_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idWeapon_enum_107_typeInfo[] = {
|
||||
static enumValueInfo_t idWeapon_enum_108_typeInfo[] = {
|
||||
{ "EVENT_RELOAD", 2 },
|
||||
{ "EVENT_ENDRELOAD", 3 },
|
||||
{ "EVENT_CHANGESKIN", 4 },
|
||||
@@ -2394,13 +2404,13 @@ static enumValueInfo_t idWeapon_enum_107_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idLight_enum_108_typeInfo[] = {
|
||||
static enumValueInfo_t idLight_enum_109_typeInfo[] = {
|
||||
{ "EVENT_BECOMEBROKEN", 2 },
|
||||
{ "EVENT_MAXEVENTS", 3 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idItem_enum_109_typeInfo[] = {
|
||||
static enumValueInfo_t idItem_enum_110_typeInfo[] = {
|
||||
{ "EVENT_PICKUP", 2 },
|
||||
{ "EVENT_RESPAWN", 3 },
|
||||
{ "EVENT_RESPAWNFX", 4 },
|
||||
@@ -2415,7 +2425,7 @@ static enumValueInfo_t playerIconType_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_111_typeInfo[] = {
|
||||
static enumValueInfo_t enum_112_typeInfo[] = {
|
||||
{ "BERSERK", 0 },
|
||||
{ "INVISIBILITY", 1 },
|
||||
{ "MEGAHEALTH", 2 },
|
||||
@@ -2424,7 +2434,7 @@ static enumValueInfo_t enum_111_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_112_typeInfo[] = {
|
||||
static enumValueInfo_t enum_113_typeInfo[] = {
|
||||
{ "SPEED", 0 },
|
||||
{ "PROJECTILE_DAMAGE", 1 },
|
||||
{ "MELEE_DAMAGE", 2 },
|
||||
@@ -2432,7 +2442,7 @@ static enumValueInfo_t enum_112_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_113_typeInfo[] = {
|
||||
static enumValueInfo_t enum_114_typeInfo[] = {
|
||||
{ "INFLUENCE_NONE", 0 },
|
||||
{ "INFLUENCE_LEVEL1", 1 },
|
||||
{ "INFLUENCE_LEVEL2", 2 },
|
||||
@@ -2440,7 +2450,7 @@ static enumValueInfo_t enum_113_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idPlayer_enum_114_typeInfo[] = {
|
||||
static enumValueInfo_t idPlayer_enum_115_typeInfo[] = {
|
||||
{ "EVENT_IMPULSE", 2 },
|
||||
{ "EVENT_EXIT_TELEPORTER", 3 },
|
||||
{ "EVENT_ABORT_TELEPORTER", 4 },
|
||||
@@ -2497,7 +2507,7 @@ static enumValueInfo_t moverState_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idExplodingBarrel_enum_120_typeInfo[] = {
|
||||
static enumValueInfo_t idExplodingBarrel_enum_121_typeInfo[] = {
|
||||
{ "EVENT_EXPLODE", 2 },
|
||||
{ "EVENT_MAXEVENTS", 3 },
|
||||
{ NULL, 0 }
|
||||
@@ -2511,7 +2521,7 @@ static enumValueInfo_t idExplodingBarrel_explode_state_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idSecurityCamera_enum_122_typeInfo[] = {
|
||||
static enumValueInfo_t idSecurityCamera_enum_123_typeInfo[] = {
|
||||
{ "SCANNING", 0 },
|
||||
{ "LOSINGINTEREST", 1 },
|
||||
{ "ALERT", 2 },
|
||||
@@ -2519,7 +2529,7 @@ static enumValueInfo_t idSecurityCamera_enum_122_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t idBrittleFracture_enum_123_typeInfo[] = {
|
||||
static enumValueInfo_t idBrittleFracture_enum_124_typeInfo[] = {
|
||||
{ "EVENT_PROJECT_DECAL", 2 },
|
||||
{ "EVENT_SHATTER", 3 },
|
||||
{ "EVENT_MAXEVENTS", 4 },
|
||||
@@ -2586,7 +2596,7 @@ static enumValueInfo_t stopEvent_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static enumValueInfo_t enum_129_typeInfo[] = {
|
||||
static enumValueInfo_t enum_130_typeInfo[] = {
|
||||
{ "OP_RETURN", 0 },
|
||||
{ "OP_UINC_F", 1 },
|
||||
{ "OP_UINCP_F", 2 },
|
||||
@@ -2797,23 +2807,24 @@ static enumTypeInfo_t enumTypeInfo[] = {
|
||||
{ "dynamicModel_t", dynamicModel_t_typeInfo },
|
||||
{ "jointHandle_t", jointHandle_t_typeInfo },
|
||||
{ "dxrWorldId_t", dxrWorldId_t_typeInfo },
|
||||
{ "renderGlobalFogMode_t", renderGlobalFogMode_t_typeInfo },
|
||||
{ "portalConnection_t", portalConnection_t_typeInfo },
|
||||
{ "idDeviceContext::enum_66", idDeviceContext_enum_66_typeInfo },
|
||||
{ "idDeviceContext::enum_67", idDeviceContext_enum_67_typeInfo },
|
||||
{ "idDeviceContext::enum_68", idDeviceContext_enum_68_typeInfo },
|
||||
{ "idDeviceContext::enum_69", idDeviceContext_enum_69_typeInfo },
|
||||
{ "contactType_t", contactType_t_typeInfo },
|
||||
{ "allowReply_t", allowReply_t_typeInfo },
|
||||
{ "escReply_t", escReply_t_typeInfo },
|
||||
{ "enum_72", enum_72_typeInfo },
|
||||
{ "enum_73", enum_73_typeInfo },
|
||||
{ "msgBoxType_t", msgBoxType_t_typeInfo },
|
||||
{ "stateResult_t", stateResult_t_typeInfo },
|
||||
{ "etype_t", etype_t_typeInfo },
|
||||
{ "idVarDef::initialized_t", idVarDef_initialized_t_typeInfo },
|
||||
{ "statement_s::enum_77", statement_s_enum_77_typeInfo },
|
||||
{ "statement_s::enum_78", statement_s_enum_78_typeInfo },
|
||||
{ "jointModTransform_t", jointModTransform_t_typeInfo },
|
||||
{ "frameCommandType_t", frameCommandType_t_typeInfo },
|
||||
{ "AFJointModType_t", AFJointModType_t_typeInfo },
|
||||
{ "enum_81", enum_81_typeInfo },
|
||||
{ "enum_82", enum_82_typeInfo },
|
||||
{ "pvsType_t", pvsType_t_typeInfo },
|
||||
{ "gameType_t", gameType_t_typeInfo },
|
||||
{ "playerVote_t", playerVote_t_typeInfo },
|
||||
@@ -2822,7 +2833,7 @@ static enumTypeInfo_t enumTypeInfo[] = {
|
||||
{ "idMultiplayerGame::msg_evt_t", idMultiplayerGame_msg_evt_t_typeInfo },
|
||||
{ "idMultiplayerGame::vote_flags_t", idMultiplayerGame_vote_flags_t_typeInfo },
|
||||
{ "idMultiplayerGame::vote_result_t", idMultiplayerGame_vote_result_t_typeInfo },
|
||||
{ "enum_90", enum_90_typeInfo },
|
||||
{ "enum_91", enum_91_typeInfo },
|
||||
{ "gameState_t", gameState_t_typeInfo },
|
||||
{ "idEventQueue::outOfOrderBehaviour_t", idEventQueue_outOfOrderBehaviour_t_typeInfo },
|
||||
{ "gameSoundChannel_t", gameSoundChannel_t_typeInfo },
|
||||
@@ -2832,36 +2843,36 @@ static enumTypeInfo_t enumTypeInfo[] = {
|
||||
{ "pmtype_t", pmtype_t_typeInfo },
|
||||
{ "waterLevel_t", waterLevel_t_typeInfo },
|
||||
{ "constraintType_t", constraintType_t_typeInfo },
|
||||
{ "enum_100", enum_100_typeInfo },
|
||||
{ "enum_101", enum_101_typeInfo },
|
||||
{ "signalNum_t", signalNum_t_typeInfo },
|
||||
{ "idEntity::enum_102", idEntity_enum_102_typeInfo },
|
||||
{ "idAnimatedEntity::enum_103", idAnimatedEntity_enum_103_typeInfo },
|
||||
{ "idPlayerStart::enum_104", idPlayerStart_enum_104_typeInfo },
|
||||
{ "idProjectile::enum_105", idProjectile_enum_105_typeInfo },
|
||||
{ "idEntity::enum_103", idEntity_enum_103_typeInfo },
|
||||
{ "idAnimatedEntity::enum_104", idAnimatedEntity_enum_104_typeInfo },
|
||||
{ "idPlayerStart::enum_105", idPlayerStart_enum_105_typeInfo },
|
||||
{ "idProjectile::enum_106", idProjectile_enum_106_typeInfo },
|
||||
{ "idProjectile::projectileState_t", idProjectile_projectileState_t_typeInfo },
|
||||
{ "idWeapon::enum_107", idWeapon_enum_107_typeInfo },
|
||||
{ "idLight::enum_108", idLight_enum_108_typeInfo },
|
||||
{ "idItem::enum_109", idItem_enum_109_typeInfo },
|
||||
{ "idWeapon::enum_108", idWeapon_enum_108_typeInfo },
|
||||
{ "idLight::enum_109", idLight_enum_109_typeInfo },
|
||||
{ "idItem::enum_110", idItem_enum_110_typeInfo },
|
||||
{ "playerIconType_t", playerIconType_t_typeInfo },
|
||||
{ "enum_111", enum_111_typeInfo },
|
||||
{ "enum_112", enum_112_typeInfo },
|
||||
{ "enum_113", enum_113_typeInfo },
|
||||
{ "idPlayer::enum_114", idPlayer_enum_114_typeInfo },
|
||||
{ "enum_114", enum_114_typeInfo },
|
||||
{ "idPlayer::enum_115", idPlayer_enum_115_typeInfo },
|
||||
{ "idMover::moveStage_t", idMover_moveStage_t_typeInfo },
|
||||
{ "idMover::moverCommand_t", idMover_moverCommand_t_typeInfo },
|
||||
{ "idMover::moverDir_t", idMover_moverDir_t_typeInfo },
|
||||
{ "idElevator::elevatorState_t", idElevator_elevatorState_t_typeInfo },
|
||||
{ "moverState_t", moverState_t_typeInfo },
|
||||
{ "idExplodingBarrel::enum_120", idExplodingBarrel_enum_120_typeInfo },
|
||||
{ "idExplodingBarrel::enum_121", idExplodingBarrel_enum_121_typeInfo },
|
||||
{ "idExplodingBarrel::explode_state_t", idExplodingBarrel_explode_state_t_typeInfo },
|
||||
{ "idSecurityCamera::enum_122", idSecurityCamera_enum_122_typeInfo },
|
||||
{ "idBrittleFracture::enum_123", idBrittleFracture_enum_123_typeInfo },
|
||||
{ "idSecurityCamera::enum_123", idSecurityCamera_enum_123_typeInfo },
|
||||
{ "idBrittleFracture::enum_124", idBrittleFracture_enum_124_typeInfo },
|
||||
{ "moveType_t", moveType_t_typeInfo },
|
||||
{ "moveCommand_t", moveCommand_t_typeInfo },
|
||||
{ "talkState_t", talkState_t_typeInfo },
|
||||
{ "moveStatus_t", moveStatus_t_typeInfo },
|
||||
{ "stopEvent_t", stopEvent_t_typeInfo },
|
||||
{ "enum_129", enum_129_typeInfo },
|
||||
{ "enum_130", enum_130_typeInfo },
|
||||
{ "botMoveFlags_t", botMoveFlags_t_typeInfo },
|
||||
{ "botChat_t", botChat_t_typeInfo },
|
||||
{ NULL, NULL }
|
||||
@@ -4410,6 +4421,16 @@ static classVariableInfo_t idRenderSystem_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static classVariableInfo_t renderGlobalFog_t_typeInfo[] = {
|
||||
{ "bool", "enabled", (intptr_t)(&((renderGlobalFog_t *)0)->enabled), sizeof( ((renderGlobalFog_t *)0)->enabled ) },
|
||||
{ "renderGlobalFogMode_t", "mode", (intptr_t)(&((renderGlobalFog_t *)0)->mode), sizeof( ((renderGlobalFog_t *)0)->mode ) },
|
||||
{ "float", "density", (intptr_t)(&((renderGlobalFog_t *)0)->density), sizeof( ((renderGlobalFog_t *)0)->density ) },
|
||||
{ "float", "start", (intptr_t)(&((renderGlobalFog_t *)0)->start), sizeof( ((renderGlobalFog_t *)0)->start ) },
|
||||
{ "float", "end", (intptr_t)(&((renderGlobalFog_t *)0)->end), sizeof( ((renderGlobalFog_t *)0)->end ) },
|
||||
{ "idVec4", "color", (intptr_t)(&((renderGlobalFog_t *)0)->color), sizeof( ((renderGlobalFog_t *)0)->color ) },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static classVariableInfo_t renderEntity_t_typeInfo[] = {
|
||||
{ "idRenderModel *", "hModel", (intptr_t)(&((renderEntity_t *)0)->hModel), sizeof( ((renderEntity_t *)0)->hModel ) },
|
||||
{ "int", "entityNum", (intptr_t)(&((renderEntity_t *)0)->entityNum), sizeof( ((renderEntity_t *)0)->entityNum ) },
|
||||
@@ -4482,6 +4503,7 @@ static classVariableInfo_t renderView_t_typeInfo[] = {
|
||||
{ "int", "time", (intptr_t)(&((renderView_t *)0)->time), sizeof( ((renderView_t *)0)->time ) },
|
||||
{ "float[12]", "shaderParms", (intptr_t)(&((renderView_t *)0)->shaderParms), sizeof( ((renderView_t *)0)->shaderParms ) },
|
||||
{ "const idMaterial *", "globalMaterial", (intptr_t)(&((renderView_t *)0)->globalMaterial), sizeof( ((renderView_t *)0)->globalMaterial ) },
|
||||
{ "renderGlobalFog_t", "globalFog", (intptr_t)(&((renderView_t *)0)->globalFog), sizeof( ((renderView_t *)0)->globalFog ) },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -5141,11 +5163,11 @@ static classVariableInfo_t frameLookup_t_typeInfo[] = {
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static classVariableInfo_t class_282_class_282_typeInfo[] = {
|
||||
// { "const idSoundShader *", "soundShader", (intptr_t)(&((class_282::class_282 *)0)->soundShader), sizeof( ((class_282::class_282 *)0)->soundShader ) },
|
||||
// { "const function_t *", "function", (intptr_t)(&((class_282::class_282 *)0)->function), sizeof( ((class_282::class_282 *)0)->function ) },
|
||||
// { "const idDeclSkin *", "skin", (intptr_t)(&((class_282::class_282 *)0)->skin), sizeof( ((class_282::class_282 *)0)->skin ) },
|
||||
// { "int", "index", (intptr_t)(&((class_282::class_282 *)0)->index), sizeof( ((class_282::class_282 *)0)->index ) },
|
||||
static classVariableInfo_t class_283_class_283_typeInfo[] = {
|
||||
// { "const idSoundShader *", "soundShader", (intptr_t)(&((class_283::class_283 *)0)->soundShader), sizeof( ((class_283::class_283 *)0)->soundShader ) },
|
||||
// { "const function_t *", "function", (intptr_t)(&((class_283::class_283 *)0)->function), sizeof( ((class_283::class_283 *)0)->function ) },
|
||||
// { "const idDeclSkin *", "skin", (intptr_t)(&((class_283::class_283 *)0)->skin), sizeof( ((class_283::class_283 *)0)->skin ) },
|
||||
// { "int", "index", (intptr_t)(&((class_283::class_283 *)0)->index), sizeof( ((class_283::class_283 *)0)->index ) },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -5509,6 +5531,7 @@ static classVariableInfo_t idGameLocal_typeInfo[] = {
|
||||
{ "bool", "sortTeamMasters", (intptr_t)(&((idGameLocal *)0)->sortTeamMasters), sizeof( ((idGameLocal *)0)->sortTeamMasters ) },
|
||||
{ "idDict", "persistentLevelInfo", (intptr_t)(&((idGameLocal *)0)->persistentLevelInfo), sizeof( ((idGameLocal *)0)->persistentLevelInfo ) },
|
||||
{ "float[12]", "globalShaderParms", (intptr_t)(&((idGameLocal *)0)->globalShaderParms), sizeof( ((idGameLocal *)0)->globalShaderParms ) },
|
||||
{ "renderGlobalFog_t", "globalFogParms", (intptr_t)(&((idGameLocal *)0)->globalFogParms), sizeof( ((idGameLocal *)0)->globalFogParms ) },
|
||||
{ "idRandom", "random", (intptr_t)(&((idGameLocal *)0)->random), sizeof( ((idGameLocal *)0)->random ) },
|
||||
{ "idProgram", "program", (intptr_t)(&((idGameLocal *)0)->program), sizeof( ((idGameLocal *)0)->program ) },
|
||||
{ "idThread *", "frameCommandThread", (intptr_t)(&((idGameLocal *)0)->frameCommandThread), sizeof( ((idGameLocal *)0)->frameCommandThread ) },
|
||||
@@ -8708,6 +8731,7 @@ static classTypeInfo_t classTypeInfo[] = {
|
||||
{ "fontInfo_t", "", sizeof(fontInfo_t), fontInfo_t_typeInfo },
|
||||
{ "fontInfoEx_t", "", sizeof(fontInfoEx_t), fontInfoEx_t_typeInfo },
|
||||
{ "idRenderSystem", "", sizeof(idRenderSystem), idRenderSystem_typeInfo },
|
||||
{ "renderGlobalFog_t", "", sizeof(renderGlobalFog_t), renderGlobalFog_t_typeInfo },
|
||||
{ "renderEntity_t", "", sizeof(renderEntity_t), renderEntity_t_typeInfo },
|
||||
{ "renderLight_t", "", sizeof(renderLight_t), renderLight_t_typeInfo },
|
||||
{ "renderView_t", "", sizeof(renderView_t), renderView_t_typeInfo },
|
||||
@@ -8787,7 +8811,7 @@ static classTypeInfo_t classTypeInfo[] = {
|
||||
{ "jointAnimInfo_t", "", sizeof(jointAnimInfo_t), jointAnimInfo_t_typeInfo },
|
||||
{ "jointMod_t", "", sizeof(jointMod_t), jointMod_t_typeInfo },
|
||||
{ "frameLookup_t", "", sizeof(frameLookup_t), frameLookup_t_typeInfo },
|
||||
// { "class_282::class_282", "", sizeof(class_282::class_282), class_282_class_282_typeInfo },
|
||||
// { "class_283::class_283", "", sizeof(class_283::class_283), class_283_class_283_typeInfo },
|
||||
{ "frameCommand_t", "", sizeof(frameCommand_t), frameCommand_t_typeInfo },
|
||||
{ "animFlags_t", "", sizeof(animFlags_t), animFlags_t_typeInfo },
|
||||
{ "idModelExport", "", sizeof(idModelExport), idModelExport_typeInfo },
|
||||
|
||||
@@ -638,6 +638,13 @@ void idSaveGame::WriteRenderView( const renderView_t &view ) {
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
WriteFloat( view.shaderParms[ i ] );
|
||||
}
|
||||
|
||||
WriteBool( view.globalFog.enabled );
|
||||
WriteInt( view.globalFog.mode );
|
||||
WriteFloat( view.globalFog.density );
|
||||
WriteFloat( view.globalFog.start );
|
||||
WriteFloat( view.globalFog.end );
|
||||
WriteVec4( view.globalFog.color );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1409,6 +1416,13 @@ void idRestoreGame::ReadRenderView( renderView_t &view ) {
|
||||
for( i = 0; i < MAX_GLOBAL_SHADER_PARMS; i++ ) {
|
||||
ReadFloat( view.shaderParms[ i ] );
|
||||
}
|
||||
|
||||
ReadBool( view.globalFog.enabled );
|
||||
ReadInt( (int &)view.globalFog.mode );
|
||||
ReadFloat( view.globalFog.density );
|
||||
ReadFloat( view.globalFog.start );
|
||||
ReadFloat( view.globalFog.end );
|
||||
ReadVec4( view.globalFog.color );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user