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

+50
View File
@@ -0,0 +1,50 @@
#include "classes.h"
// 005b14e0
byte Item::IsCollectible()
{
int temp_5fb047fd2b;
temp_5fb047fd2b = *GHIDRA_CAST<int *>(this);
if (((temp_5fb047fd2b == 1) || (temp_5fb047fd2b == 3)) || (temp_5fb047fd2b == 4)) {
return 1;
}
return 0;
}
// 005b1500
byte Item::HasTags(ulonglong tags)
{
if ((GHIDRA_UINT(tags) & *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(this) + 0xb8))) == 0 &&
(*GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(this) + 0xbc)) & (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(tags)) + 0x4)))) == 0) {
return 0;
}
return 1;
}
// 0060cc80
byte Item::IsTrinket()
{
return *GHIDRA_CAST<int *>(this) == 2;
}
// 006ef3c0
byte Item::IsAvailable(uint flags)
{
byte isAvailable;
isAvailable = IsAvailable(this,(flags & 0xff ^ 1) * 2 - 3);
return isAvailable;
}
// 00722c80
byte Item::IsNull()
{
return *GHIDRA_CAST<int *>(this) == 0;
}
// 0085dbc0
void * Item::Costume()
{
return (void *)(GHIDRA_INT(this) + 0x80);
}