- 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>
70 lines
2.3 KiB
C++
70 lines
2.3 KiB
C++
#include "classes.h"
|
|
|
|
// 0042cdf0
|
|
void GridEntity_Statue::Render()
|
|
{
|
|
return;
|
|
}
|
|
|
|
// 00838520
|
|
void GridEntity_Statue::Update()
|
|
{
|
|
if ((this->_sprite)._loaded != 0) {
|
|
AnimationState::Update(&(this->_sprite)._animState);
|
|
AnimationState::Update(&(this->_sprite)._overlayAnimState);
|
|
}
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) == 1) {
|
|
this->_collisionClass = 3;
|
|
return;
|
|
}
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) == 2) {
|
|
this->_collisionClass = 0;
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 00838ae0
|
|
void GridEntity_Statue::BeginBatches()
|
|
{
|
|
uint32_t seed;
|
|
int iVar1;
|
|
Entity *statueEffect;
|
|
uint32_t gridPathValue;
|
|
int gridX;
|
|
uint32_t variant;
|
|
Vector spawnPos;
|
|
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) < 1) {
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) = 1;
|
|
}
|
|
else if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) != 1) goto LAB_00838bf3;
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8)))) == 0) {
|
|
seed = Random();
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 0xc));
|
|
gridX = this->_gridIndex % iVar1;
|
|
iVar1 = this->_gridIndex / iVar1;
|
|
variant = 6;
|
|
}
|
|
else {
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x8)))) != 1) goto LAB_00838bf3;
|
|
seed = Random();
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_game->_room) + 0xc));
|
|
gridX = this->_gridIndex % iVar1;
|
|
iVar1 = this->_gridIndex / iVar1;
|
|
variant = 9;
|
|
}
|
|
spawnPos.x = (float)gridX * 40.0 + 40.0;
|
|
spawnPos.y = (float)iVar1 * 40.0 + 120.0;
|
|
statueEffect = (GHIDRA_CAST<Game *>((g_game)))->Game::SpawnEx(1000,variant,&spawnPos,&g_vectorZero,GHIDRA_CAST<Entity *>(0x0),0,seed,0);
|
|
*GHIDRA_CAST<Entity **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x154)))) = statueEffect;
|
|
LAB_00838bf3:
|
|
if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) {
|
|
gridPathValue = 0;
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xc)))) == 1) {
|
|
gridPathValue = 1000;
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(g_game->_room) + this->_gridIndex * 4 + 0x76c)) = gridPathValue;
|
|
}
|
|
return;
|
|
}
|