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
@@ -85,11 +85,11 @@ void GridEntity_Poop::Update()
|
||||
local_58 = (float)(*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) / 0xfa);
|
||||
}
|
||||
sprintf_s(animName,0x1f,GHIDRA_CAST<uint8_t *>("State%d"));
|
||||
pvVar3 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetAnimationData(animName);
|
||||
pvVar3 = ANM2::GetAnimationData(&this->_sprite,animName);
|
||||
local_58 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar3) + 0x30));
|
||||
bVar1 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(animName,1);
|
||||
bVar1 = ANM2::SetAnimation(&this->_sprite,animName,1);
|
||||
if (((bVar1 != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) &&
|
||||
((GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_58)),
|
||||
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(local_58)),
|
||||
(this->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(this->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
@@ -106,9 +106,9 @@ void GridEntity_Poop::Update()
|
||||
pbVar4 = (this->_sprite)._animState._animData;
|
||||
if (pbVar4 == GHIDRA_CAST<uint8_t *>(0x0)) {
|
||||
LAB_007149d5:
|
||||
bVar1 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("Appear"),1);
|
||||
bVar1 = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),1);
|
||||
if (bVar1 != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(&(this->_sprite)._animState);
|
||||
(this->_sprite)._animState._isPlaying = 1;
|
||||
}
|
||||
}
|
||||
@@ -212,9 +212,9 @@ LAB_00714b86:
|
||||
pbVar4 = (this->_sprite)._animState._animData;
|
||||
if (pbVar4 == GHIDRA_CAST<uint8_t *>(0x0)) {
|
||||
LAB_00714be2:
|
||||
bVar1 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("State1"),1);
|
||||
bVar1 = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>("State1"),1);
|
||||
if (bVar1 != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(&(this->_sprite)._animState);
|
||||
(this->_sprite)._animState._isPlaying = 1;
|
||||
}
|
||||
}
|
||||
@@ -453,8 +453,8 @@ LAB_00714fce:
|
||||
}
|
||||
}
|
||||
if ((this->_sprite)._loaded != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Update();
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::Update();
|
||||
AnimationState::Update(&(this->_sprite)._animState);
|
||||
AnimationState::Update(&(this->_sprite)._overlayAnimState);
|
||||
}
|
||||
ExceptionList = local_1c;
|
||||
return;
|
||||
@@ -689,7 +689,7 @@ LAB_00715bc8:
|
||||
giantAnm2Path._capacity = 0x1f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(giantAnm2Path._buf))) + 0x0))),"gfx/grid/grid_poop_giant.anm2",0x1e);
|
||||
ehState = 0;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&giantAnm2Path,1);
|
||||
ANM2::Load(&this->_sprite,&giantAnm2Path,1);
|
||||
ehState = 0xffffffff;
|
||||
if (0xf < giantAnm2Path._capacity) {
|
||||
uVar4 = giantAnm2Path._capacity + 1;
|
||||
@@ -720,7 +720,7 @@ LAB_00715bc8:
|
||||
anm2Path._capacity = 0x1f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/grid/grid_poop.anm2",0x18);
|
||||
ehState = 1;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&anm2Path,0);
|
||||
ANM2::Load(&this->_sprite,&anm2Path,0);
|
||||
ehState = 0xffffffff;
|
||||
if (0xf < anm2Path._capacity) {
|
||||
uVar4 = anm2Path._capacity + 1;
|
||||
@@ -871,7 +871,7 @@ LAB_00716065:
|
||||
spritesheetPathSize = 0;
|
||||
spritesheetPathCapacity = 0xf;
|
||||
spritesheetPathString[0] = GHIDRA_CAST<uint8_t *******>((GHIDRA_UINT(spritesheetPathString[0]) & 0xffffff00));
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::LoadGraphics(isSameSpritesheet);
|
||||
ANM2::LoadGraphics(&this->_sprite,isSameSpritesheet);
|
||||
LAB_007162ed:
|
||||
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) == 1000) {
|
||||
iVar3 = 4;
|
||||
@@ -889,11 +889,11 @@ LAB_007162ed:
|
||||
}
|
||||
if (*GHIDRA_CAST<char *>(g_game->_room) == '\0') {
|
||||
sprintf_s(stateAnimName,0x1f,GHIDRA_CAST<uint8_t *>("State%d"));
|
||||
pvVar8 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetAnimationData(stateAnimName);
|
||||
pvVar8 = ANM2::GetAnimationData(&this->_sprite,stateAnimName);
|
||||
local_1ac = *GHIDRA_CAST<Entity **>((GHIDRA_CAST<char *>(pvVar8) + 0x30));
|
||||
isSameSpritesheet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(stateAnimName,1);
|
||||
isSameSpritesheet = ANM2::SetAnimation(&this->_sprite,stateAnimName,1);
|
||||
if (((isSameSpritesheet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) &&
|
||||
((GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_1ac)),
|
||||
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(local_1ac)),
|
||||
(this->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(this->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
@@ -960,9 +960,9 @@ LAB_007163ec:
|
||||
}
|
||||
pcVar10 = GHIDRA_CAST<char *>(playStateAnimName);
|
||||
}
|
||||
isSameSpritesheet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(pcVar10),1);
|
||||
isSameSpritesheet = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(pcVar10),1);
|
||||
if (isSameSpritesheet != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(&(this->_sprite)._animState);
|
||||
(this->_sprite)._animState._isPlaying = 1;
|
||||
}
|
||||
}
|
||||
@@ -986,7 +986,7 @@ LAB_00716493:
|
||||
ExceptionList = prevExceptionList;
|
||||
return;
|
||||
}
|
||||
spawnLayer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(s_Spawn);
|
||||
spawnLayer = ANM2::GetLayer(&this->_sprite,s_Spawn);
|
||||
if (spawnLayer != GHIDRA_CAST<LayerState *>(0x0)) {
|
||||
(spawnLayer->_color)._colorize[0] = 1.9;
|
||||
(spawnLayer->_color)._colorize[1] = 2.0;
|
||||
@@ -1034,9 +1034,9 @@ LAB_0071660b:
|
||||
if ((uVar4 == 0) && ((pbVar7[0x34] == 0 || ((pEVar5->_sprite)._animState._isPlaying != 0))))
|
||||
goto LAB_00716637;
|
||||
}
|
||||
isSameSpritesheet = (GHIDRA_CAST<ANM2 *>((&pEVar5->_sprite)))->ANM2::SetAnimation(s_Idle,1);
|
||||
isSameSpritesheet = ANM2::SetAnimation(&pEVar5->_sprite,s_Idle,1);
|
||||
if (isSameSpritesheet != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(pEVar5->_sprite)._animState)))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(&(pEVar5->_sprite)._animState);
|
||||
(pEVar5->_sprite)._animState._isPlaying = 1;
|
||||
}
|
||||
}
|
||||
@@ -1059,11 +1059,11 @@ void GridEntity_Poop::RespawnRedPoop()
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) = 1000;
|
||||
this->_reviveTimer = 0x78;
|
||||
this->_collisionClass = 0;
|
||||
animData = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetAnimationData(GHIDRA_CAST<uint8_t *>("State5"));
|
||||
animData = ANM2::GetAnimationData(&this->_sprite,GHIDRA_CAST<uint8_t *>("State5"));
|
||||
frameCount = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(animData) + 0x30));
|
||||
isAnimSet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>("State5"),1);
|
||||
isAnimSet = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>("State5"),1);
|
||||
if ((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)frameCount);
|
||||
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)frameCount);
|
||||
if ((this->_sprite)._animState._animData != (void *)0x0) {
|
||||
(this->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user