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

+23 -23
View File
@@ -33,10 +33,10 @@ void Menu_DailyChallenge::Update()
return;
}
if (((g_manager->_framecount & 1) == 0) && (*GHIDRA_CAST<char *>((this + 0x5f)) != '\0')) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2)))))))->AnimationState::Update();
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x21])) + 0x1)))))))->AnimationState::Update();
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2)))));
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x21])) + 0x1)))));
}
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x69])) + 0x1)))))))->ANM2::update_appear_then_idle();
ANM2::update_appear_then_idle(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x69])) + 0x1)))));
(GHIDRA_CAST<GenericPrompt *>((GHIDRA_CAST<GenericPrompt *>((this + 0xd0)))))->GenericPrompt::Update(1);
if (*GHIDRA_CAST<int *>(this) == 0) {
daily_challenge_refresh();
@@ -131,7 +131,7 @@ void Menu_DailyChallenge::Update()
input_poll_active_device();
DAT_00c5ab40 = 0;
FUN_00a51aa0();
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[6])) + 0x2)))))))->ANM2::Play(GHIDRA_CAST<uint8_t *>("Loading"),0);
ANM2::Play(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[6])) + 0x2)))),GHIDRA_CAST<uint8_t *>("Loading"),0);
break;
case 1:
bVar1 = show_beta_disclaimer_popup(1,FUN_008d0ed0,this);
@@ -158,9 +158,9 @@ void Menu_DailyChallenge::Update()
animData = *GHIDRA_CAST<uint8_t **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x1a9])) + 0x1))));
if (animData == GHIDRA_CAST<uint8_t *>(0x0)) {
code_r0x008cf92b:
bVar1 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((this + 0x198)))))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("Appear"),1);
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((this + 0x198)),GHIDRA_CAST<uint8_t *>("Appear"),1);
if (bVar1 != 0) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((this + 0x1a8)))))->AnimationState::Rewind();
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((this + 0x1a8)));
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x1ae])) + 0x2))) = 1;
}
}
@@ -442,7 +442,7 @@ LAB_008cfe75:
iVar4 = GHIDRA_INT(pbVar2) - GHIDRA_INT((animName + 1));
}
text_convert_encoding(animName,iVar4,0,playerNameWide,0x200,1);
iVar4 = (GHIDRA_CAST<Font *>((font)))->Font::get_string_width_utf16(playerNameWide,-1);
iVar4 = Font::get_string_width_utf16(font,playerNameWide,-1);
local_18 = (uint8_t *)
(175.0 / (float)((double)iVar4 + __uint_to_double_fixup[-(iVar4 >> 0x1f)]));
if ((float)local_18 <= 0.0) {
@@ -468,7 +468,7 @@ LAB_008cfe75:
,(float)local_18,color,&local_480);
local_8 = 0xffffffff;
}
text2Layer = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[6])) + 0x2)))))))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>("Text2"));
text2Layer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[6])) + 0x2)))),GHIDRA_CAST<uint8_t *>("Text2"));
if (text2Layer == GHIDRA_CAST<LayerState *>(0x0)) {
KAGE_LogMessage(4,GHIDRA_CAST<uint8_t *>("[warn] no layer named %s\n"));
}
@@ -477,17 +477,17 @@ LAB_008cfe75:
if (iVar4 == 0) {
if (*GHIDRA_CAST<int *>((this + 0x18)) == 0) goto LAB_008d033d;
scoreNullFrame =
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2)))))))->AnimationState::GetNullFrame(GHIDRA_CAST<uint8_t *>("Score"));
AnimationState::GetNullFrame(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2)))),GHIDRA_CAST<uint8_t *>("Score"));
if (scoreNullFrame != GHIDRA_CAST<float *>(0x0)) {
sprintf_s(GHIDRA_CAST<uint8_t *>(&local_3c._green),0x10,s__d);
iVar4 = (GHIDRA_CAST<Font *>((font)))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>(&local_3c._green),-1);
iVar4 = Font::get_string_width_n(font,GHIDRA_CAST<uint8_t *>(&local_3c._green),-1);
fVar6 = renderX + *scoreNullFrame;
fVar7 = renderY + scoreNullFrame[1];
(GHIDRA_CAST<FontSettings *>((scoreFontSettings)))->FontSettings::constructor();
FontSettings::constructor(scoreFontSettings);
local_8 = 2;
(GHIDRA_CAST<KColor *>((GHIDRA_CAST<KColor *>(local_28))))->KColor::SetFromARGB(0xff362f2d);
font = selectedFont;
(GHIDRA_CAST<Font *>((selectedFont)))->Font::DrawString(GHIDRA_CAST<uint8_t *>(&local_3c._green),color_00,settings,
Font::DrawString(selectedFont,GHIDRA_CAST<uint8_t *>(&local_3c._green),color_00,settings,
fVar6 - (float)(iVar4 / 2),fVar7 - 8.0);
local_8 = 0xffffffff;
local_48c = 0;
@@ -507,7 +507,7 @@ LAB_008cfe75:
animName = &DAT_00b75810;
}
sprintf_s(local_28 + 4,0x10,animName);
(GHIDRA_CAST<Font *>((font)))->Font::get_string_width_n(local_28 + 4,-1);
Font::get_string_width_n(font,local_28 + 4,-1);
fVar7 = renderX + *scoreNullFrame;
fVar6 = renderY + scoreNullFrame[1];
fontSettings = 0;
@@ -521,7 +521,7 @@ LAB_008cfe75:
(GHIDRA_CAST<KColor *>((&local_478)))->KColor::SetFromARGB(0xff362f2d);
pos.y = fVar6;
pos.x = fVar7;
(GHIDRA_CAST<Font *>((font)))->Font::DrawString(local_28 + 4,pos,(Vector)0x3f4000003f400000,color_01,
Font::DrawString(font,local_28 + 4,pos,(Vector)0x3f4000003f400000,color_01,
GHIDRA_CAST<FontSettings *>(&fontSettings));
local_8 = 0xffffffff;
}
@@ -531,7 +531,7 @@ LAB_008cfe75:
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2)))),GHIDRA_CAST<uint8_t *>("BestStreak")),
scoreNullFrame != GHIDRA_CAST<float *>(0x0))) {
sprintf_s(GHIDRA_CAST<uint8_t *>(&local_3c._green),0x10,s__d);
(GHIDRA_CAST<Font *>((font)))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>(&local_3c._green),-1);
Font::get_string_width_n(font,GHIDRA_CAST<uint8_t *>(&local_3c._green),-1);
fVar7 = renderX + *scoreNullFrame;
fVar6 = renderY + scoreNullFrame[1];
fontSettings = 0;
@@ -545,14 +545,14 @@ LAB_008cfe75:
(GHIDRA_CAST<KColor *>((&local_478)))->KColor::SetFromARGB(0xff362f2d);
pos_00.y = fVar6;
pos_00.x = fVar7;
(GHIDRA_CAST<Font *>((font)))->Font::DrawString(GHIDRA_CAST<uint8_t *>(&local_3c._green),pos_00,(Vector)0x3f4000003f400000,color_02,
Font::DrawString(font,GHIDRA_CAST<uint8_t *>(&local_3c._green),pos_00,(Vector)0x3f4000003f400000,color_02,
GHIDRA_CAST<FontSettings *>(&fontSettings));
}
}
}
LAB_008d033d:
sprintf_s(GHIDRA_CAST<uint8_t *>(&local_3c._blue),10,GHIDRA_CAST<uint8_t *>("%02d:%02d:%02d"));
uVar1 = (GHIDRA_CAST<Font *>((font)))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>(&local_3c._blue),-1);
uVar1 = Font::get_string_width_n(font,GHIDRA_CAST<uint8_t *>(&local_3c._blue),-1);
fVar7 = renderY + 78.0;
fontSettings = 0;
local_45c = 0xffff;
@@ -564,7 +564,7 @@ LAB_008d033d:
fVar6 = (398.0 - ((float)(uVar1 >> 1) + 0.0)) + renderX;
local_8 = 5;
(GHIDRA_CAST<KColor *>((&local_478)))->KColor::SetFromARGB(0xff362f2d);
(GHIDRA_CAST<Font *>((font)))->Font::DrawString(GHIDRA_CAST<uint8_t *>(&local_3c._blue),color_03,&fontSettings,fVar6,fVar7);
Font::DrawString(font,GHIDRA_CAST<uint8_t *>(&local_3c._blue),color_03,&fontSettings,fVar6,fVar7);
local_8 = 0xffffffff;
(GHIDRA_CAST<GenericPopup *>((GHIDRA_CAST<GenericPopup *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x69])) + 0x1)))))))->GenericPopup::Render();
(GHIDRA_CAST<GenericPrompt *>((GHIDRA_CAST<GenericPrompt *>((this + 0xd0)))))->GenericPrompt::Render();
@@ -603,7 +603,7 @@ void Menu_DailyChallenge::load_graphics()
anm2Path._capacity = 0x2f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/main menu/Menu_DailyRun.anm2",0x24);
local_14 = 0;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[6])) + 0x2)))))))->ANM2::Load(&anm2Path,1);
ANM2::Load(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[6])) + 0x2)))),&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
freeSize = anm2Path._capacity + 1;
@@ -618,8 +618,8 @@ void Menu_DailyChallenge::load_graphics()
}
operator_delete(freeBlock,freeSize);
}
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((this + 0x13c)))))->ANM2::Reset();
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((this + 0x198)))))->ANM2::Reset();
ANM2::Reset(GHIDRA_CAST<ANM2 *>((this + 0x13c)));
ANM2::Reset(GHIDRA_CAST<ANM2 *>((this + 0x198)));
anm2Path._size = 0;
anm2Path._capacity = 0xf;
anm2Path._buf[0] = '\0';
@@ -631,7 +631,7 @@ void Menu_DailyChallenge::load_graphics()
anm2Path._capacity = 0x1f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/ScoreMenu.anm2",0x16);
local_14 = 1;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((this + 0x13c)))))->ANM2::Load(&anm2Path,1);
ANM2::Load(GHIDRA_CAST<ANM2 *>((this + 0x13c)),&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
freeSize = anm2Path._capacity + 1;
@@ -657,7 +657,7 @@ void Menu_DailyChallenge::load_graphics()
leaderboardPath._capacity = 0x1f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(leaderboardPath._buf))) + 0x0))),"gfx/ui/LeaderboardMenu.anm2",0x1c);
local_14 = 2;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((this + 0x198)))))->ANM2::Load(&leaderboardPath,1);
ANM2::Load(GHIDRA_CAST<ANM2 *>((this + 0x198)),&leaderboardPath,1);
local_14 = 0xffffffff;
if (0xf < leaderboardPath._capacity) {
freeSize = leaderboardPath._capacity + 1;