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>
121 lines
9.9 KiB
C++
121 lines
9.9 KiB
C++
#include "classes.h"
|
|
|
|
// 0098f720
|
|
FXParams::FXParams()
|
|
{
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x10)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(this) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x4)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x8)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0xc)))) = 0;
|
|
this->brightness = 0.0;
|
|
this->contrast = 1.0;
|
|
this->useWaterV2 = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x30)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x20)))) = 0x3d23d70a;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x24)))) = 0x3d23d70a;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x28)))) = 0x3d23d70a;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x2c)))) = 0x3f19999a;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x44)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x34)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x38)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x3c)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x40)))) = 0x3f800000;
|
|
this->shadowAlpha = 0.5;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x10)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>((this + 1)) = 0x3d75c28f;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x4)))) = 0x3da3d70a;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x8)))) = 0x3e051eb8;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0xc)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x24)))) = 0;
|
|
this[1].brightness = 1.0;
|
|
this[1].contrast = 1.0;
|
|
*GHIDRA_CAST<undefined4 *>(&this[1].useWaterV2) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x20)))) = 0x3f19999a;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x28)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x2c)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x30)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x34)))) = 0x3f800000;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x38)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x3c)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x40)))) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x44)))) = 0;
|
|
this[1].shadowAlpha = 0.0;
|
|
*GHIDRA_CAST<undefined4 *>((this + 2)) = 0;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[2])) + 0x4)))) = 0;
|
|
return this;
|
|
}
|
|
|
|
// 009937b0
|
|
void FXParams::operator_assign(void *other)
|
|
{
|
|
undefined4 uVar1;
|
|
undefined4 uVar2;
|
|
undefined4 uVar3;
|
|
float fVar4;
|
|
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 4));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 8));
|
|
uVar3 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0xc));
|
|
*GHIDRA_CAST<undefined4 *>(this) = *GHIDRA_CAST<undefined4 *>(other);
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x4)))) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x8)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0xc)))) = uVar3;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x10)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x10));
|
|
this->brightness = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(other) + 0x14));
|
|
this->contrast = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(other) + 0x18));
|
|
this->useWaterV2 = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(other) + 0x1c));
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x24));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x28));
|
|
uVar3 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x2c));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x20)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x20));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x24)))) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x28)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x2c)))) = uVar3;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x30)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x30));
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x38));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x3c));
|
|
uVar3 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x40));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x34)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x34));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x38)))) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x3c)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x40)))) = uVar3;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((this)) + 0x44)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x44));
|
|
this->shadowAlpha = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(other) + 0x48));
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x50));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x54));
|
|
uVar3 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x58));
|
|
*GHIDRA_CAST<undefined4 *>((this + 1)) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x4c));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x4)))) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x8)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0xc)))) = uVar3;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x10)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x5c));
|
|
fVar4 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(other) + 100));
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x68));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x6c));
|
|
this[1].brightness = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(other) + 0x60));
|
|
this[1].contrast = fVar4;
|
|
*GHIDRA_CAST<undefined4 *>(&this[1].useWaterV2) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x20)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x24)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x70));
|
|
if (GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x28)))) != GHIDRA_CAST<undefined4 *>((GHIDRA_INT(other) + 0x74))) {
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x78));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x7c));
|
|
uVar3 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x80));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x28)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x74));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x2c)))) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x30)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x34)))) = uVar3;
|
|
uVar1 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x88));
|
|
uVar2 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x8c));
|
|
uVar3 = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x90));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x38)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x84));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x3c)))) = uVar1;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x40)))) = uVar2;
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[1])) + 0x44)))) = uVar3;
|
|
*GHIDRA_CAST<undefined8 *>(&this[1].shadowAlpha) = *GHIDRA_CAST<undefined8 *>((GHIDRA_CAST<char *>(other) + 0x94));
|
|
*GHIDRA_CAST<undefined4 *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(this[2])) + 0x4)))) = *GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(other) + 0x9c));
|
|
}
|
|
return;
|
|
}
|