Files
isaac-port/generated-src/config.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

58 lines
1.2 KiB
C++

#include "classes.h"
// 0041e460
int Config::GetPillEffects()
{
int in_ECX;
return in_ECX + 0x30;
}
// 00424530
void Config::GetCollectibles()
{
return;
}
// 00685d30
void * Config::GetTrinkets()
{
return (void *)(GHIDRA_INT(this) + 0xc);
}
// 00685d40
int Config::GetCards()
{
int in_ECX;
return in_ECX + 0x24;
}
// 0072fda0
ItemConfig_Item * Config::GetNullItem(int id)
{
if ((id < 0) || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x1c)) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x18)) >> 2 <= id)) {
return GHIDRA_CAST<ItemConfig_Item *>(0x0);
}
return *GHIDRA_CAST<ItemConfig_Item **>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x18)) + id * 4));
}
// 0072fdd0
void * Config::GetPillEffect(int pillEffect)
{
if ((pillEffect < 0) ||
(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x34)) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x30)) >> 2 <= pillEffect)) {
return (void *)0x0;
}
return *(void **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x30)) + pillEffect * 4);
}
// 0085dbd0
byte Config::ShouldAddCostumeOnPickup(ItemConfig_Item *item)
{
if ((item == GHIDRA_CAST<ItemConfig_Item *>(0x0)) || (item->addCostumeOnPickup == 0)) {
return 0;
}
return 1;
}