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:
1 parent
d6e1ca7c6c
commit
780767f5e1
161 files changed
+8646
-21919
No files matched your search
@@ -11,15 +11,15 @@ RevivePlayerMenu::~RevivePlayerMenu()
|
||||
local_10 = ExceptionList;
|
||||
ExceptionList = &local_10;
|
||||
local_8 = 0;
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x124)))))->ANM2::Reset();
|
||||
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x174)))))->AnimationState::~AnimationState();
|
||||
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x154)))))->AnimationState::~AnimationState();
|
||||
ANM2::Reset(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x124)));
|
||||
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x174)));
|
||||
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x154)));
|
||||
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((GHIDRA_INT(this) + 0x13c)))))->msvc::string::_Tidy_deallocate();
|
||||
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((GHIDRA_INT(this) + 0x124)))))->msvc::string::_Tidy_deallocate();
|
||||
local_8 = 1;
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x10)))))->ANM2::Reset();
|
||||
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x60)))))->AnimationState::~AnimationState();
|
||||
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x40)))))->AnimationState::~AnimationState();
|
||||
ANM2::Reset(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x10)));
|
||||
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x60)));
|
||||
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x40)));
|
||||
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((GHIDRA_INT(this) + 0x28)))))->msvc::string::_Tidy_deallocate();
|
||||
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((GHIDRA_INT(this) + 0x10)))))->msvc::string::_Tidy_deallocate();
|
||||
ExceptionList = local_10;
|
||||
@@ -60,7 +60,7 @@ void RevivePlayerMenu::Init()
|
||||
menuAnmPath._capacity = 0x1f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(menuAnmPath._buf))) + 0x0))),"gfx/ui/Menu_RevivePlayer.anm2",0x1e);
|
||||
local_14 = 0;
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x10)))))->ANM2::Load(&menuAnmPath,1);
|
||||
ANM2::Load(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x10)),&menuAnmPath,1);
|
||||
local_14 = 0xffffffff;
|
||||
if (0xf < menuAnmPath._capacity) {
|
||||
uVar3 = menuAnmPath._capacity + 1;
|
||||
@@ -78,9 +78,9 @@ void RevivePlayerMenu::Init()
|
||||
curAnim = *GHIDRA_CAST<uint8_t **>((GHIDRA_CAST<char *>(this) + 0x44));
|
||||
if (curAnim == GHIDRA_CAST<uint8_t *>(0x0)) {
|
||||
LAB_008ef6a3:
|
||||
bVar1 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x10)))))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("Background"),1);
|
||||
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x10)),GHIDRA_CAST<uint8_t *>("Background"),1);
|
||||
if (bVar1 != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x40)))))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x40)));
|
||||
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0x54)) = 1;
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ LAB_008ef695:
|
||||
selectorAnmPath._capacity = 0x2f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(selectorAnmPath._buf))) + 0x0))),"gfx/ui/RevivePlayer_Selector.anm2",0x22);
|
||||
local_14 = 1;
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x124)))))->ANM2::Load(&selectorAnmPath,1);
|
||||
ANM2::Load(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x124)),&selectorAnmPath,1);
|
||||
local_14 = 0xffffffff;
|
||||
if (0xf < selectorAnmPath._capacity) {
|
||||
uVar3 = selectorAnmPath._capacity + 1;
|
||||
@@ -166,9 +166,9 @@ LAB_008ef7c5:
|
||||
if ((uVar3 == 0) && ((curAnim[0x34] == 0 || (*GHIDRA_CAST<char *>((GHIDRA_CAST<char *>(this) + 0x168)) != '\0'))))
|
||||
goto LAB_008ef7f1;
|
||||
}
|
||||
bVar1 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x124)))))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("UpperSelector"),1);
|
||||
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(this) + 0x124)),GHIDRA_CAST<uint8_t *>("UpperSelector"),1);
|
||||
if (bVar1 != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x154)))))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((GHIDRA_INT(this) + 0x154)));
|
||||
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0x168)) = 1;
|
||||
}
|
||||
LAB_008ef7f1:
|
||||
@@ -214,20 +214,20 @@ void RevivePlayerMenu::Render()
|
||||
if (((*in_ECX == 1) && (iVar1 != 0)) && ((game->_hud)._isVisible != 0)) {
|
||||
textPos.x = g_screenWidth * 0.5;
|
||||
textPos.y = g_screenHeight * 0.5;
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((in_ECX + 4)))))->ANM2::Render(&textPos,&g_vectorZero,&g_vectorZero);
|
||||
ANM2::Render(GHIDRA_CAST<ANM2 *>((in_ECX + 4)),&textPos,&g_vectorZero,&g_vectorZero);
|
||||
manager = g_manager;
|
||||
iVar1 = (GHIDRA_CAST<Font *>((&g_manager->_font2_TeamMeatEx12)))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>("REVIVE PLAYER"),-1);
|
||||
iVar1 = Font::get_string_width_n(&g_manager->_font2_TeamMeatEx12,GHIDRA_CAST<uint8_t *>("REVIVE PLAYER"),-1);
|
||||
local_18.y = (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)]);
|
||||
if (in_ECX[0x11] == 0) {
|
||||
nullFrame = GHIDRA_CAST<float *>(0x0);
|
||||
}
|
||||
else {
|
||||
nullFrame = (GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((in_ECX + 0x10)))))->AnimationState::GetNullFrame(GHIDRA_CAST<uint8_t *>("Title"));
|
||||
nullFrame = AnimationState::GetNullFrame(GHIDRA_CAST<AnimationState *>((in_ECX + 0x10)),GHIDRA_CAST<uint8_t *>("Title"));
|
||||
manager = g_manager;
|
||||
}
|
||||
textPos.y = textPos.y + nullFrame[1];
|
||||
textPos.x = (textPos.x + *nullFrame) - local_18.y * 0.5;
|
||||
(GHIDRA_CAST<FontSettings *>((fontSettings)))->FontSettings::constructor();
|
||||
FontSettings::constructor(fontSettings);
|
||||
local_8 = 0;
|
||||
(GHIDRA_CAST<KColor *>((&white)))->KColor::SetFromARGB(0xffffffff);
|
||||
Font::DrawStringScaled
|
||||
@@ -252,8 +252,8 @@ void RevivePlayerMenu::Render()
|
||||
local_18.y = local_18.y + 65.0;
|
||||
anim = "UpperSelector";
|
||||
}
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((menu + 0x49)))))->ANM2::Play(GHIDRA_CAST<uint8_t *>(anim),0);
|
||||
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((menu + 0x49)))))->ANM2::Render(&local_18,&g_vectorZero,&g_vectorZero);
|
||||
ANM2::Play(GHIDRA_CAST<ANM2 *>((menu + 0x49)),GHIDRA_CAST<uint8_t *>(anim),0);
|
||||
ANM2::Render(GHIDRA_CAST<ANM2 *>((menu + 0x49)),&local_18,&g_vectorZero,&g_vectorZero);
|
||||
}
|
||||
ExceptionList = local_10;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user