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
@@ -13,9 +13,9 @@ AchievementOverlay::~AchievementOverlay()
|
||||
ExceptionList = &local_10;
|
||||
_eh_vector_destructor_iterator_(this->_entries,0x34,0x282,FUN_00420b00);
|
||||
local_8 = 0;
|
||||
(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();
|
||||
msvc::deque<4byte>::~deque();
|
||||
@@ -52,7 +52,7 @@ void AchievementOverlay::load_graphics()
|
||||
anm2Path._capacity = 0x2f;
|
||||
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/ui/achievement/Achievements.anm2",0x25);
|
||||
local_14 = 0;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(&anm2Path,1);
|
||||
ANM2::Load(&this->_sprite,&anm2Path,1);
|
||||
if (0xf < anm2Path._capacity) {
|
||||
size = anm2Path._capacity + 1;
|
||||
ptr = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0)));
|
||||
@@ -404,8 +404,8 @@ void AchievementOverlay::Update()
|
||||
local_c[0] = this;
|
||||
if ((((iVar2 != 0) && (this->_isPopupBlocked == 0)) && ((g_manager->_framecount & 1) == 0)) &&
|
||||
((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);
|
||||
iVar2 = this->_state;
|
||||
}
|
||||
if (iVar2 == 1) {
|
||||
@@ -413,7 +413,7 @@ void AchievementOverlay::Update()
|
||||
((this->_sprite)._animState._isPlaying == 0)) {
|
||||
this->_frame = 0;
|
||||
this->_state = 2;
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Play(s_Idle,0);
|
||||
ANM2::Play(&this->_sprite,s_Idle,0);
|
||||
manager = g_manager;
|
||||
local_c[0] = GHIDRA_CAST<AchievementOverlay *>(&DAT_00000008);
|
||||
seed_fart_sound_override(GHIDRA_CAST<int *>(local_c));
|
||||
@@ -425,7 +425,7 @@ void AchievementOverlay::Update()
|
||||
this->_frame = iVar2 + 1;
|
||||
if ((0x5a < iVar2) || (bVar1 = input_is_action_pressed(0xe,-1,GHIDRA_CAST<Entity *>(0x0),iVar2), bVar1 != 0))
|
||||
{
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Play(GHIDRA_CAST<uint8_t *>("Dissapear"),0);
|
||||
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Dissapear"),0);
|
||||
this->_state = 3;
|
||||
}
|
||||
}
|
||||
@@ -460,21 +460,21 @@ void AchievementOverlay::Update()
|
||||
}
|
||||
(this->_sprite)._scale.x = spriteScale;
|
||||
(this->_sprite)._scale.y = spriteScale;
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
|
||||
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
|
||||
layer->_visible = bVar1;
|
||||
pngFilename = &this->_entries[this->_currentEntry]._gfx;
|
||||
if (pngFilename->_size == 0) {
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x3));
|
||||
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x3));
|
||||
layer->_visible = 0;
|
||||
KAGE_LogMessage(8,GHIDRA_CAST<uint8_t *>("No sprite for achievement %d (%s)\n"));
|
||||
}
|
||||
else {
|
||||
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::ReplaceSpritesheet(3,pngFilename);
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::LoadGraphics(unk);
|
||||
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x3));
|
||||
ANM2::LoadGraphics(&this->_sprite,unk);
|
||||
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x3));
|
||||
layer->_visible = 1;
|
||||
}
|
||||
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Play(GHIDRA_CAST<uint8_t *>("Appear"),0);
|
||||
ANM2::Play(&this->_sprite,GHIDRA_CAST<uint8_t *>("Appear"),0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
Reference in new issue
Block a user