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]>
18 lines
607 B
C++
18 lines
607 B
C++
#include "ClipInfo.h"
|
|
#include "Engine/Source/Tempest/C3Vector.h"
|
|
|
|
// VERIFY: caefdc42 auto
|
|
// OFFSET: 0x0078FFA0
|
|
void World::CLIPINFO::Set(const C3Vector& ndc) {
|
|
this->d[0] = ndc.x;
|
|
this->d[1] = 1.0f - ndc.x;
|
|
this->d[2] = ndc.y;
|
|
this->d[3] = 1.0f - ndc.y;
|
|
this->d[4] = ndc.z;
|
|
this->d[5] = 1.0f - ndc.z;
|
|
|
|
const uint32_t* bits = reinterpret_cast<const uint32_t*>(this->d);
|
|
|
|
this->outcode = (bits[0] & 0x80000000) + ((bits[1] >> 1) & 0x40000000) + ((bits[2] >> 2) & 0x20000000) + ((bits[3] >> 3) & 0x10000000) + ((bits[4] >> 4) & 0x08000000) + ((bits[5] >> 5) & 0x04000000);
|
|
}
|