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
@@ -72,8 +72,8 @@ void GridEntity_Pit::Update()
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) = 2;
|
||||
}
|
||||
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);
|
||||
}
|
||||
if (1 < GHIDRA_UINT((this->_sprite)._layerCount)) {
|
||||
pGVar8 = GHIDRA_CAST<Game *>((*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) + -2));
|
||||
@@ -91,10 +91,10 @@ void GridEntity_Pit::Update()
|
||||
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("id out of bounds\n"));
|
||||
}
|
||||
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar11 * 4)) = 0;
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::AdvanceLayerPosition(iVar11,(float)GHIDRA_INT(local_dc));
|
||||
AnimationState::AdvanceLayerPosition(&(this->_sprite)._animState,iVar11,(float)GHIDRA_INT(local_dc));
|
||||
}
|
||||
iVar11 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc))));
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
||||
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
||||
layer->_visible = 1 < iVar11;
|
||||
}
|
||||
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) == 3) {
|
||||
@@ -344,10 +344,10 @@ LAB_00713111:
|
||||
(float)((double)GHIDRA_INT(uVar9) + __uint_to_double_fixup[-(GHIDRA_INT(uVar9) >> 0x1f)]) *
|
||||
2.3283064e-10 * 0.2 + 0.1);
|
||||
other = extraout_EAX;
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&pEVar5->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
||||
layer = ANM2::GetLayer(&pEVar5->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
||||
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&layer->_color))))->Color::operator_assign(other);
|
||||
(GHIDRA_CAST<BlendMode *>((&iStack_7c)))->BlendMode::SetMode(2,unusedArg_01);
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&pEVar5->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
||||
layer = ANM2::GetLayer(&pEVar5->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
||||
layer->_blendMode[0] = iStack_7c;
|
||||
layer->_blendMode[1] = GHIDRA_INT(local_78);
|
||||
layer->_blendMode[2] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_78)) + 0x4)));
|
||||
@@ -705,7 +705,7 @@ void GridEntity_Pit::BeginBatches()
|
||||
anm2Path._capacity = 0x1f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/grid/grid_pit.anm2",0x17);
|
||||
local_8 = 2;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&anm2Path,0);
|
||||
ANM2::Load(&this->_sprite,&anm2Path,0);
|
||||
local_8 = 0xffffffff;
|
||||
if (0xf < anm2Path._capacity) {
|
||||
uVar3 = anm2Path._capacity + 1;
|
||||
@@ -734,7 +734,7 @@ void GridEntity_Pit::BeginBatches()
|
||||
anm2Path._capacity = 0x1f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/grid/grid_pit_water.anm2",0x1d);
|
||||
local_8 = 0;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&anm2Path,0);
|
||||
ANM2::Load(&this->_sprite,&anm2Path,0);
|
||||
local_8 = 0xffffffff;
|
||||
if (0xf < anm2Path._capacity) {
|
||||
uVar3 = anm2Path._capacity + 1;
|
||||
@@ -755,9 +755,9 @@ void GridEntity_Pit::BeginBatches()
|
||||
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(anm2Path._buf)) + 0x0))) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(anm2Path._buf)) + 0x0))) & 0xffffff00;
|
||||
if (pbVar7 == GHIDRA_CAST<uint8_t *>(0x0)) {
|
||||
LAB_00713a2c:
|
||||
bVar2 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetOverlayAnimation(GHIDRA_CAST<uint8_t *>("highlights"),1);
|
||||
bVar2 = ANM2::SetOverlayAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>("highlights"),1);
|
||||
if (bVar2 != 0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::Rewind();
|
||||
AnimationState::Rewind(&(this->_sprite)._overlayAnimState);
|
||||
(this->_sprite)._overlayAnimState._isPlaying = 1;
|
||||
}
|
||||
}
|
||||
@@ -788,7 +788,7 @@ LAB_00713a16:
|
||||
((pbVar7[0x34] != 0 && ((this->_sprite)._overlayAnimState._isPlaying == 0))))
|
||||
goto LAB_00713a2c;
|
||||
}
|
||||
pvVar5 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetAnimationData(GHIDRA_CAST<uint8_t *>("highlights"));
|
||||
pvVar5 = ANM2::GetAnimationData(&this->_sprite,GHIDRA_CAST<uint8_t *>("highlights"));
|
||||
uVar3 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(pvVar5) + 0x30));
|
||||
if (uVar3 == 0) {
|
||||
startFrame = 0;
|
||||
@@ -798,7 +798,7 @@ LAB_00713a16:
|
||||
startFrame = startFrame % uVar3;
|
||||
}
|
||||
if ((this->_sprite)._overlayAnimState._animData != (void *)0x0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(startFrame));
|
||||
AnimationState::SetFrameFloat(&(this->_sprite)._overlayAnimState,(float)GHIDRA_INT(startFrame));
|
||||
}
|
||||
pvVar5 = g_game->_room;
|
||||
pbVar7 = GHIDRA_CAST<uint8_t *>((GHIDRA_INT(pvVar5) + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar5) + 0x1d18)) * 0x13c + 0x1ddc));
|
||||
@@ -923,10 +923,10 @@ LAB_00713e5d:
|
||||
operator_delete(pcVar6,uVar3);
|
||||
bVar2 = extraout_CL_00;
|
||||
}
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::LoadGraphics(bVar2);
|
||||
bVar2 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(&DAT_00b68fb8,1);
|
||||
ANM2::LoadGraphics(&this->_sprite,bVar2);
|
||||
bVar2 = ANM2::SetAnimation(&this->_sprite,&DAT_00b68fb8,1);
|
||||
if (((bVar2 != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) &&
|
||||
((GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat(0.0),
|
||||
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,0.0),
|
||||
(this->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(this->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
@@ -1097,9 +1097,9 @@ void GridEntity_Pit::update_sprite_edges()
|
||||
edgeFrame = cornerMask + 0x14;
|
||||
}
|
||||
}
|
||||
isAnimSet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(&DAT_00b68fb8,1);
|
||||
isAnimSet = ANM2::SetAnimation(&this->_sprite,&DAT_00b68fb8,1);
|
||||
if (((isAnimSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) &&
|
||||
((GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)edgeFrame),
|
||||
(AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)edgeFrame),
|
||||
(this->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(this->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
@@ -1120,10 +1120,10 @@ void GridEntity_Pit::update_sprite_edges()
|
||||
KAGE_LogMessage(0x10,GHIDRA_CAST<uint8_t *>("id out of bounds\n"));
|
||||
}
|
||||
*GHIDRA_CAST<uint32_t *>((GHIDRA_INT((this->_sprite)._animState._layerFrames) + iVar8 * 4)) = 0;
|
||||
(GHIDRA_CAST<AnimationState *>((animState)))->AnimationState::AdvanceLayerPosition(iVar8,(float)iVar6);
|
||||
AnimationState::AdvanceLayerPosition(animState,iVar8,(float)iVar6);
|
||||
}
|
||||
iVar6 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc))));
|
||||
pLVar5 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
|
||||
pLVar5 = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
|
||||
pLVar5->_visible = 1 < iVar6;
|
||||
}
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8)))) = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8)))) & 0xffffff00 | edgeFrame;
|
||||
|
||||
Reference in new issue
Block a user