--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
198 lines
6.2 KiB
C++
198 lines
6.2 KiB
C++
#include "classes.h"
|
|
|
|
// 009c25e0
|
|
MessagePopup::MessagePopup(void *font, void *callback, void *userData, Vector *position)
|
|
{
|
|
float posY;
|
|
|
|
*GHIDRA_CAST<uint8_t *>(this) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 8)) = 0x41c80000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xc)) = 0x41700000;
|
|
*(void **)(GHIDRA_CAST<char *>(this) + 4) = font;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x10)) = 0x3f800000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x14)) = 2;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x18)) = 3;
|
|
posY = position->y;
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c)) = position->x;
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) = posY;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x28)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x24)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x2c)) = 0x3f000000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x30)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x34)) = 1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x38)) = 0x3f800000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x3c)) = 0;
|
|
(GHIDRA_CAST<KColor *>((GHIDRA_CAST<KColor *>((GHIDRA_INT(this) + 0x40)))))->KColor::SetFromARGB(0xffffffff);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x54)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x58)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x5c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x60)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 100)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x68)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x6c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x70)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x74)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x78)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x7c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x80)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x84)) = 0xffffffff;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x88)) = 0xffffffff;
|
|
(GHIDRA_CAST<KColor *>((GHIDRA_CAST<KColor *>((GHIDRA_INT(this) + 0x8c)))))->KColor::SetFromARGB(0xffd3d3d3);
|
|
*GHIDRA_CAST<uint8_t *>(this) = *GHIDRA_CAST<uint8_t *>(this) | 7;
|
|
*(void **)(GHIDRA_CAST<char *>(this) + 0x7c) = callback;
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0xa0)) = 1;
|
|
*(void **)(GHIDRA_CAST<char *>(this) + 0x80) = userData;
|
|
return;
|
|
}
|
|
|
|
// 009c3b70
|
|
void MessagePopup::add_blank_footer(uint8_t *headerText, uint8_t *messageText, void *popup)
|
|
{
|
|
uint32_t popupLine;
|
|
uint8_t *pbStack_34;
|
|
uint32_t local_30;
|
|
uint32_t local_2c;
|
|
uint32_t local_28;
|
|
uint32_t uStack_24;
|
|
uint32_t uStack_20;
|
|
uint32_t uStack_1c;
|
|
uint32_t local_18;
|
|
float local_14;
|
|
float local_10;
|
|
uint32_t local_c;
|
|
|
|
local_28 = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
local_14 = g_vectorZero.x;
|
|
popupLine = 0;
|
|
local_30 = 0xffffffff;
|
|
local_2c = 0xffffffff;
|
|
local_18 = 0;
|
|
local_10 = g_vectorZero.y;
|
|
local_c = 1;
|
|
pbStack_34 = headerText;
|
|
msvc::vector<48byte>::push_back(&popupLine);
|
|
popupLine = 0;
|
|
local_30 = 0xffffffff;
|
|
local_2c = 0xffffffff;
|
|
local_28 = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
local_18 = 0;
|
|
local_14 = 0.0;
|
|
local_10 = 20.0;
|
|
local_c = 1;
|
|
pbStack_34 = messageText;
|
|
msvc::vector<48byte>::push_back(&popupLine);
|
|
return;
|
|
}
|
|
|
|
// 009c3c30
|
|
void MessagePopup::add_ok_button(uint8_t *text, void *popupDesc)
|
|
{
|
|
uint32_t entry;
|
|
uint8_t *entryText;
|
|
uint32_t local_30;
|
|
uint32_t local_2c;
|
|
uint32_t entryColor;
|
|
uint32_t uStack_24;
|
|
uint32_t uStack_20;
|
|
uint32_t uStack_1c;
|
|
uint32_t local_18;
|
|
float entryOffsetX;
|
|
float entryOffsetY;
|
|
uint32_t local_c;
|
|
|
|
entryColor = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
entryOffsetX = g_vectorZero.x;
|
|
entry = 0;
|
|
local_30 = 0xffffffff;
|
|
local_2c = 0xffffffff;
|
|
local_18 = 0;
|
|
entryOffsetY = g_vectorZero.y;
|
|
local_c = 1;
|
|
entryText = text;
|
|
msvc::vector<48byte>::push_back(&entry);
|
|
entry = 0;
|
|
entryText = GHIDRA_CAST<uint8_t *>(0xb7ed98);
|
|
local_30 = 0;
|
|
local_2c = 0xffffffff;
|
|
entryColor = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
local_18 = 0;
|
|
entryOffsetX = 0.0;
|
|
entryOffsetY = 35.0;
|
|
local_c = 1;
|
|
msvc::vector<48byte>::push_back(&entry);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(popupDesc) + 0x84)) = 0;
|
|
return;
|
|
}
|
|
|
|
// 009c3d10
|
|
void MessagePopup::add_yes_no_buttons(uint8_t *message, void *popup)
|
|
{
|
|
uint32_t entry;
|
|
uint8_t *entryText;
|
|
uint32_t entryId;
|
|
uint32_t local_2c;
|
|
uint32_t entryColor;
|
|
uint32_t uStack_24;
|
|
uint32_t uStack_20;
|
|
uint32_t uStack_1c;
|
|
uint32_t local_18;
|
|
float entryOffsetX;
|
|
float entryOffsetY;
|
|
uint32_t local_c;
|
|
|
|
entryColor = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
entryOffsetX = g_vectorZero.x;
|
|
entry = 0;
|
|
entryId = 0xffffffff;
|
|
local_2c = 0xffffffff;
|
|
local_18 = 0;
|
|
entryOffsetY = g_vectorZero.y;
|
|
local_c = 1;
|
|
entryText = message;
|
|
msvc::vector<48byte>::push_back(&entry);
|
|
entry = 0;
|
|
entryText = GHIDRA_CAST<uint8_t *>(0xb7edac);
|
|
entryId = 1;
|
|
local_2c = 0xffffffff;
|
|
entryColor = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
local_18 = 0;
|
|
entryOffsetX = 0.0;
|
|
entryOffsetY = 35.0;
|
|
local_c = 1;
|
|
msvc::vector<48byte>::push_back(&entry);
|
|
entryColor = 0x3e5cdcdd;
|
|
uStack_24 = 0x3e2cacad;
|
|
uStack_20 = 0x3e34b4b5;
|
|
uStack_1c = 0x3f800000;
|
|
entry = 0;
|
|
entryOffsetX = g_vectorZero.x;
|
|
entryText = GHIDRA_CAST<uint8_t *>(0xb7edc0);
|
|
entryId = 2;
|
|
local_2c = 0xffffffff;
|
|
local_18 = 0;
|
|
entryOffsetY = g_vectorZero.y;
|
|
local_c = 1;
|
|
msvc::vector<48byte>::push_back(&entry);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(popup) + 0x84)) = 2;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(popup) + 0x88)) = 1;
|
|
return;
|
|
}
|