rodecomp/Source/Contents/World/WorldModelLoading.h
ragnarok-clanker 95101552fb Decompile fn_17685 (CWorld::OnExitFrame)
Batch #7520 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_17685 CWorld::OnExitFrame: logic confirmed by peer review

Peer-reviewed-by: secret, Romain, Toshiro
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-31 09:49:38 +00:00

49 lines
1.2 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;
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();
private:
static DWORD WINAPI ThreadEntry(void* context);
};
#endif