2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-07 19:57:48 +00:00

chore: mixed code improvements

This commit is contained in:
Jan Laupetin
2025-11-04 22:52:34 +00:00
parent b754be5a68
commit 30e63186f3
21 changed files with 270 additions and 250 deletions

View File

@@ -11,10 +11,11 @@ namespace BSP
{
}
ComWorld* ComWorldLinker::linkComWorld(const BSPData& bsp) const
ComWorld* ComWorldLinker::LinkComWorld(const BSPData& bsp) const
{
// all lights that aren't the sunlight or default light need their own GfxLightDef asset
ComWorld* comWorld = m_memory.Alloc<ComWorld>();
comWorld->name = m_memory.Dup(bsp.bspName.c_str());
comWorld->isInUse = 1;
comWorld->primaryLightCount = BSPGameConstants::BSP_DEFAULT_LIGHT_COUNT;
@@ -25,6 +26,7 @@ namespace BSP
ComPrimaryLight* sunLight = &comWorld->primaryLights[1];
const vec4_t sunLightColor = BSPEditableConstants::SUNLIGHT_COLOR;
const vec3_t sunLightDirection = BSPEditableConstants::SUNLIGHT_DIRECTION;
sunLight->type = GFX_LIGHT_TYPE_DIR;
sunLight->diffuseColor.r = sunLightColor.r;
sunLight->diffuseColor.g = sunLightColor.g;