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>
This commit is contained in:
1 parent
2ff2d5d87f
commit
3ce74c6e2d
331 files changed
+485
-7835
No files matched your search
@@ -0,0 +1,42 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user