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
@@ -6139,7 +6139,7 @@ void CCamWnd::Cam_Render() {
// the editor uses opposite pitch convention
refdef.viewaxis = idAngles(-m_Camera.angles.pitch, m_Camera.angles.yaw, m_Camera.angles.roll).ToMat3();
refdef.skyDomeMaterial = world_entity->GetKeyMaterial("skydome", "textures/skies/mars1");
refdef.width = SCREEN_WIDTH;
refdef.height = SCREEN_HEIGHT;
refdef.fov_x = 90;
@@ -68,6 +68,15 @@ const char *idEditorEntity::GetKeyString(int iIndex)
return NULL;
}
const idMaterial* idEditorEntity::GetKeyMaterial(const char* key, const char* defaultMaterial) {
const char* value = ValueForKey(key);
if (value == NULL || value[0] == 0) {
value = defaultMaterial;
}
return declManager->FindMaterial(value, false);
}
/*
=======================================================================================================================
+1
View File
@@ -51,6 +51,7 @@ public:
const char *ValueForKey(const char *key);
int GetNumKeys();
const char *GetKeyString(int iIndex);
const idMaterial* GetKeyMaterial(const char* key, const char *defaultMaterial);
void SetKeyValue(const char *key, const char *value, bool trackAngles = true);
void DeleteKey(const char *key);
float FloatForKey(const char *key);