Files
isaac-port/generated-src/rail_manager.cpp
T
shweetandClaude Opus 5.5 9d4d4f5c64 Build 29: zero-length placeholder structs, generated-src with standard types
--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 21:41:34 -05:00

75 lines
3.3 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 = (GHIDRA_CAST<ANM2 *>((&frontAnimState->_sprite)))->ANM2::SetAnimation(&DAT_00b804d8,1);
if (((bVar1 != 0) && ((frontAnimState->_sprite)._animState._animData != (void *)0x0)) &&
((GHIDRA_CAST<AnimationState *>((&(frontAnimState->_sprite)._animState)))->AnimationState::SetFrameFloat(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:
(GHIDRA_CAST<AnimationState *>((&(frontAnimState->_sprite)._animState)))->AnimationState::SetFrameFloat((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;
}