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>
1509 lines
66 KiB
C++
1509 lines
66 KiB
C++
#include "classes.h"
|
|
|
|
// 00980b40
|
|
void Menu_Game::destructor()
|
|
{
|
|
char isTargetValid;
|
|
void *local_10;
|
|
undefined1 *puStack_c;
|
|
undefined4 local_8;
|
|
|
|
puStack_c = &LAB_00afb440;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
local_8 = 0;
|
|
if (GHIDRA_CAST<int *>(this[1].SelectedElement) != GHIDRA_CAST<int *>(0x0)) {
|
|
isTargetValid =
|
|
(**(code **)(*GHIDRA_CAST<int *>(this[1].SelectedElement) + 0xc))
|
|
(__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U);
|
|
if ((isTargetValid != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) {
|
|
(*g_renderTargetReleaseFn)(this + 1);
|
|
}
|
|
}
|
|
local_8 = 1;
|
|
(GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::Reset();
|
|
(GHIDRA_CAST<AnimationState *>((&(this->ContinueWidgetSprite)._overlayAnimState)))->AnimationState::~AnimationState();
|
|
(GHIDRA_CAST<AnimationState *>((&(this->ContinueWidgetSprite)._animState)))->AnimationState::~AnimationState();
|
|
(GHIDRA_CAST<std::string *>(((this->ContinueWidgetSprite)._animDefaultName._buf)))->std::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(&this->ContinueWidgetSprite))))->std::string::_Tidy_deallocate();
|
|
local_8 = 2;
|
|
(GHIDRA_CAST<ANM2 *>((&this->GameMenuSprite)))->ANM2::Reset();
|
|
(GHIDRA_CAST<AnimationState *>((&(this->GameMenuSprite)._overlayAnimState)))->AnimationState::~AnimationState();
|
|
(GHIDRA_CAST<AnimationState *>((&(this->GameMenuSprite)._animState)))->AnimationState::~AnimationState();
|
|
(GHIDRA_CAST<std::string *>(((this->GameMenuSprite)._animDefaultName._buf)))->std::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(&this->GameMenuSprite))))->std::string::_Tidy_deallocate();
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 00980eb0
|
|
void Menu_Game::LoadGraphics()
|
|
{
|
|
byte bVar1;
|
|
byte *curAnimName;
|
|
int in_ECX;
|
|
byte *idleName;
|
|
char *freeBlock;
|
|
uint uVar2;
|
|
bool bVar3;
|
|
std_string menuAnmPath;
|
|
std_string widgetAnmPath;
|
|
uint local_24;
|
|
undefined1 *puStack_20;
|
|
void *local_1c;
|
|
undefined1 *puStack_18;
|
|
undefined4 local_14;
|
|
byte *animData;
|
|
|
|
puStack_20 = GHIDRA_CAST<undefined1 *>((GHIDRA_INT(register0x00000010) + -4));
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00af1f85;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U;
|
|
ExceptionList = &local_1c;
|
|
menuAnmPath._size = 0;
|
|
menuAnmPath._capacity = 0xf;
|
|
menuAnmPath._buf[0] = '\0';
|
|
menuAnmPath._buf[1] = '\0';
|
|
menuAnmPath._buf[2] = '\0';
|
|
menuAnmPath._buf[3] = '\0';
|
|
(*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(menuAnmPath._buf)) + 0x0))) = std::_Allocate(0x20);
|
|
menuAnmPath._size = 0x1e;
|
|
menuAnmPath._capacity = 0x1f;
|
|
builtin_strncpy((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(menuAnmPath._buf))) + 0x0))),"gfx/ui/main menu/GameMenu.anm2",0x1f);
|
|
local_14 = 0;
|
|
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((in_ECX + 0x10)))))->ANM2::Load(&menuAnmPath,1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < menuAnmPath._capacity) {
|
|
uVar2 = menuAnmPath._capacity + 1;
|
|
freeBlock = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(menuAnmPath._buf))) + 0x0)));
|
|
if (0xfff < uVar2) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(menuAnmPath._buf)) + 0x0))) + -4));
|
|
uVar2 = menuAnmPath._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(menuAnmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar2);
|
|
}
|
|
animData = *GHIDRA_CAST<byte **>((in_ECX + 0x44));
|
|
if (animData != GHIDRA_CAST<byte *>(0x0)) {
|
|
curAnimName = animData;
|
|
if (0xf < *GHIDRA_CAST<uint *>((animData + 0x14))) {
|
|
curAnimName = *GHIDRA_CAST<byte **>(animData);
|
|
}
|
|
idleName = s_Idle;
|
|
do {
|
|
bVar1 = *curAnimName;
|
|
bVar3 = bVar1 < *idleName;
|
|
if (bVar1 != *idleName) {
|
|
LAB_00980fe1:
|
|
uVar2 = -GHIDRA_UINT(bVar3) | 1;
|
|
goto LAB_00980fe6;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = curAnimName[1];
|
|
bVar3 = bVar1 < idleName[1];
|
|
if (bVar1 != idleName[1]) goto LAB_00980fe1;
|
|
curAnimName = curAnimName + 2;
|
|
idleName = idleName + 2;
|
|
} while (bVar1 != 0);
|
|
uVar2 = 0;
|
|
LAB_00980fe6:
|
|
if ((uVar2 == 0) && ((animData[0x34] == 0 || (*GHIDRA_CAST<char *>((in_ECX + 0x54)) != '\0'))))
|
|
goto LAB_00981012;
|
|
}
|
|
bVar1 = (GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((in_ECX + 0x10)))))->ANM2::SetAnimation(s_Idle,1);
|
|
if (bVar1 != 0) {
|
|
(GHIDRA_CAST<AnimationState *>((GHIDRA_CAST<AnimationState *>((in_ECX + 0x40)))))->AnimationState::Rewind();
|
|
*GHIDRA_CAST<undefined1 *>((in_ECX + 0x54)) = 1;
|
|
}
|
|
LAB_00981012:
|
|
widgetAnmPath._size = 0;
|
|
widgetAnmPath._capacity = 0xf;
|
|
widgetAnmPath._buf[0] = '\0';
|
|
widgetAnmPath._buf[1] = '\0';
|
|
widgetAnmPath._buf[2] = '\0';
|
|
widgetAnmPath._buf[3] = '\0';
|
|
(*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(widgetAnmPath._buf)) + 0x0))) = std::_Allocate(0x30);
|
|
widgetAnmPath._size = 0x2d;
|
|
widgetAnmPath._capacity = 0x2f;
|
|
builtin_strncpy((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(widgetAnmPath._buf))) + 0x0))),"gfx/ui/main menu/ContinueProgress_Widget.anm2",
|
|
0x2e);
|
|
local_14 = 1;
|
|
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((in_ECX + 0x124)))))->ANM2::Load(&widgetAnmPath,1);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < widgetAnmPath._capacity) {
|
|
uVar2 = widgetAnmPath._capacity + 1;
|
|
freeBlock = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<char *>(widgetAnmPath._buf))) + 0x0)));
|
|
if (0xfff < uVar2) {
|
|
freeBlock = *GHIDRA_CAST<char **>(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(widgetAnmPath._buf)) + 0x0))) + -4));
|
|
uVar2 = widgetAnmPath._capacity + 0x24;
|
|
if (GHIDRA_CAST<char *>(0x1f) < GHIDRA_CAST<char *>(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(widgetAnmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,uVar2);
|
|
}
|
|
widgetAnmPath._size = 0;
|
|
widgetAnmPath._capacity = 0xf;
|
|
(*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(widgetAnmPath._buf)) + 0x0))) = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(widgetAnmPath._buf)) + 0x0))) & 0xffffff00;
|
|
(GHIDRA_CAST<ANM2 *>((GHIDRA_CAST<ANM2 *>((in_ECX + 0x124)))))->ANM2::SetAnimation(GHIDRA_CAST<byte *>("Dissapear"),1);
|
|
if (*GHIDRA_CAST<int *>((in_ECX + 0x158)) != 0) {
|
|
AnimationState::AdvancePosition
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x154)),*GHIDRA_CAST<int *>((*GHIDRA_CAST<int *>((in_ECX + 0x158)) + 0x30)) + -1);
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 00981140
|
|
void Menu_Game::Update()
|
|
{
|
|
int *piVar1;
|
|
KColor fadeColor;
|
|
int *ptr;
|
|
char cVar2;
|
|
byte bVar3;
|
|
Seeds *other;
|
|
float fVar4;
|
|
byte *animName;
|
|
uint cmpResult;
|
|
LayerState *modsKeyLayer;
|
|
int unused;
|
|
int unused_00;
|
|
int iVar5;
|
|
char *pcVar6;
|
|
Manager *manager;
|
|
bool bVar7;
|
|
KColor aKStackY_b90 [128];
|
|
undefined4 uVar8;
|
|
code *pcVar9;
|
|
undefined4 cmpResult;
|
|
void *pvVar11;
|
|
Seeds local_148;
|
|
undefined4 local_e8;
|
|
Vector local_e4;
|
|
float local_dc;
|
|
byte isModsKeyVisible;
|
|
Manager *local_d4;
|
|
undefined1 connectingPopup [48];
|
|
undefined4 popupTimeout;
|
|
Seeds seedsCopy;
|
|
uint local_24;
|
|
undefined1 *puStack_20;
|
|
void *local_1c;
|
|
undefined1 *puStack_18;
|
|
int local_14;
|
|
ChallengeParam *challengeParams;
|
|
MenuManager *menuManager;
|
|
int *nextNode;
|
|
float *popup;
|
|
undefined1 *popupCount;
|
|
|
|
puStack_20 = GHIDRA_CAST<undefined1 *>(((&seedsCopy)[1]._stageSeeds + 4));
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00b0cd63;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT(((&seedsCopy)[1]._stageSeeds + 1));
|
|
ExceptionList = &local_1c;
|
|
piVar1 = (&seedsCopy)[1]._stageSeeds + 4;
|
|
if ((g_menuManager->_selectedMenuID != 3) &&
|
|
((GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::SetAnimation(GHIDRA_CAST<byte *>("Dissapear"),1),
|
|
piVar1 = GHIDRA_CAST<int *>(puStack_20), (this->ContinueWidgetSprite)._animState._animData != (void *)0x0))
|
|
{
|
|
AnimationState::AdvancePosition
|
|
(&(this->ContinueWidgetSprite)._animState,
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animData) + 0x30)) + -1);
|
|
piVar1 = GHIDRA_CAST<int *>(puStack_20);
|
|
}
|
|
puStack_20 = GHIDRA_CAST<undefined1 *>(piVar1);
|
|
if ((g_manager->_framecount & 1) == 0) {
|
|
if ((this->GameMenuSprite)._loaded != 0) {
|
|
(GHIDRA_CAST<AnimationState *>((&(this->GameMenuSprite)._animState)))->AnimationState::Update();
|
|
(GHIDRA_CAST<AnimationState *>((&(this->GameMenuSprite)._overlayAnimState)))->AnimationState::Update();
|
|
}
|
|
if ((this->ContinueWidgetSprite)._loaded != 0) {
|
|
(GHIDRA_CAST<AnimationState *>((&(this->ContinueWidgetSprite)._animState)))->AnimationState::Update();
|
|
(GHIDRA_CAST<AnimationState *>((&(this->ContinueWidgetSprite)._overlayAnimState)))->AnimationState::Update();
|
|
}
|
|
}
|
|
manager = g_manager;
|
|
if (g_menuManager->_fadeOutActive != 0) {
|
|
if (g_menuManager->_fadeOutProgress < 1.0) {
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
if ((g_manager->_framecount & 1) != 0) {
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
bVar3 = (g_manager->_gamestate)._isSaveAvailable;
|
|
challengeParams = &(g_manager->_dailyChallenge)._params;
|
|
g_manager->_debugStart = 0;
|
|
if (bVar3 == 0) {
|
|
manager->_rerunAvailable = 0;
|
|
manager->_startingFromRerun = 1;
|
|
(manager->_dailyChallenge)._id = 0;
|
|
(manager->_dailyChallenge)._seed = 0;
|
|
(manager->_dailyChallenge)._specialDailyId = 0;
|
|
(manager->_dailyChallenge)._isPractice = 0;
|
|
(GHIDRA_CAST<ChallengeParam *>((challengeParams)))->ChallengeParam::Reset();
|
|
manager->_starting = 1;
|
|
manager->_networkPlay = 0;
|
|
manager->_consecutiveResetCount = 0;
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
manager->_rerunAvailable = 1;
|
|
manager->_startingFromRerun = 0;
|
|
(manager->_dailyChallenge)._id = 0;
|
|
(manager->_dailyChallenge)._seed = 0;
|
|
(manager->_dailyChallenge)._specialDailyId = 0;
|
|
(manager->_dailyChallenge)._isPractice = 0;
|
|
(GHIDRA_CAST<ChallengeParam *>((challengeParams)))->ChallengeParam::Reset();
|
|
manager->_starting = 1;
|
|
manager->_networkPlay = 0;
|
|
manager->_consecutiveResetCount = 0;
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
local_d4 = GHIDRA_CAST<Manager *>(&DAT_0000001c);
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
if (cVar2 == '\0') {
|
|
pcVar9 = FUN_00a209e0;
|
|
uVar8 = 0xffffffff;
|
|
local_d4 = GHIDRA_CAST<Manager *>(&DAT_0000000e);
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
manager = g_manager;
|
|
if (cVar2 == '\0') {
|
|
local_dc = 3.08286e-44;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
manager = g_manager;
|
|
if (cVar2 == '\0') {
|
|
local_dc = 3.22299e-44;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
manager = g_manager;
|
|
if (cVar2 == '\0') {
|
|
local_dc = 2.10195e-44;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
if (cVar2 != '\0') {
|
|
FUN_0098aec0();
|
|
}
|
|
}
|
|
else {
|
|
iVar5 = this->KeyDownTimer;
|
|
if ((iVar5 == 0) || ((0x31 < iVar5 && (iVar5 % 10 == 0)))) {
|
|
iVar5 = this->SelectedElement + 1;
|
|
this->SelectedElement = iVar5;
|
|
if ((iVar5 != 1) ||
|
|
(((manager->_gamestate)._isSaveAvailable != 0 ||
|
|
((manager->_gamestate)._isRerunAvailable != 0)))) {
|
|
if (5 < iVar5) {
|
|
iVar5 = 0;
|
|
}
|
|
goto LAB_00981778;
|
|
}
|
|
this->SelectedElement = 2;
|
|
goto LAB_0098177b;
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
iVar5 = this->KeyDownTimer;
|
|
if ((iVar5 == 0) || ((0x31 < iVar5 && (iVar5 % 10 == 0)))) {
|
|
iVar5 = this->SelectedElement + -1;
|
|
this->SelectedElement = iVar5;
|
|
if ((iVar5 == 1) &&
|
|
(((manager->_gamestate)._isSaveAvailable == 0 &&
|
|
((manager->_gamestate)._isRerunAvailable == 0)))) {
|
|
this->SelectedElement = 0;
|
|
}
|
|
else {
|
|
if (iVar5 < 0) {
|
|
iVar5 = 5;
|
|
}
|
|
LAB_00981778:
|
|
this->SelectedElement = iVar5;
|
|
}
|
|
LAB_0098177b:
|
|
local_d4 = GHIDRA_CAST<Manager *>(0x11a);
|
|
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_d4));
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_d4),1.0,2,0,1.0,0.0);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
switch(this->SelectedElement) {
|
|
case 0:
|
|
MenuManager::push_menu(5,unused_00);
|
|
break;
|
|
case 1:
|
|
g_manager->_selectedDifficulty = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&((g_manager->_gamestate))) + 0x8))));
|
|
(GHIDRA_CAST<Seeds *>((&local_148)))->Seeds::construct_from_copy(GHIDRA_CAST<Seeds *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&((manager->_gamestate))) + 0x1e724)))));
|
|
menuManager = g_menuManager;
|
|
local_14 = 0;
|
|
(GHIDRA_CAST<Seeds *>((&seedsCopy)))->Seeds::construct_from_copy(&local_148);
|
|
local_14 = CONCAT31((*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),1);
|
|
(GHIDRA_CAST<Seeds *>((&menuManager->_seedsObject)))->Seeds::operator_assign(other);
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<std::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(&seedsCopy._seedEffects,
|
|
(fuzzer_allocator<std::_Tree_node<unsigned_int,void*>_> *)&seedsCopy._seedEffects
|
|
,*(_Tree_node<unsigned_int,void*> **)(GHIDRA_INT(seedsCopy._seedEffects) + 4));
|
|
operator_delete(seedsCopy._seedEffects,0x14);
|
|
local_14 = 0xffffffff;
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<std::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(&local_148._seedEffects,
|
|
(fuzzer_allocator<std::_Tree_node<unsigned_int,void*>_> *)&local_148._seedEffects
|
|
,*(_Tree_node<unsigned_int,void*> **)(GHIDRA_INT(local_148._seedEffects) + 4));
|
|
iVar5 = 0x14;
|
|
cmpResult = 0x98141e;
|
|
pvVar11 = local_148._seedEffects;
|
|
operator_delete(local_148._seedEffects,0x14);
|
|
(GHIDRA_CAST<KColor *>((aKStackY_b90 + 0x81)))->KColor::SetFromARGB(0xff000000);
|
|
fadeColor._green = (float)pcVar9;
|
|
fadeColor._red = (float)uVar8;
|
|
fadeColor._blue = (float)cmpResult;
|
|
fadeColor._alpha = (float)pvVar11;
|
|
fadeColor._unk = iVar5;
|
|
MenuManager::start_game(fadeColor);
|
|
break;
|
|
case 2:
|
|
bVar3 = online_check_mods_allowed();
|
|
if ((bVar3 == 0) && (bVar3 = show_beta_disclaimer_popup(1,&LAB_00983100,this), bVar3 == 0))
|
|
{
|
|
FUN_00907200();
|
|
local_e4.x = (float)&DAT_bf800000;
|
|
local_e4.y = (float)&DAT_bf800000;
|
|
MessagePopup::MessagePopup
|
|
(connectingPopup,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,
|
|
&local_e4);
|
|
local_14 = 2;
|
|
local_148._stageSeeds[9] = 0x3e5cdcdd;
|
|
local_148._stageSeeds[10] = 0x3e2cacad;
|
|
local_148._stageSeeds[0xb] = 0x3e34b4b5;
|
|
local_148._stageSeeds[0xc] = 0x3f800000;
|
|
local_148._playerInitSeed = GHIDRA_INT(g_vectorZero.x);
|
|
local_148._stageSeeds[5] = 0;
|
|
local_148._stageSeeds[6] = 0xb78894;
|
|
local_148._stageSeeds[7] = -1;
|
|
local_148._stageSeeds[8] = -1;
|
|
local_148._stageSeeds[0xd] = 0;
|
|
local_148._seedEffects = (void *)g_vectorZero.y;
|
|
local_148._seedEffectsCount = 1;
|
|
std::vector<48byte>::push_back();
|
|
popupTimeout = 2000;
|
|
fVar4 = (float)(GHIDRA_CAST<PopupQueue *>((&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf0))))))->PopupQueue::push(connectingPopup);
|
|
this[1].PositionX = fVar4;
|
|
local_dc = fVar4;
|
|
if (g_multiplayerService == (void *)0x0) {
|
|
on_online_connect_result(0,this);
|
|
LAB_0098158b:
|
|
local_d4 = g_manager;
|
|
if (fVar4 != -NAN) {
|
|
(**(code **)(*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf8)))) + 0xc))();
|
|
piVar1 = *GHIDRA_CAST<int **>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_d4[1]._gamestate)) + 0xcf0))));
|
|
nextNode = GHIDRA_CAST<int *>(*piVar1);
|
|
do {
|
|
ptr = nextNode;
|
|
if (ptr == piVar1) goto LAB_00981607;
|
|
popup = GHIDRA_CAST<float *>(ptr[2]);
|
|
nextNode = GHIDRA_CAST<int *>(*ptr);
|
|
} while (*popup != local_dc);
|
|
*GHIDRA_CAST<int **>(ptr[1]) = GHIDRA_CAST<int *>(*ptr);
|
|
*GHIDRA_CAST<int *>((*ptr + 4)) = ptr[1];
|
|
popupCount = &(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_d4[1]._gamestate)) + 0xcf4)));
|
|
*GHIDRA_CAST<int *>(popupCount) = *GHIDRA_CAST<int *>(popupCount) + -1;
|
|
operator_delete(ptr,0xc);
|
|
if (popup != GHIDRA_CAST<float *>(0x0)) {
|
|
Popup::destroy();
|
|
}
|
|
LAB_00981607:
|
|
(**(code **)(*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_d4[1]._gamestate)) + 0xcf8)))) + 0x10))();
|
|
}
|
|
this[1].PositionX = -NAN;
|
|
}
|
|
else {
|
|
_DAT_00c5abc4 = _DAT_00c5abc4 | 2;
|
|
DAT_00c5abd0 = on_online_connect_result;
|
|
DAT_00c5abd4 = this;
|
|
cVar2 = (**(code **)(*GHIDRA_CAST<int *>(g_multiplayerService) + 0xc))();
|
|
if (cVar2 == '\0') goto LAB_0098158b;
|
|
}
|
|
local_14 = 0xffffffff;
|
|
FUN_00420710();
|
|
}
|
|
break;
|
|
case 3:
|
|
MenuManager::push_menu(7,unused_00);
|
|
break;
|
|
case 4:
|
|
MenuManager::push_menu(9,unused_00);
|
|
break;
|
|
case 5:
|
|
MenuManager::push_menu(10,unused_00);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
MenuManager::push_menu(0x10,unused);
|
|
}
|
|
local_dc = 3.08286e-44;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
if (cVar2 == '\0') {
|
|
local_e8 = 0x17;
|
|
cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))();
|
|
if (cVar2 != '\0') goto LAB_0098185b;
|
|
this->KeyDownTimer = 0;
|
|
}
|
|
else {
|
|
LAB_0098185b:
|
|
this->KeyDownTimer = this->KeyDownTimer + 1;
|
|
}
|
|
if (this->SelectedElement == 1) {
|
|
if (((g_manager->_gamestate)._isSaveAvailable == 0) &&
|
|
((g_manager->_gamestate)._isRerunAvailable == 0)) {
|
|
this->SelectedElement = 0;
|
|
goto LAB_00981881;
|
|
}
|
|
if ((g_manager->_gamestate)._isRerunAvailable != 0) goto LAB_00981881;
|
|
if (((this->ContinueWidgetSprite)._animState._animData == (void *)0x0) ||
|
|
((this->ContinueWidgetSprite)._animState._isPlaying != 0)) {
|
|
LAB_00981912:
|
|
animName = (this->ContinueWidgetSprite)._animState._animData;
|
|
if ((animName == GHIDRA_CAST<byte *>(0x0)) || ((this->ContinueWidgetSprite)._animState._isPlaying != 0))
|
|
goto LAB_00981a25;
|
|
if (0xf < *GHIDRA_CAST<uint *>((animName + 0x14))) {
|
|
animName = *GHIDRA_CAST<byte **>(animName);
|
|
}
|
|
pcVar6 = "Dissapear";
|
|
do {
|
|
bVar3 = *animName;
|
|
bVar7 = bVar3 < (byte)*pcVar6;
|
|
if (bVar3 != *pcVar6) {
|
|
LAB_00981960:
|
|
cmpResult = -GHIDRA_UINT(bVar7) | 1;
|
|
goto LAB_00981965;
|
|
}
|
|
if (bVar3 == 0) break;
|
|
bVar3 = animName[1];
|
|
bVar7 = bVar3 < (byte)pcVar6[1];
|
|
if (bVar3 != pcVar6[1]) goto LAB_00981960;
|
|
animName = animName + 2;
|
|
pcVar6 = pcVar6 + 2;
|
|
} while (bVar3 != 0);
|
|
cmpResult = 0;
|
|
LAB_00981965:
|
|
if (cmpResult != 0) goto LAB_00981a25;
|
|
PreRenderContinueImg(this);
|
|
(GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::Play(GHIDRA_CAST<byte *>("Appear"),0);
|
|
local_d4 = GHIDRA_CAST<Manager *>(0x11b);
|
|
goto LAB_009819e5;
|
|
}
|
|
animName = (this->ContinueWidgetSprite)._animState._animData;
|
|
if (0xf < *GHIDRA_CAST<uint *>((animName + 0x14))) {
|
|
animName = *GHIDRA_CAST<byte **>(animName);
|
|
}
|
|
pcVar6 = "Appear";
|
|
do {
|
|
bVar3 = *animName;
|
|
bVar7 = bVar3 < (byte)*pcVar6;
|
|
if (bVar3 != *pcVar6) {
|
|
LAB_009818f3:
|
|
cmpResult = -GHIDRA_UINT(bVar7) | 1;
|
|
goto LAB_009818f8;
|
|
}
|
|
if (bVar3 == 0) break;
|
|
bVar3 = animName[1];
|
|
bVar7 = bVar3 < (byte)pcVar6[1];
|
|
if (bVar3 != pcVar6[1]) goto LAB_009818f3;
|
|
animName = animName + 2;
|
|
pcVar6 = pcVar6 + 2;
|
|
} while (bVar3 != 0);
|
|
cmpResult = 0;
|
|
LAB_009818f8:
|
|
if (cmpResult != 0) goto LAB_00981912;
|
|
(GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::Play(s_Idle,0);
|
|
}
|
|
else {
|
|
LAB_00981881:
|
|
animName = (this->ContinueWidgetSprite)._animState._animData;
|
|
if (animName == GHIDRA_CAST<byte *>(0x0)) {
|
|
animName = &s_empty;
|
|
}
|
|
else if (0xf < *GHIDRA_CAST<uint *>((animName + 0x14))) {
|
|
animName = *GHIDRA_CAST<byte **>(animName);
|
|
}
|
|
pcVar6 = "Dissapear";
|
|
do {
|
|
bVar3 = *animName;
|
|
bVar7 = bVar3 < (byte)*pcVar6;
|
|
if (bVar3 != *pcVar6) {
|
|
LAB_009819c0:
|
|
cmpResult = -GHIDRA_UINT(bVar7) | 1;
|
|
goto LAB_009819c5;
|
|
}
|
|
if (bVar3 == 0) break;
|
|
bVar3 = animName[1];
|
|
bVar7 = bVar3 < (byte)pcVar6[1];
|
|
if (bVar3 != pcVar6[1]) goto LAB_009819c0;
|
|
animName = animName + 2;
|
|
pcVar6 = pcVar6 + 2;
|
|
} while (bVar3 != 0);
|
|
cmpResult = 0;
|
|
LAB_009819c5:
|
|
if (cmpResult != 0) {
|
|
(GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::Play(GHIDRA_CAST<byte *>("Dissapear"),0);
|
|
local_d4 = GHIDRA_CAST<Manager *>(0x11c);
|
|
LAB_009819e5:
|
|
manager = g_manager;
|
|
seed_fart_sound_override(GHIDRA_CAST<int *>(&local_d4));
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_d4),1.0,2,0,1.0,0.0);
|
|
}
|
|
}
|
|
LAB_00981a25:
|
|
local_e4.y = (float)this->SelectedElement;
|
|
if (((this->GameMenuSprite)._animState._animData != (void *)0x0) &&
|
|
((6 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80)) ||
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
6 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80)))))) {
|
|
pvVar11 = (this->GameMenuSprite)._animState._animData;
|
|
local_d4 = *GHIDRA_CAST<Manager **>((GHIDRA_CAST<char *>(pvVar11) + 0x50));
|
|
if ((pvVar11 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_d4) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar11) + 0x1c)) <= GHIDRA_INT(local_d4))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
*GHIDRA_CAST<undefined4 *>((GHIDRA_INT((this->GameMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_d4) * 4)) = 0;
|
|
AnimationState::AdvanceLayerPosition
|
|
(&(this->GameMenuSprite)._animState,GHIDRA_INT(local_d4),(float)GHIDRA_INT(local_e4.y));
|
|
}
|
|
if ((g_manager->_gamestate)._isSaveAvailable == 0) {
|
|
if ((this->GameMenuSprite)._animState._animData == (void *)0x0) goto LAB_00981c09;
|
|
pvVar11 = (this->GameMenuSprite)._animState._animation;
|
|
if ((g_manager->_gamestate)._isRerunAvailable == 0) {
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar11) + 0x80)) < 3) &&
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80)) < 3)) goto LAB_00981c09;
|
|
pvVar11 = (this->GameMenuSprite)._animState._animData;
|
|
local_e4.y = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar11) + 0x40));
|
|
if ((pvVar11 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_e4.y) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar11) + 0x1c)) <= GHIDRA_INT(local_e4.y))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
fVar4 = 1.0;
|
|
}
|
|
else {
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar11) + 0x80)) < 3) &&
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80)) < 3)) goto LAB_00981c09;
|
|
pvVar11 = (this->GameMenuSprite)._animState._animData;
|
|
local_e4.y = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar11) + 0x40));
|
|
if ((pvVar11 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_e4.y) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar11) + 0x1c)) <= GHIDRA_INT(local_e4.y))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
fVar4 = 2.0;
|
|
}
|
|
}
|
|
else {
|
|
if (((this->GameMenuSprite)._animState._animData == (void *)0x0) ||
|
|
((*GHIDRA_CAST<int *>((GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80)) < 3 &&
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
*GHIDRA_CAST<int *>((GHIDRA_INT((this->GameMenuSprite)._animState._animation) + 0x80)) < 3))))
|
|
goto LAB_00981c09;
|
|
pvVar11 = (this->GameMenuSprite)._animState._animData;
|
|
local_e4.y = *GHIDRA_CAST<float *>((GHIDRA_CAST<char *>(pvVar11) + 0x40));
|
|
if ((pvVar11 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_e4.y) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar11) + 0x1c)) <= GHIDRA_INT(local_e4.y))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
fVar4 = 0.0;
|
|
}
|
|
*GHIDRA_CAST<undefined4 *>((GHIDRA_INT((this->GameMenuSprite)._animState._layerFrames) + GHIDRA_INT(local_e4.y) * 4)) = 0;
|
|
(GHIDRA_CAST<AnimationState *>((&(this->GameMenuSprite)._animState)))->AnimationState::AdvanceLayerPosition(GHIDRA_INT(local_e4.y),fVar4);
|
|
LAB_00981c09:
|
|
if ((g_menuControllerIndex == 0) || (isModsKeyVisible = 0, g_menuControllerIndex == -1)) {
|
|
isModsKeyVisible = 1;
|
|
}
|
|
modsKeyLayer = (GHIDRA_CAST<ANM2 *>((&this->GameMenuSprite)))->ANM2::GetLayer(GHIDRA_CAST<byte *>("ModsKey"));
|
|
if (modsKeyLayer != GHIDRA_CAST<LayerState *>(0x0)) {
|
|
modsKeyLayer->_visible = isModsKeyVisible;
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 00981c80
|
|
void Menu_Game::Render()
|
|
{
|
|
Menu_Game *other;
|
|
byte bVar1;
|
|
ColorMod color;
|
|
undefined1 auVar2 [32];
|
|
Vector pos;
|
|
Vector scale;
|
|
float *nullFrame;
|
|
byte *animName;
|
|
uint cmpResult;
|
|
undefined *shader;
|
|
byte *extraout_ECX;
|
|
char *unusedArg;
|
|
KColor *color_00;
|
|
byte *extraout_ECX_00;
|
|
bool bVar3;
|
|
float imageHeight;
|
|
float imageWidth;
|
|
float guideScaleX;
|
|
float guideScaleY;
|
|
Vector *size;
|
|
KColor *imageRefCount;
|
|
undefined1 auStack_126 [6];
|
|
undefined1 destQuad [112];
|
|
undefined1 sourceQuad [36];
|
|
KColor quadColor;
|
|
Vector local_78;
|
|
float guideOffsetY;
|
|
float guideOffsetX;
|
|
float menuY;
|
|
float menuX;
|
|
undefined4 uStack_60;
|
|
undefined4 uStack_5c;
|
|
Vector scratchVec [2];
|
|
ColorMod guideColor;
|
|
float local_14;
|
|
int continueImage;
|
|
|
|
local_14 = (float)(__security_cookie ^ GHIDRA_UINT(((&guideColor)[1]._tint + 3)));
|
|
menuX = (g_menuManager->_ViewPosition).x + this->PositionX;
|
|
menuY = (g_menuManager->_ViewPosition).y + this->PositionY;
|
|
if ((this->GameMenuSprite)._loaded != 0) {
|
|
scratchVec[0].x = menuX;
|
|
scratchVec[0].y = menuY;
|
|
if ((this->GameMenuSprite)._overlayRenderFirst == 0) {
|
|
AnimationState::Render
|
|
(&(this->GameMenuSprite)._animState,scratchVec,&g_vectorZero,&g_vectorZero);
|
|
AnimationState::Render
|
|
(&(this->GameMenuSprite)._overlayAnimState,scratchVec,&g_vectorZero,&g_vectorZero);
|
|
menuY = scratchVec[0].y;
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(&(this->GameMenuSprite)._overlayAnimState,scratchVec,&g_vectorZero,&g_vectorZero);
|
|
AnimationState::Render
|
|
(&(this->GameMenuSprite)._animState,scratchVec,&g_vectorZero,&g_vectorZero);
|
|
menuY = scratchVec[0].y;
|
|
}
|
|
menuX = scratchVec[0].x;
|
|
}
|
|
uStack_60 = 0;
|
|
uStack_5c = 0;
|
|
scratchVec[0].x = 0.0;
|
|
scratchVec[0].y = 0.0;
|
|
unusedArg = GHIDRA_CAST<char *>(g_menuControllerIndex);
|
|
if ((g_menuControllerIndex != 0) && (g_menuControllerIndex != -1)) {
|
|
if ((this->GameMenuSprite)._animState._animData == (void *)0x0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(&(this->GameMenuSprite)._animState,GHIDRA_CAST<byte *>("ModsButton"));
|
|
}
|
|
scratchVec[0].y = menuY + nullFrame[1];
|
|
scratchVec[0].x = menuX + *nullFrame;
|
|
guideColor._offset[2] = 0.0;
|
|
color._offset[1] = (float)uStack_60;
|
|
color._offset[0] = (float)uStack_60;
|
|
auVar2 = ZEXT1632(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000)));
|
|
color._tint[0] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x0)));
|
|
color._tint[1] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x4)));
|
|
color._tint[2] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x8)));
|
|
color._tint[3] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0xc)));
|
|
color._colorize[0] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x10)));
|
|
color._colorize[1] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x14)));
|
|
color._colorize[2] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x18)));
|
|
color._colorize[3] = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&((float)auVar2)) + 0x1c)));
|
|
color._offset[2] = 0.0;
|
|
pos.y = scratchVec[0].y;
|
|
pos.x = scratchVec[0].x;
|
|
scale.y = g_vectorOne.y;
|
|
scale.x = g_vectorOne.x;
|
|
Manager::render_controller_action_glyph
|
|
(g_manager,g_menuControllerIndex,0x1c,0,1,color,pos,scale);
|
|
unusedArg = GHIDRA_CAST<char *>(extraout_ECX);
|
|
}
|
|
if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) &&
|
|
((this->ContinueWidgetSprite)._animState._isPlaying == 0)) {
|
|
animName = (this->ContinueWidgetSprite)._animState._animData;
|
|
if (0xf < *GHIDRA_CAST<uint *>((animName + 0x14))) {
|
|
animName = *GHIDRA_CAST<byte **>(animName);
|
|
}
|
|
unusedArg = "Dissapear";
|
|
do {
|
|
bVar1 = *animName;
|
|
bVar3 = bVar1 < (byte)*unusedArg;
|
|
if (bVar1 != *unusedArg) {
|
|
LAB_00981e47:
|
|
cmpResult = -GHIDRA_UINT(bVar3) | 1;
|
|
goto LAB_00981e4c;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = animName[1];
|
|
bVar3 = bVar1 < (byte)unusedArg[1];
|
|
if (bVar1 != unusedArg[1]) goto LAB_00981e47;
|
|
animName = animName + 2;
|
|
unusedArg = unusedArg + 2;
|
|
} while (bVar1 != 0);
|
|
cmpResult = 0;
|
|
LAB_00981e4c:
|
|
if (cmpResult == 0) goto LAB_00982038;
|
|
}
|
|
if ((g_menuManager->_selectedMenuID == 3) && (other = this + 1, this[1].KeyDownTimer != 0)) {
|
|
shader = &g_shaders;
|
|
if ((DAT_00c7911c & 1) == 0) {
|
|
shader = g_currentShader;
|
|
}
|
|
guideColor._colorize[0] = 0.0;
|
|
guideColor._colorize[1] = 0.0;
|
|
guideColor._colorize[2] = 0.0;
|
|
guideColor._colorize[3] = 0.0;
|
|
guideColor._tint[0] = 1.0;
|
|
guideColor._tint[1] = 0.5;
|
|
guideColor._tint[2] = 0.5;
|
|
guideColor._tint[3] = 0.5;
|
|
guideColor._offset[0] = 0.0;
|
|
guideOffsetX = g_vectorZero.x;
|
|
guideColor._offset[1] = 0.0;
|
|
guideColor._offset[2] = 0.0;
|
|
guideOffsetY = g_vectorZero.y;
|
|
local_78.y = g_vectorOne.x;
|
|
scratchVec[0].y = g_vectorOne.y;
|
|
guideScaleX = g_vectorOne.x;
|
|
guideScaleY = g_vectorOne.y;
|
|
g_currentShader = shader;
|
|
if ((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(&(this->ContinueWidgetSprite)._animState,GHIDRA_CAST<byte *>("Guide"));
|
|
if (nullFrame == GHIDRA_CAST<float *>(0x0)) {
|
|
guideScaleX = local_78.y;
|
|
guideScaleY = scratchVec[0].y;
|
|
}
|
|
else {
|
|
guideOffsetX = *nullFrame;
|
|
guideScaleX = nullFrame[4];
|
|
guideScaleY = nullFrame[5];
|
|
guideOffsetY = nullFrame[1];
|
|
}
|
|
}
|
|
continueImage = other->KeyDownTimer;
|
|
imageWidth = (float)((double)*GHIDRA_CAST<int *>((continueImage + 0x10)) +
|
|
__uint_to_double_fixup[-(*GHIDRA_CAST<int *>((continueImage + 0x10)) >> 0x1f)]) *
|
|
guideScaleX;
|
|
imageHeight = (float)((double)*GHIDRA_CAST<int *>((continueImage + 0x14)) +
|
|
__uint_to_double_fixup[-(*GHIDRA_CAST<int *>((continueImage + 0x14)) >> 0x1f)]) *
|
|
guideScaleY;
|
|
scratchVec[0].x = imageWidth;
|
|
scratchVec[0].y = imageHeight;
|
|
quad_set_rect(sourceQuad,&g_vectorZero,scratchVec,continueImage);
|
|
(GHIDRA_CAST<KColor *>((&quadColor)))->KColor::SetFromARGB(0xffffffff);
|
|
scratchVec[0].x = guideScaleX * imageWidth;
|
|
size = scratchVec;
|
|
scratchVec[0].y = imageHeight * guideScaleY;
|
|
local_78.x = (menuX + 72.0 + guideOffsetX) - imageWidth * 0.5;
|
|
local_78.y = (menuY + 124.0 + guideOffsetY) - imageHeight * 0.5;
|
|
imageRefCount = color_00;
|
|
render_quad_set_rect(destQuad,&local_78,size,color_00);
|
|
(GHIDRA_CAST<KAGE::SmartPointer *>((auStack_126 + -0x12)))->KAGE::SmartPointer::operator_assign(other);
|
|
apply_sprite_shader_params(&guideColor,1,size,imageRefCount);
|
|
(**(code **)(*GHIDRA_CAST<int *>(other->KeyDownTimer) + 0x14))(sourceQuad);
|
|
unusedArg = GHIDRA_CAST<char *>(extraout_ECX_00);
|
|
}
|
|
LAB_00982038:
|
|
shader_cache_find(GHIDRA_INT(unusedArg));
|
|
return;
|
|
}
|
|
|
|
// 00982100
|
|
void Menu_Game::PreRenderContinueImg()
|
|
{
|
|
int iVar1;
|
|
PersistentGameData *pPVar2;
|
|
Vector pos;
|
|
undefined1 uVar3;
|
|
byte bVar4;
|
|
undefined1 uVar5;
|
|
byte bVar6;
|
|
undefined4 *renderTargetEntry;
|
|
float *pfVar7;
|
|
uint uVar8;
|
|
LayerState *layer;
|
|
ColorMod *color;
|
|
int iVar9;
|
|
KColor *color_00;
|
|
void *pvVar10;
|
|
std_string *lineCStr;
|
|
byte *****joinedBuf;
|
|
NetplayManager NVar11;
|
|
void *allocBase;
|
|
KColor *color_01;
|
|
KColor *color_02;
|
|
char *expectedAnimName;
|
|
AnimationState *secondAnimState;
|
|
ModManager *secondAnimState;
|
|
int iVar12;
|
|
std_string *psVar13;
|
|
byte *pbVar14;
|
|
uint size;
|
|
int id;
|
|
NetplayManager NVar15;
|
|
byte *strEnd;
|
|
NetplayManager NVar16;
|
|
NetplayManager NVar17;
|
|
bool isLess;
|
|
float fVar18;
|
|
float fVar19;
|
|
int local_2b4;
|
|
byte *stageLine;
|
|
Vector imageCenter;
|
|
Menu_Game *local_2a4;
|
|
float local_2a0;
|
|
float *local_29c;
|
|
NetplayManager local_298;
|
|
NetplayManager local_294;
|
|
Color tmpColor;
|
|
FontSettings timeFontSettings;
|
|
std_string local_260;
|
|
byte *****local_248;
|
|
KColor local_244;
|
|
short stageNameWide [256];
|
|
NetplayManager local_30;
|
|
NetplayManager stageLinesEnd;
|
|
int stageLinesCapacityEnd;
|
|
uint local_24;
|
|
undefined1 *puStack_20;
|
|
void *local_1c;
|
|
undefined1 *puStack_18;
|
|
undefined4 local_14;
|
|
Manager *manager;
|
|
char strChar;
|
|
|
|
puStack_20 = GHIDRA_CAST<undefined1 *>((stageNameWide + 0x116));
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00b0cdea;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((stageNameWide + 0x110));
|
|
ExceptionList = &local_1c;
|
|
imageCenter.x = 0.0;
|
|
imageCenter.y = 0.0;
|
|
local_2a4 = this;
|
|
std::vector::resize(&imageCenter);
|
|
renderTargetEntry = std::deque::back();
|
|
if (GHIDRA_CAST<byte *>((renderTargetEntry + 1)) != GHIDRA_CAST<byte *>(0x0)) {
|
|
*GHIDRA_CAST<byte *>((renderTargetEntry + 1)) = (byte)(g_graphicsManager_flags >> 5) & 1;
|
|
}
|
|
*renderTargetEntry = g_graphicsManager_renderTarget;
|
|
(GHIDRA_CAST<KAGE_Graphics *>((&DAT_00c798e0)))->KAGE_Graphics::SetRenderTarget((void *)this[1].KeyDownTimer,0);
|
|
(GHIDRA_CAST<RenderTarget *>((&DAT_00c798e0)))->RenderTarget::Clear();
|
|
NVar17 = (NetplayManager)g_manager;
|
|
local_298 = (NetplayManager)g_manager;
|
|
if ((g_manager->_gamestate)._isSaveAvailable == 0) goto LAB_00983081;
|
|
iVar9 = *GHIDRA_CAST<int *>((this[1].KeyDownTimer + 0x14));
|
|
iVar12 = *GHIDRA_CAST<int *>((this[1].KeyDownTimer + 0x10));
|
|
local_29c = (this->ContinueWidgetSprite)._animState._animData;
|
|
imageCenter.y = (float)((double)iVar9 + __uint_to_double_fixup[-(iVar9 >> 0x1f)]) * 0.5;
|
|
imageCenter.x = (float)((double)iVar12 + __uint_to_double_fixup[-(iVar12 >> 0x1f)]) * 0.5;
|
|
if (local_29c == GHIDRA_CAST<float *>(0x0)) {
|
|
LAB_0098228c:
|
|
bVar6 = (GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::SetAnimation(GHIDRA_CAST<byte *>("Character"),1);
|
|
if (bVar6 != 0) {
|
|
(GHIDRA_CAST<AnimationState *>((&(this->ContinueWidgetSprite)._animState)))->AnimationState::Rewind();
|
|
(this->ContinueWidgetSprite)._animState._isPlaying = 1;
|
|
}
|
|
}
|
|
else {
|
|
pfVar7 = local_29c;
|
|
if (0xf < GHIDRA_UINT(local_29c[5])) {
|
|
pfVar7 = GHIDRA_CAST<float *>(*local_29c);
|
|
}
|
|
expectedAnimName = "Character";
|
|
do {
|
|
bVar6 = *GHIDRA_CAST<byte *>(pfVar7);
|
|
isLess = bVar6 < (byte)*expectedAnimName;
|
|
if (bVar6 != *expectedAnimName) {
|
|
LAB_00982260:
|
|
uVar8 = -GHIDRA_UINT(isLess) | 1;
|
|
goto LAB_00982265;
|
|
}
|
|
if (bVar6 == 0) break;
|
|
bVar6 = *GHIDRA_CAST<byte *>((GHIDRA_CAST<char *>(pfVar7) + 1));
|
|
isLess = bVar6 < (byte)expectedAnimName[1];
|
|
if (bVar6 != expectedAnimName[1]) goto LAB_00982260;
|
|
pfVar7 = GHIDRA_CAST<float *>((GHIDRA_INT(pfVar7) + 2));
|
|
expectedAnimName = expectedAnimName + 2;
|
|
} while (bVar6 != 0);
|
|
uVar8 = 0;
|
|
LAB_00982265:
|
|
if ((uVar8 != 0) ||
|
|
((*GHIDRA_CAST<char *>((local_29c + 0xd)) != '\0' &&
|
|
((this->ContinueWidgetSprite)._animState._isPlaying == 0)))) goto LAB_0098228c;
|
|
}
|
|
local_294 = *GHIDRA_CAST<NetplayManager *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(((GHIDRA_CAST<Manager *>(NVar17))->_gamestate))) + 0x19d7c))));
|
|
if (GHIDRA_UINT(local_294) < 0x29) {
|
|
if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) &&
|
|
((0 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80)) ||
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
0 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80)))))) {
|
|
pvVar10 = (this->ContinueWidgetSprite)._animState._animData;
|
|
local_29c = *GHIDRA_CAST<float **>((GHIDRA_CAST<char *>(pvVar10) + 0x38));
|
|
if ((pvVar10 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_29c) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar10) + 0x1c)) <= GHIDRA_INT(local_29c))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
*(undefined4 *)
|
|
(GHIDRA_INT((this->ContinueWidgetSprite)._animState._layerFrames) + GHIDRA_INT(local_29c) * 4) = 0;
|
|
AnimationState::AdvanceLayerPosition
|
|
(&(this->ContinueWidgetSprite)._animState,GHIDRA_INT(local_29c),(float)GHIDRA_INT(local_294));
|
|
}
|
|
layer = (GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::GetLayer(GHIDRA_CAST<byte *>(0x0));
|
|
layer->_visible = 1;
|
|
local_294 = *GHIDRA_CAST<NetplayManager *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(((GHIDRA_CAST<Manager *>(NVar17))->_gamestate))) + 0x19d7c))));
|
|
if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) &&
|
|
((3 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80)) ||
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
3 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80)))))) {
|
|
pvVar10 = (this->ContinueWidgetSprite)._animState._animData;
|
|
local_29c = *GHIDRA_CAST<float **>((GHIDRA_CAST<char *>(pvVar10) + 0x44));
|
|
if ((pvVar10 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_29c) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar10) + 0x1c)) <= GHIDRA_INT(local_29c))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
*(undefined4 *)
|
|
(GHIDRA_INT((this->ContinueWidgetSprite)._animState._layerFrames) + GHIDRA_INT(local_29c) * 4) = 0;
|
|
AnimationState::AdvanceLayerPosition
|
|
(&(this->ContinueWidgetSprite)._animState,GHIDRA_INT(local_29c),(float)GHIDRA_INT(local_294));
|
|
}
|
|
layer = (GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::GetLayer(GHIDRA_CAST<byte *>(0x3));
|
|
layer->_visible = 1;
|
|
}
|
|
else {
|
|
layer = (GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::GetLayer(GHIDRA_CAST<byte *>(0x0));
|
|
layer->_visible = 0;
|
|
layer = (GHIDRA_CAST<ANM2 *>((&this->ContinueWidgetSprite)))->ANM2::GetLayer(GHIDRA_CAST<byte *>(0x3));
|
|
layer->_visible = 0;
|
|
}
|
|
local_294 = *GHIDRA_CAST<NetplayManager *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(((GHIDRA_CAST<Manager *>(NVar17))->_gamestate))) + 0x8))));
|
|
if (((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) &&
|
|
((2 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80)) ||
|
|
(KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("LayerId out of bounds\n")),
|
|
2 < *GHIDRA_CAST<int *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._animation) + 0x80)))))) {
|
|
pvVar10 = (this->ContinueWidgetSprite)._animState._animData;
|
|
local_29c = *GHIDRA_CAST<float **>((GHIDRA_CAST<char *>(pvVar10) + 0x40));
|
|
if ((pvVar10 == (void *)0x0) ||
|
|
((GHIDRA_INT(local_29c) < 0 || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(pvVar10) + 0x1c)) <= GHIDRA_INT(local_29c))))) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("id out of bounds\n"));
|
|
}
|
|
*GHIDRA_CAST<undefined4 *>((GHIDRA_INT((this->ContinueWidgetSprite)._animState._layerFrames) + GHIDRA_INT(local_29c) * 4))
|
|
= 0;
|
|
AnimationState::AdvanceLayerPosition
|
|
(&(this->ContinueWidgetSprite)._animState,GHIDRA_INT(local_29c),(float)GHIDRA_INT(local_294));
|
|
}
|
|
if ((this->ContinueWidgetSprite)._loaded != 0) {
|
|
if ((this->ContinueWidgetSprite)._overlayRenderFirst == 0) {
|
|
AnimationState::Render
|
|
(&(this->ContinueWidgetSprite)._animState,&imageCenter,&g_vectorZero,&g_vectorZero);
|
|
secondAnimState = &(this->ContinueWidgetSprite)._overlayAnimState;
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(&(this->ContinueWidgetSprite)._overlayAnimState,&imageCenter,&g_vectorZero,
|
|
&g_vectorZero);
|
|
secondAnimState = &(this->ContinueWidgetSprite)._animState;
|
|
}
|
|
AnimationState::Render(secondAnimState,&imageCenter,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
if (0x28 < *GHIDRA_CAST<uint *>(&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(((GHIDRA_CAST<Manager *>(NVar17))->_gamestate))) + 0x19d7c))))) {
|
|
(GHIDRA_CAST<Color *>((&tmpColor)))->Color::Color();
|
|
ModManager::RenderCustomCharacterPortraits(secondAnimState,id,&imageCenter,color,&g_vectorOne);
|
|
}
|
|
if ((this->ContinueWidgetSprite)._animState._animData != (void *)0x0) {
|
|
local_29c = (GHIDRA_CAST<AnimationState *>((&(this->ContinueWidgetSprite)._animState)))->AnimationState::GetNullFrame(&DAT_00b6837c)
|
|
;
|
|
if (local_29c != GHIDRA_CAST<float *>(0x0)) {
|
|
sprintf_s(GHIDRA_CAST<byte *>(&local_30),9,GHIDRA_CAST<byte *>("%02d:%02d:%02d"));
|
|
pfVar7 = local_29c;
|
|
manager = g_manager;
|
|
fVar18 = imageCenter.x + *local_29c;
|
|
fVar19 = imageCenter.y + local_29c[1];
|
|
iVar9 = (GHIDRA_CAST<Font *>((&g_manager->_font2_TeamMeatEx12)))->Font::get_string_width_n(GHIDRA_CAST<byte *>(&local_30),-1);
|
|
fVar19 = fVar19 - 6.0;
|
|
timeFontSettings = (FontSettings)0x0;
|
|
(*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(local_260._buf)) + 0x0))) = GHIDRA_CAST<std_string *>(0xffff);
|
|
local_260._buf[4] = '\0';
|
|
local_260._buf[5] = '\0';
|
|
local_260._buf[6] = '\0';
|
|
local_260._buf[7] = '\0';
|
|
local_260._buf[8] = '\0';
|
|
local_260._buf[9] = '\0';
|
|
local_260._buf[10] = -0x80;
|
|
local_260._buf[0xb] = '?';
|
|
local_260._buf[0xc] = -1;
|
|
local_260._buf[0xd] = -1;
|
|
local_260._buf[0xe] = -1;
|
|
local_260._buf[0xf] = -1;
|
|
local_260._size = 0;
|
|
local_260._capacity = 0;
|
|
fVar18 = (float)-(iVar9 / 2) + fVar18;
|
|
local_14 = 0;
|
|
(GHIDRA_CAST<KColor *>((&local_244)))->KColor::SetFromARGB(0xff372b2d);
|
|
pos.y = fVar19;
|
|
pos.x = fVar18;
|
|
(GHIDRA_CAST<Font *>((&manager->_font2_TeamMeatEx12)))->Font::DrawString(GHIDRA_CAST<byte *>(&local_30),pos,*GHIDRA_CAST<Vector *>((pfVar7 + 4)),
|
|
color_00,&timeFontSettings);
|
|
local_14 = 0xffffffff;
|
|
NVar17 = local_298;
|
|
this = local_2a4;
|
|
}
|
|
if (((this->ContinueWidgetSprite)._animState._animData == (void *)0x0) ||
|
|
(local_29c = AnimationState::GetNullFrame
|
|
(&(this->ContinueWidgetSprite)._animState,GHIDRA_CAST<byte *>("Stage")),
|
|
local_29c == GHIDRA_CAST<float *>(0x0))) goto LAB_00983081;
|
|
if ((*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0xfac)) == 2) || (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0xfac)) == 3)) {
|
|
iVar9 = 1;
|
|
}
|
|
else {
|
|
iVar9 = 0;
|
|
}
|
|
bVar6 = (GHIDRA_CAST<Seeds *>((GHIDRA_CAST<Seeds *>((GHIDRA_INT(NVar17) + 0x1f6c8)))))->Seeds::HasSeedEffect(9);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_294)) + 0x0))) = bVar6;
|
|
bVar6 = (GHIDRA_CAST<Seeds *>((GHIDRA_CAST<Seeds *>((GHIDRA_INT(NVar17) + 0x1f6c8)))))->Seeds::HasSeedEffect(0x10);
|
|
if (bVar6 == 0) {
|
|
iVar12 = 0;
|
|
}
|
|
else {
|
|
iVar12 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_298) + 0x1024));
|
|
}
|
|
Level::get_stage_display_name
|
|
(&local_260,*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_298) + 0x1088)),*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_298) + 0x108c)),
|
|
*GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(local_298) + 0x1098)),iVar12,(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_294)) + 0x0))),iVar9);
|
|
local_30 = (NetplayManager)0x0;
|
|
stageLinesEnd = (NetplayManager)0x0;
|
|
stageLinesCapacityEnd = 0;
|
|
local_14 = 2;
|
|
local_2a4 = GHIDRA_CAST<Menu_Game *>(&g_manager->_font2_TeamMeatEx12);
|
|
psVar13 = &local_260;
|
|
if (0xf < local_260._capacity) {
|
|
psVar13 = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(local_260._buf))) + 0x0)));
|
|
}
|
|
uVar8 = (GHIDRA_CAST<Font *>((GHIDRA_CAST<Font *>(local_2a4))))->Font::get_string_width_n(GHIDRA_CAST<byte *>(psVar13),-1);
|
|
if (uVar8 < 0x58) {
|
|
vector_string_emplace_reallocate(&local_30,GHIDRA_CAST<std_string *>(0x0),&local_260);
|
|
NVar17 = local_30;
|
|
NVar16 = stageLinesEnd;
|
|
}
|
|
else {
|
|
pvVar10 = string_split(&local_244._blue,&local_260,0x20);
|
|
FUN_00651a50(pvVar10);
|
|
std::vector<std::string>::_Tidy();
|
|
local_2a0 = 0.0;
|
|
local_298 = stageLinesEnd;
|
|
iVar9 = GHIDRA_INT(stageLinesEnd) - GHIDRA_INT(local_30) >> 0x1f;
|
|
NVar17 = local_30;
|
|
NVar16 = stageLinesEnd;
|
|
if ((GHIDRA_INT(stageLinesEnd) - GHIDRA_INT(local_30)) / 0x18 + iVar9 != iVar9) {
|
|
local_294 = (NetplayManager)0x0;
|
|
do {
|
|
if (local_2a0 == 0.0) {
|
|
LAB_009829b7:
|
|
local_2a0 = (float)(GHIDRA_INT(local_2a0) + 1);
|
|
local_294 = (NetplayManager)(GHIDRA_INT(local_294) + 0x18);
|
|
}
|
|
else {
|
|
uVar8 = *GHIDRA_CAST<uint *>((GHIDRA_INT((GHIDRA_INT(local_294) + 0x10)) + GHIDRA_INT(NVar17)));
|
|
stageLine = GHIDRA_CAST<byte *>((GHIDRA_INT(local_294) + GHIDRA_INT(NVar17)));
|
|
if (2 < uVar8) goto LAB_009829b7;
|
|
if (uVar8 == 0x7fffffff) goto LAB_009830f2;
|
|
pbVar14 = stageLine;
|
|
if (0xf < *GHIDRA_CAST<uint *>((stageLine + 0x14))) {
|
|
pbVar14 = *GHIDRA_CAST<byte **>(stageLine);
|
|
}
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(&local_248))))->std::string::concat(GHIDRA_INT(stageLine),GHIDRA_CAST<std_string *>(stageLine),
|
|
&DAT_00b656ec,1,pbVar14,uVar8);
|
|
pbVar14 = stageLine;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 3;
|
|
joinedBuf = GHIDRA_CAST<byte *****>(&local_248);
|
|
if (0xf < GHIDRA_UINT(local_244._unk)) {
|
|
joinedBuf = local_248;
|
|
}
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>((stageLine + -0x18)))))->std::string::append(GHIDRA_CAST<byte *>(joinedBuf),GHIDRA_UINT(local_244._alpha));
|
|
local_14 = CONCAT31((*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),2);
|
|
if (0xf < GHIDRA_UINT(local_244._unk)) {
|
|
uVar8 = local_244._unk + 1;
|
|
joinedBuf = local_248;
|
|
if (0xfff < uVar8) {
|
|
joinedBuf = GHIDRA_CAST<byte *****>(local_248[-1]);
|
|
uVar8 = local_244._unk + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>((GHIDRA_INT(local_248) + (-4 - GHIDRA_INT(joinedBuf)))))
|
|
goto LAB_00983056;
|
|
}
|
|
operator_delete(joinedBuf,uVar8);
|
|
}
|
|
std::vector<std::string>::erase(&local_2b4,pbVar14);
|
|
local_298 = stageLinesEnd;
|
|
NVar17 = local_30;
|
|
NVar16 = stageLinesEnd;
|
|
}
|
|
} while (GHIDRA_UINT(local_2a0) < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18)));
|
|
}
|
|
if (2 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18))) {
|
|
uVar8 = *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x28));
|
|
local_2a0 = (float)(local_260._size >> 1);
|
|
NVar11 = NVar16;
|
|
if (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x10)) + 1 + uVar8 < GHIDRA_UINT(local_2a0)) {
|
|
do {
|
|
psVar13 = GHIDRA_CAST<std_string *>((GHIDRA_INT(NVar17) + 0x18));
|
|
if (uVar8 == 0x7fffffff) goto LAB_009830f2;
|
|
lineCStr = psVar13;
|
|
if (0xf < *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x2c))) {
|
|
lineCStr = *GHIDRA_CAST<std_string **>(psVar13->_buf);
|
|
}
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(&local_248))))->std::string::concat(local_2b4,psVar13,&DAT_00b656ec,1,
|
|
GHIDRA_CAST<byte *>(lineCStr),uVar8);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 4;
|
|
joinedBuf = GHIDRA_CAST<byte *****>(&local_248);
|
|
if (0xf < GHIDRA_UINT(local_244._unk)) {
|
|
joinedBuf = local_248;
|
|
}
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(NVar17))))->std::string::append(GHIDRA_CAST<byte *>(joinedBuf),GHIDRA_UINT(local_244._alpha));
|
|
local_14 = CONCAT31((*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),2);
|
|
if (0xf < GHIDRA_UINT(local_244._unk)) {
|
|
uVar8 = local_244._unk + 1;
|
|
joinedBuf = local_248;
|
|
if (0xfff < uVar8) {
|
|
joinedBuf = GHIDRA_CAST<byte *****>(local_248[-1]);
|
|
uVar8 = local_244._unk + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>((GHIDRA_INT(local_248) + (-4 - GHIDRA_INT(joinedBuf)))))
|
|
goto LAB_00983056;
|
|
}
|
|
operator_delete(joinedBuf,uVar8);
|
|
}
|
|
local_294 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x30);
|
|
if (local_294 != NVar11) {
|
|
do {
|
|
NVar16 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x18);
|
|
if (NVar16 != local_294) {
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(NVar16))))->std::string::_Tidy_deallocate();
|
|
iVar9 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_294) + 4));
|
|
iVar12 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_294) + 8));
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_294) + 0xc));
|
|
*GHIDRA_CAST<int *>(NVar16) = *GHIDRA_CAST<int *>(local_294);
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x1c)) = iVar9;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x20)) = iVar12;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x24)) = iVar1;
|
|
iVar9 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_294) + 0x14));
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x28)) = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(local_294) + 0x10));
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x2c)) = iVar9;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x40)) = 0;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x44)) = 0xf;
|
|
*GHIDRA_CAST<undefined1 *>(local_294) = 0;
|
|
}
|
|
local_294 = (NetplayManager)(GHIDRA_INT(local_294) + 0x18);
|
|
NVar17 = NVar16;
|
|
} while (local_294 != NVar11);
|
|
NVar17 = local_30;
|
|
}
|
|
NVar15 = *GHIDRA_CAST<NetplayManager *>((GHIDRA_CAST<char *>(NVar11) + -4));
|
|
NVar16 = (NetplayManager)(GHIDRA_INT(NVar11) + -0x18);
|
|
local_298 = NVar16;
|
|
if (0xf < GHIDRA_UINT(NVar15)) {
|
|
pvVar10 = *(void **)NVar16;
|
|
uVar8 = GHIDRA_INT(NVar15) + 1;
|
|
allocBase = pvVar10;
|
|
if (0xfff < uVar8) {
|
|
allocBase = *(void **)(GHIDRA_CAST<char *>(pvVar10) + -4);
|
|
uVar8 = GHIDRA_INT(NVar15) + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar10) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_00983056;
|
|
}
|
|
operator_delete(allocBase,uVar8);
|
|
}
|
|
(GHIDRA_CAST<Vector *>((GHIDRA_INT(NVar11) + -8)))->x = 0.0;
|
|
*GHIDRA_CAST<NetplayManager *>((GHIDRA_CAST<char *>(NVar11) + -4)) = (NetplayManager)0xf;
|
|
*GHIDRA_CAST<undefined1 *>(NVar16) = 0;
|
|
uVar8 = *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x28));
|
|
NVar11 = NVar16;
|
|
stageLinesEnd = NVar16;
|
|
} while (*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x10)) + 1 + uVar8 < GHIDRA_UINT(local_2a0));
|
|
}
|
|
if (2 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18))) {
|
|
do {
|
|
psVar13 = GHIDRA_CAST<std_string *>((GHIDRA_INT(NVar17) + 0x30));
|
|
if (*GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x40)) == 0x7fffffff) {
|
|
LAB_009830f2:
|
|
/* WARNING: Subroutine does not return */
|
|
std::string::_Xlen();
|
|
}
|
|
lineCStr = psVar13;
|
|
if (0xf < *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x44))) {
|
|
lineCStr = *GHIDRA_CAST<std_string **>(psVar13->_buf);
|
|
}
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(&local_248))))->std::string::concat(local_2b4,psVar13,&DAT_00b656ec,1,
|
|
GHIDRA_CAST<byte *>(lineCStr),*GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x40)));
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 5;
|
|
joinedBuf = GHIDRA_CAST<byte *****>(&local_248);
|
|
if (0xf < GHIDRA_UINT(local_244._unk)) {
|
|
joinedBuf = local_248;
|
|
}
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>((GHIDRA_INT(NVar17) + 0x18)))))->std::string::append(GHIDRA_CAST<byte *>(joinedBuf),
|
|
GHIDRA_UINT(local_244._alpha));
|
|
local_14 = CONCAT31((*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),2);
|
|
if (0xf < GHIDRA_UINT(local_244._unk)) {
|
|
uVar8 = local_244._unk + 1;
|
|
joinedBuf = local_248;
|
|
if (0xfff < uVar8) {
|
|
joinedBuf = GHIDRA_CAST<byte *****>(local_248[-1]);
|
|
uVar8 = local_244._unk + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>((GHIDRA_INT(local_248) + (-4 - GHIDRA_INT(joinedBuf)))))
|
|
goto LAB_00983056;
|
|
}
|
|
operator_delete(joinedBuf,uVar8);
|
|
}
|
|
NVar16 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x48);
|
|
if (NVar16 != local_298) {
|
|
NVar17 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x30);
|
|
NVar11 = local_298;
|
|
do {
|
|
if (NVar17 != NVar16) {
|
|
(GHIDRA_CAST<std::string *>((GHIDRA_CAST<char *>(NVar17))))->std::string::_Tidy_deallocate();
|
|
iVar9 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar16) + 4));
|
|
iVar12 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar16) + 8));
|
|
iVar1 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar16) + 0xc));
|
|
*GHIDRA_CAST<int *>(NVar17) = *GHIDRA_CAST<int *>(NVar16);
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 4)) = iVar9;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 8)) = iVar12;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0xc)) = iVar1;
|
|
pPVar2 = GHIDRA_CAST<PersistentGameData *>((GHIDRA_INT(NVar16) + 0x14));
|
|
uVar3 = (*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((pPVar2)) + 0x0)));
|
|
bVar6 = pPVar2->_isReadOnly;
|
|
bVar4 = pPVar2->_isSteamAchievementsEnabled;
|
|
uVar5 = (*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((pPVar2)) + 0x3)));
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x10)) = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar16) + 0x10));
|
|
pPVar2 = GHIDRA_CAST<PersistentGameData *>((GHIDRA_INT(NVar17) + 0x14));
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((pPVar2)) + 0x0))) = uVar3;
|
|
pPVar2->_isReadOnly = bVar6;
|
|
pPVar2->_isSteamAchievementsEnabled = bVar4;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>((pPVar2)) + 0x3))) = uVar5;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x28)) = 0;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x2c)) = 0xf;
|
|
*GHIDRA_CAST<undefined1 *>(NVar16) = 0;
|
|
NVar11 = local_298;
|
|
}
|
|
NVar16 = (NetplayManager)(GHIDRA_INT(NVar16) + 0x18);
|
|
NVar17 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x18);
|
|
} while (NVar16 != NVar11);
|
|
NVar17 = local_30;
|
|
}
|
|
NVar15 = local_298;
|
|
NVar16 = (NetplayManager)(GHIDRA_INT(local_298) + -0x18);
|
|
NVar11 = *GHIDRA_CAST<NetplayManager *>((GHIDRA_CAST<char *>(local_298) + -4));
|
|
local_298 = NVar16;
|
|
if (0xf < GHIDRA_UINT(NVar11)) {
|
|
pvVar10 = *(void **)NVar16;
|
|
uVar8 = GHIDRA_INT(NVar11) + 1;
|
|
allocBase = pvVar10;
|
|
if (0xfff < uVar8) {
|
|
allocBase = *(void **)(GHIDRA_CAST<char *>(pvVar10) + -4);
|
|
uVar8 = GHIDRA_INT(NVar11) + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar10) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_00983056;
|
|
}
|
|
operator_delete(allocBase,uVar8);
|
|
}
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar15) + -8)) = 0;
|
|
*GHIDRA_CAST<NetplayManager *>((GHIDRA_CAST<char *>(NVar15) + -4)) = (NetplayManager)0xf;
|
|
*GHIDRA_CAST<undefined1 *>(NVar16) = 0;
|
|
stageLinesEnd = NVar16;
|
|
} while (2 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(NVar17)) / 0x18)));
|
|
}
|
|
}
|
|
}
|
|
local_298 = (NetplayManager)(imageCenter.x + *local_29c + 0.0);
|
|
local_2a0 = (imageCenter.y + local_29c[1]) - 6.0;
|
|
NVar11 = NVar17;
|
|
if (0xf < *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x14))) {
|
|
NVar11 = *GHIDRA_CAST<NetplayManager *>(NVar17);
|
|
}
|
|
if (NVar11 == (NetplayManager)0x0) {
|
|
iVar9 = 0;
|
|
}
|
|
else {
|
|
NVar15 = NVar11;
|
|
do {
|
|
strChar = *GHIDRA_CAST<char *>(NVar15);
|
|
NVar15 = (NetplayManager)(GHIDRA_INT(NVar15) + 1);
|
|
} while (strChar != '\0');
|
|
iVar9 = GHIDRA_INT(NVar15) - GHIDRA_INT((GHIDRA_INT(NVar11) + 1));
|
|
}
|
|
local_294 = NVar17;
|
|
text_convert_encoding(GHIDRA_CAST<byte *>(NVar11),iVar9,0,stageNameWide,0x100,1);
|
|
tmpColor._colorize[0] = 0.0;
|
|
tmpColor._colorize[1] = 9.18341e-41;
|
|
tmpColor._colorize[2] = 0.0;
|
|
tmpColor._colorize[3] = 1.0;
|
|
tmpColor._offset[0] = -NAN;
|
|
tmpColor._offset[1] = 0.0;
|
|
tmpColor._offset[2] = 0.0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 6;
|
|
(GHIDRA_CAST<KColor *>((&local_244)))->KColor::SetFromARGB(0xff372b2d);
|
|
fVar18 = local_29c[5];
|
|
fVar19 = local_29c[4];
|
|
uVar8 = (GHIDRA_CAST<Font *>((GHIDRA_CAST<Font *>(local_2a4))))->Font::get_string_width_utf16(stageNameWide,-1);
|
|
Font::draw_string_wide
|
|
(GHIDRA_CAST<Font *>(local_2a4),stageNameWide,(float)local_298 - ((float)(uVar8 >> 1) + 0.0),
|
|
local_2a0,fVar19,fVar18,color_01,tmpColor._colorize);
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 2;
|
|
if (1 < GHIDRA_UINT(((GHIDRA_INT(NVar16) - GHIDRA_INT(local_294)) / 0x18))) {
|
|
local_298 = (NetplayManager)((float)local_298 + 4.0);
|
|
pbVar14 = GHIDRA_CAST<byte *>((GHIDRA_INT(local_30) + 0x18));
|
|
local_2a0 = local_2a0 + 14.0;
|
|
if (0xf < *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(local_30) + 0x2c))) {
|
|
pbVar14 = *GHIDRA_CAST<byte **>(pbVar14);
|
|
}
|
|
if (pbVar14 == GHIDRA_CAST<byte *>(0x0)) {
|
|
iVar9 = 0;
|
|
}
|
|
else {
|
|
strEnd = pbVar14;
|
|
do {
|
|
bVar6 = *strEnd;
|
|
strEnd = strEnd + 1;
|
|
} while (bVar6 != 0);
|
|
iVar9 = GHIDRA_INT(strEnd) - GHIDRA_INT((pbVar14 + 1));
|
|
}
|
|
text_convert_encoding(pbVar14,iVar9,0,stageNameWide,0x100,1);
|
|
tmpColor._colorize[0] = 0.0;
|
|
tmpColor._colorize[1] = 9.18341e-41;
|
|
tmpColor._colorize[2] = 0.0;
|
|
tmpColor._colorize[3] = 1.0;
|
|
tmpColor._offset[0] = -NAN;
|
|
tmpColor._offset[1] = 0.0;
|
|
tmpColor._offset[2] = 0.0;
|
|
(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 7;
|
|
(GHIDRA_CAST<KColor *>((&local_244)))->KColor::SetFromARGB(0xff372b2d);
|
|
fVar18 = local_29c[5];
|
|
fVar19 = local_29c[4];
|
|
uVar8 = (GHIDRA_CAST<Font *>((GHIDRA_CAST<Font *>(local_2a4))))->Font::get_string_width_utf16(stageNameWide,-1);
|
|
Font::draw_string_wide
|
|
(GHIDRA_CAST<Font *>(local_2a4),stageNameWide,(float)local_298 - ((float)(uVar8 >> 1) + 0.0),
|
|
local_2a0,fVar19,fVar18,color_02,tmpColor._colorize);
|
|
}
|
|
local_14 = CONCAT31((*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),1);
|
|
for (NVar17 = local_294; NVar17 != NVar16; NVar17 = (NetplayManager)(GHIDRA_INT(NVar17) + 0x18)) {
|
|
uVar8 = *GHIDRA_CAST<uint *>((GHIDRA_CAST<char *>(NVar17) + 0x14));
|
|
if (0xf < uVar8) {
|
|
pvVar10 = *(void **)NVar17;
|
|
size = uVar8 + 1;
|
|
allocBase = pvVar10;
|
|
if (0xfff < size) {
|
|
allocBase = *(void **)(GHIDRA_CAST<char *>(pvVar10) + -4);
|
|
size = uVar8 + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar10) + (-4 - GHIDRA_INT(allocBase))))) goto LAB_00983056;
|
|
}
|
|
operator_delete(allocBase,size);
|
|
}
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x10)) = 0;
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(NVar17) + 0x14)) = 0xf;
|
|
*GHIDRA_CAST<undefined1 *>(NVar17) = 0;
|
|
}
|
|
uVar8 = ((stageLinesCapacityEnd - GHIDRA_INT(local_30)) / 0x18) * 0x18;
|
|
NVar17 = local_30;
|
|
if (0xfff < uVar8) {
|
|
NVar17 = *GHIDRA_CAST<NetplayManager *>((GHIDRA_CAST<char *>(local_30) + -4));
|
|
uVar8 = uVar8 + 0x23;
|
|
if (0x1f < (GHIDRA_INT(local_30) - GHIDRA_INT(NVar17)) - 4U) goto LAB_00983056;
|
|
}
|
|
operator_delete((void *)NVar17,uVar8);
|
|
local_14 = 0xffffffff;
|
|
if (0xf < local_260._capacity) {
|
|
uVar8 = local_260._capacity + 1;
|
|
psVar13 = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(local_260._buf))) + 0x0)));
|
|
if (0xfff < uVar8) {
|
|
psVar13 = GHIDRA_CAST<std_string *>((GHIDRA_CAST<std_string *>(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(local_260._buf)) + 0x0))) + -0x18)))->_capacity);
|
|
uVar8 = local_260._capacity + 0x24;
|
|
if (GHIDRA_CAST<byte *>(0x1f) < GHIDRA_CAST<byte *>(((*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(local_260._buf)) + 0x0))) + (-4 - GHIDRA_INT(psVar13))))) {
|
|
LAB_00983056:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(psVar13,uVar8);
|
|
}
|
|
local_260._size = 0;
|
|
local_260._capacity = 0xf;
|
|
(*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(local_260._buf)) + 0x0))) = (*GHIDRA_CAST<undefined4 *>((GHIDRA_CAST<char *>(&(local_260._buf)) + 0x0))) & 0xffffff00;
|
|
}
|
|
LAB_00983081:
|
|
_glfw_context_reset(1);
|
|
if (g_renderTargetStackSize == 0) {
|
|
KAGE_LogMessage(0x10,GHIDRA_CAST<byte *>("PopRenderTarget: stack is empty!\n"));
|
|
}
|
|
renderTargetEntry = std::deque::back();
|
|
KAGE_Graphics::SetRenderTarget
|
|
(&DAT_00c798e0,(void *)*renderTargetEntry,*GHIDRA_CAST<byte *>((renderTargetEntry + 1)));
|
|
g_renderTargetStackSize = g_renderTargetStackSize - 1;
|
|
if (g_renderTargetStackSize == 0) {
|
|
DAT_00c7978c = 0;
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 00983190
|
|
void Menu_Game::on_online_connect_result(int result, void *menuGame)
|
|
{
|
|
int unused;
|
|
undefined1 local_c4 [84];
|
|
undefined1 local_70 [12];
|
|
undefined1 local_64 [12];
|
|
undefined4 local_58;
|
|
undefined4 local_54;
|
|
undefined4 local_50;
|
|
undefined4 local_4c;
|
|
undefined4 local_48;
|
|
undefined4 local_44;
|
|
Vector popupPos;
|
|
int closedPopupId;
|
|
void *local_10;
|
|
undefined1 *puStack_c;
|
|
undefined4 local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b09400;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
closedPopupId = -1;
|
|
(GHIDRA_CAST<PopupManager *>((&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf0))))))->PopupManager::close(GHIDRA_CAST<int *>((GHIDRA_INT(menuGame) + 0x240)),
|
|
&closedPopupId);
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(menuGame) + 0x240)) = -1;
|
|
if (result == 0) {
|
|
MenuManager::push_menu(0x13,unused);
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
popupPos.x = (float)&DAT_bf800000;
|
|
popupPos.y = (float)&DAT_bf800000;
|
|
MessagePopup::MessagePopup
|
|
(local_c4,&g_manager->_font2_TeamMeatEx12,(void *)0x0,(void *)0x0,&popupPos);
|
|
local_8 = 0;
|
|
MessagePopup::add_ok_button(GHIDRA_CAST<byte *>("##PLATFORM###NOT_CONNECTED_TO_SERVER"),local_c4);
|
|
(GHIDRA_CAST<PopupQueue *>((&(*GHIDRA_CAST<undefined1 *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf0))))))->PopupQueue::push(local_c4);
|
|
local_48 = 0;
|
|
local_44 = 0;
|
|
local_50 = 0;
|
|
local_4c = 0;
|
|
local_58 = 0;
|
|
local_54 = 0;
|
|
FID_conflict__Tidy(local_64);
|
|
FID_conflict__Tidy(local_70);
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|