--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>
1461 lines
56 KiB
C++
1461 lines
56 KiB
C++
#include "classes.h"
|
|
|
|
// 009c01d0
|
|
void * Popup::constructor(void *desc)
|
|
{
|
|
uint32_t uVar1;
|
|
int64_t lVar2;
|
|
int64_t lVar3;
|
|
int64_t lVar4;
|
|
uint32_t uVar5;
|
|
uint32_t uVar6;
|
|
char cVar7;
|
|
void *loadedImage;
|
|
uint32_t uVar8;
|
|
uint32_t uVar9;
|
|
int iVar10;
|
|
uint64_t uVar11;
|
|
uint64_t timeNs;
|
|
uint32_t local_40;
|
|
int *local_3c;
|
|
uint32_t local_38;
|
|
uint32_t local_34;
|
|
uint32_t local_30;
|
|
uint32_t *image;
|
|
uint32_t local_28;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00b0ec1b;
|
|
local_1c = ExceptionList;
|
|
ExceptionList = &local_1c;
|
|
*GHIDRA_CAST<int *>(this) = DAT_00c72a24;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 8)) = 0;
|
|
DAT_00c72a24 = DAT_00c72a24 + 1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xc)) = 0xffffffff;
|
|
uVar11 = GetTimeNs();
|
|
uVar8 = GHIDRA_UINT((uVar11 >> 0x20));
|
|
lVar2 = (uVar11 & 0xffffffff) * 0x431bde82;
|
|
local_30 = (uint32_t)((uint64_t)lVar2 >> 0x20);
|
|
lVar3 = (uint64_t)uVar8 * 0x431bde82;
|
|
local_34 = (uint32_t)((uint64_t)lVar3 >> 0x20);
|
|
local_28 = (uint32_t)lVar3;
|
|
uVar11 = (uint64_t)uVar8 * 0xd7b634db + ((uVar11 & 0xffffffff) * 0xd7b634db >> 0x20);
|
|
uVar9 = GHIDRA_UINT((uVar11 >> 0x20));
|
|
lVar2 = lVar2 + (uVar11 & 0xffffffff);
|
|
local_40 = (uint32_t)lVar2;
|
|
uVar8 = GHIDRA_UINT(((uint64_t)lVar2 >> 0x20));
|
|
lVar3 = lVar3 + (uint64_t)CONCAT14(CARRY4(uVar9,uVar8),uVar9 + uVar8);
|
|
uVar8 = GHIDRA_UINT(((uint64_t)lVar3 >> 0x20));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x18)) = 0xfefefefe;
|
|
image = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(this) + 0x1c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x10)) = GHIDRA_UINT(lVar3) >> 0x12 | uVar8 * 0x4000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x14)) = uVar8 >> 0x12;
|
|
*image = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x20)) = 0;
|
|
local_14 = 0;
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0x24)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x28)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x2c)) = 0x41c80000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x30)) = 0x41700000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x34)) = 0x3f800000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x38)) = 2;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x3c)) = 3;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x44)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x40)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x4c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x48)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x50)) = 0x3f000000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x54)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x58)) = 1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x5c)) = 0x3f800000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x60)) = 0;
|
|
(GHIDRA_CAST<KColor *>((GHIDRA_CAST<KColor *>((GHIDRA_INT(this) + 100)))))->KColor::SetFromARGB(0xffffffff);
|
|
*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)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x88)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x8c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x90)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x94)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x98)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x9c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa0)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa8)) = 0xffffffff;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xac)) = 0xffffffff;
|
|
(GHIDRA_CAST<KColor *>((GHIDRA_CAST<KColor *>((GHIDRA_INT(this) + 0xb0)))))->KColor::SetFromARGB(0xffd3d3d3);
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0x24)) = *GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0x24)) | 7;
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0xc4)) = 1;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xd4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xd0)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xdc)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xd8)) = 0;
|
|
*GHIDRA_CAST<uint8_t ***>((GHIDRA_CAST<char *>(this) + 200)) = IsaacRepentancePlus::Popup::LerpVector2::vftable;
|
|
*GHIDRA_CAST<uint8_t ***>((GHIDRA_CAST<char *>(this) + 0xf0)) = IsaacRepentancePlus::Popup::LerpVector2::vftable;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xfc)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xf8)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x104)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x100)) = 0;
|
|
*GHIDRA_CAST<uint8_t ***>((GHIDRA_CAST<char *>(this) + 0x118)) = IsaacRepentancePlus::Popup::LerpFloat::vftable;
|
|
timeNs = GetTimeNs();
|
|
uVar8 = GHIDRA_UINT((timeNs >> 0x20));
|
|
uVar11 = (timeNs & 0xffffffff) * 0xd7b634db;
|
|
local_40 = (uint32_t)uVar11;
|
|
lVar2 = (timeNs & 0xffffffff) * 0x431bde82;
|
|
local_30 = (uint32_t)((uint64_t)lVar2 >> 0x20);
|
|
lVar3 = (uint64_t)uVar8 * 0xd7b634db;
|
|
local_34 = (uint32_t)((uint64_t)lVar3 >> 0x20);
|
|
lVar4 = (uint64_t)uVar8 * 0x431bde82;
|
|
local_3c = GHIDRA_CAST<int *>(((uint64_t)lVar4 >> 0x20));
|
|
local_28 = (uint32_t)lVar4;
|
|
uVar11 = lVar3 + (uVar11 >> 0x20);
|
|
uVar9 = GHIDRA_UINT((uVar11 >> 0x20));
|
|
lVar2 = lVar2 + (uVar11 & 0xffffffff);
|
|
local_38 = (uint32_t)lVar2;
|
|
uVar8 = GHIDRA_UINT(((uint64_t)lVar2 >> 0x20));
|
|
lVar4 = lVar4 + (uint64_t)CONCAT14(CARRY4(uVar9,uVar8),uVar9 + uVar8);
|
|
uVar8 = GHIDRA_UINT(((uint64_t)lVar4 >> 0x20));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x138)) = GHIDRA_UINT(lVar4) >> 0x12 | uVar8 * 0x4000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x13c)) = uVar8 >> 0x12;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x140)) = 0;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(desc) + 0x3c)) == 1) {
|
|
loadedImage = Manager::LoadImage(&local_40,GHIDRA_CAST<uint8_t *>("gfx/ui/Popup_Beige.png"));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 2;
|
|
(GHIDRA_CAST<KAGE::SmartPointer *>((image)))->KAGE::SmartPointer::operator_assign(loadedImage);
|
|
local_14 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),3);
|
|
}
|
|
else {
|
|
loadedImage = Manager::LoadImage(&local_40,GHIDRA_CAST<uint8_t *>("gfx/ui/Popup_White.png"));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 4;
|
|
(GHIDRA_CAST<KAGE::SmartPointer *>((image)))->KAGE::SmartPointer::operator_assign(loadedImage);
|
|
local_14 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),5);
|
|
}
|
|
if (((local_3c != GHIDRA_CAST<int *>(0x0)) && (cVar7 = (**(code **)(*local_3c + 0xc))(), cVar7 != '\0')) &&
|
|
(g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)(&local_40);
|
|
}
|
|
local_14 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),1);
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0x24)) = *GHIDRA_CAST<uint8_t *>(desc);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x28)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 4));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x2c)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 8));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x30)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0xc));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x34)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x10));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x38)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x14));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x3c)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x18));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x40)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x1c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x44)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x20));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x48)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x24));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x4c)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x28));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x50)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x2c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x54)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x30));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x58)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x34));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x5c)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x38));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x60)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x3c));
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x44));
|
|
uVar5 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x48));
|
|
uVar6 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x4c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 100)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x40));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x68)) = uVar1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x6c)) = uVar5;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x70)) = uVar6;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x74)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x50));
|
|
if (GHIDRA_CAST<uint32_t *>((GHIDRA_INT(this) + 0x78)) != GHIDRA_CAST<uint32_t *>((GHIDRA_INT(desc) + 0x54))) {
|
|
FUN_009c3070(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x54)),*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x58)),local_3c);
|
|
}
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x6c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x94)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x70));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x90)) = uVar1;
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x74));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x9c)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x78));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x98)) = uVar1;
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x7c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa4)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x80));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa0)) = uVar1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa8)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x84));
|
|
uVar1 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x90));
|
|
uVar5 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x94));
|
|
uVar6 = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x98));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xb0)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x8c));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xb4)) = uVar1;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xb8)) = uVar5;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xbc)) = uVar6;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xc0)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(desc) + 0x9c));
|
|
*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(this) + 0xc4)) = *GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(desc) + 0xa0));
|
|
build_lines((void *)(GHIDRA_INT(this) + 0x24));
|
|
set_state(this,1);
|
|
local_3c = GHIDRA_CAST<int *>(0);
|
|
if (0 < *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(desc) + 0x88))) {
|
|
local_3c = GHIDRA_CAST<int *>(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(desc) + 0x88)));
|
|
}
|
|
iVar10 = 0;
|
|
if (-1 < GHIDRA_INT(local_3c)) {
|
|
do {
|
|
FUN_009c2210(1);
|
|
iVar10 = iVar10 + 1;
|
|
} while (iVar10 <= GHIDRA_INT(local_3c));
|
|
}
|
|
ExceptionList = local_1c;
|
|
return this;
|
|
}
|
|
|
|
// 009c06a0
|
|
float * Popup::get_center(float *param_1)
|
|
{
|
|
float fVar1;
|
|
int iVar2;
|
|
float *pfVar3;
|
|
int in_ECX;
|
|
float fVar4;
|
|
uint8_t local_20 [8];
|
|
uint8_t local_18 [4];
|
|
float local_14;
|
|
float local_10;
|
|
float local_c;
|
|
|
|
iVar2 = *GHIDRA_CAST<int *>((in_ECX + 200));
|
|
param_1[1] = 0.0;
|
|
*param_1 = 0.0;
|
|
pfVar3 = GHIDRA_CAST<float *>((**(code **)(iVar2 + 8))(local_18));
|
|
fVar1 = *pfVar3;
|
|
local_c = *GHIDRA_CAST<float *>((in_ECX + 0x48));
|
|
local_10 = pfVar3[1];
|
|
local_14 = *GHIDRA_CAST<float *>((in_ECX + 0x4c));
|
|
(**(code **)(*GHIDRA_CAST<int *>((in_ECX + 0xf0)) + 8))(local_20);
|
|
fVar4 = DAT_00c79980 * 0.5;
|
|
*param_1 = fVar1 + local_c + DAT_00c7997c * 0.5;
|
|
param_1[1] = (local_10 + local_14 + fVar4) - 9.0;
|
|
return param_1;
|
|
}
|
|
|
|
// 009c0760
|
|
Vector * Popup::get_size(Vector *outSize)
|
|
{
|
|
float width;
|
|
float height;
|
|
float firstSize;
|
|
float secondSize [4];
|
|
int firstWidgetVtable;
|
|
|
|
firstWidgetVtable = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 200));
|
|
outSize->y = 0.0;
|
|
outSize->x = 0.0;
|
|
(**(code **)(firstWidgetVtable + 8))(&firstSize);
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 8))(secondSize);
|
|
width = firstSize * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x40));
|
|
FUN_008370b0();
|
|
height = secondSize[0] * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44));
|
|
FUN_008370b0();
|
|
outSize->x = width;
|
|
outSize->y = height;
|
|
return outSize;
|
|
}
|
|
|
|
// 009c07f0
|
|
int64_t Popup::get_elapsed_ms()
|
|
{
|
|
int64_t lVar1;
|
|
int64_t lVar2;
|
|
uint32_t uVar3;
|
|
uint32_t uVar4;
|
|
uint32_t uVar5;
|
|
uint64_t nowNs;
|
|
|
|
nowNs = GetTimeNs();
|
|
uVar4 = GHIDRA_UINT((nowNs >> 0x20));
|
|
lVar1 = (nowNs & 0xffffffff) * 0x431bde82;
|
|
lVar2 = (uint64_t)uVar4 * 0xd7b634db + ((nowNs & 0xffffffff) * 0xd7b634db >> 0x20);
|
|
uVar5 = GHIDRA_UINT(((uint64_t)lVar2 >> 0x20));
|
|
uVar3 = GHIDRA_INT(((uint64_t)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2)));
|
|
lVar1 = (uint64_t)uVar4 * 0x431bde82 + (uint64_t)CONCAT14(CARRY4(uVar5,uVar3),uVar5 + uVar3);
|
|
uVar4 = GHIDRA_UINT(((uint64_t)lVar1 >> 0x20));
|
|
uVar3 = GHIDRA_UINT(lVar1) >> 0x12 | uVar4 * 0x4000;
|
|
return CONCAT44(((uVar4 >> 0x12) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x14))) -
|
|
GHIDRA_UINT((uVar3 < *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x10)))),uVar3 - *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x10)));
|
|
}
|
|
|
|
// 009c0960
|
|
uint8_t Popup::Update(uint8_t isFirstInQueue)
|
|
{
|
|
int iVar1;
|
|
uint8_t bVar2;
|
|
char cVar3;
|
|
uint32_t in_XMM0_Da;
|
|
float fadeAlpha;
|
|
uint32_t in_XMM0_Db;
|
|
int64_t elapsedMs;
|
|
undefined3 in_stack_00000005;
|
|
uint32_t *resultSlot;
|
|
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
|
|
GetTimeNs();
|
|
FUN_00aefe20();
|
|
fadeAlpha = (float)(double)CONCAT44(in_XMM0_Db,in_XMM0_Da) / 100.0;
|
|
if (fadeAlpha <= 0.0) {
|
|
fadeAlpha = 0.0;
|
|
}
|
|
if (1.0 <= fadeAlpha) {
|
|
fadeAlpha = 1.0;
|
|
}
|
|
if (iVar1 < 3) {
|
|
fadeAlpha = fadeAlpha * 0.4 + 0.0;
|
|
}
|
|
else {
|
|
fadeAlpha = 0.4 - fadeAlpha * 0.4;
|
|
}
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x140)) = fadeAlpha;
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4));
|
|
if (iVar1 == 1) {
|
|
show(this);
|
|
goto LAB_009c0ba9;
|
|
}
|
|
if (iVar1 != 2) {
|
|
if ((iVar1 == 3) && (bVar2 = hide(this), bVar2 != 0)) {
|
|
return 1;
|
|
}
|
|
goto LAB_009c0ba9;
|
|
}
|
|
if (isFirstInQueue == 0) goto LAB_009c0ba9;
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xc)) < 0) ||
|
|
((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x88)) - *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x84))) / 0x30 <= *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xc)))
|
|
) {
|
|
LAB_009c0ad6:
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xa8)) != -1) {
|
|
_isFirstInQueue = 0xf;
|
|
cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))
|
|
(0xffffffff,FUN_00a209e0,&isFirstInQueue,0,0);
|
|
if ((cVar3 != '\0') && (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) < 3)) {
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x18)) = 0xfefefefe;
|
|
if (*(code **)(GHIDRA_CAST<char *>(this) + 0xa0) != (code *)0x0) {
|
|
(**(code **)(GHIDRA_CAST<char *>(this) + 0xa0))(GHIDRA_INT(this) + 0xa8,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa4)));
|
|
}
|
|
set_state(this,3);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
_isFirstInQueue = 0xe;
|
|
cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&isFirstInQueue,0,0);
|
|
if (cVar3 == '\0') goto LAB_009c0ad6;
|
|
FUN_009c1200(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x84)) + 8 + *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xc)) * 0x30,0);
|
|
}
|
|
_isFirstInQueue = 0x16;
|
|
cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&isFirstInQueue,0,0);
|
|
if (cVar3 == '\0') {
|
|
_isFirstInQueue = 0x17;
|
|
cVar3 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&isFirstInQueue,0,0);
|
|
if (cVar3 != '\0') {
|
|
FUN_009c2210(1);
|
|
}
|
|
}
|
|
else {
|
|
FUN_009c2210(0xffffffff);
|
|
}
|
|
LAB_009c0ba9:
|
|
resultSlot = GHIDRA_CAST<uint32_t *>((GHIDRA_INT(this) + 0x18));
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x18)) != -0x1010102) {
|
|
elapsedMs = get_elapsed_ms(this);
|
|
if (((GHIDRA_INT(((uint64_t)elapsedMs >> 0x20)) != 0) ||
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x54)) <= GHIDRA_UINT(elapsedMs))) && (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) < 3)) {
|
|
elapsedMs = get_elapsed_ms(this);
|
|
if ((GHIDRA_INT(((uint64_t)elapsedMs >> 0x20)) == 0) &&
|
|
(GHIDRA_UINT(elapsedMs) < *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x54)))) {
|
|
*resultSlot = *resultSlot;
|
|
}
|
|
else {
|
|
*resultSlot = 0xfefefefe;
|
|
if (*(code **)(GHIDRA_CAST<char *>(this) + 0xa0) != (code *)0x0) {
|
|
(**(code **)(GHIDRA_CAST<char *>(this) + 0xa0))(resultSlot,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0xa4)));
|
|
}
|
|
set_state(this,3);
|
|
}
|
|
}
|
|
}
|
|
if (*(code **)(GHIDRA_CAST<char *>(this) + 0x90) != (code *)0x0) {
|
|
(**(code **)(GHIDRA_CAST<char *>(this) + 0x90))(this,*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x94)));
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// 009c1260
|
|
void Popup::set_state(int state)
|
|
{
|
|
if (state == 1) {
|
|
show(this);
|
|
}
|
|
else {
|
|
if (state == 2) {
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 200)))(&g_vectorZero);
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0xf0)))(&g_vectorOne);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 2;
|
|
return;
|
|
}
|
|
if (state == 3) {
|
|
hide(this);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 3;
|
|
return;
|
|
}
|
|
}
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) = state;
|
|
return;
|
|
}
|
|
|
|
// 009c12d0
|
|
void Popup::show()
|
|
{
|
|
int iVar1;
|
|
char isTweenDone;
|
|
uint32_t local_10;
|
|
int local_c;
|
|
float local_8;
|
|
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) != 1) {
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 200)))(&g_vectorZero);
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0xf0)))(&g_vectorOne);
|
|
local_8 = 1.0;
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0x118)))(&local_8);
|
|
local_8 = 1.0 / *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x5c));
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x58)) == 1) {
|
|
local_10 = 0;
|
|
local_c = -0x3ca10000;
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 200)))(&local_10);
|
|
local_c = __ftoui3();
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 200)) + 4))(&g_vectorZero,&local_c);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 8)) = 1;
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0xf0)))(&DAT_00c375e0);
|
|
local_c = __ftoui3();
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 4))(&DAT_00c375ec,&local_c);
|
|
}
|
|
else {
|
|
local_c = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x58)) + -2;
|
|
if (local_c == 0) {
|
|
(*(code *)**GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0x118)))(&local_c);
|
|
local_c = __ftoui3();
|
|
local_8 = 1.0;
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x118)) + 4))(&local_8,&local_c);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 1;
|
|
return;
|
|
}
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 1;
|
|
return;
|
|
}
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x58));
|
|
if (iVar1 != 0) {
|
|
if (iVar1 == 1) {
|
|
isTweenDone = (**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 0xc))();
|
|
if (isTweenDone == '\0') {
|
|
return;
|
|
}
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 8));
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 8)) = iVar1 + 1;
|
|
if (iVar1 + 1 < 4) {
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 4))
|
|
(&DAT_00c375ec + iVar1 * 0xc,&DAT_00c375e8 + iVar1 * 3);
|
|
return;
|
|
}
|
|
}
|
|
else {
|
|
if (iVar1 != 2) {
|
|
return;
|
|
}
|
|
isTweenDone = (**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x118)) + 0xc))();
|
|
if (isTweenDone == '\0') {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
set_state(this,2);
|
|
return;
|
|
}
|
|
|
|
// 009c14c0
|
|
uint8_t Popup::hide()
|
|
{
|
|
int64_t lVar1;
|
|
int64_t lVar2;
|
|
char isTweenDone;
|
|
int iVar3;
|
|
uint32_t uVar4;
|
|
uint32_t uVar5;
|
|
uint32_t uVar6;
|
|
uint64_t nowNs;
|
|
void *local_18;
|
|
int local_14;
|
|
uint32_t local_10 [2];
|
|
uint32_t local_8;
|
|
|
|
iVar3 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x58));
|
|
local_18 = this;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) != 3) {
|
|
if (iVar3 == 1) {
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 8)) = 3;
|
|
local_10[0] = __ftoui3();
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 4))(&DAT_00c37604,local_10);
|
|
nowNs = GetTimeNs();
|
|
uVar5 = GHIDRA_UINT((nowNs >> 0x20));
|
|
lVar1 = (nowNs & 0xffffffff) * 0x431bde82;
|
|
lVar2 = (uint64_t)uVar5 * 0xd7b634db + ((nowNs & 0xffffffff) * 0xd7b634db >> 0x20);
|
|
uVar6 = GHIDRA_UINT(((uint64_t)lVar2 >> 0x20));
|
|
uVar4 = GHIDRA_INT(((uint64_t)lVar1 >> 0x20)) + GHIDRA_UINT(CARRY4(GHIDRA_UINT(lVar1),GHIDRA_UINT(lVar2)));
|
|
lVar1 = (uint64_t)uVar5 * 0x431bde82 + (uint64_t)CONCAT14(CARRY4(uVar6,uVar4),uVar6 + uVar4)
|
|
;
|
|
uVar4 = GHIDRA_UINT(((uint64_t)lVar1 >> 0x20));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_18) + 0x138)) = GHIDRA_UINT(lVar1) >> 0x12 | uVar4 * 0x4000;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(local_18) + 0x13c)) = uVar4 >> 0x12;
|
|
this = local_18;
|
|
}
|
|
else if (iVar3 == 2) {
|
|
local_8 = __ftoui3();
|
|
local_10[0] = 0;
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x118)) + 4))(local_10,&local_8);
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 3;
|
|
return 0;
|
|
}
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 4)) = 3;
|
|
return 0;
|
|
}
|
|
if (iVar3 == 0) {
|
|
return 1;
|
|
}
|
|
if (iVar3 == 1) {
|
|
isTweenDone = (**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 0xc))();
|
|
if (isTweenDone != '\0') {
|
|
iVar3 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 8)) + -1;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 8)) = iVar3;
|
|
if (iVar3 < 0) {
|
|
return 1;
|
|
}
|
|
if (iVar3 == 0) {
|
|
local_18 = (void *)0x70;
|
|
local_10[0] = 0xc3690000;
|
|
local_14 = iVar3;
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 200)) + 4))(&local_14,&local_18);
|
|
iVar3 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 8));
|
|
}
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 4))
|
|
(&DAT_00c375e0 + iVar3 * 0xc,&DAT_00c375e8 + iVar3 * 3);
|
|
}
|
|
}
|
|
else if ((iVar3 == 2) &&
|
|
(isTweenDone = (**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x118)) + 0xc))(), isTweenDone != '\0')) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// 009c16b0
|
|
void Popup::render_frame(KColor *color, Vector *offset)
|
|
{
|
|
float *pfVar1;
|
|
KColor *color_00;
|
|
KColor *color_01;
|
|
int dwordsLeft;
|
|
KColor *color_02;
|
|
KColor *color_03;
|
|
KColor *color_04;
|
|
KColor *color_05;
|
|
KColor *color_06;
|
|
KColor *color_07;
|
|
KColor *color_08;
|
|
KColor *color_09;
|
|
float *dst;
|
|
float fVar2;
|
|
float fVar3;
|
|
float fVar4;
|
|
float fVar5;
|
|
uint8_t quadBuffer [112];
|
|
uint8_t posOut [4];
|
|
float outerHalfHeight;
|
|
float colorQuad [6];
|
|
float corner3X;
|
|
float corner3Y;
|
|
float color0Red;
|
|
float color0Green;
|
|
float color0Blue;
|
|
float color0Alpha;
|
|
int color0Unk;
|
|
float color1Red;
|
|
float color1Green;
|
|
float color1Blue;
|
|
float color1Alpha;
|
|
int color1Unk;
|
|
float color2Red;
|
|
float color2Green;
|
|
float color2Blue;
|
|
float color2Alpha;
|
|
int color2Unk;
|
|
float color3Red;
|
|
float color3Green;
|
|
float color3Blue;
|
|
float color3Alpha;
|
|
int color3Unk;
|
|
uint32_t sourceQuad;
|
|
uint32_t sourceY0;
|
|
uint32_t sourceX1;
|
|
uint32_t sourceY1;
|
|
uint32_t sourceX2;
|
|
uint32_t sourceY2;
|
|
uint32_t sourceX3;
|
|
uint32_t sourceY3;
|
|
int local_64;
|
|
Vector scratchVec;
|
|
float local_58;
|
|
float local_54;
|
|
float halfHeight;
|
|
float local_4c;
|
|
float centerY;
|
|
float local_44;
|
|
float centerX;
|
|
float halfWidth;
|
|
void *self;
|
|
uint32_t tmpQuadX0;
|
|
uint32_t tmpQuadY0;
|
|
uint32_t tmpQuadX1;
|
|
uint32_t tmpQuadY1;
|
|
KColor local_24;
|
|
|
|
self = this;
|
|
pfVar1 = GHIDRA_CAST<float *>((**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 200)) + 8))(posOut));
|
|
local_54 = *pfVar1 + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x48));
|
|
local_58 = pfVar1[1] + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x4c));
|
|
(**(code **)(*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0xf0)) + 8))(&scratchVec);
|
|
fVar2 = scratchVec.x * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x40));
|
|
FUN_008370b0();
|
|
fVar3 = scratchVec.y * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x44));
|
|
local_44 = fVar2;
|
|
FUN_008370b0();
|
|
local_4c = fVar3 / 98.0;
|
|
fVar4 = local_44 * 0.5;
|
|
fVar3 = fVar3 * 0.5;
|
|
fVar2 = DAT_00c7997c * 0.5 + local_54 + offset->x;
|
|
fVar5 = ((DAT_00c79980 * 0.5 + local_58) - 9.0) + offset->y;
|
|
halfHeight = fVar3;
|
|
centerY = fVar5;
|
|
local_44 = local_44 / 211.0;
|
|
centerX = fVar2;
|
|
halfWidth = fVar4;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
(GHIDRA_CAST<ColorQuad *>((colorQuad)))->ColorQuad::ColorQuad(color_00);
|
|
tmpQuadX0 = 0x42f00000;
|
|
tmpQuadY1 = 0x41200000;
|
|
tmpQuadY0 = 0x41200000;
|
|
tmpQuadX1 = 0x43000000;
|
|
local_24._red = 120.0;
|
|
local_24._blue = 128.0;
|
|
sourceQuad = 0x42f00000;
|
|
sourceY0 = 0x41200000;
|
|
sourceX1 = 0x43000000;
|
|
sourceY1 = 0x41200000;
|
|
local_24._alpha = 18.0;
|
|
local_24._green = 18.0;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x42f00000;
|
|
sourceY2 = 0x41900000;
|
|
sourceX3 = 0x43000000;
|
|
sourceY3 = 0x41900000;
|
|
local_64 = local_24._unk;
|
|
local_54 = fVar2 - fVar4;
|
|
local_58 = fVar5 - fVar3;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color
|
|
(quadBuffer,fVar2 - fVar4,fVar5 - fVar3,fVar4 + fVar4 + (fVar2 - fVar4),
|
|
fVar3 + fVar3 + (fVar5 - fVar3),color_01);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
fVar4 = local_4c * 98.0;
|
|
tmpQuadX0 = 0x3f800000;
|
|
fVar2 = local_58 - 7.0;
|
|
tmpQuadY1 = 0x41e00000;
|
|
fVar3 = local_54 - fVar4;
|
|
tmpQuadY0 = 0x41e00000;
|
|
tmpQuadX1 = 0x42c60000;
|
|
local_24._red = 1.0;
|
|
local_24._blue = 99.0;
|
|
local_24._alpha = 35.0;
|
|
local_24._green = 35.0;
|
|
sourceQuad = 0x3f800000;
|
|
sourceY0 = 0x41e00000;
|
|
sourceX1 = 0x42c60000;
|
|
sourceY1 = 0x41e00000;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x3f800000;
|
|
sourceY2 = 0x420c0000;
|
|
sourceX3 = 0x42c60000;
|
|
sourceY3 = 0x420c0000;
|
|
local_64 = local_24._unk;
|
|
local_4c = fVar4;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color(quadBuffer,fVar3,fVar2,fVar3 + fVar4,fVar2 + 7.0,color_02);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
scratchVec.x = corner3X;
|
|
scratchVec.y = corner3Y;
|
|
(GHIDRA_CAST<Quad *>((colorQuad)))->Quad::rotate(&scratchVec,-1.5707964);
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
fVar4 = local_44 * 211.0;
|
|
tmpQuadX0 = 0x41000000;
|
|
fVar3 = centerX - halfWidth;
|
|
tmpQuadY1 = 0x3f800000;
|
|
tmpQuadY0 = 0x3f800000;
|
|
tmpQuadX1 = 0x435b0000;
|
|
local_24._red = 8.0;
|
|
local_24._blue = 219.0;
|
|
sourceQuad = 0x41000000;
|
|
sourceY0 = 0x3f800000;
|
|
sourceX1 = 0x435b0000;
|
|
sourceY1 = 0x3f800000;
|
|
local_24._alpha = 9.0;
|
|
local_24._green = 9.0;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x41000000;
|
|
sourceY2 = 0x41100000;
|
|
sourceX3 = 0x435b0000;
|
|
sourceY3 = 0x41100000;
|
|
outerHalfHeight = halfHeight + 8.0;
|
|
local_64 = local_24._unk;
|
|
fVar2 = centerY - outerHalfHeight;
|
|
local_44 = fVar4;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color(quadBuffer,fVar3,fVar2,fVar3 + fVar4,fVar2 + 8.0,color_03);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
tmpQuadX0 = 0x3f800000;
|
|
fVar2 = centerY + -halfHeight;
|
|
tmpQuadY1 = 0x42100000;
|
|
tmpQuadY0 = 0x42100000;
|
|
tmpQuadX1 = 0x42c60000;
|
|
local_24._red = 1.0;
|
|
local_24._blue = 99.0;
|
|
sourceQuad = 0x3f800000;
|
|
sourceY0 = 0x42100000;
|
|
sourceX1 = 0x42c60000;
|
|
sourceY1 = 0x42100000;
|
|
local_24._alpha = 43.0;
|
|
local_24._green = 43.0;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x3f800000;
|
|
sourceY2 = 0x422c0000;
|
|
sourceX3 = 0x42c60000;
|
|
sourceY3 = 0x422c0000;
|
|
local_64 = local_24._unk;
|
|
fVar3 = centerX + (halfWidth - local_4c);
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color
|
|
(quadBuffer,fVar3,fVar2,fVar3 + local_4c,fVar2 + 7.0,color_04);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
scratchVec.x = colorQuad[2];
|
|
scratchVec.y = colorQuad[3];
|
|
(GHIDRA_CAST<Quad *>((colorQuad)))->Quad::rotate(&scratchVec,-1.5707964);
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
fVar2 = centerY + halfHeight;
|
|
fVar3 = -halfWidth + centerX;
|
|
tmpQuadX0 = 0x40800000;
|
|
tmpQuadY1 = 0x41200000;
|
|
tmpQuadY0 = 0x41200000;
|
|
tmpQuadX1 = 0x43570000;
|
|
local_24._red = 4.0;
|
|
local_24._blue = 215.0;
|
|
local_24._alpha = 27.0;
|
|
local_24._green = 27.0;
|
|
sourceQuad = 0x40800000;
|
|
sourceY0 = 0x41200000;
|
|
sourceX1 = 0x43570000;
|
|
sourceY1 = 0x41200000;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x40800000;
|
|
sourceY2 = 0x41d80000;
|
|
sourceX3 = 0x43570000;
|
|
sourceY3 = 0x41d80000;
|
|
local_64 = local_24._unk;
|
|
local_4c = fVar2;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color
|
|
(quadBuffer,fVar3,fVar2,fVar3 + local_44,fVar2 + 17.0,color_05);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
local_24._red = 1.0;
|
|
tmpQuadX0 = 0x3f800000;
|
|
tmpQuadY1 = 0x40800000;
|
|
tmpQuadY0 = 0x40800000;
|
|
local_24._blue = 8.0;
|
|
tmpQuadX1 = 0x41000000;
|
|
local_24._alpha = 9.0;
|
|
fVar3 = local_54 - 7.0;
|
|
fVar2 = local_58 - 5.0;
|
|
local_24._green = 9.0;
|
|
sourceQuad = 0x3f800000;
|
|
sourceY0 = 0x40800000;
|
|
sourceX1 = 0x41000000;
|
|
sourceY1 = 0x40800000;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x3f800000;
|
|
sourceY2 = 0x41100000;
|
|
sourceX3 = 0x41000000;
|
|
sourceY3 = 0x41100000;
|
|
local_64 = local_24._unk;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color(quadBuffer,fVar3,fVar2,fVar3 + 7.0,fVar2 + 5.0,color_06);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
fVar3 = centerX + halfWidth;
|
|
fVar2 = -outerHalfHeight + centerY;
|
|
tmpQuadX0 = 0x435b0000;
|
|
tmpQuadY1 = 0x3f800000;
|
|
tmpQuadY0 = 0x3f800000;
|
|
tmpQuadX1 = 0x435e0000;
|
|
local_24._red = 219.0;
|
|
local_24._blue = 222.0;
|
|
local_24._alpha = 9.0;
|
|
local_24._green = 9.0;
|
|
sourceQuad = 0x435b0000;
|
|
sourceY0 = 0x3f800000;
|
|
sourceX1 = 0x435e0000;
|
|
sourceY1 = 0x3f800000;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x435b0000;
|
|
sourceY2 = 0x41100000;
|
|
sourceX3 = 0x435e0000;
|
|
sourceY3 = 0x41100000;
|
|
local_64 = local_24._unk;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color(quadBuffer,fVar3,fVar2,fVar3 + 3.0,fVar2 + 8.0,color_07);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
tmpQuadX0 = 0x3f800000;
|
|
tmpQuadY1 = 0x41200000;
|
|
tmpQuadY0 = 0x41200000;
|
|
tmpQuadX1 = 0x40800000;
|
|
local_24._red = 1.0;
|
|
fVar2 = -(halfWidth + 3.0) + centerX;
|
|
local_24._blue = 4.0;
|
|
local_24._alpha = 23.0;
|
|
local_24._green = 23.0;
|
|
sourceQuad = 0x3f800000;
|
|
sourceY0 = 0x41200000;
|
|
sourceX1 = 0x40800000;
|
|
sourceY1 = 0x41200000;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x3f800000;
|
|
sourceY2 = 0x41b80000;
|
|
sourceX3 = 0x40800000;
|
|
sourceY3 = 0x41b80000;
|
|
local_64 = local_24._unk;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color
|
|
(quadBuffer,fVar2,local_4c,fVar2 + 3.0,local_4c + 13.0,color_08);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
fVar3 = halfWidth + centerX;
|
|
fVar2 = centerY + halfHeight;
|
|
tmpQuadX0 = 0x43570000;
|
|
tmpQuadY1 = 0x41200000;
|
|
tmpQuadY0 = 0x41200000;
|
|
tmpQuadX1 = 0x435c0000;
|
|
local_24._red = 215.0;
|
|
local_24._blue = 220.0;
|
|
local_24._alpha = 27.0;
|
|
local_24._green = 27.0;
|
|
sourceQuad = 0x43570000;
|
|
sourceY0 = 0x41200000;
|
|
sourceX1 = 0x435c0000;
|
|
sourceY1 = 0x41200000;
|
|
local_24._unk = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_24._unk)) + 0x1))),1);
|
|
sourceX2 = 0x43570000;
|
|
sourceY2 = 0x41d80000;
|
|
sourceX3 = 0x435c0000;
|
|
sourceY3 = 0x41d80000;
|
|
local_64 = local_24._unk;
|
|
(GHIDRA_CAST<KColor *>((&local_24)))->KColor::SetFromARGB(0xffffffff);
|
|
pfVar1 = render_quad_set_uniform_color(quadBuffer,fVar3,fVar2,fVar3 + 5.0,fVar2 + 17.0,color_09);
|
|
dst = colorQuad;
|
|
for (dwordsLeft = 0x1c; dwordsLeft != 0; dwordsLeft = dwordsLeft + -1) {
|
|
*dst = *pfVar1;
|
|
pfVar1 = pfVar1 + 1;
|
|
dst = dst + 1;
|
|
}
|
|
color3Red = color->_red;
|
|
color3Green = color->_green;
|
|
color3Blue = color->_blue;
|
|
color3Alpha = color->_alpha;
|
|
color0Unk = color->_unk;
|
|
color2Red = color->_red;
|
|
color2Green = color->_green;
|
|
color2Blue = color->_blue;
|
|
color2Alpha = color->_alpha;
|
|
color1Red = color->_red;
|
|
color1Green = color->_green;
|
|
color1Blue = color->_blue;
|
|
color1Alpha = color->_alpha;
|
|
color0Red = color->_red;
|
|
color0Green = color->_green;
|
|
color0Blue = color->_blue;
|
|
color0Alpha = color->_alpha;
|
|
color1Unk = color0Unk;
|
|
color2Unk = color0Unk;
|
|
color3Unk = color0Unk;
|
|
(**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(self) + 0x1c)) + 0x14))(&sourceQuad,colorQuad,g_drawRectUnset);
|
|
return;
|
|
}
|
|
|
|
// 009c27c0
|
|
void Popup::build_lines()
|
|
{
|
|
int iVar1;
|
|
uint8_t *pbVar2;
|
|
void *ptr;
|
|
int *linesBegin;
|
|
int lineWidth;
|
|
StringTable *stringTable;
|
|
uint8_t *textEnd;
|
|
void *pvVar4;
|
|
char *lineCopy;
|
|
int *lineEnd;
|
|
uint32_t size;
|
|
uint32_t *linesEnd;
|
|
uint32_t uVar5;
|
|
uint32_t *lineRecord;
|
|
int *piVar6;
|
|
float fVar7;
|
|
float cursorY;
|
|
float fVar8;
|
|
float lineHeight;
|
|
float unsetSize;
|
|
int local_68;
|
|
uint32_t lineIndex;
|
|
int *wrappedLines;
|
|
int *wrappedLinesEnd;
|
|
int wrappedLinesCapacity;
|
|
uint32_t *entryFields;
|
|
char *local_44;
|
|
uint32_t local_40;
|
|
uint32_t local_3c;
|
|
uint32_t local_38;
|
|
uint32_t local_34;
|
|
uint32_t local_30;
|
|
std_string local_2c;
|
|
uint32_t local_14;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
float *lineSpacing;
|
|
int *linesBegin;
|
|
uint8_t textChar;
|
|
|
|
local_8 = -1;
|
|
puStack_c = &LAB_00b0ec95;
|
|
local_10 = ExceptionList;
|
|
local_14 = __security_cookie ^ GHIDRA_UINT(&(&local_2c)[1]._size);
|
|
ExceptionList = &local_10;
|
|
free_line_buffers(this);
|
|
fVar7 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c));
|
|
local_68 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x54));
|
|
if (fVar7 == -1.0) {
|
|
fVar7 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x2c)) * DAT_00c7997c;
|
|
}
|
|
fVar8 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 8));
|
|
if (local_68 != *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x58))) {
|
|
entryFields = GHIDRA_CAST<uint32_t *>((local_68 + 0x18));
|
|
do {
|
|
pbVar2 = GHIDRA_CAST<uint8_t *>(entryFields[-5]);
|
|
iVar1 = strncmp(GHIDRA_CAST<char *>(pbVar2),"##GAME##",8);
|
|
if (iVar1 == 0) {
|
|
pbVar2 = pbVar2 + 8;
|
|
stringTable = &g_manager->_stringTable;
|
|
LAB_009c288d:
|
|
pbVar2 = string_table_translate(stringTable,pbVar2);
|
|
}
|
|
else {
|
|
iVar1 = strncmp(GHIDRA_CAST<char *>(pbVar2),"##PLATFORM##",0xc);
|
|
if (iVar1 == 0) {
|
|
pbVar2 = pbVar2 + 0xc;
|
|
stringTable = &g_manager->_stringTablePc;
|
|
goto LAB_009c288d;
|
|
}
|
|
}
|
|
wrappedLines = GHIDRA_CAST<int *>(0x0);
|
|
wrappedLinesEnd = GHIDRA_CAST<int *>(0x0);
|
|
wrappedLinesCapacity = 0;
|
|
local_8 = 0;
|
|
if (entryFields[-4] == -1) {
|
|
text_wrap_lines(pbVar2,*GHIDRA_CAST<Font **>((GHIDRA_CAST<char *>(this) + 4)),&wrappedLines,fVar7 - (fVar8 + fVar8));
|
|
}
|
|
else {
|
|
local_2c._size = 0;
|
|
local_2c._capacity = 0xf;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) = (void *)0x0;
|
|
textEnd = pbVar2;
|
|
do {
|
|
textChar = *textEnd;
|
|
textEnd = textEnd + 1;
|
|
} while (textChar != 0);
|
|
(GHIDRA_CAST<msvc::string *>((local_2c._buf)))->msvc::string::assign(pbVar2,GHIDRA_INT(textEnd) - GHIDRA_INT((pbVar2 + 1)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
|
|
vector_string_emplace_reallocate_move(&wrappedLines,GHIDRA_CAST<std_string *>(0x0),&local_2c);
|
|
local_8 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_8))) + 0x1))) << 8;
|
|
if (0xf < local_2c._capacity) {
|
|
uVar5 = local_2c._capacity + 1;
|
|
pvVar4 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((void *)local_2c._buf)) + 0x0)));
|
|
if (0xfff < uVar5) {
|
|
pvVar4 = *(void **)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) + -4);
|
|
uVar5 = local_2c._capacity + 0x24;
|
|
if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar4))))) goto LAB_009c2c9c;
|
|
}
|
|
operator_delete(pvVar4,uVar5);
|
|
}
|
|
}
|
|
linesBegin = wrappedLines;
|
|
lineIndex = 0;
|
|
uVar5 = (GHIDRA_INT(wrappedLinesEnd) - GHIDRA_INT(wrappedLines)) / 0x18;
|
|
if (uVar5 != 0) {
|
|
linesBegin = wrappedLines;
|
|
do {
|
|
piVar6 = linesBegin;
|
|
if (0xf < GHIDRA_UINT(linesBegin[5])) {
|
|
piVar6 = GHIDRA_CAST<int *>(*linesBegin);
|
|
}
|
|
if (piVar6 == GHIDRA_CAST<int *>(0x0)) {
|
|
lineCopy = GHIDRA_CAST<char *>(0x0);
|
|
}
|
|
else {
|
|
lineEnd = piVar6;
|
|
do {
|
|
iVar1 = *lineEnd;
|
|
lineEnd = GHIDRA_CAST<int *>((GHIDRA_INT(lineEnd) + 1));
|
|
} while ((char)iVar1 != '\0');
|
|
lineCopy = operator_new_tracked(GHIDRA_UINT((GHIDRA_INT(lineEnd) + (1 - (GHIDRA_INT(piVar6) + 1)))));
|
|
lineEnd = piVar6;
|
|
do {
|
|
iVar1 = *lineEnd;
|
|
lineEnd = GHIDRA_CAST<int *>((GHIDRA_INT(lineEnd) + 1));
|
|
} while ((char)iVar1 != '\0');
|
|
strncpy(lineCopy,GHIDRA_CAST<char *>(piVar6),(size_t)(GHIDRA_INT(lineEnd) + (1 - (GHIDRA_INT(piVar6) + 1))));
|
|
}
|
|
local_38 = entryFields[-3];
|
|
local_40 = entryFields[-5];
|
|
local_3c = entryFields[-4];
|
|
local_34 = entryFields[-2];
|
|
local_30 = entryFields[-1];
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0))) = *entryFields;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x4))) = entryFields[1];
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0xc))) = entryFields[3];
|
|
local_2c._size = entryFields[4];
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x8))) = entryFields[2];
|
|
local_2c._capacity = entryFields[5];
|
|
lineRecord = *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 100));
|
|
local_44 = lineCopy;
|
|
if (lineRecord == *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0x68))) {
|
|
msvc::vector<48byte>::_Emplace_reallocate(lineRecord,&local_44);
|
|
}
|
|
else {
|
|
*lineRecord = lineCopy;
|
|
lineRecord[3] = local_38;
|
|
lineRecord[8] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x8)));
|
|
lineRecord[4] = local_34;
|
|
lineRecord[5] = local_30;
|
|
lineRecord[6] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x0)));
|
|
lineRecord[7] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0x4)));
|
|
lineRecord[1] = local_40;
|
|
lineRecord[2] = local_3c;
|
|
lineRecord[9] = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_2c._buf)) + 0xc)));
|
|
lineRecord[10] = local_2c._size;
|
|
lineRecord[0xb] = local_2c._capacity;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 100)) = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 100)) + 0x30;
|
|
}
|
|
linesBegin = linesBegin + 6;
|
|
lineIndex = lineIndex + 1;
|
|
} while (lineIndex < uVar5);
|
|
}
|
|
local_8 = -1;
|
|
if (linesBegin != GHIDRA_CAST<int *>(0x0)) {
|
|
linesBegin = wrappedLinesEnd;
|
|
piVar6 = linesBegin;
|
|
if (linesBegin != wrappedLinesEnd) {
|
|
do {
|
|
uVar5 = piVar6[5];
|
|
if (0xf < uVar5) {
|
|
pvVar4 = (void *)*piVar6;
|
|
size = uVar5 + 1;
|
|
ptr = pvVar4;
|
|
if (0xfff < size) {
|
|
ptr = *(void **)(GHIDRA_CAST<char *>(pvVar4) + -4);
|
|
size = uVar5 + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar4) + (-4 - GHIDRA_INT(ptr))))) goto LAB_009c2c9c;
|
|
}
|
|
operator_delete(ptr,size);
|
|
linesBegin = wrappedLinesEnd;
|
|
}
|
|
piVar6[4] = 0;
|
|
piVar6[5] = 0xf;
|
|
*GHIDRA_CAST<uint8_t *>(piVar6) = 0;
|
|
piVar6 = piVar6 + 6;
|
|
} while (piVar6 != linesBegin);
|
|
}
|
|
uVar5 = ((wrappedLinesCapacity - GHIDRA_INT(linesBegin)) / 0x18) * 0x18;
|
|
linesBegin = linesBegin;
|
|
if (0xfff < uVar5) {
|
|
linesBegin = GHIDRA_CAST<int *>(linesBegin[-1]);
|
|
uVar5 = uVar5 + 0x23;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < GHIDRA_CAST<uint8_t *>((GHIDRA_INT(linesBegin) + (-4 - GHIDRA_INT(linesBegin))))) {
|
|
LAB_009c2c9c:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(linesBegin,uVar5);
|
|
wrappedLines = GHIDRA_CAST<int *>(0x0);
|
|
wrappedLinesEnd = GHIDRA_CAST<int *>(0x0);
|
|
wrappedLinesCapacity = 0;
|
|
}
|
|
local_68 = local_68 + 0x30;
|
|
entryFields = entryFields + 0xc;
|
|
} while (local_68 != *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 0x58)));
|
|
}
|
|
unsetSize = (float)&DAT_bf800000;
|
|
fVar8 = 0.0;
|
|
lineRecord = *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0x60));
|
|
fVar7 = 0.0;
|
|
linesEnd = *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 100));
|
|
lineHeight = (float)*GHIDRA_CAST<uint16_t *>((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(this) + 4)) + 0x14)) * *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x10));
|
|
if (lineRecord != linesEnd) {
|
|
do {
|
|
iVar1 = (GHIDRA_CAST<Font *>((*GHIDRA_CAST<Font **>((GHIDRA_CAST<char *>(this) + 4)))))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>(*lineRecord),-1);
|
|
if (fVar7 <= (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)])) {
|
|
fVar7 = (float)((double)iVar1 + __uint_to_double_fixup[-(iVar1 >> 0x1f)]);
|
|
}
|
|
linesEnd = *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 100));
|
|
lineSpacing = GHIDRA_CAST<float *>((lineRecord + 10));
|
|
lineRecord = lineRecord + 0xc;
|
|
fVar8 = fVar8 + lineHeight + *lineSpacing;
|
|
} while (lineRecord != linesEnd);
|
|
}
|
|
fVar7 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 8)) + *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 8)) + fVar7;
|
|
cursorY = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0xc));
|
|
fVar8 = cursorY * 1.65 + fVar8;
|
|
if ((*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c)) == unsetSize) || (*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c)) < fVar7)) {
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c)) = fVar7;
|
|
}
|
|
if ((*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) == unsetSize) || (*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) < fVar8)) {
|
|
*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x20)) = fVar8;
|
|
}
|
|
lineRecord = *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 0x60));
|
|
if (lineRecord != linesEnd) {
|
|
fVar7 = 0.5;
|
|
do {
|
|
lineWidth = (GHIDRA_CAST<Font *>((*GHIDRA_CAST<Font **>((GHIDRA_CAST<char *>(this) + 4)))))->Font::get_string_width_n(GHIDRA_CAST<uint8_t *>(*lineRecord),-1);
|
|
iVar1 = lineRecord[0xb];
|
|
if (iVar1 == 0) {
|
|
fVar8 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 8));
|
|
LAB_009c2cba:
|
|
lineRecord[9] = fVar8 + (float)lineRecord[9];
|
|
}
|
|
else {
|
|
if (iVar1 == 1) {
|
|
fVar8 = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c)) * fVar7 -
|
|
(float)((double)lineWidth + __uint_to_double_fixup[-(lineWidth >> 0x1f)]) * fVar7;
|
|
goto LAB_009c2cba;
|
|
}
|
|
if (iVar1 == 2) {
|
|
fVar8 = (*GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 0x1c)) - *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(this) + 8))) -
|
|
(float)((double)lineWidth + __uint_to_double_fixup[-(lineWidth >> 0x1f)]);
|
|
goto LAB_009c2cba;
|
|
}
|
|
}
|
|
fVar8 = (float)lineRecord[10];
|
|
lineRecord[10] = cursorY + fVar8;
|
|
lineRecord = lineRecord + 0xc;
|
|
cursorY = cursorY + fVar8 + lineHeight;
|
|
} while (lineRecord != *GHIDRA_CAST<uint32_t **>((GHIDRA_CAST<char *>(this) + 100)));
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 009c2d00
|
|
void Popup::free_line_buffers()
|
|
{
|
|
int iVar1;
|
|
void **ppvVar2;
|
|
uint64_t *allocatedBytes;
|
|
int *line;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t uStack_8;
|
|
uint64_t allocatedBefore;
|
|
uint32_t bufferSize;
|
|
|
|
uStack_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af0eb0;
|
|
local_10 = ExceptionList;
|
|
line = *GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 0x60));
|
|
ppvVar2 = &local_10;
|
|
if (line == *GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 100))) {
|
|
*GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 100)) = line;
|
|
return;
|
|
}
|
|
do {
|
|
ExceptionList = ppvVar2;
|
|
iVar1 = *line;
|
|
if (iVar1 != 0) {
|
|
if (g_mainHeap == (void *)0x0) {
|
|
allocatedBytes = &g_allocatedBytesNoHeap;
|
|
}
|
|
else {
|
|
allocatedBytes = GHIDRA_CAST<uint64_t *>((GHIDRA_INT(g_mainHeap) + 0x30));
|
|
}
|
|
bufferSize = *GHIDRA_CAST<uint32_t *>((iVar1 + -4));
|
|
allocatedBefore = *allocatedBytes;
|
|
*GHIDRA_CAST<uint32_t *>(allocatedBytes) = GHIDRA_UINT(*allocatedBytes) - bufferSize;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocatedBytes) + 4)) =
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(allocatedBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(allocatedBefore) < bufferSize));
|
|
free((void *)(iVar1 + -4));
|
|
*line = 0;
|
|
}
|
|
line = line + 0xc;
|
|
ppvVar2 = ExceptionList;
|
|
} while (line != *GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(this) + 100)));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 100)) = *GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(this) + 0x60));
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 009c3410
|
|
void Popup::destroy()
|
|
{
|
|
char isLastRef;
|
|
uint32_t uVar1;
|
|
void *in_ECX;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00af1360;
|
|
local_10 = ExceptionList;
|
|
uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
|
|
ExceptionList = &local_10;
|
|
free_line_buffers((void *)(GHIDRA_INT(in_ECX) + 0x24));
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(in_ECX) + 0xa0)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(in_ECX) + 0xa4)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(in_ECX) + 0x98)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(in_ECX) + 0x9c)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(in_ECX) + 0x90)) = 0;
|
|
*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(in_ECX) + 0x94)) = 0;
|
|
FID_conflict__Tidy((void *)(GHIDRA_INT(in_ECX) + 0x84));
|
|
FID_conflict__Tidy((void *)(GHIDRA_INT(in_ECX) + 0x78));
|
|
local_8 = 0;
|
|
if (*GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(in_ECX) + 0x20)) != GHIDRA_CAST<int *>(0x0)) {
|
|
isLastRef = (**(code **)(**GHIDRA_CAST<int **>((GHIDRA_CAST<char *>(in_ECX) + 0x20)) + 0xc))(uVar1);
|
|
if ((isLastRef != '\0') && (g_imageReleaseFn != (void *)0x0)) {
|
|
(*g_imageReleaseFn)(GHIDRA_INT(in_ECX) + 0x1c);
|
|
}
|
|
}
|
|
operator_delete(in_ECX,0x148);
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|