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

77 lines
3.9 KiB
C++

#include "classes.h"
// 00997ef0
void * FXLayer::copy_constructor(void *other)
{
undefined4 *puVar1;
undefined4 uVar2;
undefined4 uVar3;
undefined4 uVar4;
uint uVar5;
void *newData;
undefined4 *dest;
uint byteCount;
undefined4 *src;
void *local_10;
undefined1 *puStack_c;
undefined4 local_8;
undefined4 *srcEnd;
local_8 = 0xffffffff;
puStack_c = &LAB_00b0d700;
local_10 = ExceptionList;
uVar5 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
ExceptionList = &local_10;
*GHIDRA_CAST<undefined4 *>(this) = *GHIDRA_CAST<undefined4 *>(other);
(GHIDRA_CAST<KAGE::SmartPointer *>(((void *)(GHIDRA_INT(this) + 4))))->KAGE::SmartPointer::operator_assign((void *)(GHIDRA_INT(other) + 4));
local_8 = 0;
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0xc)) = 0;
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x10)) = 0;
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x14)) = 0;
srcEnd = *GHIDRA_CAST<undefined4 **>((GHIDRA_CAST<char *>(other) + 0x10));
src = *GHIDRA_CAST<undefined4 **>((GHIDRA_CAST<char *>(other) + 0xc));
if (src != srcEnd) {
byteCount = (GHIDRA_INT(srcEnd) - GHIDRA_INT(src)) / 0x14;
if (0xccccccc < byteCount) {
/* WARNING: Subroutine does not return */
FUN_0040cee0(uVar5);
}
byteCount = byteCount * 0x14;
newData = std::_Allocate(byteCount);
*(void **)(GHIDRA_CAST<char *>(this) + 0xc) = newData;
*(void **)(GHIDRA_CAST<char *>(this) + 0x10) = newData;
*(void **)(GHIDRA_CAST<char *>(this) + 0x14) = (void *)(GHIDRA_INT(newData) + byteCount);
dest = *GHIDRA_CAST<undefined4 **>((GHIDRA_CAST<char *>(this) + 0xc));
do {
uVar2 = src[1];
uVar3 = src[2];
uVar4 = src[3];
*dest = *src;
dest[1] = uVar2;
dest[2] = uVar3;
dest[3] = uVar4;
puVar1 = src + 4;
src = src + 5;
dest[4] = *puVar1;
dest = dest + 5;
} while (src != srcEnd);
*GHIDRA_CAST<undefined4 **>((GHIDRA_CAST<char *>(this) + 0x10)) = dest;
}
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x18)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x18));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x1c)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x1c));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x20)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x20));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x24)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x24));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x28)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x28));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x2c)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x2c));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x30)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x30));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x34)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x34));
*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(this) + 0x38)) = *GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(other) + 0x38));
*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(this) + 0x39)) = *GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(other) + 0x39));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x3c)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x3c));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x40)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x40));
*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(this) + 0x44)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x44));
*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(this) + 0x48)) = *GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(other) + 0x48));
ExceptionList = local_10;
return this;
}