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:
shweetandClaude Opus 5.5 committed 2026-11-19 23:04:54 -05:00
1 parent d6e1ca7c6c
commit 780767f5e1
161 files changed
+8646 -21919

No files matched your search

+86 -85
View File
@@ -1393,7 +1393,7 @@ void Entity_Laser::Init(int type, int variant, int subType, uint32_t initSeed)
(GHIDRA_CAST<Entity *>((GHIDRA_CAST<Entity *>(this))))->Entity::Init(type,variant,subType,initSeed);
if (this->_config != (void *)0x0) {
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(GHIDRA_CAST<std_string *>((GHIDRA_INT(this->_config) + 0x74)),1);
ANM2::Load(&this->_sprite,GHIDRA_CAST<std_string *>((GHIDRA_INT(this->_config) + 0x74)),1);
defaultAnimName = &(this->_sprite)._animDefaultName;
if (0xf < (this->_sprite)._animDefaultName._capacity) {
defaultAnimName = *GHIDRA_CAST<std_string **>(defaultAnimName->_buf);
@@ -1425,9 +1425,9 @@ LAB_0096f615:
if ((uVar3 == 0) && ((animData[0x34] == 0 || ((this->_sprite)._animState._isPlaying != 0))))
goto LAB_0096f648;
}
bVar1 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(defaultAnimName),1);
bVar1 = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(defaultAnimName),1);
if (bVar1 != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
AnimationState::Rewind(&(this->_sprite)._animState);
(this->_sprite)._animState._isPlaying = 1;
}
}
@@ -2574,8 +2574,8 @@ LAB_00973251:
local_b8 = fVar13;
}
if (local_bc + 2.0 < local_b8) {
pvVar4 = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(0);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
pvVar4 = AnimationState::GetLayerFrame(&(this->_sprite)._animState,0);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
scratchColor._tint[0] = (this->_sprite)._color._tint[0];
scratchColor._tint[1] = (this->_sprite)._color._tint[1];
scratchColor._tint[2] = (this->_sprite)._color._tint[2];
@@ -3174,9 +3174,9 @@ LAB_009729ca:
laserRef = laser;
local_9c = pVVar7;
if ((float)local_a8 + 2.0 < (float)local_b0) {
pvVar4 = (GHIDRA_CAST<AnimationState *>((&(laser->_sprite)._animState)))->AnimationState::GetLayerFrame(0);
pvVar4 = AnimationState::GetLayerFrame(&(laser->_sprite)._animState,0);
local_a4 = GHIDRA_CAST<ColorMod *>((GHIDRA_INT(pvVar4) + 0x30));
layer = (GHIDRA_CAST<ANM2 *>((&laser->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(&laser->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
local_ac = &(laser->_sprite)._color;
scratchColor2._tint[0] = local_ac->_tint[0];
scratchColor2._tint[1] = (laser->_sprite)._color._tint[1];
@@ -3928,7 +3928,7 @@ LAB_00976cb2:
local_10c.y = g_vectorZero.x;
local_104.y = g_vectorZero.y;
if ((1 < GHIDRA_UINT((this->_sprite)._layerCount)) &&
(pvVar9 = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(0),
(pvVar9 = AnimationState::GetLayerFrame(&(this->_sprite)._animState,0),
pvVar9 != (void *)0x0)) {
fVar23 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar9) + 0x14)) + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar9) + 0xc));
fVar20 = (this->_sprite)._scale.y;
@@ -4919,7 +4919,8 @@ LAB_00975f41:
this = GHIDRA_CAST<Entity_Laser *>(local_150.y);
local_d4[0] = pEVar12;
if (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_150.y) + 0x3c0)) != 0) {
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((GHIDRA_INT(register0x00000010) + -0x3b8)))))->ANM2::ANM2(GHIDRA_CAST<ANM2 *>((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_150.y) + 0x3c0)) + 0x48)));
ANM2::ANM2(GHIDRA_CAST<ANM2 *>((GHIDRA_INT(register0x00000010) + -0x3b8)),
GHIDRA_CAST<ANM2 *>((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_150.y) + 0x3c0)) + 0x48)));
other._championColor._colorize[0] = in_stack_fffffd2c;
other._filename._buf[0] = in_stack_fffffc48[0];
other._filename._buf[1] = in_stack_fffffc48[1];
@@ -5018,9 +5019,9 @@ LAB_00975f41:
(*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(&(other)) + 0x10a))) = SUB42(uVar29,2);
other._shadowLayerIndex = iVar8;
other._bitflags = GHIDRA_INT(spawnedLaser);
(GHIDRA_CAST<ANM2 *>((&pEVar12->_sprite)))->ANM2::operator_assign(other);
ANM2::operator_assign(&pEVar12->_sprite,other);
iVar8 = Isaac::Random(3);
(GHIDRA_CAST<ANM2 *>((&pEVar12->_sprite)))->ANM2::SetFrame(GHIDRA_CAST<std_string *>("Droplets"),iVar8);
ANM2::SetFrame(&pEVar12->_sprite,GHIDRA_CAST<std_string *>("Droplets"),iVar8);
}
(pEVar12->_posOffset).x = (GHIDRA_CAST<Vector *>((GHIDRA_INT(this) + 0x34c)))->x;
(pEVar12->_posOffset).y = (GHIDRA_CAST<Vector *>((GHIDRA_INT(this) + 0x34c)))->y;
@@ -5060,14 +5061,14 @@ LAB_00975f41:
if ((this->_dead != 0) || (this->_shrink != 0)) {
iVar8 = this->_variant;
if (iVar8 == 2) {
bVar6 = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::IsLoopingAnimation();
bVar6 = AnimationState::IsLoopingAnimation(&(this->_sprite)._animState);
if (bVar6 != 0) {
(GHIDRA_CAST<ANM2 *>((this_03)))->ANM2::GetAnimation(GHIDRA_CAST<std_string *>(&fStack_44));
ANM2::GetAnimation(this_03,GHIDRA_CAST<std_string *>(&fStack_44));
local_14 = 1;
SimpleString::operator=(GHIDRA_CAST<SimpleString *>(&fStack_44),"Fade");
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::Play(GHIDRA_CAST<std_string *>(&fStack_44),0);
if (this->_child != 0) {
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((this->_child + 0x48)))))->ANM2::Play(&DAT_00b1c00c,0);
ANM2::Play(GHIDRA_CAST<ANM2 *>((this->_child + 0x48)),&DAT_00b1c00c,0);
}
if ((this->_initSeed & 0x1000U) != 0) {
(GHIDRA_CAST<Sprite *>((GHIDRA_CAST<Sprite *>(&this->_sprite))))->Sprite::SetFrame_1(1);
@@ -5075,7 +5076,7 @@ LAB_00975f41:
local_14 = 0xffffffff;
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(&fStack_44))))->msvc::string::_Tidy_deallocate();
}
bVar6 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::IsFinishedImpl(&s_empty);
bVar6 = ANM2::IsFinishedImpl(&this->_sprite,&s_empty);
if (bVar6 == 0) goto LAB_00976e53;
}
else if ((iVar8 != 10) && (iVar8 != 4)) {
@@ -5757,7 +5758,7 @@ LAB_00978138:
fStack_18 = 4.34403e-44;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_40))) + 0x14))),"gfx/007.001_Static Laser.anm2",0x1e);
local_8 = 1;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(GHIDRA_CAST<std_string *>((local_40 + 0x14)),1);
ANM2::Load(&this->_sprite,GHIDRA_CAST<std_string *>((local_40 + 0x14)),1);
local_8 = 0xffffffff;
if (0xf < GHIDRA_UINT(fStack_18)) {
uVar11 = GHIDRA_INT(fStack_18) + 1;
@@ -5779,9 +5780,9 @@ LAB_00978138:
animData = (this->_sprite)._animState._animData;
if (animData == GHIDRA_CAST<uint8_t *>(0x0)) {
LAB_009784a4:
bVar8 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(local_44),1);
bVar8 = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(local_44),1);
if (bVar8 != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
AnimationState::Rewind(&(this->_sprite)._animState);
(this->_sprite)._animState._isPlaying = 1;
}
}
@@ -5827,7 +5828,7 @@ LAB_00978485:
fStack_18 = 4.34403e-44;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(local_40))) + 0x14))),"gfx/007.006_CageVisLaser.anm2",0x1e);
local_8 = 0;
(GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::Load(GHIDRA_CAST<std_string *>((local_40 + 0x14)),1);
ANM2::Load(&this->_sprite,GHIDRA_CAST<std_string *>((local_40 + 0x14)),1);
local_8 = 0xffffffff;
if (0xf < GHIDRA_UINT(fStack_18)) {
uVar11 = GHIDRA_INT(fStack_18) + 1;
@@ -5873,9 +5874,9 @@ LAB_00978319:
if ((uVar11 == 0) && ((animData[0x34] == 0 || ((this->_sprite)._animState._isPlaying != 0))))
goto LAB_009784c5;
}
bVar8 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST<uint8_t *>(local_44),1);
bVar8 = ANM2::SetAnimation(&this->_sprite,GHIDRA_CAST<uint8_t *>(local_44),1);
if (bVar8 != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
AnimationState::Rewind(&(this->_sprite)._animState);
(this->_sprite)._animState._isPlaying = 1;
update_first_frame(this);
this->_isFirstUpdate = 0;
@@ -6054,8 +6055,8 @@ void Entity_Laser::Render(Vector *offset)
}
}
this_00 = &this->_sprite;
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
pfVar3 = (GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_1b0);
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
pfVar3 = LayerState::GetTexture(layer,&local_1b0);
local_120 = *pfVar3;
local_8 = 0.0;
if (((GHIDRA_CAST<int *>(local_1b0.y) != GHIDRA_CAST<int *>(0x0)) &&
@@ -6079,9 +6080,9 @@ void Entity_Laser::Render(Vector *offset)
((iVar6 != 5 && (iVar6 != 8)))))) {
iVar6 = this->_variant;
if (((iVar6 == 2) || (iVar6 == 10)) || (iVar6 == 7)) {
layerFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(0);
layerFrame = AnimationState::GetLayerFrame(&(this->_sprite)._animState,0);
if (layerFrame == GHIDRA_CAST<AnimationState *>(0x0)) goto LAB_0097ab0f;
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(frameCopy))))->AnimationState::copy_assign(layerFrame);
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(frameCopy),layerFrame);
local_208._offset[2] = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_208._offset[2])) + 0x1))),1);
local_208._colorize[3] = this->_laserLength * 0.65 + (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)frameCopy)) + 0x4)));
local_208._colorize[2] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)frameCopy)) + 0x0)));
@@ -6141,7 +6142,7 @@ void Entity_Laser::Render(Vector *offset)
local_148.y = local_150 + offset->y + local_188.y * local_134 + renderPos->y;
fStack_324 = 1.393063e-38;
set_quad_corner_colors(quad,&local_148,&quadCorner2,&quadCorner1,&quadCorner3,&quadColor);
(GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
fStack_324 = 1.3930686e-38;
FUN_00a13560();
FUN_00682260();
@@ -6159,23 +6160,23 @@ void Entity_Laser::Render(Vector *offset)
vertexColor._blue = shaderColor._tint[2];
vertexColor._alpha = shaderColor._tint[3] * alphaMultiplier;
vertexColor._unk = 0;
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapSMode = 0;
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapTMode = 0;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uVar14)) + 0x0))) = 1.3930976e-38;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uVar14)) + 0x4))) = 0.0;
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
(GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(auStack_30a + -10);
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
LayerState::GetTexture(layer,auStack_30a + -10);
apply_sprite_shader_params(&shaderColor,1,(void *)uVar14,SUB84(uVar14,4));
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
texture = (GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_148);
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
texture = LayerState::GetTexture(layer,&local_148);
local_8 = 8.40779e-45;
goto LAB_0097b218;
}
(GHIDRA_CAST<Color *>((GHIDRA_CAST<Color *>(&tmpColor))))->Color::operator_assign(&(this->_sprite)._color);
(this->_sprite)._color._tint[3] = tmpColor._tint[3] * alphaMultiplier;
(GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::Render(&this->_renderPosition,&g_vectorZero,&g_vectorZero);
ANM2::Render(this_00,&this->_renderPosition,&g_vectorZero,&g_vectorZero);
(this->_sprite)._color._tint[3] = tmpColor._tint[3];
iVar6 = extraout_ECX_00;
}
@@ -6191,8 +6192,8 @@ void Entity_Laser::Render(Vector *offset)
(this->_sprite)._rotation = (float)local_124;
iVar6 = extraout_ECX;
if (15.0 < this->_laserLength) {
local_124 = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(0);
layerFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(1);
local_124 = AnimationState::GetLayerFrame(&(this->_sprite)._animState,0);
layerFrame = AnimationState::GetLayerFrame(&(this->_sprite)._animState,1);
if ((local_124 == GHIDRA_CAST<AnimationState *>(0x0)) || (layerFrame == GHIDRA_CAST<AnimationState *>(0x0))) {
LAB_0097ab0f:
warnMessage = "[warn] Laser::Render current frame is NULL\n";
@@ -6201,9 +6202,9 @@ LAB_0097ab0f:
ExceptionList = local_10;
return;
}
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(firstLayerFrame))))->AnimationState::copy_assign(local_124);
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(frameCopy))))->AnimationState::copy_assign(layerFrame);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x1));
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(firstLayerFrame),local_124);
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(frameCopy),layerFrame);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x1));
local_208._offset[2] = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_208._offset[2])) + 0x1))),1);
local_120 = frameScaleX * (layer->_size).x * (this->_sprite)._scale.x;
frameScaleY = frameScaleY * (layer->_size).y * (this->_sprite)._scale.y;
@@ -6272,7 +6273,7 @@ LAB_0097ab0f:
quadCorner2.y = local_140 + (float)local_124 / local_130;
fStack_324 = 1.3928041e-38;
set_quad_corner_colors(quad,&quadCorner2,&quadCorner1,&quadCorner3,&local_148,&quadColor);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
g_graphicsManager_blendMode[0] = layer->_blendMode[0];
g_graphicsManager_blendMode[1] = layer->_blendMode[1];
g_graphicsManager_blendMode[2] = layer->_blendMode[2];
@@ -6293,17 +6294,17 @@ LAB_0097ab0f:
vertexColor._blue = shaderColor._tint[2];
vertexColor._alpha = shaderColor._tint[3] * alphaMultiplier;
vertexColor._unk = 0;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapSMode = 0;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapTMode = 0;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uVar13)) + 0x0))) = 1.3928444e-38;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uVar13)) + 0x4))) = 0.0;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
(GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(auStack_30a + -10);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
LayerState::GetTexture(layer,auStack_30a + -10);
apply_sprite_shader_params(&shaderColor,1,(void *)uVar13,SUB84(uVar13,4));
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
texture = (GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_148);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
texture = LayerState::GetTexture(layer,&local_148);
local_8 = 7.00649e-45;
LAB_0097b218:
(**(code **)(*GHIDRA_CAST<int *>(*texture) + 0x14))();
@@ -6316,7 +6317,7 @@ LAB_0097b218:
goto LAB_0097b24c;
}
local_164 = GHIDRA_CAST<uint8_t *>(GHIDRA_UINT((1 < uVar5)));
layerFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(GHIDRA_INT(local_164));
layerFrame = AnimationState::GetLayerFrame(&(this->_sprite)._animState,GHIDRA_INT(local_164));
if (layerFrame == GHIDRA_CAST<AnimationState *>(0x0)) {
warnMessage = "[warn] Laser::Render current laser frame is NULL\n";
KAGE_LogMessage(1,GHIDRA_CAST<uint8_t *>("[warn] Laser::Render current laser frame is NULL\n"));
@@ -6324,20 +6325,20 @@ LAB_0097b218:
ExceptionList = local_10;
return;
}
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(frameCopy))))->AnimationState::copy_assign(layerFrame);
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(local_164);
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(frameCopy),layerFrame);
layer = ANM2::GetLayer(this_00,local_164);
verticesBegin = GHIDRA_CAST<float *>(0x0);
verticesEnd = GHIDRA_CAST<float *>(0x0);
verticesCapacity = GHIDRA_CAST<float *>(0x0);
local_130 = frameScaleX * (layer->_size).x * (this->_sprite)._scale.x;
local_8 = 1.4013e-45;
msvc::vector<8byte>::reserve();
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapSMode = 0;
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapTMode = 0;
layer = (GHIDRA_CAST<ANM2 *>((this_00)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
(GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_1b0);
layer = ANM2::GetLayer(this_00,GHIDRA_CAST<uint8_t *>(0x0));
LayerState::GetTexture(layer,&local_1b0);
local_8 = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),2);
scaledOffsetX = (this->_posOffset).x * 0.65;
local_12c = *GHIDRA_CAST<int **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_homingLaser))) + 0x1c))));
@@ -6475,7 +6476,7 @@ LAB_00979179:
local_190 = 0.0;
}
verticesEnd = local_138;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(local_164);
layer = ANM2::GetLayer(&this->_sprite,local_164);
g_graphicsManager_blendMode[0] = layer->_blendMode[0];
g_graphicsManager_blendMode[1] = layer->_blendMode[1];
g_graphicsManager_blendMode[2] = layer->_blendMode[2];
@@ -6668,7 +6669,7 @@ LAB_00979179:
pfVar3 = verticesBegin;
}
if ((1 < GHIDRA_UINT((this->_sprite)._layerCount)) && (this->_subtype == 0)) {
layerFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(0);
layerFrame = AnimationState::GetLayerFrame(&(this->_sprite)._animState,0);
if (layerFrame == GHIDRA_CAST<AnimationState *>(0x0)) {
warnMessage = "[warn] Laser::Render current frame is NULL\n";
KAGE_LogMessage(1,GHIDRA_CAST<uint8_t *>("[warn] Laser::Render current frame is NULL\n"));
@@ -6691,8 +6692,8 @@ LAB_00979c35:
if (GHIDRA_UINT((GHIDRA_INT(pfVar3) + (-4 - GHIDRA_INT(pfVar4)))) < 0x20) goto LAB_00979c35;
goto LAB_0097a2b3;
}
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(frameCopy))))->AnimationState::copy_assign(layerFrame);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(frameCopy),layerFrame);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
pfVar4 = *GHIDRA_CAST<float **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_homingLaser))) + 0x1c))));
frameScaleX = frameScaleX * (layer->_size).x * (this->_sprite)._scale.x;
frameScaleY = frameScaleY * (layer->_size).y * (this->_sprite)._scale.y;
@@ -6768,11 +6769,11 @@ LAB_00979c35:
local_244 = 0;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uVar12)) + 0x0))) = 1.3925265e-38;
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(uVar12)) + 0x4))) = 0.0;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
(GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(auStack_30a + -10);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
LayerState::GetTexture(layer,auStack_30a + -10);
apply_sprite_shader_params(&shaderColor,1,(void *)uVar12,SUB84(uVar12,4));
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
texture = (GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_148);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
texture = LayerState::GetTexture(layer,&local_148);
local_8 = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),3);
(**(code **)(*GHIDRA_CAST<int *>(*texture) + 0x14))();
TexturePtr::release();
@@ -7047,7 +7048,7 @@ LAB_0097c1bc:
widthScale = (float)puVar9 * 0.2 + local_60;
}
else {
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>(&(this->_sprite)._animState))))->ANM2::GetAnimation(GHIDRA_CAST<std_string *>((local_50 + 0x10)));
ANM2::GetAnimation(GHIDRA_CAST<ANM2 *>(&(this->_sprite)._animState),GHIDRA_CAST<std_string *>((local_50 + 0x10)));
local_14 = 0;
(GHIDRA_CAST<msvc::string *>((local_50 + 0x10)))->msvc::string::append(&DAT_00b61844,4);
local_54 = local_50 + 0x10;
@@ -7057,9 +7058,9 @@ LAB_0097c1bc:
pbVar7 = (this->_sprite)._animState._animData;
if (pbVar7 == GHIDRA_CAST<uint8_t *>(0x0)) {
LAB_0097c25f:
bVar5 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(local_54,1);
bVar5 = ANM2::SetAnimation(&this->_sprite,local_54,1);
if (bVar5 != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
AnimationState::Rewind(&(this->_sprite)._animState);
(this->_sprite)._animState._isPlaying = 1;
this = savedLaser;
}
@@ -7608,8 +7609,8 @@ uint8_t Entity_Laser::RenderShadowLayer(Vector *offset)
return 1;
}
laserSprite = &this->_sprite;
layer = (GHIDRA_CAST<ANM2 *>((laserSprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
sheetTexture = (GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_dc);
layer = ANM2::GetLayer(laserSprite,GHIDRA_CAST<uint8_t *>(0x0));
sheetTexture = LayerState::GetTexture(layer,&local_dc);
spawnerRoot = *sheetTexture;
local_8 = 0.0;
if (((local_d8 != GHIDRA_CAST<BitSet128 *>(0x0)) &&
@@ -7624,26 +7625,26 @@ uint8_t Entity_Laser::RenderShadowLayer(Vector *offset)
return 1;
}
layerName = GHIDRA_CAST<uint8_t *>(GHIDRA_UINT((1 < GHIDRA_UINT((this->_sprite)._layerCount))));
layerFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(GHIDRA_INT(layerName));
layerFrame = AnimationState::GetLayerFrame(&(this->_sprite)._animState,GHIDRA_INT(layerName));
if (layerFrame == GHIDRA_CAST<AnimationState *>(0x0)) {
KAGE_LogMessage(1,GHIDRA_CAST<uint8_t *>("[warn] Laser::Render current laser frame is NULL\n"));
ExceptionList = local_10;
return 1;
}
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(frameCopy))))->AnimationState::copy_assign(layerFrame);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(layerName);
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(frameCopy),layerFrame);
layer = ANM2::GetLayer(&this->_sprite,layerName);
points = GHIDRA_CAST<float *>(0x0);
pointsEnd = GHIDRA_CAST<float *>(0x0);
pointsCapacity = GHIDRA_CAST<float *>(0x0);
local_c4 = local_94 * (this->_sprite)._scale.x * (layer->_size).x;
local_8 = 1.4013e-45;
msvc::vector<8byte>::reserve();
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapSMode = 0;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
layer->_wrapTMode = 0;
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
(GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&shadowTexture);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
LayerState::GetTexture(layer,&shadowTexture);
local_8 = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),2);
local_b4 = *GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_homingLaser))) + 0x1c))));
offsetX = (this->_posOffset).x * 0.65;
@@ -7938,7 +7939,7 @@ LAB_0097e2ff:
case 0xe:
case 0xf:
if (this->_subtype != 0) goto LAB_0097e2ff;
layerFrame = (GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::GetLayerFrame(0);
layerFrame = AnimationState::GetLayerFrame(&(this->_sprite)._animState,0);
if (layerFrame == GHIDRA_CAST<AnimationState *>(0x0)) {
KAGE_LogMessage(1,GHIDRA_CAST<uint8_t *>("[warn] Laser::Render current frame is NULL\n"));
TexturePtr::release();
@@ -7958,8 +7959,8 @@ LAB_0097e2ff:
}
goto code_r0x0097e364;
}
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>(frameCopy))))->AnimationState::copy_assign(layerFrame);
layer = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
AnimationState::copy_assign(GHIDRA_CAST<AnimationState *>(frameCopy),layerFrame);
layer = ANM2::GetLayer(&this->_sprite,GHIDRA_CAST<uint8_t *>(0x0));
pfVar4 = *GHIDRA_CAST<float **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((this->_homingLaser))) + 0x1c))));
uvTopLeftY = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)frameCopy)) + 0x4))) + 0.01;
uvBottomLeftY = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)frameCopy)) + 0xc))) + (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((float)frameCopy)) + 0x4)));
@@ -8016,11 +8017,11 @@ LAB_0097e2ff:
shaderColor._offset[1] = 0.0;
shaderColor._offset[2] = 0.0;
uVar11 = 0x97e28d;
layer = (GHIDRA_CAST<ANM2 *>((laserSprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
(GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(auStack_21e + -10);
layer = ANM2::GetLayer(laserSprite,GHIDRA_CAST<uint8_t *>(0x0));
LayerState::GetTexture(layer,auStack_21e + -10);
apply_sprite_shader_params(&shaderColor,1,(void *)uVar11,(void *)((uint64_t)uVar11 >> 0x20));
layer = (GHIDRA_CAST<ANM2 *>((laserSprite)))->ANM2::GetLayer(GHIDRA_CAST<uint8_t *>(0x0));
layerTexture = (GHIDRA_CAST<LayerState *>((layer)))->LayerState::GetTexture(&local_11c);
layer = ANM2::GetLayer(laserSprite,GHIDRA_CAST<uint8_t *>(0x0));
layerTexture = LayerState::GetTexture(layer,&local_11c);
local_8 = (float)CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),3);
vertexColor._unk = 0;
vertexColor._red = shaderColor._tint[0];
@@ -8740,7 +8741,7 @@ void Entity_Laser::spawn_impact_effect(int unused)
anm2Path._capacity = 0x2f;
builtin_strncpy((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(anm2Path._buf))) + 0x0))),"gfx/1000.050_brimstoneimpact_static.anm2",0x29);
local_14 = 0;
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((piVar7 + 0x12)))))->ANM2::Load(&anm2Path,1);
ANM2::Load(GHIDRA_CAST<ANM2 *>((piVar7 + 0x12)),&anm2Path,1);
local_14 = 0xffffffff;
if (0xf < anm2Path._capacity) {
uVar6 = anm2Path._capacity + 1;
@@ -8765,10 +8766,10 @@ void Entity_Laser::spawn_impact_effect(int unused)
curAnimName = GHIDRA_CAST<uint8_t *>(local_44[0xd]);
if (curAnimName == GHIDRA_CAST<uint8_t *>(0x0)) {
LAB_0097fb40:
bVar5 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((piVar7 + 0x12)))))->ANM2::SetAnimation(defaultAnim,1);
bVar5 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>((piVar7 + 0x12)),defaultAnim,1);
piVar2 = local_44;
if (bVar5 != 0) {
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((local_44 + 0xc)))))->AnimationState::Rewind();
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>((local_44 + 0xc)));
*GHIDRA_CAST<uint8_t *>((piVar2 + 0x11)) = 1;
piVar7 = impactEffect;
}
@@ -8915,9 +8916,9 @@ LAB_0097fd46:
if ((uVar4 == 0) && ((pbVar5[0x34] == 0 || ((this->_sprite)._animState._isPlaying != 0))))
goto LAB_0097fd78;
}
bVar3 = (GHIDRA_CAST<ANM2 *>((&this->_sprite)))->ANM2::SetAnimation(animName,1);
bVar3 = ANM2::SetAnimation(&this->_sprite,animName,1);
if (bVar3 != 0) {
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::Rewind();
AnimationState::Rewind(&(this->_sprite)._animState);
(this->_sprite)._animState._isPlaying = 1;
}
LAB_0097fd78:
@@ -8946,7 +8947,7 @@ LAB_0097fd78:
if (animData == (void *)0x0) {
return;
}
(GHIDRA_CAST<AnimationState *>((&(this->_sprite)._animState)))->AnimationState::SetFrameFloat((float)GHIDRA_INT(frame));
AnimationState::SetFrameFloat(&(this->_sprite)._animState,(float)GHIDRA_INT(frame));
return;
}