rodecomp/Source/Contents/World/WorldEnvironment.cpp
ragnarok-clanker a47d20f8be Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
2026-10-25 07:42:41 +00:00

29 lines
1.1 KiB
C++

#include "Contents/World/WorldEnvironment.h"
#include "Render/Renderer.h"
#include "Resource/World/WorldResource.h"
// OFFSET: 0x00AC94C0
// FUNCTION: fn_17684
void PublishWorldEnvironment(
const C3dWorldRes& resource, int* modeBounds, WorldSpatialTree*& serialized, WorldEnvironmentLighting& lighting, unsigned char& rendererFlag,
CRenderer& renderer
) {
serialized = resource.spatial;
modeBounds[0] = resource.bounds[2];
modeBounds[1] = resource.bounds[3];
modeBounds[2] = resource.bounds[0];
modeBounds[3] = resource.bounds[1];
lighting.direction[0] = resource.lightDirection[0];
lighting.direction[1] = resource.lightDirection[1];
lighting.direction[2] = resource.lightDirection[2];
lighting.diffuse[0] = resource.diffuse[0];
lighting.diffuse[1] = resource.diffuse[1];
lighting.diffuse[2] = resource.diffuse[2];
lighting.ambient[0] = resource.ambient[0];
lighting.ambient[1] = resource.ambient[1];
lighting.ambient[2] = resource.ambient[2];
rendererFlag = resource.flag;
renderer.SetLighting(lighting.direction, lighting.diffuse, lighting.ambient);
}