Files
isaac-port/generated-src/rail_manager.cpp
T
shweetandClaude Opus 5.5 780767f5e1 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>
2026-11-19 23:04:54 -05:00

75 lines
3.2 KiB
C++

#include "classes.h"
// 009e2f20
void RailManager::Render(Vector *offset)
{
RailManager *frontAnimState = this;
uint8_t bVar1;
int gridSize;
AnimationState *frontAnimState;
uint32_t gridIndex;
float pixelScale;
double dVar2;
double dVar3;
int gridEntityOffset;
Vector renderPos;
int gridWidth;
bVar1 = ANM2::SetAnimation(&frontAnimState->_sprite,&DAT_00b804d8,1);
if (((bVar1 != 0) && ((frontAnimState->_sprite)._animState._animData != (void *)0x0)) &&
(AnimationState::SetFrameFloat(&(frontAnimState->_sprite)._animState,0.0),
(frontAnimState->_sprite)._animState._animData != (void *)0x0)) {
(frontAnimState->_sprite)._animState._isPlaying = 0;
}
gridIndex = 0;
gridSize = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(frontAnimState->_room) + 0x10)) * *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(frontAnimState->_room) + 0xc));
if (0 < gridSize) {
gridEntityOffset = 0x24;
do {
bVar1 = (frontAnimState->_sprite)._filename._buf[gridIndex - 0x1c0];
if (-1 < (char)bVar1) {
if (gridIndex < 0x1c0) {
gridWidth = *GHIDRA_CAST<int *>((gridEntityOffset + GHIDRA_INT(frontAnimState->_room)));
if ((gridWidth != 0) && (*GHIDRA_CAST<int *>((gridWidth + 4)) == 7)) goto LAB_009e3195;
if ((bVar1 == 0xff) || ((bVar1 & 0x40) == 0)) goto LAB_009e2fd2;
bVar1 = bVar1 & 0x3f;
if ((frontAnimState->_sprite)._animState._animData != (void *)0x0) goto LAB_009e2fe1;
}
else {
LAB_009e2fd2:
if ((frontAnimState->_sprite)._animState._animData != (void *)0x0) {
bVar1 = bVar1 & 0xf;
LAB_009e2fe1:
AnimationState::SetFrameFloat(&(frontAnimState->_sprite)._animState,(float)bVar1);
}
}
gridWidth = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(frontAnimState->_room) + 0xc));
pixelScale = g_displayPixelRatio * g_screenPointScale;
dVar2 = floor((double)(((((float)(GHIDRA_INT(gridIndex) % gridWidth) * 40.0 + 40.0) - 60.0) * 0.65
+ (g_screenWidth - 338.0) * 0.5) * pixelScale + 0.5));
dVar3 = floor((double)(((((float)(GHIDRA_INT(gridIndex) / gridWidth) * 40.0 + 120.0) - 140.0) *
0.65 + (g_screenHeight - 182.0) * 0.5) * pixelScale + 0.5));
renderPos.x = (float)dVar2 / pixelScale + offset->x;
renderPos.y = (float)dVar3 / pixelScale + offset->y;
if ((frontAnimState->_sprite)._loaded != 0) {
if ((frontAnimState->_sprite)._overlayRenderFirst == 0) {
AnimationState::Render
(&(frontAnimState->_sprite)._animState,&renderPos,&g_vectorZero,&g_vectorZero);
frontAnimState = &(frontAnimState->_sprite)._overlayAnimState;
}
else {
AnimationState::Render
(&(frontAnimState->_sprite)._overlayAnimState,&renderPos,&g_vectorZero,&g_vectorZero);
frontAnimState = &(frontAnimState->_sprite)._animState;
}
AnimationState::Render(frontAnimState,&renderPos,&g_vectorZero,&g_vectorZero);
}
}
LAB_009e3195:
gridEntityOffset = gridEntityOffset + 4;
gridIndex = gridIndex + 1;
} while (GHIDRA_INT(gridIndex) < gridSize);
}
return;
}