mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-17 11:00:38 +02:00
Added skydome support.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user