Liquid system ported from 12340 (LiquidSystem module, chunk/WMO liquid, wave manager, geometry factories); CMap load chain (Load, LoadWdt, low-detail WDL, lights, CreateMapObjDef, PurgeMaps); CMapChunk create/batch/vertex/index code; CMapRenderChunk; frustum stack and scene cull helpers. MapViewer renders terrain through a viewer-only shortcut (ViewerWorld.cpp). Engine fix: int render-state setters write the full pointer-sized slot (x64 texture crash). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
41 lines
1.5 KiB
C++
41 lines
1.5 KiB
C++
#include "MapObjDef.h"
|
|
#include "WoW/Source/WorldClient/Map.h"
|
|
#include "WoW/Source/WorldClient/MapLight.h"
|
|
#include "WoW/Source/WorldClient/World.h"
|
|
#include "WoW/Source/WorldClient/CWorldMath.h"
|
|
#include "WoW/Source/WorldClient/DayNight__DNInfo.h"
|
|
|
|
// VERIFY: 18be6c93 auto
|
|
// OFFSET: 0x007B3990
|
|
bool CMapObjDef::TestAABox(C3Vector& start, C3Vector& end) {
|
|
return CWorldMath::VectorIntersectAABox2(this->m_bbox, start, end);
|
|
}
|
|
|
|
// VERIFY: 7ed1c1b6 manual
|
|
// OFFSET: 0x007B3F30
|
|
void CMapObjDefGroup::SelectLights(CM2Lighting* lighting) {
|
|
lighting->AddLight(&CMap::s_mapLight->m_light);
|
|
|
|
if (CWorld::farFog > this->m_distanceToCamera) {
|
|
if (this->m_flags & MAPOBJ_FLAG_UNPLACED) {
|
|
this->m_flags = static_cast<MapObjFlag>(this->m_flags & ~MAPOBJ_FLAG_UNPLACED);
|
|
}
|
|
|
|
for (CMapBaseObjLink* link = this->m_lightLinkList.Head(); link; link = this->m_lightLinkList.Next(link)) {
|
|
CMapLight* light = static_cast<CMapLight*>(link->m_owner);
|
|
|
|
if (light->m_light.m_visible && !light->unk_00D1) {
|
|
lighting->AddLight(&light->m_light);
|
|
}
|
|
}
|
|
}
|
|
|
|
DayNight::DNInfo* dayNight = DayNight::GetInfo();
|
|
|
|
if (this->m_flags & 0x8000) {
|
|
lighting->SetFog(C3Vector(dayNight->m_fogInterior.m_color), dayNight->m_fogInterior.m_start, dayNight->m_fogInterior.m_end, dayNight->m_fogInterior.m_density);
|
|
} else {
|
|
lighting->SetFog(C3Vector(dayNight->m_fog.m_color), dayNight->m_fog.m_start, dayNight->m_fog.m_end, dayNight->m_fog.m_density);
|
|
}
|
|
}
|