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>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-19 21:10:23 -05:00
1 parent 2ff2d5d87f
commit 3ce74c6e2d
331 files changed
+485 -7835

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
#include "classes.h"
// 00424440
void ChallengeParam::Reset()
{
void *pvVar1;
pvVar1 = (this->_roomset)._head;
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<std::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
(&this->_roomset,
(fuzzer_allocator<std::_Tree_node<unsigned_int,void*>_> *)&this->_roomset,
*(_Tree_node<unsigned_int,void*> **)(GHIDRA_INT(pvVar1) + 4));
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 4) = pvVar1;
*(void **)pvVar1 = pvVar1;
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 8) = pvVar1;
(this->_roomset)._size = 0;
(this->_collectibleList)._end = (this->_collectibleList)._begin;
(this->_trinketList)._end = (this->_trinketList)._begin;
pvVar1 = (this->_seedEffects)._begin;
this->_endStage = 0;
this->_getCurse = 0;
this->_curseFilter = 0;
this->_playerType = 0;
this->_startingPill = -1;
this->_startingCard = 0;
this->_blackHearts = 0;
this->_soulHearts = 0;
this->_coins = 0;
this->_canShoot = 1;
this->_maxDamage = 0;
this->_minShotSpeed = 0;
this->_bigRange = 0;
this->_isPathTypeSet = 0;
this->_minFireRate = 0.0;
this->_maxHearts = 0;
this->_hearts = 0;
this->_difficulty = 0;
this->_isMegaSatan = 0;
this->_addDamage = 0.0;
this->_pathType = 0;
(this->_seedEffects)._end = pvVar1;
return;
}