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
+24
-24
@@ -750,7 +750,7 @@ void Entity::constructor()
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x3c)))) = 0;
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x40)))) = 0xffffffff;
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x44)))) = 0xffffffff;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::constructor();
|
||||
ANM2::constructor(&this->_sprite);
|
||||
(this->_shadowOffset).y = 0.0;
|
||||
(this->_shadowOffset).x = 0.0;
|
||||
this->_valid = 0;
|
||||
@@ -923,9 +923,9 @@ void Entity::destructor()
|
||||
vector_0x3c_tidy();
|
||||
msvc::vector<Vector>::_Tidy();
|
||||
local_8 = 2;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Reset();
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::~AnimationState();
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::~AnimationState();
|
||||
ANM2::Reset(&this->_sprite);
|
||||
AnimationState::~AnimationState(&(this->_sprite)._overlayAnimState);
|
||||
AnimationState::~AnimationState(&(this->_sprite)._animState);
|
||||
(GHIDRA_CAST<msvc::string *>(((this->_sprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate();
|
||||
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(&this->_sprite))))->msvc::string::_Tidy_deallocate();
|
||||
FUN_0041c7d0();
|
||||
@@ -3447,7 +3447,7 @@ void Entity::ClearReferences()
|
||||
(this->_colorParams)._end = (this->_colorParams)._begin;
|
||||
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8))));
|
||||
(this->_collisionPoints)._end = (this->_collisionPoints)._begin;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Reset();
|
||||
ANM2::Reset(&this->_sprite);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4819,8 +4819,8 @@ void Entity::Update()
|
||||
local_310 = GHIDRA_CAST<float *>((this->_sprite)._playbackSpeed);
|
||||
(this->_sprite)._playbackSpeed = (float)local_310 * this->_speedMultiplier;
|
||||
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);
|
||||
local_320 = *GHIDRA_CAST<ItemPool **>(&this->_flags);
|
||||
uVar13 = *GHIDRA_CAST<uint32_t *>((GHIDRA_INT(&this->_flags) + 4));
|
||||
}
|
||||
@@ -6108,7 +6108,7 @@ void Entity::Render(Vector *offset)
|
||||
offsetY = offset->y;
|
||||
(this->_renderPosition).x = (float)dVar1 / pixelScale + offset->x;
|
||||
(this->_renderPosition).y = (float)dVar2 / pixelScale + offsetY;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Render(&this->_renderPosition,&g_vectorZero,&g_vectorZero);
|
||||
ANM2::Render(&this->_sprite,&this->_renderPosition,&g_vectorZero,&g_vectorZero);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -6411,7 +6411,7 @@ uint8_t Entity::RenderShadowLayer(Vector *offset)
|
||||
if (layerName == GHIDRA_CAST<uint8_t *>(0xffffffff)) {
|
||||
return 0;
|
||||
}
|
||||
shadowLayer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(layerName);
|
||||
shadowLayer = ANM2::GetLayer(&this->_sprite,layerName);
|
||||
spriteColor = &(this->_sprite)._color;
|
||||
shadowLayer->_visible = 1;
|
||||
savedTint = spriteColor->_tint[0];
|
||||
@@ -7137,10 +7137,10 @@ LAB_006b4a6a:
|
||||
(pEVar6->_posOffset).x = 0.0;
|
||||
(pEVar6->_posOffset).y = -10.0;
|
||||
if ((pEVar6->_sprite)._animState._animData != (void *)0x0) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(pEVar6->_sprite)._animState)))->AnimationState::SetFrameFloat(1.0);
|
||||
AnimationState::SetFrameFloat(&(pEVar6->_sprite)._animState,1.0);
|
||||
}
|
||||
uVar5 = g_graphicsManager_flags;
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&pEStack_90->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
||||
layer = ANM2::GetLayer(&pEStack_90->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
||||
iVar7 = 1;
|
||||
if ((uVar5 & 4) == 0) {
|
||||
iVar7 = 6;
|
||||
@@ -7679,7 +7679,7 @@ Vector * Entity::GetNullOffset(Vector *outOffset, uint8_t *nullLayerName)
|
||||
Vector offset;
|
||||
|
||||
if ((this->_sprite)._animState._animData != (void *)0x0) {
|
||||
nullFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetNullFrame(nullLayerName);
|
||||
nullFrame = AnimationState::GetNullFrame(&(this->_sprite)._animState,nullLayerName);
|
||||
if ((nullFrame != GHIDRA_CAST<float *>(0x0)) && (*GHIDRA_CAST<char *>((nullFrame + 3)) != '\0')) {
|
||||
offset.x = (*nullFrame / 0.65) * (this->_sprite)._scale.x;
|
||||
offset.y = (nullFrame[1] / 0.65) * (this->_sprite)._scale.y;
|
||||
@@ -7722,7 +7722,7 @@ Capsule * Entity::GetNullCapsule(Capsule *outCapsule, uint8_t *nullLayerName)
|
||||
Vector capsuleSize;
|
||||
|
||||
if ((this->_sprite)._animState._animData != (void *)0x0) {
|
||||
nullFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetNullFrame(nullLayerName);
|
||||
nullFrame = AnimationState::GetNullFrame(&(this->_sprite)._animState,nullLayerName);
|
||||
if ((nullFrame != GHIDRA_CAST<float *>(0x0)) && (*GHIDRA_CAST<char *>((nullFrame + 3)) != '\0')) {
|
||||
capsuleSize.x = (this->_sprite)._scale.x;
|
||||
offsetX = (*nullFrame / 0.65) * capsuleSize.x;
|
||||
@@ -8798,12 +8798,12 @@ void Entity::DestroyRockGridAt(Vector *position, GridEntityDesc *desc, Entity *s
|
||||
local_5c = pEVar2;
|
||||
if (isNormalRock != '\0') {
|
||||
if (source != GHIDRA_CAST<Entity *>(0x0)) {
|
||||
(GHIDRA_CAST<ANM2 *>((&sourceSprite)))->ANM2::ANM2(&source->_sprite);
|
||||
ANM2::ANM2(&sourceSprite,&source->_sprite);
|
||||
Isaac::SwapANM2(&pEVar2->_sprite,&sourceSprite);
|
||||
local_8 = 0.0;
|
||||
this->ANM2::Reset();
|
||||
(GHIDRA_CAST<AnimationState *>((&sourceSprite._overlayAnimState)))->AnimationState::~AnimationState();
|
||||
(GHIDRA_CAST<AnimationState *>((&sourceSprite._animState)))->AnimationState::~AnimationState();
|
||||
ANM2::Reset(this);
|
||||
AnimationState::~AnimationState(&sourceSprite._overlayAnimState);
|
||||
AnimationState::~AnimationState(&sourceSprite._animState);
|
||||
(GHIDRA_CAST<msvc::string *>((sourceSprite._animDefaultName._buf)))->msvc::string::_Tidy_deallocate();
|
||||
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(&sourceSprite))))->msvc::string::_Tidy_deallocate();
|
||||
local_8 = -NAN;
|
||||
@@ -8811,7 +8811,7 @@ void Entity::DestroyRockGridAt(Vector *position, GridEntityDesc *desc, Entity *s
|
||||
if ((GridEntityType == 6) || (name = "rubble", GridEntityType == 0x1a)) {
|
||||
name = "rubble_alt";
|
||||
}
|
||||
anim = (GHIDRA_CAST<ANM2 *>((&pEVar2->_sprite)))->ANM2::GetAnimationData(GHIDRA_CAST<uint8_t *>(name));
|
||||
anim = ANM2::GetAnimationData(&pEVar2->_sprite,GHIDRA_CAST<uint8_t *>(name));
|
||||
if (anim != GHIDRA_CAST<uint8_t *>(0x0)) {
|
||||
local_60 = *GHIDRA_CAST<float *>((anim + 0x30));
|
||||
if (local_60 == 0.0) {
|
||||
@@ -8824,9 +8824,9 @@ void Entity::DestroyRockGridAt(Vector *position, GridEntityDesc *desc, Entity *s
|
||||
if (0xf < *GHIDRA_CAST<uint32_t *>((anim + 0x14))) {
|
||||
anim = *GHIDRA_CAST<uint8_t **>(anim);
|
||||
}
|
||||
isAnimSet = (GHIDRA_CAST<ANM2 *>((&pEVar2->_sprite)))->ANM2::SetAnimation(anim,1);
|
||||
isAnimSet = ANM2::SetAnimation(&pEVar2->_sprite,anim,1);
|
||||
if (((isAnimSet != 0) && ((pEVar2->_sprite)._animState._animData != (void *)0x0)) &&
|
||||
((GHIDRA_CAST<AnimationState *>((&(pEVar2->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(local_4c)),
|
||||
(AnimationState::SetFrameFloat(&(pEVar2->_sprite)._animState,(float)GHIDRA_INT(local_4c)),
|
||||
(pEVar2->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(pEVar2->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
@@ -8932,9 +8932,9 @@ void Entity::SetSpriteFrame(std_string *animName, int frame)
|
||||
if (0xf < animName->_capacity) {
|
||||
animName = *GHIDRA_CAST<std_string **>(animName->_buf);
|
||||
}
|
||||
isAnimationSet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(animName),1);
|
||||
isAnimationSet = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(animName),1);
|
||||
if ((isAnimationSet != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)frame);
|
||||
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)frame);
|
||||
if ((this->_sprite)._animState._animData != (void *)0x0) {
|
||||
(this->_sprite)._animState._isPlaying = 0;
|
||||
}
|
||||
@@ -8950,9 +8950,9 @@ void Entity::SetSpriteOverlayFrame(std_string *anim, int frame)
|
||||
if (0xf < anim->_capacity) {
|
||||
anim = *GHIDRA_CAST<std_string **>(anim->_buf);
|
||||
}
|
||||
isAnimationSet = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetOverlayAnimation(GHIDRA_CAST<uint8_t *>(anim),1);
|
||||
isAnimationSet = ANM2::SetOverlayAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(anim),1);
|
||||
if ((isAnimationSet != 0) && ((this->_sprite)._overlayAnimState._animData != (void *)0x0)) {
|
||||
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._overlayAnimState)))->AnimationState::SetFrameFloat((float)frame);
|
||||
AnimationState::SetFrameFloat(&(this->_sprite)._overlayAnimState,(float)frame);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user