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

+20 -20
View File
@@ -31,7 +31,7 @@ void Menu_Online::render_mode_select()
local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U;
isKeyboard = g_menuControllerIndex == 0;
lobbyGameMode = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((g_manager->_lobbySettings))) + 0x4))));
backKeyLayer = (GHIDRA_CAST<ANM2 *>((in_ECX)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>("BackKey"));
backKeyLayer = ANM2::GetLayer(in_ECX,GHIDRA_CAST<uint8_t *>("BackKey"));
local_48 = 0;
backKeyLayer->_visible = isKeyboard;
pvStack_5c = in_ECX[7]._overlayAnimState._nullLayerFrames;
@@ -74,7 +74,7 @@ void Menu_Online::render_mode_select()
gameMode = iVar1;
do {
if (((iVar1 != 4) || (buttonIdx != 4)) && ((in_ECX->_animState)._animData != (void *)0x0)) {
nullFrame = (GHIDRA_CAST<AnimationState *>((&in_ECX->_animState)))->AnimationState::GetNullFrame((&PTR_DAT_00b756f0)[buttonIdx]);
nullFrame = AnimationState::GetNullFrame(&in_ECX->_animState,(&PTR_DAT_00b756f0)[buttonIdx]);
if (nullFrame != GHIDRA_CAST<float *>(0x0)) {
nullPos.x = originX + *nullFrame + 0.0;
nullPos.y = (float)-*GHIDRA_CAST<int *>((buttonLoaded + 0x13)) + originY + nullFrame[1];
@@ -100,7 +100,7 @@ void Menu_Online::render_mode_select()
buttonLoaded = buttonLoaded + 0x120;
} while (buttonIdx < 6);
if ((iVar1 == 4) && ((in_ECX->_animState)._animData != (void *)0x0)) {
nullFrame = (GHIDRA_CAST<AnimationState *>((&in_ECX->_animState)))->AnimationState::GetNullFrame(GHIDRA_CAST<uint8_t *>("ChallengeBox"));
nullFrame = AnimationState::GetNullFrame(&in_ECX->_animState,GHIDRA_CAST<uint8_t *>("ChallengeBox"));
if (nullFrame != GHIDRA_CAST<float *>(0x0)) {
nullPos.x = originX + *nullFrame;
nullPos.y = originY + nullFrame[1];
@@ -117,7 +117,7 @@ void Menu_Online::render_mode_select()
nullFrame = GHIDRA_CAST<float *>(0x0);
}
else {
nullFrame = (GHIDRA_CAST<AnimationState *>((&in_ECX->_animState)))->AnimationState::GetNullFrame(GHIDRA_CAST<uint8_t *>("BackButton"));
nullFrame = AnimationState::GetNullFrame(&in_ECX->_animState,GHIDRA_CAST<uint8_t *>("BackButton"));
}
nullPos.x = *nullFrame + menuPos.x;
nullPos.y = nullFrame[1] + menuPos.y;
@@ -154,8 +154,8 @@ void Menu_Online::Update()
return;
}
if (((g_manager->_framecount & 1) == 0) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x10d))) != '\0')) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))))))->AnimationState::Update();
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x54)))))))->AnimationState::Update();
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))));
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x54)))));
}
upAction = 0x16;
isActionTriggered =
@@ -213,11 +213,11 @@ LAB_008e4c65:
if (iVar2 != 4) goto LAB_008e4cc5;
entryAnim = "Options";
}
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x118)))))))->ANM2::Play(GHIDRA_CAST<uint8_t *>(entryAnim),0);
ANM2::Play(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x118)))),GHIDRA_CAST<uint8_t *>(entryAnim),0);
LAB_008e4cc5:
if (((g_manager->_framecount & 1) != 0) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x221))) != '\0')) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x148)))))))->AnimationState::Update();
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x168)))))))->AnimationState::Update();
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x148)))));
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x168)))));
}
menuAction = 0xe;
isActionTriggered =
@@ -257,12 +257,12 @@ LAB_008e4cc5:
MenuManager::push_menu(0x14,unused);
}
}
cursorLayer = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))))))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>("Cursor"));
cursorLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),GHIDRA_CAST<uint8_t *>("Cursor"));
if (cursorLayer == GHIDRA_CAST<LayerState *>(0x0)) {
KAGE_LogMessage(4,GHIDRA_CAST<uint8_t *>("[warn] no layer named %s\n"));
return;
}
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))))))->ANM2::SetLayerFrame(*GHIDRA_CAST<int *>(cursorLayer->_layerData),this->_state);
ANM2::SetLayerFrame(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),*GHIDRA_CAST<int *>(cursorLayer->_layerData),this->_state);
return;
}
@@ -298,7 +298,7 @@ void Menu_Online::Render()
local_24 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(&descriptor) + 0x34U));
ExceptionList = &local_1c;
isKeyboard = g_menuControllerIndex == 0;
backKeyLayer = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))))))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>("BackKey"));
backKeyLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),GHIDRA_CAST<uint8_t *>("BackKey"));
backKeyLayer->_visible = isKeyboard;
renderPos.x = (g_menuManager->_ViewPosition).x + *GHIDRA_CAST<float *>((this + 1));
renderPos.y = (g_menuManager->_ViewPosition).y + *GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[1])) + 0x4))));
@@ -478,9 +478,9 @@ void Menu_Online::enter()
animData = *GHIDRA_CAST<uint8_t **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x38))));
if (animData == GHIDRA_CAST<uint8_t *>(0x0)) {
LAB_008e52d3:
bVar1 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))))))->ANM2::SetAnimation(s_Idle,1);
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),s_Idle,1);
if (bVar1 != 0) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))))))->AnimationState::Rewind();
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))));
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x48))) = 1;
}
}
@@ -604,7 +604,7 @@ void Menu_Online::start_quick_match()
(manager->_dailyChallenge)._seed = 0;
(manager->_dailyChallenge)._specialDailyId = 0;
(manager->_dailyChallenge)._isPractice = 0;
(GHIDRA_CAST<ChallengeParam *>((&(manager->_dailyChallenge)._params)))->ChallengeParam::Reset();
ChallengeParam::Reset(&(manager->_dailyChallenge)._params);
(GHIDRA_CAST<LobbySettings *>((&g_manager->_lobbySettings)))->LobbySettings::reset();
popupSize.x = (float)&DAT_bf800000;
popupSize.y = (float)&DAT_bf800000;
@@ -885,7 +885,7 @@ LAB_008e5f30:
if (0xf < psVar1[-1]._capacity) {
lineChars = *GHIDRA_CAST<std_string **>(psVar3->_buf);
}
uVar4 = (GHIDRA_CAST<Font *>((font)))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>(lineChars),-1);
uVar4 = Font::get_string_width_n(font,GHIDRA_CAST<uint8_t *>(lineChars),-1);
if (0x9f < uVar4) {
local_44 = GHIDRA_CAST<uint8_t *>(*lastLineSize);
puVar5 = local_44 + -1;
@@ -939,7 +939,7 @@ LAB_008e5d7f:
if (0xf < lineChars->_capacity) {
psVar1 = *GHIDRA_CAST<std_string **>(lineChars->_buf);
}
pvVar2 = (GHIDRA_CAST<Font *>((font)))->Font::measure_string(tmpLine._buf + 8,GHIDRA_CAST<uint8_t *>(psVar1),&fontParams,&g_vectorOne);
pvVar2 = Font::measure_string(font,tmpLine._buf + 8,GHIDRA_CAST<uint8_t *>(psVar1),&fontParams,&g_vectorOne);
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 5;
color._blue = 0.1764706;
color._red = 0.21176471;
@@ -1533,7 +1533,7 @@ void Menu_Online::render_descriptions()
if (0xf < tmpStringCapacity) {
pppppbVar4 = tmpString[0];
}
(GHIDRA_CAST<Font *>((pFVar3)))->Font::DrawStringScaled(GHIDRA_CAST<uint8_t *>(pppppbVar4),&labelPos,&textColor,&fontSettings);
Font::DrawStringScaled(pFVar3,GHIDRA_CAST<uint8_t *>(pppppbVar4),&labelPos,&textColor,&fontSettings);
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0;
if (0xf < tmpStringCapacity) {
uVar5 = tmpStringCapacity + 1;
@@ -1566,7 +1566,7 @@ void Menu_Online::render_descriptions()
local_78 = 0;
local_7c = 0xffff;
fontSettings = 2;
(GHIDRA_CAST<Font *>((&g_manager->_font1_TeamMeatEx10)))->Font::DrawStringScaled(countText,pos,&textColor,&fontSettings);
Font::DrawStringScaled(&g_manager->_font1_TeamMeatEx10,countText,pos,&textColor,&fontSettings);
rowY = rowY + 14.0;
labelPos.y = rowY;
if (statIndex == *GHIDRA_CAST<int *>((in_ECX + 0x124))) {
@@ -1646,7 +1646,7 @@ void Menu_Online::render_descriptions()
if (0xf < descriptionTextCapacity) {
pppppbVar4 = descriptionText[0];
}
(GHIDRA_CAST<Font *>((pFVar3)))->Font::DrawStringScaled(GHIDRA_CAST<uint8_t *>(pppppbVar4),&descriptionPos,&textColor,&fontSettings);
Font::DrawStringScaled(pFVar3,GHIDRA_CAST<uint8_t *>(pppppbVar4),&descriptionPos,&textColor,&fontSettings);
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 5;
if (0xf < descriptionTextCapacity) {
uVar5 = descriptionTextCapacity + 1;