Files
isaac-port/generated-src/generic_popup.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

141 lines
5.4 KiB
C++

#include "classes.h"
// 008372e0
void GenericPopup::Render()
{
uint8_t bVar1;
uint8_t *animName;
int textWidth;
AnimationState *frontAnimState;
uint8_t *idleName;
int line;
uint32_t *lineText;
bool bVar2;
float y;
float alignFactor;
uint32_t drawSettings;
uint32_t local_3c;
uint32_t local_38;
uint32_t local_34;
uint32_t local_30;
uint32_t local_2c;
uint32_t local_28;
Font *font;
float lineOffsetY;
Vector local_1c;
uint32_t local_14;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
local_8 = 0xffffffff;
puStack_c = &LAB_00b0245d;
local_10 = ExceptionList;
local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
ExceptionList = &local_10;
if ((*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x11])) + 0x1)))) != 0) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2))) != '\0')) {
font = &g_manager->_font2_TeamMeatEx12;
local_1c.x = (g_screenWidth - 480.0) * 0.5;
local_1c.y = (g_screenHeight - 270.0) * 0.5;
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x58])) + 0x1))) != '\0') {
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x25])) + 0x1))) == '\0') {
AnimationState::Render
(GHIDRA_CAST<AnimationState *>((this + 0x10)),&local_1c,&g_vectorZero,&g_vectorZero);
frontAnimState = GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x1a])) + 0x2))));
}
else {
AnimationState::Render
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x1a])) + 0x2)))),&local_1c,&g_vectorZero,&g_vectorZero);
frontAnimState = GHIDRA_CAST<AnimationState *>((this + 0x10));
}
AnimationState::Render(frontAnimState,&local_1c,&g_vectorZero,&g_vectorZero);
}
animName = *GHIDRA_CAST<uint8_t **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x11])) + 0x1))));
if ((animName != GHIDRA_CAST<uint8_t *>(0x0)) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x16])) + 0x2))) != '\0')) {
if (0xf < *GHIDRA_CAST<uint32_t *>((animName + 0x14))) {
animName = *GHIDRA_CAST<uint8_t **>(animName);
}
idleName = s_Idle;
do {
bVar1 = *animName;
bVar2 = bVar1 < *idleName;
if (bVar1 != *idleName) {
LAB_00837400:
local_1c.x = (float)(-GHIDRA_UINT(bVar2) | 1);
goto LAB_00837405;
}
if (bVar1 == 0) break;
bVar1 = animName[1];
bVar2 = bVar1 < idleName[1];
if (bVar1 != idleName[1]) goto LAB_00837400;
animName = animName + 2;
idleName = idleName + 2;
} while (bVar1 != 0);
local_1c.x = 0.0;
LAB_00837405:
if (local_1c.x == 0.0) {
lineOffsetY = -32.0;
lineText = GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x62])) + 0x2))));
line = 0;
local_1c.y = 18.0;
do {
alignFactor = 0.5;
if (GHIDRA_CAST<short *>(*lineText) != GHIDRA_CAST<short *>(0x0)) {
drawSettings = 0;
local_3c = 0xffff;
local_38 = 0;
local_34 = 0x3f800000;
local_30 = 0xffffffff;
local_2c = 0;
local_28 = 0;
local_8 = 0;
y = g_screenHeight * 0.5 + (&lineOffsetY)[line];
textWidth = Font::get_string_width_utf16(font,GHIDRA_CAST<short *>(*lineText),-1);
Font::draw_string_wide_unscaled
(font,GHIDRA_CAST<short *>(*lineText),
g_screenWidth * alignFactor -
(float)((double)textWidth + __uint_to_double_fixup[-(textWidth >> 0x1f)]) *
alignFactor,y,GHIDRA_CAST<KColor *>((this + 0x5c)),&drawSettings);
}
line = line + 1;
lineText = lineText + 1;
} while (line < 3);
}
}
}
ExceptionList = local_10;
return;
}
// 009c6130
void GenericPopup::destructor()
{
char isLastRef;
uint32_t uVar1;
void *local_10;
uint8_t *puStack_c;
uint32_t local_8;
puStack_c = &LAB_00af0b40;
local_10 = ExceptionList;
uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
ExceptionList = &local_10;
*GHIDRA_CAST<uint8_t ***>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x6e])) + 0x2)))) = KAGE::Network::Multiplayer::ConstLobby::vftable;
local_8 = 0;
if (*GHIDRA_CAST<int **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x71])) + 0x1)))) != GHIDRA_CAST<int *>(0x0)) {
isLastRef = (**(code **)(**GHIDRA_CAST<int **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x71])) + 0x1)))) + 0xc))(uVar1);
if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) {
(*g_lobbyReleaseFn)(this + 0x70);
}
}
(GHIDRA_CAST<msvc::string *>((&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x66])) + 0x2))))))->msvc::string::_Tidy_deallocate();
local_8 = 1;
ANM2::Reset(GHIDRA_CAST<ANM2 *>(this));
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[0x1a])) + 0x2)))));
AnimationState::~AnimationState(GHIDRA_CAST<AnimationState *>((this + 0x10)));
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>((this + 8)))))->msvc::string::_Tidy_deallocate();
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(this))))->msvc::string::_Tidy_deallocate();
ExceptionList = local_10;
return;
}