rodecomp/Source/Contents/World/WorldModelLoading.h
ragnarok-clanker 1a4662a41f Decompile fn_17684 (CWorld::InitWorld)
Batch #9400 by Lumen: 0 byte-identical, 1 confirmed by peer review.

- fn_17684 CWorld::InitWorld: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, Toshiro
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-01 12:48:30 +00:00

53 lines
1.3 KiB
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDMODELLOADING_H
#define RAGNAROK_SOURCE_CONTENTS_WORLD_WORLDMODELLOADING_H
#include <cstddef>
#include <vector>
#include <windows.h>
class C3dActor;
class ResourceMgr;
class BinkMovies;
struct WorldModelRecord;
struct ModelLightingContext;
struct WorldSpatialTree;
struct TerrainHeight;
struct DeferredWorldModel {
/* 0000 */ float distance;
/* 0004 */ const WorldModelRecord* placement;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(DeferredWorldModel) == 8);
static_assert(offsetof(DeferredWorldModel, placement) == 4);
#endif
extern HANDLE hObject;
extern std::vector<DeferredWorldModel> g_deferredWorldModels;
extern float g_worldLightDirection[3];
extern float g_worldDiffuse[3];
extern float g_worldAmbient[3];
extern float g_worldLoadCenter[3];
extern int g_partyEffectNoticePending;
struct WorldModelLoading {
ResourceMgr& resources;
BinkMovies& movies;
ModelLightingContext& lighting;
std::vector<C3dActor*>& models;
int& published;
int& pending;
std::vector<DeferredWorldModel>& deferred;
HANDLE& thread;
void Schedule(const WorldModelRecord& placement, const TerrainHeight& terrain, int column, int row, float* center);
void Start();
void Run();
void Publish(WorldSpatialTree& root);
void Finish();
static DWORD WINAPI ThreadEntry(void* context);
};
#endif