Files
isaac-port/generated-src/popup_manager.cpp
T
shweetandClaude Opus 5.5 3ce74c6e2d Reconstruction layout: generated-src/ (generated) and src/ (curated), CMake, the first takeover: RNG
The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function
defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body.
src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read
from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT,
from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra).
structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout.

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

43 lines
1.2 KiB
C++

#include "classes.h"
// 009c3ab0
void PopupManager::close(int *popupId, int *result)
{
int *piVar1;
int *node;
int *this_00;
longlong elapsedMs;
int *listHead;
if (*popupId != -1) {
piVar1 = GHIDRA_CAST<int *>((GHIDRA_INT(this) + 8));
(**(code **)(*piVar1 + 0xc))(0xffffffff);
this_00 = GHIDRA_CAST<int *>(0x0);
listHead = *GHIDRA_CAST<int **>(this);
node = GHIDRA_CAST<int *>(*listHead);
if (node != listHead) {
while (this_00 = GHIDRA_CAST<int *>(node[2]), *this_00 != *popupId) {
node = GHIDRA_CAST<int *>(*node);
if (node == listHead) {
(**(code **)(*piVar1 + 0x10))();
return;
}
}
}
(**(code **)(*piVar1 + 0x10))();
if ((this_00 != GHIDRA_CAST<int *>(0x0)) && (this_00[1] < 3)) {
elapsedMs = (GHIDRA_CAST<Popup *>((this_00)))->Popup::get_elapsed_ms();
if ((GHIDRA_INT(((ulonglong)elapsedMs >> 0x20)) == 0) && (GHIDRA_UINT(elapsedMs) < GHIDRA_UINT(this_00[0x15]))) {
this_00[6] = *result;
return;
}
this_00[6] = -0x1010102;
if ((code *)this_00[0x28] != (code *)0x0) {
(*(code *)this_00[0x28])(result,this_00[0x29]);
}
(GHIDRA_CAST<Popup *>((this_00)))->Popup::set_state(3);
}
}
return;
}