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

+14 -14
View File
@@ -41,9 +41,9 @@ void GridEntity_Decoration::Update()
ExceptionList = &local_1c;
if ((*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8)))) != 1000) && ((this->_sprite)._loaded != 0)) {
decoration = this;
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Update();
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::Update();
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(this->_sprite)._animState))))->ANM2::GetAnimation(GHIDRA_CAST<std_string *>(animName));
AnimationState::Update(&(this->_sprite)._animState);
AnimationState::Update(&(this->_sprite)._overlayAnimState);
ANM2::GetAnimation(GHIDRA_CAST<ANM2 *>(&(this->_sprite)._animState),GHIDRA_CAST<std_string *>(animName));
animNameData = animName[0];
local_14 = GHIDRA_CAST<std_string *>(0x0);
psVar2 = GHIDRA_CAST<std_string *>(animName);
@@ -197,7 +197,7 @@ void GridEntity_Decoration::BeginBatches()
local_2c._capacity = 0x1f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_2c._buf))) + 0x0))),"gfx/grid/Tiles_Rotgut.anm2",0x1b);
local_8 = 0;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&local_2c,1);
ANM2::Load(&this->_sprite,&local_2c,1);
local_8 = 0xffffffff;
if (0xf < local_2c._capacity) {
uVar10 = local_2c._capacity + 1;
@@ -214,15 +214,15 @@ void GridEntity_Decoration::BeginBatches()
}
iVar5 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
if (iVar5 == 10) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetFrame(GHIDRA_CAST<std_string *>("Ladder"),0);
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>("Ladder"),0);
iVar5 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
}
if (iVar5 == 0x14) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetFrame(GHIDRA_CAST<std_string *>("Ladder"),1);
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>("Ladder"),1);
iVar5 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
}
if (iVar5 == 0x1e) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetFrame(GHIDRA_CAST<std_string *>("Ladder"),2);
ANM2::SetFrame(&this->_sprite,GHIDRA_CAST<std_string *>("Ladder"),2);
ExceptionList = local_10;
return;
}
@@ -249,7 +249,7 @@ void GridEntity_Decoration::BeginBatches()
builtin_strncpy((GHIDRA_CAST<std_string *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) + 0x18)))->_buf,"on.anm2",8);
local_8 = 2;
}
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&local_2c,1);
ANM2::Load(&this->_sprite,&local_2c,1);
local_8 = 0xffffffff;
if (0xf < local_2c._capacity) {
uVar10 = local_2c._capacity + 1;
@@ -263,15 +263,15 @@ void GridEntity_Decoration::BeginBatches()
}
iVar5 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
if (iVar5 == 10) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Play(GHIDRA_CAST<uint8_t *>("Ladder1"),0);
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Ladder1"),0);
iVar5 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
}
if (iVar5 == 0x14) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Play(GHIDRA_CAST<uint8_t *>("Ladder2"),0);
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Ladder2"),0);
iVar5 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
}
if (iVar5 == 0x1e) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Play(GHIDRA_CAST<uint8_t *>("Ladder3"),0);
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Ladder3"),0);
ExceptionList = local_10;
return;
}
@@ -293,7 +293,7 @@ void GridEntity_Decoration::BeginBatches()
((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(local_2c._buf))) + 0x0))))->_capacity = 0x2e646565;
builtin_strncpy((GHIDRA_CAST<std_string *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) + 0x18)))->_buf,"anm2",5);
local_8 = 3;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&local_2c,1);
ANM2::Load(&this->_sprite,&local_2c,1);
local_8 = 0xffffffff;
if (0xf < local_2c._capacity) {
uVar10 = local_2c._capacity + 1;
@@ -321,7 +321,7 @@ void GridEntity_Decoration::BeginBatches()
}
decoration = savedThis;
if (anm2Path._size != 0) {
(GHIDRA_CAST<ANM2 *>((&savedThis->_sprite)))->ANM2::Load(&anm2Path,1);
ANM2::Load(&savedThis->_sprite,&anm2Path,1);
attemptsLeft = 0x14;
LAB_0099b160:
iVar5 = attemptsLeft + -1;
@@ -509,7 +509,7 @@ LAB_0099b3bd:
if (isAnimAccepted != '\0') goto LAB_0099b406;
goto LAB_0099b160;
LAB_0099b406:
psVar4 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(decoration->_sprite)._animState))))->ANM2::GetAnimation(GHIDRA_CAST<std_string *>(curAnimName));
psVar4 = ANM2::GetAnimation(GHIDRA_CAST<ANM2 *>(&(decoration->_sprite)._animState),GHIDRA_CAST<std_string *>(curAnimName));
animNameSize = &psVar4->_size;
if (0xf < psVar4->_capacity) {
psVar4 = *GHIDRA_CAST<std_string **>(psVar4->_buf);