Curation round 2, wave A: anm2 (Anm2Ed JSON), text, config as idiomatic classes; SDL3 platform opens a window

- anm2.h/.cpp take over ANM2, AnimationState, LayerState, AnmCache and the frame data. They read Anm2Ed's JSON documents
  with simdjson and play them as the game does (interpolation baked at load). src/anm2/ and msvc.h are retired.
- font, formatted_text, string_table and rich_text take over the text classes. FormattedText::parse is still bit-exact
  against its assembly.
- options_config and challenge_params take over OptionsConfig, ChallengeParams and the .ini helpers. The tests include
  Save's exact bytes.
- platform.h/.cpp and main.cpp run IsaacMain on SDL3: the window and GL context open, and the run stops at the first
  built-in shader (FUN_00a13fa0).
- source_tree.py: a taken-over parent stays bytes, taken-over methods are not re-emitted as a namespace, and every
  address in a (a, b, c to d) list on a comment counts as taken over.
- log.h: reconstruction_missing() for a taken-over class's methods that are not written yet.
206 functions taken over, boot path 89/615. The full build waits for wave B: item_config, entity_config and mod_manager
still use the old APIs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-19 23:04:54 -05:00
1 parent d6e1ca7c6c
commit 780767f5e1
161 files changed
+8646 -21919

No files matched your search

+21 -21
View File
@@ -13,9 +13,9 @@ ItemOverlay::~ItemOverlay()
local_10 = ExceptionList;
ExceptionList = &local_10;
local_8 = 0;
(GHIDRA_CAST<ANM2 *>((&this->_megaMushPlayerSprite)))->ANM2::Reset();
(GHIDRA_CAST<AnimationState *>((&(this->_megaMushPlayerSprite)._overlayAnimState)))->AnimationState::~AnimationState();
(GHIDRA_CAST<AnimationState *>((&(this->_megaMushPlayerSprite)._animState)))->AnimationState::~AnimationState();
ANM2::Reset(&this->_megaMushPlayerSprite);
AnimationState::~AnimationState(&(this->_megaMushPlayerSprite)._overlayAnimState);
AnimationState::~AnimationState(&(this->_megaMushPlayerSprite)._animState);
(GHIDRA_CAST<msvc::string *>(((this->_megaMushPlayerSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate();
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(&this->_megaMushPlayerSprite))))->msvc::string::_Tidy_deallocate();
playerRef = &this->_player;
@@ -27,9 +27,9 @@ ItemOverlay::~ItemOverlay()
local_8 = 0xffffffff;
_eh_vector_destructor_iterator_(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x11c))),0x58,0x30,FUN_009abd50);
local_8 = 2;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Reset();
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::~AnimationState();
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::~AnimationState();
ANM2::Reset(&this->_sprite);
AnimationState::~AnimationState(&(this->_sprite)._overlayAnimState);
AnimationState::~AnimationState(&(this->_sprite)._animState);
(GHIDRA_CAST<msvc::string *>(((this->_sprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate();
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(&this->_sprite))))->msvc::string::_Tidy_deallocate();
ExceptionList = local_10;
@@ -74,7 +74,7 @@ void ItemOverlay::Update(uint8_t unk)
}
if ((this->_megaMushPlayerSprite)._loaded != 0) {
if (unk == 0) {
(GHIDRA_CAST<ANM2 *>((&this->_megaMushPlayerSprite)))->ANM2::Update();
ANM2::Update(&this->_megaMushPlayerSprite);
}
else if ((this->_megaMushPlayerSprite)._animState._animData != (void *)0x0) {
AnimationState::AdvancePosition
@@ -82,9 +82,9 @@ void ItemOverlay::Update(uint8_t unk)
*GHIDRA_CAST<int *>((GHIDRA_INT((this->_megaMushPlayerSprite)._animState._animData) + 0x30)) + -1);
}
if (((this->_player != 0) &&
(bVar1 = (GHIDRA_CAST<ANM2 *>((&this->_megaMushPlayerSprite)))->ANM2::IsPlaying(GHIDRA_CAST<uint8_t *>("Transform")), bVar1 != 0)) &&
(bVar1 = ANM2::IsPlaying(&this->_megaMushPlayerSprite,GHIDRA_CAST<uint8_t *>("Transform")), bVar1 != 0)) &&
(isFastForward == 0)) {
iVar2 = (GHIDRA_CAST<ANM2 *>((&this->_megaMushPlayerSprite)))->ANM2::GetFrame();
iVar2 = ANM2::GetFrame(&this->_megaMushPlayerSprite);
manager = g_manager;
if (iVar2 == 1) {
local_8 = GHIDRA_CAST<AnimationState *>(0x9d);
@@ -135,7 +135,7 @@ LAB_009acc1b:
this->_state = 0;
}
if (isFastForward == 0) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Update();
ANM2::Update(&this->_sprite);
}
else {
if ((this->_sprite)._animState._animData == (void *)0x0) goto LAB_009accdf;
@@ -144,7 +144,7 @@ LAB_009acc1b:
*GHIDRA_CAST<int *>((GHIDRA_INT((this->_sprite)._animState._animData) + 0x30)) + -1);
}
if ((((this->_sprite)._animState._animData != (void *)0x0) &&
(bVar1 = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::IsEventTriggered(GHIDRA_CAST<uint8_t *>("Sound")),
(bVar1 = AnimationState::IsEventTriggered(&(this->_sprite)._animState,GHIDRA_CAST<uint8_t *>("Sound")),
manager = g_manager, bVar1 != 0)) && (this->_overlayID == 0x27)) {
local_8 = GHIDRA_CAST<AnimationState *>(0x51);
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_8));
@@ -153,7 +153,7 @@ LAB_009acc1b:
LAB_009accdf:
local_8 = &(this->_sprite)._animState;
if (((this->_sprite)._animState._animData != (void *)0x0) &&
(bVar1 = (GHIDRA_CAST<AnimationState *>((local_8)))->AnimationState::IsEventTriggered(GHIDRA_CAST<uint8_t *>("SleepFillHP")), bVar1 != 0)) {
(bVar1 = AnimationState::IsEventTriggered(local_8,GHIDRA_CAST<uint8_t *>("SleepFillHP")), bVar1 != 0)) {
playerIndex = 0;
playerManager = &g_game->_playerManager;
if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((playerManager->_playerList)._begin) >>
@@ -207,12 +207,12 @@ LAB_009ace00:
}
spriteAnimState = local_8;
if ((this->_overlayID == 0x2c) && ((this->_sprite)._animState._animData != (void *)0x0)) {
bVar1 = (GHIDRA_CAST<AnimationState *>((local_8)))->AnimationState::IsEventTriggered(GHIDRA_CAST<uint8_t *>("Transition"));
bVar1 = AnimationState::IsEventTriggered(local_8,GHIDRA_CAST<uint8_t *>("Transition"));
manager = g_manager;
game = g_game;
if (bVar1 == 0) {
if ((((this->_sprite)._animState._animData != (void *)0x0) &&
(bVar1 = (GHIDRA_CAST<AnimationState *>((spriteAnimState)))->AnimationState::IsEventTriggered(GHIDRA_CAST<uint8_t *>("Static")),
(bVar1 = AnimationState::IsEventTriggered(spriteAnimState,GHIDRA_CAST<uint8_t *>("Static")),
manager = g_manager, bVar1 != 0)) && (isFastForward == 0)) {
_unk = 0x51;
seed_fart_sound_override(GHIDRA_CAST<int *>(&unk));
@@ -300,7 +300,7 @@ void ItemOverlay::Render()
scratchVec.y = g_screenHeight * 0.5;
scratchVec.x = g_screenWidth * 0.5;
}
(GHIDRA_CAST<ANM2 *>((sprite)))->ANM2::Render(&scratchVec,&g_vectorZero,&g_vectorZero);
ANM2::Render(sprite,&scratchVec,&g_vectorZero,&g_vectorZero);
unusedArg = extraout_ECX_00;
LAB_009ad1ff:
shader_cache_find(GHIDRA_INT(unusedArg));
@@ -338,10 +338,10 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player)
}
sprite = &this->_sprite;
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>((&this->_sprite + 1)) + eOverlayID * 0x58 + 0x14)) == 0) {
(GHIDRA_CAST<ANM2 *>((sprite)))->ANM2::Reset();
ANM2::Reset(sprite);
}
else {
(GHIDRA_CAST<ANM2 *>((sprite)))->ANM2::Load(GHIDRA_CAST<std_string *>((GHIDRA_INT((&this->_sprite + 1)) + eOverlayID * 0x58 + 4)),0);
ANM2::Load(sprite,GHIDRA_CAST<std_string *>((GHIDRA_INT((&this->_sprite + 1)) + eOverlayID * 0x58 + 4)),0);
bVar5 = extraout_CL;
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>((&this->_sprite + 1)) + eOverlayID * 0x58 + 0x44)) != 0) {
Sprite::ReplaceSpritesheet
@@ -349,7 +349,7 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player)
GHIDRA_CAST<std_string *>((GHIDRA_INT((&this->_sprite + 1)) + eOverlayID * 0x58 + 0x34)));
bVar5 = extraout_CL_00;
}
(GHIDRA_CAST<ANM2 *>((sprite)))->ANM2::LoadGraphics(bVar5);
ANM2::LoadGraphics(sprite,bVar5);
}
newPlayer = player;
this->_overlayID = eOverlayID;
@@ -380,7 +380,7 @@ void ItemOverlay::Show(int eOverlayID, int delay, Entity_Player *player)
pbVar9 = GHIDRA_CAST<uint8_t *>(0x0);
if ((this->_sprite)._layerCount != 0) {
do {
layer = (GHIDRA_CAST<ANM2 *>((sprite)))->ANM2::GetLayer(pbVar9);
layer = ANM2::GetLayer(sprite,pbVar9);
layerData = layer->_layerData;
if (layerData == (void *)0x0) {
pbVar8 = &s_empty;
@@ -470,9 +470,9 @@ LAB_009ad429:
if ((cmpResult == 0) && ((pbVar9[0x34] == 0 || ((this->_sprite)._animState._isPlaying != 0))))
goto LAB_009ad452;
}
bVar5 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(pbVar10,1);
bVar5 = ANM2::SetAnimation(&this->_sprite,pbVar10,1);
if (bVar5 != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
AnimationState::Rewind(&(this->_sprite)._animState);
(this->_sprite)._animState._isPlaying = 1;
}
}