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

+16 -16
View File
@@ -53,9 +53,9 @@ void InviteFriendsMenu::load_graphics()
local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U;
ExceptionList = &local_1c;
local_68 = cursorSprite;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)))))->ANM2::Reset();
ANM2::Reset(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)));
cursorSprite = GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 0x118));
(GHIDRA_CAST<ANM2 *>((cursorSprite)))->ANM2::Reset();
ANM2::Reset(cursorSprite);
anm2Path._size = 0;
anm2Path._capacity = 0xf;
anm2Path._buf[0] = '\0';
@@ -68,7 +68,7 @@ void InviteFriendsMenu::load_graphics()
anm2Path._capacity = 0x1f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/InviteWidget.anm2",0x19);
local_14 = 2;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)))))->ANM2::Load(&anm2Path,1);
ANM2::Load(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)),&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
uVar10 = anm2Path._capacity + 1;
@@ -94,7 +94,7 @@ void InviteFriendsMenu::load_graphics()
anm2Path._capacity = 0x1f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/InviteWidget.anm2",0x19);
local_14 = 3;
(GHIDRA_CAST<ANM2 *>((cursorSprite)))->ANM2::Load(&anm2Path,1);
ANM2::Load(cursorSprite,&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
uVar10 = anm2Path._capacity + 1;
@@ -117,7 +117,7 @@ void InviteFriendsMenu::load_graphics()
anm2Path._capacity = 0x2f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/main menu/InviteFriendsMenu.anm2",0x28);
local_14 = 0;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)))))->ANM2::Load(&anm2Path,1);
ANM2::Load(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)),&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
uVar10 = anm2Path._capacity + 1;
@@ -143,7 +143,7 @@ void InviteFriendsMenu::load_graphics()
anm2Path._capacity = 0x2f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/main menu/InviteFriendsMenu.anm2",0x28);
local_14 = 1;
(GHIDRA_CAST<ANM2 *>((cursorSprite)))->ANM2::Load(&anm2Path,1);
ANM2::Load(cursorSprite,&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
uVar10 = anm2Path._capacity + 1;
@@ -162,9 +162,9 @@ void InviteFriendsMenu::load_graphics()
pbVar5 = *GHIDRA_CAST<uint8_t **>((GHIDRA_CAST<char *>(cursorSprite) + 0x14c));
if (pbVar5 == GHIDRA_CAST<uint8_t *>(0x0)) {
LAB_009c4468:
bVar4 = (GHIDRA_CAST<ANM2 *>((cursorSprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("Cursor"),1);
bVar4 = ANM2::SetAnimation(cursorSprite,GHIDRA_CAST<uint8_t *>("Cursor"),1);
if (bVar4 != 0) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(cursorSprite) + 0x148)))))->AnimationState::Rewind();
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(cursorSprite) + 0x148)));
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(cursorSprite) + 0x15c)) = 1;
}
}
@@ -225,9 +225,9 @@ LAB_009c4455:
pbVar5 = *GHIDRA_CAST<uint8_t **>((GHIDRA_CAST<char *>(cursorSprite) + 0x38));
if (pbVar5 == GHIDRA_CAST<uint8_t *>(0x0)) {
LAB_009c455f:
bVar4 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)))))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("Appear"),1);
bVar4 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(cursorSprite) + 4)),GHIDRA_CAST<uint8_t *>("Appear"),1);
if (bVar4 != 0) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(cursorSprite) + 0x34)))))->AnimationState::Rewind();
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(cursorSprite) + 0x34)));
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(cursorSprite) + 0x48)) = 1;
}
}
@@ -415,7 +415,7 @@ LAB_009c4819:
pageCount = ceil((double)(float)local_54);
local_54 = GHIDRA_CAST<int *>((float)pageCount);
isArrowVisible = 1 < GHIDRA_INT(pageCount);
arrowLayer = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(pvVar3) + 4)))))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>("ArrowUp"));
arrowLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(pvVar3) + 4)),GHIDRA_CAST<uint8_t *>("ArrowUp"));
arrowLayer->_visible = isArrowVisible;
iVar7 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar3) + 0x230)) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar3) + 0x22c));
local_54 = GHIDRA_CAST<int *>(((float)((double)(iVar7 >> 3) + __uint_to_double_fixup[-(iVar7 >> 0x1f)]) /
@@ -424,7 +424,7 @@ LAB_009c4819:
pageCount = ceil((double)(float)local_54);
local_54 = GHIDRA_CAST<int *>((float)pageCount);
isArrowVisible = 1 < GHIDRA_INT(pageCount);
arrowLayer = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(pvVar3) + 4)))))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>("ArrowDown"));
arrowLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(pvVar3) + 4)),GHIDRA_CAST<uint8_t *>("ArrowDown"));
arrowLayer->_visible = isArrowVisible;
*GHIDRA_CAST<uint32_t *>(onlineFriends[1]) = 0;
puVar1 = GHIDRA_CAST<uint32_t *>(*onlineFriends);
@@ -532,13 +532,13 @@ void InviteFriendsMenu::Render()
friendListFrame = GHIDRA_CAST<float *>(0x0);
}
else {
statusFrame = (GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((in_ECX + 0xd)))))->AnimationState::GetNullFrame(GHIDRA_CAST<uint8_t *>("Status"));
statusFrame = AnimationState::GetNullFrame(GHIDRA_CAST<AnimationState *>((in_ECX + 0xd)),GHIDRA_CAST<uint8_t *>("Status"));
if (in_ECX[0xe] == 0) {
friendListFrame = GHIDRA_CAST<float *>(0x0);
}
else {
friendListFrame =
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((in_ECX + 0xd)))))->AnimationState::GetNullFrame(GHIDRA_CAST<uint8_t *>("FriendList"));
AnimationState::GetNullFrame(GHIDRA_CAST<AnimationState *>((in_ECX + 0xd)),GHIDRA_CAST<uint8_t *>("FriendList"));
}
}
if (((*in_ECX == 2) && (statusFrame != GHIDRA_CAST<float *>(0x0))) && (friendListFrame != GHIDRA_CAST<float *>(0x0))) {
@@ -556,7 +556,7 @@ void InviteFriendsMenu::Render()
text = string_table_translate
(GHIDRA_CAST<StringTable *>((extraout_EDX + 0x4a920)),
GHIDRA_CAST<uint8_t *>("#Online/NO_ONLINE_FRIENDS"));
(GHIDRA_CAST<Font *>((statusFont)))->Font::DrawString(text,&local_2c,GHIDRA_CAST<Vector *>((statusFrame + 4)),&local_50,local_b4);
Font::DrawString(statusFont,text,&local_2c,GHIDRA_CAST<Vector *>((statusFrame + 4)),&local_50,local_b4);
ExceptionList = local_10;
return;
}
@@ -668,7 +668,7 @@ void InviteFriendsMenu::Render()
if (iVar1 != iVar2) {
nameColor = &highlightColor;
}
(GHIDRA_CAST<Font *>((nameFont)))->Font::DrawStringScaled((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x4))),&drawPos,nameColor,&local_70);
Font::DrawStringScaled(nameFont,(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_3c)) + 0x4))),&drawPos,nameColor,&local_70);
row = row + 1;
local_8 = 0xffffffff;
friendIndex = GHIDRA_INT(local_20) + 1;