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

+15 -15
View File
@@ -189,8 +189,8 @@ LAB_007191ab:
}
LAB_0071926c:
if ((this->_sprite)._loaded != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Update();
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::Update();
AnimationState::Update(&(this->_sprite)._animState);
AnimationState::Update(&(this->_sprite)._overlayAnimState);
game = g_game;
}
iVar4 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc))));
@@ -421,7 +421,7 @@ void GridEntity_Rock::RenderTop(Vector *pos)
*GHIDRA_CAST<uint64_t *>((this->_sprite)._color._offset) = (*GHIDRA_CAST<uint64_t *>((GHIDRA_CAST<char *>(&(roomColor._offset)) + 0x0)));
(this->_sprite)._color._offset[2] = roomColor._offset[2];
}
topLayer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
topLayer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
topLayer->_visible = 1;
pvVar1 = (this->_sprite)._animState._animData;
if (((pvVar1 != (void *)0x0) &&
@@ -432,7 +432,7 @@ void GridEntity_Rock::RenderTop(Vector *pos)
*GHIDRA_CAST<int *>((GHIDRA_INT((this->_sprite)._animState._layerFrames) + layerIndex * 4)),
&g_vectorZero,&g_vectorZero,animation);
}
topLayer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
topLayer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
topLayer->_visible = 0;
if (spriteColor != &savedColor) {
spriteColor->_tint[0] = local_58;
@@ -501,7 +501,7 @@ void GridEntity_Rock::BeginBatches()
anm2Path._capacity = 0x1f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/grid/grid_rock.anm2",0x18);
local_8 = 0;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&anm2Path,0);
ANM2::Load(&this->_sprite,&anm2Path,0);
local_8 = 0xffffffff;
if (0xf < anm2Path._capacity) {
uVar9 = anm2Path._capacity + 1;
@@ -562,7 +562,7 @@ void GridEntity_Rock::BeginBatches()
} while (uVar9 < GHIDRA_UINT((this->_sprite)._layerCount));
}
animName = &this->_anim;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::LoadGraphics(bVar3);
ANM2::LoadGraphics(&this->_sprite,bVar3);
local_48 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc))));
bVar2 = false;
if (local_48 == 0) {
@@ -620,7 +620,7 @@ void GridEntity_Rock::BeginBatches()
break;
case 0x18:
(GHIDRA_CAST<msvc::string *>((animName->_buf)))->msvc::string::assign(GHIDRA_CAST<uint8_t *>("pillar"),6);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
layer->_visible = 0;
goto LAB_0071a3d7;
case 0x19:
@@ -660,7 +660,7 @@ LAB_0071a3d7:
if (0xf < (this->_anim)._capacity) {
animName = *GHIDRA_CAST<std_string **>(animName->_buf);
}
pvVar7 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetAnimationData(GHIDRA_CAST<uint8_t *>(animName));
pvVar7 = ANM2::GetAnimationData(&this->_sprite,GHIDRA_CAST<uint8_t *>(animName));
if (pvVar7 == (void *)0x0) {
KAGE_LogMessage(1,GHIDRA_CAST<uint8_t *>("[warn] GridEntityRock animation %s is NULL\n"));
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8)))) = 0;
@@ -746,9 +746,9 @@ LAB_0071a3d7:
if (0xf < (this->_anim)._capacity) {
animName = *GHIDRA_CAST<std_string **>(animName->_buf);
}
bVar3 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(animName),1);
bVar3 = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(animName),1);
if (((bVar3 != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) &&
((GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_4c)),
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(local_4c)),
(this->_sprite)._animState._animData != (void *)0x0)) {
(this->_sprite)._animState._isPlaying = 0;
}
@@ -893,7 +893,7 @@ void GridEntity_Rock::SetBigRockFrame(uint32_t param_2)
if (0xf < (this->_anim)._capacity) {
name = *GHIDRA_CAST<std_string **>(anim->_buf);
}
animData = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetAnimationData(GHIDRA_CAST<uint8_t *>(name));
animData = ANM2::GetAnimationData(&this->_sprite,GHIDRA_CAST<uint8_t *>(name));
if (animData != (void *)0x0) {
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 4));
if (iVar1 == 0) {
@@ -932,9 +932,9 @@ LAB_0071aa1f:
if (0xf < (this->_anim)._capacity) {
anim = *GHIDRA_CAST<std_string **>(anim->_buf);
}
isAnimSet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(anim),1);
isAnimSet = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(anim),1);
if (((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) &&
((GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(frame)),
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(frame)),
(this->_sprite)._animState._animData != (void *)0x0)) {
(this->_sprite)._animState._isPlaying = 0;
}
@@ -966,9 +966,9 @@ void GridEntity_Rock::UpdateAnimFrame()
if (0xf < (this->_anim)._capacity) {
anim = *GHIDRA_CAST<std_string **>(anim->_buf);
}
isAnimSet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(anim),1);
isAnimSet = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(anim),1);
if ((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(frame));
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(frame));
if ((this->_sprite)._animState._animData != (void *)0x0) {
(this->_sprite)._animState._isPlaying = 0;
}