Files
isaac-port/generated-src/level_generator_room.cpp
T
shweetandClaude Opus 5.5 3ce74c6e2d Reconstruction layout: generated-src/ (generated) and src/ (curated), CMake, the first takeover: RNG
The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function
defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body.
src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read
from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT,
from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra).
structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:10:23 -05:00

79 lines
3.7 KiB
C++

#include "classes.h"
// 007381b0
LevelGenerator_Room * LevelGenerator_Room::constructor(uint column, uint line, uint shape)
{
LevelGenerator_Room LVar1;
*GHIDRA_CAST<undefined1 *>(this) = 1;
this[2] = (LevelGenerator_Room)column;
this[3] = (LevelGenerator_Room)line;
this[4] = (LevelGenerator_Room)0x0;
this[5] = (LevelGenerator_Room)0x0;
this[6] = (LevelGenerator_Room)shape;
this[7] = (LevelGenerator_Room)0x0;
this[8] = (LevelGenerator_Room)0xffffffff;
this[9] = (LevelGenerator_Room)0xffffffff;
this[10] = (LevelGenerator_Room)g_levelGenInvalidPos[0];
this[0xb] = (LevelGenerator_Room)g_levelGenInvalidPos[1];
this[0xc] = (LevelGenerator_Room)0x0;
this[0xd] = (LevelGenerator_Room)0x0;
LVar1 = (LevelGenerator_Room)operator_new(0x14);
*GHIDRA_CAST<LevelGenerator_Room *>(LVar1) = LVar1;
*GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(LVar1) + 4)) = LVar1;
*GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(LVar1) + 8)) = LVar1;
*GHIDRA_CAST<undefined2 *>((GHIDRA_CAST<char *>(LVar1) + 0xc)) = 0x101;
this[0xc] = LVar1;
*GHIDRA_CAST<undefined1 *>((this + 0xf)) = 0;
this[0x10] = (LevelGenerator_Room)0x0;
*GHIDRA_CAST<undefined1 *>((this + 0x11)) = 0;
LVar1 = *GHIDRA_CAST<LevelGenerator_Room *>((&DAT_00c5d37c + shape * 8));
this[4] = *GHIDRA_CAST<LevelGenerator_Room *>((&DAT_00c5d378 + shape * 8));
this[5] = LVar1;
return this;
}
// 007507d0
LevelGenerator_Room::LevelGenerator_Room(void *other)
{
LevelGenerator_Room setHead;
void *local_10;
undefined1 *puStack_c;
undefined4 local_8;
LevelGenerator_Room *indexSet;
local_8 = 0xffffffff;
puStack_c = &LAB_00afe4ad;
local_10 = ExceptionList;
ExceptionList = &local_10;
indexSet = this + 0xc;
*GHIDRA_CAST<undefined1 *>(this) = *GHIDRA_CAST<undefined1 *>(other);
this[1] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 4));
this[2] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 8));
this[3] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0xc));
this[4] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x10));
this[5] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x14));
this[6] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x18));
this[7] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x1c));
this[8] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x20));
this[9] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x24));
this[10] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x28));
this[0xb] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x2c));
*indexSet = (LevelGenerator_Room)0x0;
this[0xd] = (LevelGenerator_Room)0x0;
setHead = (LevelGenerator_Room)operator_new(0x14);
*GHIDRA_CAST<LevelGenerator_Room *>(setHead) = setHead;
*GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(setHead) + 4)) = setHead;
*GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(setHead) + 8)) = setHead;
*GHIDRA_CAST<undefined2 *>((GHIDRA_CAST<char *>(setHead) + 0xc)) = 0x101;
*indexSet = setHead;
local_8 = 0;
std_set_uint_copy(indexSet,(void *)(GHIDRA_INT(other) + 0x30),GHIDRA_INT(other));
this[0xe] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x38));
*GHIDRA_CAST<undefined1 *>((this + 0xf)) = *GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(other) + 0x3c));
this[0x10] = *GHIDRA_CAST<LevelGenerator_Room *>((GHIDRA_CAST<char *>(other) + 0x40));
*GHIDRA_CAST<undefined1 *>((this + 0x11)) = *GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(other) + 0x44));
ExceptionList = local_10;
return this;
}