Batch #1063 by ragnarok-clanker: no function's compiled code changes; checked with 62 compiled unit(s), including every includer of Source/Contents/Items/ItemNaming.h, Source/Contents/Models/ModelActor.h, Source/Contents/Models/ModelRendering.h, Source/Contents/Models/ModelSpatial.h, Source/Contents/Movies/BinkMovie.h, Source/Contents/Movies/BinkMovies.h, Source/Contents/PlayerNameDictionary.h, Source/Contents/Skills/AutomaticSkills.h, Source/Contents/Skills/ClientSkills.h, Source/Contents/Skills/PlayerSkillBundle.h, Source/Contents/Skills/SkillInfo.h, Source/Contents/Sound/SoundMgr.h, Source/Contents/UserData/NormalItemSlots.h, Source/Contents/World/WorldModelLoading.h, Source/Contents/World/WorldModelView.h, Source/Contents/World/WorldRayQuery.h.
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDMODELVIEW_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDMODELVIEW_H
|
|
|
|
#include <cstddef>
|
|
#include <list>
|
|
|
|
struct OrientedBounds;
|
|
struct WorldSpatialTree;
|
|
struct ModelRenderContext;
|
|
struct GroundLightingContext;
|
|
class GroundGeometry;
|
|
|
|
struct ModelViewPlanes {
|
|
/* 0010 */ float planes[6][4];
|
|
/* 0070 */ float normals[6][3];
|
|
|
|
int ClassifyAxisAligned(const WorldSpatialTree& bounds) const;
|
|
int ClassifyOriented(const OrientedBounds& bounds) const;
|
|
};
|
|
|
|
struct WorldViewSpatial {
|
|
WorldViewSpatial();
|
|
~WorldViewSpatial();
|
|
|
|
/* 0000 */ std::list<WorldSpatialTree*> inside;
|
|
/* 0008 */ std::list<WorldSpatialTree*> clipped;
|
|
/* 0010 */ ModelViewPlanes planes;
|
|
|
|
void Collect(float horizontal, float vertical, const float* matrix, WorldSpatialTree& root);
|
|
void CollectNode(WorldSpatialTree& node, int depth, bool fullyInside);
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(ModelViewPlanes) == 0x00A8);
|
|
static_assert(offsetof(ModelViewPlanes, normals) == 0x0060);
|
|
static_assert(offsetof(WorldViewSpatial, clipped) == 0x0008);
|
|
static_assert(offsetof(WorldViewSpatial, planes) == 0x0010);
|
|
#endif
|
|
|
|
int ClassifyModelView(const OrientedBounds& bounds, const ModelViewPlanes& planes);
|
|
|
|
void DrawWorldModelLeaves(
|
|
std::list<WorldSpatialTree*>& clipped, std::list<WorldSpatialTree*>& inside, const ModelViewPlanes& planes, const float* matrix, unsigned frame, int updates,
|
|
GroundGeometry& ground, ModelRenderContext& models, GroundLightingContext& lighting, int* visibleRectangle
|
|
);
|
|
|
|
#endif
|