Added skydome support.

This commit is contained in:
Justin Marshall
2026-05-24 11:54:07 -07:00
parent 3242531044
commit 029fd186dc
18 changed files with 281 additions and 37 deletions
+1 -1
View File
@@ -4430,7 +4430,7 @@ idGameLocal::GetMapLoadingGUI
===============
*/
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) {
sprintf(gui, "guis/loadscreenbeta.gui");
sprintf(gui, "guis/map/loading.gui");
}
/*
+1
View File
@@ -445,6 +445,7 @@ void idPlayerView::SingleView( idUserInterface *hud, const renderView_t *view )
// hack the shake in at the very last moment, so it can't cause any consistency problems
renderView_t hackedView = *view;
hackedView.skyDomeMaterial = gameLocal.world->GetSkydomeMaterial();
hackedView.viewaxis = hackedView.viewaxis * ShakeAxis();
gameRenderWorld->RenderScene( &hackedView );
+2
View File
@@ -102,6 +102,8 @@ void idWorldspawn::Spawn( void ) {
pm_stamina.SetFloat( 0.0f );
}
skydomeMaterial = declManager->FindMaterial(spawnArgs.GetString("skydome", "textures/skies/mars1"));
// load script
scriptname = gameLocal.GetMapName();
scriptname.SetFileExtension( ".script" );
+2
View File
@@ -48,10 +48,12 @@ public:
void Save( idRestoreGame *savefile );
void Restore( idRestoreGame *savefile );
const idMaterial* GetSkydomeMaterial() { return skydomeMaterial; }
private:
ID_SCRIPT_EVENT( "<immediateremove>", 0 )
ID_SCRIPT_EVENT( "remove", 0 )
void Event_Remove( void );
const idMaterial* skydomeMaterial;
};
#endif /* !__GAME_WORLDSPAWN_H__ */
+6
View File
@@ -4277,6 +4277,9 @@ intptr_t idWorldspawn::Invoke(const char *functionName, void *param1) {
Spawn();
return 0;
};
if(functionNameHash == 234239) { // GetSkydomeMaterial
return (intptr_t)GetSkydomeMaterial();
};
if(functionNameHash == 153439) { // Event_Remove
Event_Remove();
return 0;
@@ -4290,6 +4293,9 @@ bool idWorldspawn::HasNativeFunction(const char *functionName) {
if(functionNameHash == 63102) { // Spawn
return true;
};
if(functionNameHash == 234239) { // GetSkydomeMaterial
return true;
};
if(functionNameHash == 153439) { // Event_Remove
return true;
};
+2
View File
@@ -4562,6 +4562,7 @@ static classVariableInfo_t renderView_t_typeInfo[] = {
{ "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 ) },
{ "const idMaterial *", "skyDomeMaterial", (intptr_t)(&((renderView_t *)0)->skyDomeMaterial), sizeof( ((renderView_t *)0)->skyDomeMaterial ) },
{ NULL, 0 }
};
@@ -7064,6 +7065,7 @@ classVariableInfo_t idLight::typeInfo[] = {
};
classVariableInfo_t idWorldspawn::typeInfo[] = {
{ "const idMaterial *", "skydomeMaterial", (intptr_t)(&((idWorldspawn *)0)->skydomeMaterial), sizeof( ((idWorldspawn *)0)->skydomeMaterial ) },
{ NULL, 0 }
};