Restore translation-unit ownership and publish verified source corrections

Owner-authorized source migration: 31 helper-only translation units were merged into their callers or existing inline headers; both build manifests updated. Includes the preserved source payload, Lua configuration matching wowdecomp, and exact malloca expansion without diagnostic pragmas.

449 native units compiled locally and 449 staged units compiled by the pinned server toolchain. No previously byte-matched function regressed. Compiler mapping diagnostics remain recorded as needs_cleanup, not accepted or peer-confirmed. Existing independent review records are preserved. README.md is intentionally unchanged.
This commit is contained in:
ragnarok-clanker 2026-10-25 15:42:21 +00:00
commit e168b4e4a6
326 changed files with 9538 additions and 3481 deletions

View file

@ -1,7 +1,6 @@
#include "Contents/Models/ModelActor.h"
#include "Contents/Ground/TerrainHeight.h"
#include "Contents/World/WorldModelLoading.h"
#include "Contents/World/WorldModelPlacement.h"
#include "Contents/World/WorldSpatialInitialization.h"
#include "Resource/ResourceMgr.h"
#include "Resource/World/WorldResource.h"
@ -10,8 +9,10 @@
#include <atomic>
#include <cmath>
#include <cstdint>
#include <cstring>
namespace {
// INLINED
bool Before(const DeferredWorldModel& left, const DeferredWorldModel& right) {
if (left.distance < right.distance) {
return true;
@ -27,8 +28,43 @@ namespace {
return false;
}
// INLINED
C3dActor* CreatePlacedWorldModel(const WorldModelRecord& placement, C3dModelRes& resource, BinkMovies& movies, ModelLightingContext& lighting) {
resource.RegisterMovies(movies, placement.position);
if (!resource.FindNode(placement.node) && resource.nodes.empty()) {
return nullptr;
}
C3dActor* actor = nullptr;
if (resource.major == 1) {
actor = new C3dActorV1;
} else if (resource.major == 2) {
actor = new C3dActorV2;
}
actor->CopyVolumes(resource.volumes);
actor->SetSpeed(placement.animationSpeed);
actor->playback = placement.animation;
std::memcpy(actor->position, placement.position, sizeof(actor->position));
actor->dirty = 1;
std::memcpy(actor->rotation, placement.rotation, sizeof(actor->rotation));
actor->dirty = 1;
std::memcpy(actor->scale, placement.scale, sizeof(actor->scale));
actor->dirty = 1;
actor->commandMode = placement.flag;
actor->color = static_cast<std::uint32_t>(placement.index);
actor->Assign(resource);
actor->occlusionEnabled = 0;
actor->Prepare(lighting);
return actor;
}
}
// INLINED
void WorldModelLoading::Schedule(const WorldModelRecord& placement, const TerrainHeight& terrain, int column, int row, float* center) {
terrain.CellCenter(column, row, center[0], center[2]);
const float y = placement.position[1] - center[1];
@ -51,11 +87,13 @@ void WorldModelLoading::Schedule(const WorldModelRecord& placement, const Terrai
}
}
// FUNCTION: fn_17680
DWORD WINAPI WorldModelLoading::ThreadEntry(void* context) {
static_cast<WorldModelLoading*>(context)->Run();
return 0;
}
// INLINED
void WorldModelLoading::Start() {
this->thread = CreateThread(nullptr, 0, &WorldModelLoading::ThreadEntry, this, 0, nullptr);
@ -65,8 +103,7 @@ void WorldModelLoading::Start() {
}
}
// OFFSET: 0x00AC8BF0
// FUNCTION: fn_17680
// INLINED
void WorldModelLoading::Run() {
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
std::sort(this->deferred.begin(), this->deferred.end(), Before);