Six agents took over PopupButtons/PopupQueue/AchievementOverlay, Seeds with the global Random (now seeded from the clock as in the original), Game (g_game exists from Manager::Init on), KeyConfigs, an offline NetplayManager, Console's output and printing, TextureCache, the color-mod and sprite shader passes, mod shaders and reload_resource_paths. An integration pass moved callers to the new APIs (0 errors, 0 warnings with -Wall -Wextra). build/isaac loads the 34 installed mods and stops at ScoreSheet::ScoreSheet in Game's constructor; with the remaining stubs skipped under gdb the intro cutscene plays through and the main menu's frame loop runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1680 lines
64 KiB
C++
1680 lines
64 KiB
C++
#include "classes.h"
|
|
|
|
// 008cc1a0
|
|
void Menu_Online::render_mode_select()
|
|
{
|
|
Vector pos;
|
|
Vector scale;
|
|
LayerState *backKeyLayer;
|
|
float *nullFrame;
|
|
ANM2 *in_ECX;
|
|
AnimationState *secondAnimState;
|
|
int iVar1;
|
|
uint8_t *buttonLoaded;
|
|
uint32_t local_68;
|
|
uint32_t uStack_64;
|
|
uint32_t uStack_60;
|
|
void *pvStack_5c;
|
|
uint32_t local_48;
|
|
uint32_t uStack_44;
|
|
uint32_t local_40;
|
|
int lobbyGameMode;
|
|
float originY;
|
|
float originX;
|
|
Vector menuPos;
|
|
int gameMode;
|
|
int buttonIdx;
|
|
Vector nullPos;
|
|
uint8_t isKeyboard;
|
|
uint32_t local_14;
|
|
|
|
local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U;
|
|
isKeyboard = g_menuControllerIndex == 0;
|
|
lobbyGameMode = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((g_manager->_lobbySettings))) + 0x4))));
|
|
backKeyLayer = ANM2::GetLayer(in_ECX,GHIDRA_CAST<uint8_t *>("BackKey"));
|
|
local_48 = 0;
|
|
backKeyLayer->_visible = isKeyboard;
|
|
pvStack_5c = in_ECX[7]._overlayAnimState._nullLayerFrames;
|
|
uStack_44 = 0;
|
|
local_40 = 0;
|
|
local_68 = 0x3f800000;
|
|
uStack_64 = 0x3f800000;
|
|
uStack_60 = 0x3f800000;
|
|
if (&in_ECX->_color != GHIDRA_CAST<ColorMod *>(&local_68)) {
|
|
(in_ECX->_color)._colorize[0] = 0.0;
|
|
(in_ECX->_color)._colorize[1] = 0.0;
|
|
(in_ECX->_color)._colorize[2] = 0.0;
|
|
(in_ECX->_color)._colorize[3] = 0.0;
|
|
(in_ECX->_color)._tint[0] = 1.0;
|
|
(in_ECX->_color)._tint[1] = 1.0;
|
|
(in_ECX->_color)._tint[2] = 1.0;
|
|
(in_ECX->_color)._tint[3] = (float)pvStack_5c;
|
|
(in_ECX->_color)._offset[0] = 0.0;
|
|
(in_ECX->_color)._offset[1] = 0.0;
|
|
(in_ECX->_color)._offset[2] = 0.0;
|
|
}
|
|
menuPos.x = (g_menuManager->_ViewPosition).x + (float)in_ECX[7]._overlayAnimState._animation;
|
|
menuPos.y = (g_menuManager->_ViewPosition).y + (float)in_ECX[7]._overlayAnimState._animData;
|
|
if (in_ECX->_loaded != 0) {
|
|
if (in_ECX->_overlayRenderFirst == 0) {
|
|
AnimationState::Render(&in_ECX->_animState,&menuPos,&g_vectorZero,&g_vectorZero);
|
|
secondAnimState = &in_ECX->_overlayAnimState;
|
|
}
|
|
else {
|
|
AnimationState::Render(&in_ECX->_overlayAnimState,&menuPos,&g_vectorZero,&g_vectorZero);
|
|
secondAnimState = &in_ECX->_animState;
|
|
}
|
|
AnimationState::Render(secondAnimState,&menuPos,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
buttonLoaded = &in_ECX[1]._loaded;
|
|
originX = (g_menuManager->_ViewPosition).x + (float)in_ECX[7]._overlayAnimState._animation;
|
|
originY = (g_menuManager->_ViewPosition).y + (float)in_ECX[7]._overlayAnimState._animData;
|
|
iVar1 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&((g_manager->_lobbySettings))) + 0x4))));
|
|
buttonIdx = 0;
|
|
gameMode = iVar1;
|
|
do {
|
|
if (((iVar1 != 4) || (buttonIdx != 4)) && ((in_ECX->_animState)._animData != (void *)0x0)) {
|
|
nullFrame = AnimationState::GetNullFrame(&in_ECX->_animState,(&PTR_DAT_00b756f0)[buttonIdx]);
|
|
if (nullFrame != GHIDRA_CAST<float *>(0x0)) {
|
|
nullPos.x = originX + *nullFrame + 0.0;
|
|
nullPos.y = (float)-*GHIDRA_CAST<int *>((buttonLoaded + 0x13)) + originY + nullFrame[1];
|
|
if (*buttonLoaded != 0) {
|
|
if (buttonLoaded[-0x99] == 0) {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>((buttonLoaded + -0xd9)),&nullPos,&g_vectorZero,&g_vectorZero
|
|
);
|
|
secondAnimState = GHIDRA_CAST<AnimationState *>((buttonLoaded + -0xb9));
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>((buttonLoaded + -0xb9)),&nullPos,&g_vectorZero,&g_vectorZero
|
|
);
|
|
secondAnimState = GHIDRA_CAST<AnimationState *>((buttonLoaded + -0xd9));
|
|
}
|
|
AnimationState::Render(secondAnimState,&nullPos,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
}
|
|
iVar1 = gameMode;
|
|
}
|
|
buttonIdx = buttonIdx + 1;
|
|
buttonLoaded = buttonLoaded + 0x120;
|
|
} while (buttonIdx < 6);
|
|
if ((iVar1 == 4) && ((in_ECX->_animState)._animData != (void *)0x0)) {
|
|
nullFrame = AnimationState::GetNullFrame(&in_ECX->_animState,GHIDRA_CAST<uint8_t *>("ChallengeBox"));
|
|
if (nullFrame != GHIDRA_CAST<float *>(0x0)) {
|
|
nullPos.x = originX + *nullFrame;
|
|
nullPos.y = originY + nullFrame[1];
|
|
FUN_008cb6f0(&nullPos);
|
|
}
|
|
}
|
|
if ((lobbyGameMode != 4) &&
|
|
(((g_manager->_lobbySettings)._seed._size != 0 ||
|
|
(*GHIDRA_CAST<char *>(&in_ECX[7]._overlayAnimState._layerFrames) != '\0')))) {
|
|
Menu_Challenge::render_seed_text();
|
|
}
|
|
if (isKeyboard == 0) {
|
|
if ((in_ECX->_animState)._animData == (void *)0x0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame(&in_ECX->_animState,GHIDRA_CAST<uint8_t *>("BackButton"));
|
|
}
|
|
nullPos.x = *nullFrame + menuPos.x;
|
|
nullPos.y = nullFrame[1] + menuPos.y;
|
|
pos.y = nullPos.y;
|
|
pos.x = nullPos.x;
|
|
scale.y = g_vectorOne.y;
|
|
scale.x = g_vectorOne.x;
|
|
Manager::render_controller_action_glyph
|
|
(g_manager,g_menuControllerIndex,0xf,0,0,
|
|
(ColorMod)
|
|
ZEXT1644(CONCAT412(in_ECX[7]._overlayAnimState._nullLayerFrames,
|
|
CONCAT48(0x3f800000,0x3f8000003f800000))),pos,scale);
|
|
}
|
|
return;
|
|
}
|
|
|
|
// 008e4b10
|
|
void Menu_Online::Update()
|
|
{
|
|
uint8_t bVar1;
|
|
char isActionTriggered;
|
|
int iVar2;
|
|
LayerState *cursorLayer;
|
|
int unused;
|
|
uint32_t menuAction;
|
|
uint32_t upAction;
|
|
int soundId;
|
|
char *entryAnim;
|
|
Manager *manager;
|
|
int *state;
|
|
|
|
bVar1 = NetplayManager::check_connection(GHIDRA_CAST<NetplayManager *>(&g_manager->_netplayManager));
|
|
if (bVar1 == 0) {
|
|
return;
|
|
}
|
|
if (((g_manager->_framecount & 1) == 0) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x10d))) != '\0')) {
|
|
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))));
|
|
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x54)))));
|
|
}
|
|
upAction = 0x16;
|
|
isActionTriggered =
|
|
(**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&upAction,0,0);
|
|
if (isActionTriggered == '\0') {
|
|
menuAction = 0x17;
|
|
isActionTriggered =
|
|
(**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20940,&menuAction,0,0);
|
|
if (isActionTriggered != '\0') {
|
|
iVar2 = this->_prevState;
|
|
if ((iVar2 == 0) || ((0x31 < iVar2 && (iVar2 % 10 == 0)))) {
|
|
this->_state = this->_state + 1;
|
|
if (4 < this->_state) {
|
|
this->_state = this->_state + -5;
|
|
}
|
|
goto LAB_008e4c1e;
|
|
}
|
|
goto LAB_008e4c65;
|
|
}
|
|
iVar2 = 0;
|
|
}
|
|
else {
|
|
iVar2 = this->_prevState;
|
|
if ((iVar2 == 0) || ((0x31 < iVar2 && (iVar2 % 10 == 0)))) {
|
|
state = &this->_state;
|
|
*state = *state + -1;
|
|
if (*state < 0) {
|
|
this->_state = this->_state + 5;
|
|
}
|
|
LAB_008e4c1e:
|
|
manager = g_manager;
|
|
soundId = 0x11a;
|
|
seed_fart_sound_override(&soundId);
|
|
(GHIDRA_CAST<SoundEffects *>((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0);
|
|
iVar2 = this->_prevState;
|
|
}
|
|
LAB_008e4c65:
|
|
iVar2 = iVar2 + 1;
|
|
}
|
|
this->_prevState = iVar2;
|
|
iVar2 = this->_state;
|
|
if (iVar2 == 0) {
|
|
entryAnim = "Quick Match";
|
|
}
|
|
else if (iVar2 == 1) {
|
|
entryAnim = "Public Match";
|
|
}
|
|
else if (iVar2 == 2) {
|
|
entryAnim = "Friend Match";
|
|
}
|
|
else if (iVar2 == 3) {
|
|
entryAnim = "Daily Run";
|
|
}
|
|
else {
|
|
if (iVar2 != 4) goto LAB_008e4cc5;
|
|
entryAnim = "Options";
|
|
}
|
|
ANM2::Play(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x118)))),GHIDRA_CAST<uint8_t *>(entryAnim),0);
|
|
LAB_008e4cc5:
|
|
if (((g_manager->_framecount & 1) != 0) && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x221))) != '\0')) {
|
|
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x148)))));
|
|
AnimationState::Update(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x168)))));
|
|
}
|
|
menuAction = 0xe;
|
|
isActionTriggered =
|
|
(**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&menuAction,0,0);
|
|
if (isActionTriggered == '\0') {
|
|
menuAction = 0xf;
|
|
isActionTriggered =
|
|
(**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a209e0,&menuAction,0,0);
|
|
if (isActionTriggered != '\0') {
|
|
FUN_0098aec0();
|
|
}
|
|
}
|
|
else {
|
|
switch(this->_state) {
|
|
case 0:
|
|
bVar1 = show_beta_disclaimer_popup(1,FUN_008e68a0,this);
|
|
if (bVar1 == 0) {
|
|
start_quick_match();
|
|
}
|
|
break;
|
|
case 1:
|
|
bVar1 = show_beta_disclaimer_popup(1,FUN_008e68a0,this);
|
|
if (bVar1 == 0) {
|
|
FUN_008e56b0();
|
|
}
|
|
break;
|
|
case 2:
|
|
bVar1 = show_beta_disclaimer_popup(1,FUN_008e68a0,this);
|
|
if (bVar1 == 0) {
|
|
FUN_008e5720();
|
|
}
|
|
break;
|
|
case 3:
|
|
MenuManager::push_menu(4,unused);
|
|
break;
|
|
case 4:
|
|
MenuManager::push_menu(0x14,unused);
|
|
}
|
|
}
|
|
cursorLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),GHIDRA_CAST<uint8_t *>("Cursor"));
|
|
if (cursorLayer == GHIDRA_CAST<LayerState *>(0x0)) {
|
|
KAGE_LogMessage(4,GHIDRA_CAST<uint8_t *>("[warn] no layer named %s\n"));
|
|
return;
|
|
}
|
|
ANM2::SetLayerFrame(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),*GHIDRA_CAST<int *>(cursorLayer->_layerData),this->_state);
|
|
return;
|
|
}
|
|
|
|
// 008e4e30
|
|
void Menu_Online::Render()
|
|
{
|
|
uint8_t bVar1;
|
|
Vector pos;
|
|
Vector scale;
|
|
LayerState *backKeyLayer;
|
|
uint8_t *translatedText;
|
|
int iVar2;
|
|
float *nullFrame;
|
|
uint8_t *pbVar3;
|
|
void *freeBlock;
|
|
AnimationState *topAnimState;
|
|
uint32_t freeSize;
|
|
Vector renderPos;
|
|
uint8_t isKeyboard;
|
|
std_string descriptor;
|
|
uint32_t local_24;
|
|
uint8_t *puStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
void *local_14;
|
|
float menuX;
|
|
float menuY;
|
|
|
|
puStack_20 = GHIDRA_CAST<uint8_t *>((GHIDRA_INT(&descriptor) + 0x40));
|
|
local_14 = (void *)0xffffffff;
|
|
puStack_18 = &LAB_00b069dd;
|
|
local_1c = ExceptionList;
|
|
local_24 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(&descriptor) + 0x34U));
|
|
ExceptionList = &local_1c;
|
|
isKeyboard = g_menuControllerIndex == 0;
|
|
backKeyLayer = ANM2::GetLayer(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),GHIDRA_CAST<uint8_t *>("BackKey"));
|
|
backKeyLayer->_visible = isKeyboard;
|
|
renderPos.x = (g_menuManager->_ViewPosition).x + *GHIDRA_CAST<float *>((this + 1));
|
|
renderPos.y = (g_menuManager->_ViewPosition).y + *GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[1])) + 0x4))));
|
|
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x10d))) != '\0') {
|
|
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x74))) == '\0') {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))),&renderPos,&g_vectorZero,&g_vectorZero);
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x54)))),&renderPos,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x54)))),&renderPos,&g_vectorZero,&g_vectorZero);
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))),&renderPos,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
}
|
|
menuY = renderPos.y;
|
|
menuX = renderPos.x;
|
|
iVar2 = this->_state;
|
|
if (iVar2 == 0) {
|
|
translatedText =
|
|
string_table_translate(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/ONLINE_QUICK_DESCRIPTOR"));
|
|
descriptor._size = 0;
|
|
descriptor._capacity = 0xf;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptor._buf)) + 0x0))) = (void *)0x0;
|
|
pbVar3 = translatedText;
|
|
do {
|
|
bVar1 = *pbVar3;
|
|
pbVar3 = pbVar3 + 1;
|
|
} while (bVar1 != 0);
|
|
(GHIDRA_CAST<msvc::string *>((descriptor._buf)))->msvc::string::assign(translatedText,GHIDRA_INT(pbVar3) - GHIDRA_INT((translatedText + 1)));
|
|
local_14 = (void *)0x0;
|
|
LAB_008e4f9b:
|
|
render_descriptor(this,&descriptor);
|
|
local_14 = (void *)0xffffffff;
|
|
if (descriptor._capacity < 0x10) goto LAB_008e4fe1;
|
|
freeSize = descriptor._capacity + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((void *)descriptor._buf)) + 0x0)));
|
|
if (0xfff < freeSize) {
|
|
freeBlock = *(void **)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptor._buf)) + 0x0))) + -4);
|
|
iVar2 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptor._buf)) + 0x0))) - GHIDRA_INT(freeBlock);
|
|
joined_r0x008e5119:
|
|
freeSize = descriptor._capacity + 0x24;
|
|
if (0x1f < iVar2 - 4U) {
|
|
local_14 = (void *)0xffffffff;
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (iVar2 == 1) {
|
|
translatedText =
|
|
string_table_translate
|
|
(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/ONLINE_PUBLIC_DESCRIPTOR"));
|
|
descriptor._size = 0;
|
|
descriptor._capacity = 0xf;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptor._buf)) + 0x0))) = (void *)0x0;
|
|
pbVar3 = translatedText;
|
|
do {
|
|
bVar1 = *pbVar3;
|
|
pbVar3 = pbVar3 + 1;
|
|
} while (bVar1 != 0);
|
|
(GHIDRA_CAST<msvc::string *>((descriptor._buf)))->msvc::string::assign(translatedText,GHIDRA_INT(pbVar3) - GHIDRA_INT((translatedText + 1)));
|
|
local_14 = (void *)0x1;
|
|
goto LAB_008e4f9b;
|
|
}
|
|
if (iVar2 == 2) {
|
|
pbVar3 = string_table_translate
|
|
(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/ONLINE_FRIEND_DESCRIPTOR"));
|
|
(GHIDRA_CAST<msvc::string *>((descriptor._buf)))->msvc::string::string_from_cstr(pbVar3);
|
|
local_14 = (void *)0x2;
|
|
goto LAB_008e4f9b;
|
|
}
|
|
if (iVar2 == 3) {
|
|
pbVar3 = string_table_translate
|
|
(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/ONLINE_DAILY_DESCRIPTOR"));
|
|
(GHIDRA_CAST<msvc::string *>((descriptor._buf)))->msvc::string::string_from_cstr(pbVar3);
|
|
local_14 = (void *)0x3;
|
|
goto LAB_008e4f9b;
|
|
}
|
|
if (iVar2 != 4) goto LAB_008e4fe1;
|
|
pbVar3 = string_table_translate
|
|
(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>("#Online/ONLINE_OPTIONS_DESCRIPTOR"));
|
|
(GHIDRA_CAST<msvc::string *>((descriptor._buf)))->msvc::string::string_from_cstr(pbVar3);
|
|
local_14 = (void *)0x4;
|
|
render_descriptor(this,&descriptor);
|
|
local_14 = (void *)0xffffffff;
|
|
if (descriptor._capacity < 0x10) goto LAB_008e4fe1;
|
|
freeSize = descriptor._capacity + 1;
|
|
freeBlock = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&((void *)descriptor._buf)) + 0x0)));
|
|
if (0xfff < freeSize) {
|
|
freeBlock = *(void **)((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptor._buf)) + 0x0))) + -4);
|
|
iVar2 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(descriptor._buf)) + 0x0))) - GHIDRA_INT(freeBlock);
|
|
goto joined_r0x008e5119;
|
|
}
|
|
}
|
|
local_14 = (void *)0xffffffff;
|
|
operator_delete(freeBlock,freeSize);
|
|
LAB_008e4fe1:
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x38)))) == 0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))),GHIDRA_CAST<uint8_t *>("Doodle Position"));
|
|
}
|
|
renderPos.x = menuX + *nullFrame;
|
|
renderPos.y = menuY + nullFrame[1];
|
|
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x221))) != '\0') {
|
|
if ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x188))) == '\0') {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x148)))),&renderPos,&g_vectorZero,&g_vectorZero);
|
|
topAnimState = GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x168))));
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x168)))),&renderPos,&g_vectorZero,&g_vectorZero);
|
|
topAnimState = GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x148))));
|
|
}
|
|
AnimationState::Render(topAnimState,&renderPos,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
if (isKeyboard == 0) {
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x38)))) == 0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))),GHIDRA_CAST<uint8_t *>("BackButton"));
|
|
}
|
|
renderPos.y = menuY + nullFrame[1];
|
|
renderPos.x = menuX + *nullFrame;
|
|
descriptor._capacity = 0;
|
|
pos.y = renderPos.y;
|
|
pos.x = renderPos.x;
|
|
scale.y = g_vectorOne.y;
|
|
scale.x = g_vectorOne.x;
|
|
Manager::render_controller_action_glyph
|
|
(g_manager,g_menuControllerIndex,0xf,0,1,
|
|
(ColorMod)ZEXT1644(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))),pos
|
|
,scale);
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
}
|
|
|
|
// 008e5260
|
|
void Menu_Online::enter()
|
|
{
|
|
uint8_t bVar1;
|
|
char cVar2;
|
|
uint32_t uVar3;
|
|
uint8_t *currentAnimName;
|
|
uint32_t uVar4;
|
|
uint8_t *idleName;
|
|
bool bVar5;
|
|
uint32_t uVar6;
|
|
uint8_t **joinLobby;
|
|
uint32_t joinLobbyPtr;
|
|
int *joinLobbyRefCount;
|
|
uint8_t **pendingLobby;
|
|
int *pendingLobbyPtr;
|
|
int *pendingLobbyRefCount;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
uint8_t *animData;
|
|
Manager *manager;
|
|
uint8_t *pendingLobbySrc;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b06a35;
|
|
local_10 = ExceptionList;
|
|
uVar3 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U;
|
|
ExceptionList = &local_10;
|
|
animData = *GHIDRA_CAST<uint8_t **>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x38))));
|
|
if (animData == GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
LAB_008e52d3:
|
|
bVar1 = ANM2::SetAnimation(GHIDRA_CAST<ANM2 *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x4)))),s_Idle,1);
|
|
if (bVar1 != 0) {
|
|
AnimationState::Rewind(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x48))) = 1;
|
|
}
|
|
}
|
|
else {
|
|
currentAnimName = animData;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((animData + 0x14))) {
|
|
currentAnimName = *GHIDRA_CAST<uint8_t **>(animData);
|
|
}
|
|
idleName = s_Idle;
|
|
do {
|
|
bVar1 = *currentAnimName;
|
|
bVar5 = bVar1 < *idleName;
|
|
if (bVar1 != *idleName) {
|
|
LAB_008e52c0:
|
|
uVar4 = -GHIDRA_UINT(bVar5) | 1;
|
|
goto LAB_008e52c5;
|
|
}
|
|
if (bVar1 == 0) break;
|
|
bVar1 = currentAnimName[1];
|
|
bVar5 = bVar1 < idleName[1];
|
|
if (bVar1 != idleName[1]) goto LAB_008e52c0;
|
|
currentAnimName = currentAnimName + 2;
|
|
idleName = idleName + 2;
|
|
} while (bVar1 != 0);
|
|
uVar4 = 0;
|
|
LAB_008e52c5:
|
|
if ((uVar4 != 0) || ((animData[0x34] != 0 && ((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x48))) == '\0')))) goto LAB_008e52d3;
|
|
}
|
|
manager = g_manager;
|
|
this->_state = 0;
|
|
this->_prevState = 1;
|
|
pendingLobby = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
pendingLobbyPtr = GHIDRA_CAST<int *>(0x0);
|
|
pendingLobbyRefCount = GHIDRA_CAST<int *>(0x0);
|
|
local_8 = 0;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((&pendingLobbyPtr)))->msvc::shared_ptr::assign(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(manager[1]._gamestate)) + 0x8ec))));
|
|
local_8 = 1;
|
|
if (pendingLobbyPtr != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar2 = (**(code **)(*pendingLobbyPtr + 0xc))(uVar3);
|
|
if (cVar2 != '\0') {
|
|
bVar5 = true;
|
|
goto LAB_008e5354;
|
|
}
|
|
}
|
|
bVar5 = false;
|
|
LAB_008e5354:
|
|
pendingLobby = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
local_8 = 2;
|
|
if (pendingLobbyRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar2 = (**(code **)(*pendingLobbyRefCount + 0xc))();
|
|
if ((cVar2 != '\0') && (g_lobbyReleaseFn != (void *)0x0)) {
|
|
(*g_lobbyReleaseFn)(&pendingLobbyPtr);
|
|
}
|
|
}
|
|
manager = g_manager;
|
|
if (bVar5) {
|
|
joinLobby = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
joinLobbyPtr = 0;
|
|
joinLobbyRefCount = GHIDRA_CAST<int *>(0x0);
|
|
pendingLobbySrc = &(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0x8ec)));
|
|
local_8 = 3;
|
|
uVar6 = 0x8e53c2;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((&joinLobbyPtr)))->msvc::shared_ptr::assign(pendingLobbySrc);
|
|
local_8 = 4;
|
|
online_lobby_join(&manager->_netplayManager,&joinLobby,CONCAT44(pendingLobbySrc,uVar6));
|
|
joinLobby = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
local_8 = 5;
|
|
if (joinLobbyRefCount != GHIDRA_CAST<int *>(0x0)) {
|
|
cVar2 = (**(code **)(*joinLobbyRefCount + 0xc))();
|
|
if ((cVar2 != '\0') && (g_lobbyReleaseFn != (void *)0x0)) {
|
|
(*g_lobbyReleaseFn)(&joinLobbyPtr);
|
|
}
|
|
}
|
|
}
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 008e5420
|
|
void Menu_Online::start_quick_match()
|
|
{
|
|
int iVar1;
|
|
void *in_ECX;
|
|
uint32_t freeSize;
|
|
void *freeBlock;
|
|
uint8_t local_f4 [48];
|
|
uint32_t local_c4;
|
|
uint8_t local_a0 [12];
|
|
uint8_t local_94 [12];
|
|
uint32_t local_88;
|
|
uint32_t local_84;
|
|
uint32_t local_80;
|
|
uint32_t local_7c;
|
|
uint32_t local_78;
|
|
uint32_t local_74;
|
|
uint32_t local_70;
|
|
Vector popupSize;
|
|
uint32_t textEntry;
|
|
char *entryText;
|
|
uint32_t local_38;
|
|
uint32_t local_34;
|
|
uint32_t local_30;
|
|
uint32_t uStack_2c;
|
|
void *pvStack_28;
|
|
uint32_t uStack_24;
|
|
int local_20;
|
|
void *local_1c;
|
|
float local_18;
|
|
int local_14;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
Manager *manager;
|
|
|
|
manager = g_manager;
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b06a78;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
(g_manager->_dailyChallenge)._id = 0;
|
|
(manager->_dailyChallenge)._seed = 0;
|
|
(manager->_dailyChallenge)._specialDailyId = 0;
|
|
(manager->_dailyChallenge)._isPractice = 0;
|
|
ChallengeParam::Reset(&(manager->_dailyChallenge)._params);
|
|
(GHIDRA_CAST<LobbySettings *>((&g_manager->_lobbySettings)))->LobbySettings::reset();
|
|
popupSize.x = (float)&DAT_bf800000;
|
|
popupSize.y = (float)&DAT_bf800000;
|
|
MessagePopup::MessagePopup
|
|
(local_f4,&g_manager->_font2_TeamMeatEx12,online_quick_match_popup_callback,in_ECX,
|
|
&popupSize);
|
|
local_8 = 0;
|
|
local_30 = 0x3e5cdcdd;
|
|
uStack_2c = 0x3e2cacad;
|
|
pvStack_28 = (void *)0x3e34b4b5;
|
|
uStack_24 = 0x3f800000;
|
|
local_1c = (void *)g_vectorZero.x;
|
|
textEntry = 0;
|
|
entryText = "##GAME###Online/SEARCHING_FOR_LOBBIES";
|
|
local_38 = 0xffffffff;
|
|
local_34 = 0xffffffff;
|
|
local_20 = 0;
|
|
local_18 = g_vectorZero.y;
|
|
local_14 = 1;
|
|
msvc::vector<48byte>::push_back(&textEntry);
|
|
local_c4 = 1000;
|
|
local_70 = 0xdeadbeef;
|
|
iVar1 = PopupQueue::push(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf0))),local_f4);
|
|
*GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(in_ECX) + 0x23c)) = iVar1;
|
|
local_34 = 0x32;
|
|
pvStack_28 = (void *)0x0;
|
|
uStack_24 = 0;
|
|
local_20 = 0;
|
|
local_1c = (void *)0x0;
|
|
local_18 = 0.0;
|
|
local_14 = 0;
|
|
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),1);
|
|
local_30 = 1;
|
|
uStack_2c = 1;
|
|
iVar1 = (g_manager->_optionsConfig)._eosCrossplay;
|
|
if ((iVar1 == 2) || (iVar1 == 3)) {
|
|
iVar1 = 3;
|
|
}
|
|
else {
|
|
iVar1 = 2;
|
|
}
|
|
Multiplayer::set_service_provider(iVar1);
|
|
KAGE::Network::MultiplayerManager::request_lobby_list
|
|
(&DAT_00c79a50,&local_34,on_quick_match_search_result,in_ECX);
|
|
FUN_00a539f0();
|
|
if (local_1c != (void *)0x0) {
|
|
freeSize = ((local_14 - GHIDRA_INT(local_1c)) / 0x18) * 0x18;
|
|
freeBlock = local_1c;
|
|
if (0xfff < freeSize) {
|
|
freeBlock = *(void **)(GHIDRA_CAST<char *>(local_1c) + -4);
|
|
freeSize = freeSize + 0x23;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_1c) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_008e5642;
|
|
}
|
|
operator_delete(freeBlock,freeSize);
|
|
}
|
|
if (pvStack_28 != (void *)0x0) {
|
|
freeSize = ((local_20 - GHIDRA_INT(pvStack_28)) / 0x18) * 0x18;
|
|
freeBlock = pvStack_28;
|
|
if (0xfff < freeSize) {
|
|
freeBlock = *(void **)(GHIDRA_CAST<char *>(pvStack_28) + -4);
|
|
freeSize = freeSize + 0x23;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvStack_28) + (-4 - GHIDRA_INT(freeBlock))))) {
|
|
LAB_008e5642:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(freeBlock,freeSize);
|
|
}
|
|
local_78 = 0;
|
|
local_74 = 0;
|
|
local_80 = 0;
|
|
local_7c = 0;
|
|
local_88 = 0;
|
|
local_84 = 0;
|
|
FID_conflict__Tidy(local_94);
|
|
FID_conflict__Tidy(local_a0);
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
|
|
// 008e5790
|
|
void Menu_Online::render_descriptor(std_string *text)
|
|
{
|
|
KColor color;
|
|
float *nullFrame;
|
|
std_string *lineChars;
|
|
char *backChar;
|
|
std_string *psVar1;
|
|
void *pvVar2;
|
|
void *ptr;
|
|
std_string *psVar3;
|
|
uint32_t size;
|
|
uint32_t uVar4;
|
|
uint8_t *puVar5;
|
|
uint8_t *puVar6;
|
|
uint8_t *puVar7;
|
|
uint32_t fontParams;
|
|
uint32_t local_94;
|
|
uint32_t local_90;
|
|
uint32_t local_8c;
|
|
uint32_t local_88;
|
|
uint32_t local_84;
|
|
uint32_t local_80;
|
|
uint8_t *local_7c;
|
|
float textX;
|
|
std_string *local_74;
|
|
std_string *local_70;
|
|
uint32_t charIndex;
|
|
Font *font;
|
|
uint32_t *lastLineSize;
|
|
float textY;
|
|
std_string *lines;
|
|
std_string *linesEnd;
|
|
std_string *linesCapacity;
|
|
uint8_t *local_50;
|
|
uint8_t *local_4c;
|
|
std_string *local_48;
|
|
uint8_t *local_44;
|
|
uint8_t ch;
|
|
std_string tmpLine;
|
|
uint32_t stackCookie;
|
|
char *pcStack_20;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
uint32_t *lastLineSizePtr;
|
|
|
|
pcStack_20 = GHIDRA_CAST<char *>((GHIDRA_INT(register0x00000010) + 0xfffffffc));
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00b06ad8;
|
|
local_1c = ExceptionList;
|
|
stackCookie = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffff0U));
|
|
ExceptionList = &local_1c;
|
|
textX = (g_menuManager->_ViewPosition).x + *GHIDRA_CAST<float *>((this + 1));
|
|
textY = (g_menuManager->_ViewPosition).y + *GHIDRA_CAST<float *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(this[1])) + 0x4))));
|
|
if (*GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x38)))) == 0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
pcStack_20 = GHIDRA_CAST<char *>((GHIDRA_INT(register0x00000010) + 0xfffffffc));
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(GHIDRA_CAST<AnimationState *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x34)))),GHIDRA_CAST<uint8_t *>("Descriptor Position"));
|
|
}
|
|
textX = textX + *nullFrame;
|
|
textY = textY + nullFrame[1];
|
|
font = &g_manager->_font1_TeamMeatEx10;
|
|
lines = GHIDRA_CAST<std_string *>(0x0);
|
|
linesEnd = GHIDRA_CAST<std_string *>(0x0);
|
|
linesCapacity = GHIDRA_CAST<std_string *>(0x0);
|
|
tmpLine._capacity = GHIDRA_UINT(&DAT_0000000f);
|
|
tmpLine._size = 0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) = GHIDRA_CAST<std_string *>(0x0);
|
|
local_14 = 1;
|
|
vector_string_emplace_reallocate_move(&lines,GHIDRA_CAST<std_string *>(0x0),&tmpLine);
|
|
local_14 = local_14 & 0xffffff00;
|
|
if (&DAT_0000000f < tmpLine._capacity) {
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((tmpLine._capacity + 1));
|
|
lineChars = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(tmpLine._buf))) + 0x0)));
|
|
if (GHIDRA_CAST<uint8_t *>(0xfff) < puVar5) {
|
|
lineChars = GHIDRA_CAST<std_string *>((GHIDRA_CAST<std_string *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) + -0x18)))->_capacity);
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((tmpLine._capacity + 0x24));
|
|
if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) + (-4 - GHIDRA_INT(lineChars))))) goto LAB_008e5f00;
|
|
}
|
|
operator_delete(lineChars,GHIDRA_UINT(puVar5));
|
|
}
|
|
charIndex = 0;
|
|
if (text->_size != 0) {
|
|
LAB_008e58d0:
|
|
psVar1 = linesEnd;
|
|
psVar3 = linesEnd + -1;
|
|
lineChars = text;
|
|
if (0xf < text->_capacity) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(text->_buf);
|
|
}
|
|
local_70 = psVar3;
|
|
if (lineChars->_buf[charIndex] == '\n') {
|
|
tmpLine._capacity = GHIDRA_UINT(&DAT_0000000f);
|
|
tmpLine._size = 0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) = GHIDRA_CAST<std_string *>(0x0);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 2;
|
|
if (linesEnd == linesCapacity) {
|
|
vector_string_emplace_reallocate_move(&lines,linesEnd,&tmpLine);
|
|
}
|
|
else {
|
|
linesEnd->_buf[0] = '\0';
|
|
linesEnd->_buf[1] = '\0';
|
|
linesEnd->_buf[2] = '\0';
|
|
linesEnd->_buf[3] = '\0';
|
|
linesEnd->_size = 0;
|
|
linesEnd->_capacity = 0;
|
|
linesEnd->_buf[0] = '\0';
|
|
linesEnd->_buf[1] = '\0';
|
|
linesEnd->_buf[2] = '\0';
|
|
linesEnd->_buf[3] = '\0';
|
|
*GHIDRA_CAST<uint32_t *>((linesEnd->_buf + 4)) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x4)));
|
|
*GHIDRA_CAST<uint32_t *>((linesEnd->_buf + 8)) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x8)));
|
|
*GHIDRA_CAST<uint32_t *>((linesEnd->_buf + 0xc)) = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0xc)));
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) = GHIDRA_CAST<std_string *>(0x0);
|
|
linesEnd->_size = 0;
|
|
linesEnd->_capacity = 0xf;
|
|
linesEnd = linesEnd + 1;
|
|
}
|
|
local_14 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_14))) + 0x1))) << 8;
|
|
if (&DAT_0000000f < tmpLine._capacity) {
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((tmpLine._capacity + 1));
|
|
lineChars = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(tmpLine._buf))) + 0x0)));
|
|
if (GHIDRA_CAST<uint8_t *>(0xfff) < puVar5) {
|
|
lineChars = GHIDRA_CAST<std_string *>((GHIDRA_CAST<std_string *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) + -0x18)))->_capacity);
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((tmpLine._capacity + 0x24));
|
|
if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) + (-4 - GHIDRA_INT(lineChars))))) goto LAB_008e5f00;
|
|
}
|
|
operator_delete(lineChars,GHIDRA_UINT(puVar5));
|
|
}
|
|
}
|
|
else {
|
|
lineChars = text;
|
|
if (0xf < text->_capacity) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(text->_buf);
|
|
}
|
|
local_4c = GHIDRA_CAST<uint8_t *>(linesEnd[-1]._capacity);
|
|
puVar5 = GHIDRA_CAST<uint8_t *>(linesEnd[-1]._size);
|
|
ch = lineChars->_buf[charIndex];
|
|
lastLineSize = &linesEnd[-1]._size;
|
|
if (puVar5 < local_4c) {
|
|
*lastLineSize = GHIDRA_UINT((puVar5 + 1));
|
|
lineChars = psVar3;
|
|
if (&DAT_0000000f < local_4c) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(psVar3->_buf);
|
|
}
|
|
lineChars->_buf[GHIDRA_INT(puVar5)] = ch;
|
|
(lineChars->_buf + 1)[GHIDRA_INT(puVar5)] = 0;
|
|
}
|
|
else {
|
|
if (puVar5 == GHIDRA_CAST<uint8_t *>(0x7fffffff)) {
|
|
LAB_008e5f30:
|
|
/* WARNING: Subroutine does not return */
|
|
msvc::string::_Xlen();
|
|
}
|
|
local_50 = GHIDRA_CAST<uint8_t *>((GHIDRA_UINT((puVar5 + 1)) | 0xf));
|
|
if (local_50 < GHIDRA_CAST<uint8_t *>(0x80000000)) {
|
|
local_44 = GHIDRA_CAST<uint8_t *>((GHIDRA_UINT(local_4c) >> 1));
|
|
if (GHIDRA_CAST<uint8_t *>((0x7fffffff - GHIDRA_INT(local_44))) < local_4c) {
|
|
local_50 = GHIDRA_CAST<uint8_t *>(0x7fffffff);
|
|
}
|
|
else if (local_50 < local_44 + GHIDRA_INT(local_4c)) {
|
|
local_50 = local_44 + GHIDRA_INT(local_4c);
|
|
}
|
|
}
|
|
else {
|
|
local_50 = GHIDRA_CAST<uint8_t *>(0x7fffffff);
|
|
}
|
|
local_48 = msvc::_Allocate(GHIDRA_UINT((local_50 + 1)));
|
|
*lastLineSize = GHIDRA_UINT((puVar5 + 1));
|
|
psVar1[-1]._capacity = GHIDRA_UINT(local_50);
|
|
if (local_4c < GHIDRA_CAST<uint8_t *>(0x10)) {
|
|
memcpy(local_48,psVar3,(size_t)puVar5);
|
|
local_48->_buf[GHIDRA_INT(puVar5)] = ch;
|
|
(local_48->_buf + 1)[GHIDRA_INT(puVar5)] = '\0';
|
|
}
|
|
else {
|
|
local_44 = *GHIDRA_CAST<uint8_t **>(psVar3->_buf);
|
|
memcpy(local_48,local_44,(size_t)puVar5);
|
|
local_48->_buf[GHIDRA_INT(puVar5)] = ch;
|
|
puVar6 = local_4c + 1;
|
|
(local_48->_buf + 1)[GHIDRA_INT(puVar5)] = '\0';
|
|
puVar5 = local_44;
|
|
if (GHIDRA_CAST<uint8_t *>(0xfff) < puVar6) {
|
|
puVar5 = *GHIDRA_CAST<uint8_t **>((local_44 + -4));
|
|
puVar6 = local_4c + 0x24;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < local_44 + (-4 - GHIDRA_INT(puVar5))) goto LAB_008e5f00;
|
|
}
|
|
operator_delete(puVar5,GHIDRA_UINT(puVar6));
|
|
}
|
|
*GHIDRA_CAST<std_string **>(psVar3->_buf) = local_48;
|
|
}
|
|
lineChars = psVar3;
|
|
if (0xf < psVar1[-1]._capacity) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(psVar3->_buf);
|
|
}
|
|
uVar4 = Font::get_string_width_n(font,GHIDRA_CAST<uint8_t *>(lineChars),-1);
|
|
if (0x9f < uVar4) {
|
|
local_44 = GHIDRA_CAST<uint8_t *>(*lastLineSize);
|
|
puVar5 = local_44 + -1;
|
|
if (puVar5 != GHIDRA_CAST<uint8_t *>(0x0)) {
|
|
do {
|
|
lineChars = psVar3;
|
|
if (0xf < psVar1[-1]._capacity) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(psVar3->_buf);
|
|
}
|
|
if (lineChars->_buf[GHIDRA_INT(puVar5)] == 0x20) {
|
|
puVar6 = GHIDRA_CAST<uint8_t *>(0x0);
|
|
tmpLine._size = 0;
|
|
tmpLine._capacity = GHIDRA_UINT(&DAT_0000000f);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) = GHIDRA_CAST<std_string *>(0x0);
|
|
local_50 = puVar5 + 1;
|
|
local_14 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),3);
|
|
if (local_44 <= local_50) goto LAB_008e5c86;
|
|
lineChars = psVar3;
|
|
puVar5 = &DAT_0000000f;
|
|
goto LAB_008e5b47;
|
|
}
|
|
puVar5 = puVar5 + -1;
|
|
} while (puVar5 != GHIDRA_CAST<uint8_t *>(0x0));
|
|
}
|
|
}
|
|
}
|
|
lineChars = linesEnd;
|
|
goto LAB_008e5995;
|
|
}
|
|
lineChars = linesEnd;
|
|
LAB_008e5d36:
|
|
psVar3 = GHIDRA_CAST<std_string *>(((GHIDRA_INT(lineChars) - GHIDRA_INT(lines)) / 0x18));
|
|
local_70 = psVar3;
|
|
if (psVar3 < GHIDRA_CAST<std_string *>(0x2)) {
|
|
if (psVar3 != GHIDRA_CAST<std_string *>(0x0)) goto LAB_008e5d7f;
|
|
}
|
|
else {
|
|
textY = textY - (float)(uint16_t)font->_base;
|
|
LAB_008e5d7f:
|
|
lineChars = lines;
|
|
do {
|
|
fontParams = 1;
|
|
local_94 = 0xffff;
|
|
local_90 = 0;
|
|
local_8c = 0x3f800000;
|
|
local_88 = 0xffffffff;
|
|
local_84 = 0;
|
|
local_80 = 0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 4;
|
|
psVar1 = lineChars;
|
|
if (0xf < lineChars->_capacity) {
|
|
psVar1 = *GHIDRA_CAST<std_string **>(lineChars->_buf);
|
|
}
|
|
pvVar2 = Font::measure_string(font,tmpLine._buf + 8,GHIDRA_CAST<uint8_t *>(psVar1),&fontParams,&g_vectorOne);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 5;
|
|
color._blue = 0.1764706;
|
|
color._red = 0.21176471;
|
|
color._green = 0.18431373;
|
|
color._alpha = 1.0;
|
|
color._unk = 0;
|
|
Font::render_glyph_quads(font,pvVar2,textX,textY,1.0,1.0,color,&fontParams);
|
|
msvc::vector<12byte>::clear();
|
|
msvc::vector<12byte>::_Tidy();
|
|
lineChars = lineChars + 1;
|
|
local_14 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_14))) + 0x1))) << 8;
|
|
textY = (float)(uint16_t)font->_base + textY;
|
|
psVar3 = GHIDRA_CAST<std_string *>((GHIDRA_INT(&psVar3[-1]._capacity) + 3));
|
|
} while (psVar3 != GHIDRA_CAST<std_string *>(0x0));
|
|
lineChars = linesEnd;
|
|
}
|
|
psVar3 = lines;
|
|
if (lines != GHIDRA_CAST<std_string *>(0x0)) {
|
|
for (; psVar3 != lineChars; psVar3 = psVar3 + 1) {
|
|
uVar4 = psVar3->_capacity;
|
|
if (0xf < uVar4) {
|
|
pvVar2 = *(void **)psVar3->_buf;
|
|
size = uVar4 + 1;
|
|
ptr = pvVar2;
|
|
if (0xfff < size) {
|
|
ptr = *(void **)(GHIDRA_CAST<char *>(pvVar2) + -4);
|
|
size = uVar4 + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(pvVar2) + (-4 - GHIDRA_INT(ptr))))) goto LAB_008e5f00;
|
|
}
|
|
operator_delete(ptr,size);
|
|
}
|
|
psVar3->_size = 0;
|
|
psVar3->_capacity = 0xf;
|
|
psVar3->_buf[0] = 0;
|
|
}
|
|
uVar4 = ((GHIDRA_INT(linesCapacity) - GHIDRA_INT(lines)) / 0x18) * 0x18;
|
|
lineChars = lines;
|
|
if (0xfff < uVar4) {
|
|
lineChars = GHIDRA_CAST<std_string *>(lines[-1]._capacity);
|
|
uVar4 = uVar4 + 0x23;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < GHIDRA_CAST<uint8_t *>((GHIDRA_INT(lines) + (-4 - GHIDRA_INT(lineChars))))) {
|
|
LAB_008e5f00:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(lineChars,uVar4);
|
|
}
|
|
ExceptionList = local_1c;
|
|
return;
|
|
while( true ) {
|
|
local_50 = local_50 + 1;
|
|
local_44 = GHIDRA_CAST<uint8_t *>(*lastLineSize);
|
|
lineChars = psVar3;
|
|
puVar5 = puVar7;
|
|
local_48 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(tmpLine._buf))) + 0x0)));
|
|
if (local_44 <= local_50) break;
|
|
LAB_008e5b47:
|
|
psVar3 = local_70;
|
|
if (0xf < lineChars->_capacity) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(lineChars->_buf);
|
|
}
|
|
ch = lineChars->_buf[GHIDRA_INT(local_50)];
|
|
if (puVar6 < puVar5) {
|
|
tmpLine._size = GHIDRA_UINT((puVar6 + 1));
|
|
lineChars = &tmpLine;
|
|
if (&DAT_0000000f < puVar5) {
|
|
lineChars = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(tmpLine._buf))) + 0x0)));
|
|
}
|
|
lineChars->_buf[GHIDRA_INT(puVar6)] = ch;
|
|
(lineChars->_buf + 1)[GHIDRA_INT(puVar6)] = '\0';
|
|
puVar6 = GHIDRA_CAST<uint8_t *>(tmpLine._size);
|
|
puVar7 = GHIDRA_CAST<uint8_t *>(tmpLine._capacity);
|
|
}
|
|
else {
|
|
local_4c = puVar6;
|
|
local_48 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(tmpLine._buf))) + 0x0)));
|
|
if (puVar6 == GHIDRA_CAST<uint8_t *>(0x7fffffff)) goto LAB_008e5f30;
|
|
local_44 = puVar6 + 1;
|
|
puVar7 = GHIDRA_CAST<uint8_t *>((GHIDRA_UINT(local_44) | 0xf));
|
|
if (puVar7 < GHIDRA_CAST<uint8_t *>(0x80000000)) {
|
|
if (GHIDRA_CAST<uint8_t *>((0x7fffffff - (GHIDRA_UINT(puVar5) >> 1))) < puVar5) {
|
|
puVar7 = GHIDRA_CAST<uint8_t *>(0x7fffffff);
|
|
}
|
|
else if (puVar7 < puVar5 + (GHIDRA_UINT(puVar5) >> 1)) {
|
|
puVar7 = puVar5 + (GHIDRA_UINT(puVar5) >> 1);
|
|
}
|
|
}
|
|
else {
|
|
puVar7 = GHIDRA_CAST<uint8_t *>(0x7fffffff);
|
|
}
|
|
local_7c = puVar5;
|
|
local_74 = msvc::_Allocate(GHIDRA_UINT((puVar7 + 1)));
|
|
tmpLine._size = GHIDRA_UINT(local_44);
|
|
tmpLine._capacity = GHIDRA_UINT(puVar7);
|
|
if (local_7c < GHIDRA_CAST<uint8_t *>(0x10)) {
|
|
memcpy(local_74,&tmpLine,(size_t)local_4c);
|
|
local_74->_buf[GHIDRA_INT(local_4c)] = ch;
|
|
(local_74->_buf + 1)[GHIDRA_INT(local_4c)] = '\0';
|
|
}
|
|
else {
|
|
memcpy(local_74,local_48,(size_t)local_4c);
|
|
local_74->_buf[GHIDRA_INT(local_4c)] = ch;
|
|
(local_74->_buf + 1)[GHIDRA_INT(local_4c)] = '\0';
|
|
puVar5 = local_7c + 1;
|
|
lineChars = local_48;
|
|
if (GHIDRA_CAST<uint8_t *>(0xfff) < puVar5) {
|
|
lineChars = GHIDRA_CAST<std_string *>(local_48[-1]._capacity);
|
|
puVar5 = local_7c + 0x24;
|
|
if (0x1f < GHIDRA_UINT((GHIDRA_INT(local_48) + (-4 - GHIDRA_INT(lineChars))))) goto LAB_008e5f00;
|
|
}
|
|
operator_delete(lineChars,GHIDRA_UINT(puVar5));
|
|
}
|
|
puVar6 = local_44;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) = local_74;
|
|
}
|
|
}
|
|
LAB_008e5c86:
|
|
backChar = GHIDRA_CAST<char *>(FUN_00693680());
|
|
lastLineSizePtr = lastLineSize;
|
|
if (*backChar == ' ') {
|
|
puVar5 = local_44;
|
|
}
|
|
else {
|
|
do {
|
|
uVar4 = *lastLineSizePtr;
|
|
lineChars = psVar3;
|
|
if (0xf < psVar3->_capacity) {
|
|
lineChars = *GHIDRA_CAST<std_string **>(psVar3->_buf);
|
|
}
|
|
*lastLineSizePtr = uVar4 - 1;
|
|
lineChars->_buf[uVar4 - 1] = 0;
|
|
backChar = GHIDRA_CAST<char *>(FUN_00693680());
|
|
} while (*backChar != ' ');
|
|
puVar5 = GHIDRA_CAST<uint8_t *>(psVar3->_size);
|
|
}
|
|
lineChars = linesEnd;
|
|
if (0xf < psVar3->_capacity) {
|
|
psVar3 = *GHIDRA_CAST<std_string **>(psVar3->_buf);
|
|
}
|
|
*lastLineSizePtr = GHIDRA_UINT((puVar5 + -1));
|
|
psVar3->_buf[GHIDRA_INT((puVar5 + -1))] = 0;
|
|
if (linesEnd == linesCapacity) {
|
|
vector_string_emplace_reallocate(&lines,linesEnd,&tmpLine);
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<msvc::string *>((linesEnd->_buf)))->msvc::string::string(&tmpLine);
|
|
linesEnd = lineChars + 1;
|
|
}
|
|
lineChars = linesEnd;
|
|
local_14 = local_14 & 0xffffff00;
|
|
if (&DAT_0000000f < tmpLine._capacity) {
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((tmpLine._capacity + 1));
|
|
psVar3 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_CAST<std_string *>(tmpLine._buf))) + 0x0)));
|
|
if (GHIDRA_CAST<uint8_t *>(0xfff) < puVar5) {
|
|
psVar3 = GHIDRA_CAST<std_string *>((GHIDRA_CAST<std_string *>(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) + -0x18)))->_capacity);
|
|
puVar5 = GHIDRA_CAST<uint8_t *>((tmpLine._capacity + 0x24));
|
|
if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(tmpLine._buf)) + 0x0))) + (-4 - GHIDRA_INT(psVar3))))) goto LAB_008e5f00;
|
|
}
|
|
operator_delete(psVar3,GHIDRA_UINT(puVar5));
|
|
}
|
|
LAB_008e5995:
|
|
charIndex = charIndex + 1;
|
|
if (text->_size <= charIndex) goto LAB_008e5d36;
|
|
goto LAB_008e58d0;
|
|
}
|
|
|
|
// 008e5f40
|
|
void Menu_Online::on_quick_match_search_result(int *param_1, int param_2)
|
|
{
|
|
char *pcVar1;
|
|
uint32_t *puVar2;
|
|
uint32_t *puVar3;
|
|
int *piVar4;
|
|
char cVar5;
|
|
int iVar6;
|
|
char *passwordChar;
|
|
uint32_t i;
|
|
uint32_t *puVar7;
|
|
int *sortEnd;
|
|
int iVar8;
|
|
int *piVar9;
|
|
uint32_t excludedIdCount;
|
|
int *sortEnd;
|
|
int lobbyIt;
|
|
uint8_t auStackY_164 [128];
|
|
uint8_t **lobbyHandleVtable;
|
|
void *pvVar11;
|
|
void *lobbyRefCount;
|
|
uint8_t auStack_d2 [2];
|
|
int local_b8;
|
|
uint8_t lobbyRef [4];
|
|
int *local_a4;
|
|
uint32_t lobbySortKey;
|
|
int *local_9c;
|
|
int *local_98;
|
|
uint8_t **local_94;
|
|
int **local_90;
|
|
int *local_8c;
|
|
int *listHead;
|
|
int *local_84;
|
|
int *local_80;
|
|
int *candidateList;
|
|
int candidateCount;
|
|
uint64_t local_74;
|
|
LobbySettings lobbySettings;
|
|
int excludedIdsBegin;
|
|
int excludedIdsEnd;
|
|
uint32_t stackCookie;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b06b72;
|
|
local_10 = ExceptionList;
|
|
stackCookie = __security_cookie ^ GHIDRA_UINT(((&lobbySettings)[1]._seed._buf + 8));
|
|
ExceptionList = &local_10;
|
|
candidateList = GHIDRA_CAST<int *>(0x0);
|
|
candidateCount = 0;
|
|
candidateList = operator_new(0x18);
|
|
*candidateList = GHIDRA_INT(candidateList);
|
|
candidateList[1] = GHIDRA_INT(candidateList);
|
|
local_8 = 0;
|
|
lobbyIt = *param_1;
|
|
if (lobbyIt != param_1[1]) {
|
|
do {
|
|
piVar9 = GHIDRA_CAST<int *>((lobbyIt + 4));
|
|
if ((*GHIDRA_CAST<int **>((lobbyIt + 4)) == GHIDRA_CAST<int *>(0x0)) ||
|
|
(iVar6 = (**(code **)(**GHIDRA_CAST<int **>((lobbyIt + 4)) + 0x30))(), iVar6 != 5)) {
|
|
if (GHIDRA_CAST<int *>(*piVar9) == GHIDRA_CAST<int *>(0x0)) {
|
|
passwordChar = GHIDRA_CAST<char *>(0x0);
|
|
}
|
|
else {
|
|
passwordChar = GHIDRA_CAST<char *>((**(code **)(*GHIDRA_CAST<int *>(*piVar9) + 0x2c))());
|
|
}
|
|
pcVar1 = passwordChar + 1;
|
|
do {
|
|
cVar5 = *passwordChar;
|
|
passwordChar = passwordChar + 1;
|
|
} while (cVar5 != '\0');
|
|
if (passwordChar == pcVar1) {
|
|
iVar6 = *piVar9;
|
|
if (iVar6 == 0) {
|
|
local_74 = 0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_74)) + 0x4))) = GHIDRA_CAST<int *>(0x0);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_74)) + 0x0))) = GHIDRA_CAST<int *>(0x0);
|
|
local_9c = GHIDRA_CAST<int *>(local_74);
|
|
sortEnd = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_74)) + 0x4)));
|
|
}
|
|
else {
|
|
local_9c = *GHIDRA_CAST<int **>((iVar6 + 8));
|
|
sortEnd = *GHIDRA_CAST<int **>((iVar6 + 0xc));
|
|
}
|
|
local_98 = sortEnd;
|
|
local_80 = local_9c;
|
|
FUN_00731ee0();
|
|
if (((*GHIDRA_CAST<char *>((local_b8 + 0xd)) == '\0') && (*GHIDRA_CAST<int **>((local_b8 + 0x14)) <= sortEnd)) &&
|
|
((*GHIDRA_CAST<int **>((local_b8 + 0x14)) < sortEnd || (*GHIDRA_CAST<int **>((local_b8 + 0x10)) <= local_80)))) {
|
|
iVar6 = local_b8;
|
|
iVar8 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0x8f4))));
|
|
}
|
|
else {
|
|
iVar6 = *GHIDRA_CAST<int *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0x8f4))));
|
|
iVar8 = iVar6;
|
|
}
|
|
if (iVar6 == iVar8) {
|
|
KAGE::SmartPointer<LobbyImplBase>::SmartPointer();
|
|
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),1);
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((lobbyRef)))->msvc::shared_ptr::assign(piVar9);
|
|
if (GHIDRA_CAST<int *>(*piVar9) == GHIDRA_CAST<int *>(0x0)) {
|
|
lobbySortKey = 0;
|
|
}
|
|
else {
|
|
lobbySortKey = (**(code **)(*GHIDRA_CAST<int *>(*piVar9) + 0x30))();
|
|
}
|
|
(GHIDRA_CAST<LobbySettings *>((&lobbySettings)))->LobbySettings::reset();
|
|
local_84 = GHIDRA_CAST<int *>((auStackY_164 + 0x84));
|
|
lobbyHandleVtable = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
pvVar11 = (void *)0x0;
|
|
lobbyRefCount = (void *)0x0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 3;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((auStackY_164 + 0x88)))->msvc::shared_ptr::assign(lobbyRef);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 2;
|
|
Menu_Save::select_save_slot
|
|
(GHIDRA_CAST<Menu_Save *>(&lobbySettings),lobbyHandleVtable,pvVar11,lobbyRefCount);
|
|
if (g_userProfile == (void *)0x0) {
|
|
local_74 = 0;
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_74)) + 0x4))) = GHIDRA_CAST<int *>(0x0);
|
|
(*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(local_74)) + 0x0))) = GHIDRA_CAST<int *>(0x0);
|
|
iVar6 = (*GHIDRA_CAST<uint32_t *>((GHIDRA_CAST<char *>(&(GHIDRA_INT(local_74))) + 0x4)));
|
|
iVar8 = GHIDRA_INT(GHIDRA_CAST<int *>(local_74));
|
|
}
|
|
else {
|
|
iVar6 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_userProfile) + 0xc));
|
|
iVar8 = *GHIDRA_CAST<int *>((GHIDRA_CAST<char *>(g_userProfile) + 8));
|
|
}
|
|
i = 0;
|
|
excludedIdCount = excludedIdsEnd - excludedIdsBegin >> 3;
|
|
if (excludedIdCount != 0) {
|
|
do {
|
|
if ((*GHIDRA_CAST<int *>((excludedIdsBegin + i * 8)) == iVar8) &&
|
|
(*GHIDRA_CAST<int *>((excludedIdsBegin + 4 + i * 8)) == iVar6)) goto LAB_008e61df;
|
|
i = i + 1;
|
|
} while (i < excludedIdCount);
|
|
}
|
|
listHead = candidateList;
|
|
if (candidateCount == 0xaaaaaaa) {
|
|
/* WARNING: Subroutine does not return */
|
|
msvc::_Xlength_error("list too long");
|
|
}
|
|
local_90 = &candidateList;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 4;
|
|
local_8c = GHIDRA_CAST<int *>(0x0);
|
|
puVar7 = operator_new(0x18);
|
|
local_74 = CONCAT44(puVar7 + 2,GHIDRA_CAST<int *>(local_74));
|
|
puVar7[2] = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
puVar7[3] = 0;
|
|
puVar7[4] = 0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 5;
|
|
local_8c = puVar7;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((puVar7 + 3)))->msvc::shared_ptr::assign(lobbyRef);
|
|
puVar7[5] = lobbySortKey;
|
|
candidateCount = candidateCount + 1;
|
|
local_8c = GHIDRA_CAST<int *>(0x0);
|
|
puVar2 = GHIDRA_CAST<uint32_t *>(listHead[1]);
|
|
*puVar7 = listHead;
|
|
puVar7[1] = puVar2;
|
|
listHead[1] = GHIDRA_INT(puVar7);
|
|
*puVar2 = puVar7;
|
|
LAB_008e61df:
|
|
msvc::vector<Vector>::_Tidy();
|
|
(GHIDRA_CAST<msvc::string *>((lobbySettings._password._buf)))->msvc::string::_Tidy_deallocate();
|
|
(GHIDRA_CAST<msvc::string *>((lobbySettings._seed._buf)))->msvc::string::_Tidy_deallocate();
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 7;
|
|
if (((local_a4 != GHIDRA_CAST<int *>(0x0)) &&
|
|
(cVar5 = (**(code **)(*local_a4 + 0xc))(), cVar5 != '\0')) &&
|
|
(g_lobbyReleaseFn != (void *)0x0)) {
|
|
(*g_lobbyReleaseFn)();
|
|
}
|
|
local_8 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_8))) + 0x1))) << 8;
|
|
}
|
|
}
|
|
}
|
|
lobbyIt = lobbyIt + 0xc;
|
|
} while (lobbyIt != param_1[1]);
|
|
}
|
|
local_84 = GHIDRA_CAST<int *>((GHIDRA_UINT(local_84) & 0xffffff00));
|
|
listHead = candidateList;
|
|
if ((candidateCount != 0) && (candidateCount != 1)) {
|
|
local_80 = GHIDRA_CAST<int *>(FUN_008e69a0());
|
|
sortEnd = GHIDRA_CAST<int *>(FUN_008e69a0());
|
|
local_74 = CONCAT44(sortEnd,GHIDRA_CAST<int *>(local_74));
|
|
local_84 = GHIDRA_CAST<int *>(*listHead);
|
|
sortEnd = local_84;
|
|
piVar9 = local_80;
|
|
if (GHIDRA_UINT(local_80[5]) < GHIDRA_UINT(local_84[5])) {
|
|
local_84 = local_80;
|
|
piVar4 = local_80;
|
|
}
|
|
else {
|
|
do {
|
|
sortEnd = GHIDRA_CAST<int *>(*sortEnd);
|
|
if (sortEnd == local_80) goto LAB_008e6318;
|
|
piVar4 = local_80;
|
|
} while (GHIDRA_UINT(sortEnd[5]) <= GHIDRA_UINT(local_80[5]));
|
|
}
|
|
LAB_008e62d0:
|
|
local_8c = piVar4;
|
|
piVar9 = GHIDRA_CAST<int *>(*piVar9);
|
|
if (piVar9 != sortEnd) goto code_r0x008e62d6;
|
|
goto LAB_008e62de;
|
|
}
|
|
LAB_008e6323:
|
|
*GHIDRA_CAST<uint8_t *>((param_2 + 0x24c)) = 0;
|
|
if ((candidateCount == 0) || (cVar5 = FUN_009c38e0(), cVar5 == '\0')) {
|
|
local_94 = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
KAGE::SmartPointer<LobbyImplBase>::SmartPointer();
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 8;
|
|
pvVar11 = (void *)FUN_00a71f00();
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 9;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>((&local_90)))->msvc::shared_ptr::assign(pvVar11);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 10;
|
|
if ((local_98 != GHIDRA_CAST<int *>(0x0)) &&
|
|
((cVar5 = (**(code **)(*local_98 + 0xc))(), cVar5 != '\0' &&
|
|
(g_lobbyReleaseFn != (void *)0x0)))) {
|
|
(*g_lobbyReleaseFn)();
|
|
}
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0xb;
|
|
(GHIDRA_CAST<msvc::shared_ptr *>(((void *)(param_2 + 0x244))))->msvc::shared_ptr::assign(&local_90);
|
|
local_94 = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0xc;
|
|
if (((local_8c != GHIDRA_CAST<int *>(0x0)) && (cVar5 = (**(code **)(*local_8c + 0xc))(), cVar5 != '\0')) &&
|
|
(g_lobbyReleaseFn != (void *)0x0)) {
|
|
(*g_lobbyReleaseFn)();
|
|
}
|
|
local_8 = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(GHIDRA_UINT(local_8))) + 0x1))) << 8;
|
|
}
|
|
else {
|
|
(GHIDRA_CAST<msvc::shared_ptr *>(((void *)(param_2 + 0x244))))->msvc::shared_ptr::assign((void *)(*candidateList + 0xc));
|
|
}
|
|
local_74 = CONCAT44(0xffffffff,GHIDRA_CAST<int *>(local_74));
|
|
(GHIDRA_CAST<PopupManager *>((&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(g_manager[1]._gamestate)) + 0xcf0))))))->PopupManager::close(GHIDRA_CAST<int *>((param_2 + 0x23c)),
|
|
GHIDRA_CAST<int *>((GHIDRA_INT(&local_74) + 4)));
|
|
local_8 = 0xffffffff;
|
|
*GHIDRA_CAST<int *>((param_2 + 0x23c)) = -1;
|
|
*GHIDRA_CAST<uint32_t *>(candidateList[1]) = 0;
|
|
puVar2 = GHIDRA_CAST<uint32_t *>(*candidateList);
|
|
while (puVar2 != GHIDRA_CAST<uint32_t *>(0x0)) {
|
|
puVar7 = GHIDRA_CAST<uint32_t *>(*puVar2);
|
|
puVar2[2] = KAGE::Network::Multiplayer::ConstLobby::vftable;
|
|
local_8 = 0xd;
|
|
if (((GHIDRA_CAST<int *>(puVar2[4]) != GHIDRA_CAST<int *>(0x0)) &&
|
|
(cVar5 = (**(code **)(*GHIDRA_CAST<int *>(puVar2[4]) + 0xc))(), cVar5 != '\0')) &&
|
|
(g_lobbyReleaseFn != (void *)0x0)) {
|
|
(*g_lobbyReleaseFn)();
|
|
}
|
|
local_8 = 0xffffffff;
|
|
operator_delete(puVar2,0x18);
|
|
puVar2 = puVar7;
|
|
}
|
|
operator_delete(candidateList,0x18);
|
|
ExceptionList = local_10;
|
|
return;
|
|
code_r0x008e62d6:
|
|
piVar4 = local_8c;
|
|
if (GHIDRA_UINT(piVar9[5]) < GHIDRA_UINT(sortEnd[5])) goto LAB_008e62d0;
|
|
LAB_008e62de:
|
|
puVar2 = GHIDRA_CAST<uint32_t *>(local_8c[1]);
|
|
*puVar2 = piVar9;
|
|
puVar7 = GHIDRA_CAST<uint32_t *>(piVar9[1]);
|
|
*puVar7 = sortEnd;
|
|
puVar3 = GHIDRA_CAST<uint32_t *>(sortEnd[1]);
|
|
*puVar3 = local_8c;
|
|
sortEnd[1] = GHIDRA_INT(puVar7);
|
|
piVar9[1] = GHIDRA_INT(puVar2);
|
|
local_8c[1] = GHIDRA_INT(puVar3);
|
|
if (piVar9 != sortEnd) {
|
|
do {
|
|
sortEnd = GHIDRA_CAST<int *>(*sortEnd);
|
|
if (sortEnd == piVar9) goto LAB_008e6318;
|
|
piVar4 = piVar9;
|
|
} while (GHIDRA_UINT(sortEnd[5]) <= GHIDRA_UINT(piVar9[5]));
|
|
goto LAB_008e62d0;
|
|
}
|
|
LAB_008e6318:
|
|
*listHead = GHIDRA_INT(local_84);
|
|
goto LAB_008e6323;
|
|
}
|
|
|
|
// 008e6a80
|
|
void Menu_Online::render_descriptions()
|
|
{
|
|
std_string *keySize;
|
|
float fVar1;
|
|
float fVar2;
|
|
float *nullFrame;
|
|
uint8_t *translatedText;
|
|
Vector *pos;
|
|
Font *pFVar3;
|
|
uint8_t *****pppppbVar4;
|
|
int in_ECX;
|
|
uint8_t *strCursor;
|
|
uint32_t uVar5;
|
|
uint8_t *statKey;
|
|
int statIndex;
|
|
Vector hiddenValuePos;
|
|
Vector valuePos;
|
|
Vector descriptionPos;
|
|
int statOffset;
|
|
KColor textColor;
|
|
Vector labelPos;
|
|
float columnX;
|
|
float rowY;
|
|
Vector local_88;
|
|
uint32_t fontSettings;
|
|
uint32_t local_7c;
|
|
uint32_t local_78;
|
|
uint32_t local_74;
|
|
uint32_t local_70;
|
|
uint32_t local_6c;
|
|
uint32_t local_68;
|
|
uint8_t *****descriptionText [4];
|
|
uint32_t descriptionTextSize;
|
|
uint32_t descriptionTextCapacity;
|
|
uint8_t *****tmpString [4];
|
|
uint32_t tmpStringSize;
|
|
uint32_t tmpStringCapacity;
|
|
uint8_t countText [32];
|
|
uint32_t stackCookie;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
int statCount;
|
|
uint8_t strChar;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00b06c45;
|
|
local_10 = ExceptionList;
|
|
stackCookie = __security_cookie ^ GHIDRA_UINT((countText + 0x30));
|
|
ExceptionList = &local_10;
|
|
local_88.x = (g_menuManager->_ViewPosition).x + *GHIDRA_CAST<float *>((in_ECX + 0x128));
|
|
local_88.y = (g_menuManager->_ViewPosition).y + *GHIDRA_CAST<float *>((in_ECX + 300));
|
|
if (*GHIDRA_CAST<char *>((in_ECX + 0x109)) != '\0') {
|
|
if (*GHIDRA_CAST<char *>((in_ECX + 0x70)) == '\0') {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x30)),&local_88,&g_vectorZero,&g_vectorZero);
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x50)),&local_88,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
else {
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x50)),&local_88,&g_vectorZero,&g_vectorZero);
|
|
AnimationState::Render
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x30)),&local_88,&g_vectorZero,&g_vectorZero);
|
|
}
|
|
}
|
|
fVar2 = local_88.y;
|
|
fVar1 = local_88.x;
|
|
if (*GHIDRA_CAST<int *>((in_ECX + 0x34)) == 0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x30)),GHIDRA_CAST<uint8_t *>("TextStartPos"));
|
|
}
|
|
labelPos.y = fVar2 + nullFrame[1];
|
|
statIndex = 0;
|
|
labelPos.x = fVar1 + *nullFrame;
|
|
statKey = GHIDRA_CAST<uint8_t *>(&DAT_00c78f08);
|
|
statOffset = 0xa8c;
|
|
columnX = labelPos.x;
|
|
rowY = labelPos.y;
|
|
local_88.y = labelPos.y;
|
|
do {
|
|
statCount = *GHIDRA_CAST<int *>(((g_manager->_persistentGameData)._achievements + statOffset + -0x38));
|
|
if ((0 < statIndex) && (statIndex == (statIndex / 7) * 7)) {
|
|
labelPos.x = columnX + 126.0;
|
|
labelPos.y = local_88.y;
|
|
columnX = labelPos.x;
|
|
rowY = local_88.y;
|
|
}
|
|
sprintf_s(countText,0x20,s__d);
|
|
fontSettings = 0;
|
|
local_7c = 0xffff;
|
|
local_78 = 0;
|
|
local_74 = 0x3f800000;
|
|
local_70 = 0xffffffff;
|
|
local_6c = 0;
|
|
local_68 = 0;
|
|
if (statCount < 1) {
|
|
textColor._unk = 0;
|
|
textColor._red = 0.21176471;
|
|
textColor._green = 0.18431373;
|
|
textColor._blue = 0.1764706;
|
|
textColor._alpha = 0.8;
|
|
local_8 = 3;
|
|
Font::DrawStringScaled
|
|
(&g_manager->_font1_TeamMeatEx10,GHIDRA_CAST<uint8_t *>("??????"),&labelPos,&textColor,&fontSettings
|
|
);
|
|
local_8 = 4;
|
|
hiddenValuePos.x = columnX + 102.0;
|
|
hiddenValuePos.y = rowY + 0.0;
|
|
pos = &hiddenValuePos;
|
|
}
|
|
else {
|
|
pFVar3 = &g_manager->_font1_TeamMeatEx10;
|
|
local_8 = 0;
|
|
textColor._unk = 0;
|
|
textColor._red = 0.21176471;
|
|
textColor._green = 0.18431373;
|
|
textColor._blue = 0.1764706;
|
|
textColor._alpha = 1.0;
|
|
strCursor = statKey;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((statKey + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(statKey);
|
|
}
|
|
translatedText = string_table_translate(&g_manager->_stringTable,strCursor);
|
|
tmpStringSize = 0;
|
|
tmpStringCapacity = 0xf;
|
|
tmpString[0] = GHIDRA_CAST<uint8_t *****>(0x0);
|
|
strCursor = translatedText;
|
|
do {
|
|
strChar = *strCursor;
|
|
strCursor = strCursor + 1;
|
|
} while (strChar != 0);
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(tmpString))))->msvc::string::assign(translatedText,
|
|
GHIDRA_INT(strCursor) - GHIDRA_INT((translatedText + 1)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
|
|
pppppbVar4 = GHIDRA_CAST<uint8_t *****>(tmpString);
|
|
if (0xf < tmpStringCapacity) {
|
|
pppppbVar4 = tmpString[0];
|
|
}
|
|
Font::DrawStringScaled(pFVar3,GHIDRA_CAST<uint8_t *>(pppppbVar4),&labelPos,&textColor,&fontSettings);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 0;
|
|
if (0xf < tmpStringCapacity) {
|
|
uVar5 = tmpStringCapacity + 1;
|
|
pppppbVar4 = tmpString[0];
|
|
if (0xfff < uVar5) {
|
|
pppppbVar4 = GHIDRA_CAST<uint8_t *****>(tmpString[0][-1]);
|
|
uVar5 = tmpStringCapacity + 0x24;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < GHIDRA_CAST<uint8_t *>((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppbVar4)))))
|
|
goto LAB_008e718e;
|
|
}
|
|
operator_delete(pppppbVar4,uVar5);
|
|
}
|
|
tmpStringSize = 0;
|
|
tmpStringCapacity = 0xf;
|
|
tmpString[0] = GHIDRA_CAST<uint8_t *****>((GHIDRA_UINT(tmpString[0]) & 0xffffff00));
|
|
local_8 = 2;
|
|
valuePos.x = columnX + 102.0;
|
|
textColor._red = 0.21176471;
|
|
textColor._green = 0.18431373;
|
|
textColor._blue = 0.1764706;
|
|
textColor._alpha = 1.0;
|
|
valuePos.y = rowY + 0.0;
|
|
textColor._unk = 0;
|
|
pos = &valuePos;
|
|
}
|
|
local_68 = 0;
|
|
local_6c = 0;
|
|
local_70 = 0xffffffff;
|
|
local_74 = 0x3f800000;
|
|
local_78 = 0;
|
|
local_7c = 0xffff;
|
|
fontSettings = 2;
|
|
Font::DrawStringScaled(&g_manager->_font1_TeamMeatEx10,countText,pos,&textColor,&fontSettings);
|
|
rowY = rowY + 14.0;
|
|
labelPos.y = rowY;
|
|
if (statIndex == *GHIDRA_CAST<int *>((in_ECX + 0x124))) {
|
|
local_7c = 0x12cffff;
|
|
local_70 = 0xffffffff;
|
|
local_6c = 0;
|
|
local_68 = 0;
|
|
local_8 = 5;
|
|
fontSettings = 1;
|
|
local_78 = 1;
|
|
local_74 = 0x3f800000;
|
|
if (*GHIDRA_CAST<int *>((in_ECX + 0x34)) == 0) {
|
|
nullFrame = GHIDRA_CAST<float *>(0x0);
|
|
}
|
|
else {
|
|
nullFrame = AnimationState::GetNullFrame
|
|
(GHIDRA_CAST<AnimationState *>((in_ECX + 0x30)),GHIDRA_CAST<uint8_t *>("DescriptionPos"));
|
|
}
|
|
textColor._unk = 0;
|
|
descriptionPos.y = fVar2 + nullFrame[1];
|
|
descriptionPos.x = fVar1 + *nullFrame;
|
|
textColor._red = 0.21176471;
|
|
textColor._green = 0.18431373;
|
|
textColor._blue = 0.1764706;
|
|
textColor._alpha = 1.0;
|
|
if (statCount < 1) {
|
|
Font::DrawStringScaled
|
|
(&g_manager->_font1_TeamMeatEx10,GHIDRA_CAST<uint8_t *>("??????"),&descriptionPos,&textColor,
|
|
&fontSettings);
|
|
}
|
|
else {
|
|
keySize = *GHIDRA_CAST<std_string **>((statKey + 0x10));
|
|
pFVar3 = &g_manager->_font1_TeamMeatEx10;
|
|
if (0x7fffffffU - GHIDRA_INT(keySize) < 5) {
|
|
/* WARNING: Subroutine does not return */
|
|
msvc::string::_Xlen();
|
|
}
|
|
strCursor = statKey;
|
|
if (0xf < *GHIDRA_CAST<uint32_t *>((statKey + 0x14))) {
|
|
strCursor = *GHIDRA_CAST<uint8_t **>(statKey);
|
|
}
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(tmpString))))->msvc::string::concat(GHIDRA_INT(local_88.y),keySize,strCursor,
|
|
GHIDRA_UINT(keySize),GHIDRA_CAST<uint8_t *>("_DESC"),5);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 6;
|
|
pppppbVar4 = GHIDRA_CAST<uint8_t *****>(tmpString);
|
|
if (0xf < tmpStringCapacity) {
|
|
pppppbVar4 = tmpString[0];
|
|
}
|
|
translatedText = string_table_translate(&g_manager->_stringTable,GHIDRA_CAST<uint8_t *>(pppppbVar4));
|
|
descriptionTextSize = 0;
|
|
descriptionTextCapacity = 0xf;
|
|
descriptionText[0] = GHIDRA_CAST<uint8_t *****>(0x0);
|
|
strCursor = translatedText;
|
|
do {
|
|
strChar = *strCursor;
|
|
strCursor = strCursor + 1;
|
|
} while (strChar != 0);
|
|
(GHIDRA_CAST<msvc::string *>((GHIDRA_CAST<char *>(descriptionText))))->msvc::string::assign(translatedText,
|
|
GHIDRA_INT(strCursor) - GHIDRA_INT((translatedText + 1)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 5;
|
|
if (0xf < tmpStringCapacity) {
|
|
uVar5 = tmpStringCapacity + 1;
|
|
pppppbVar4 = tmpString[0];
|
|
if (0xfff < uVar5) {
|
|
pppppbVar4 = GHIDRA_CAST<uint8_t *****>(tmpString[0][-1]);
|
|
uVar5 = tmpStringCapacity + 0x24;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < GHIDRA_CAST<uint8_t *>((GHIDRA_INT(tmpString[0]) + (-4 - GHIDRA_INT(pppppbVar4)))))
|
|
goto LAB_008e718e;
|
|
}
|
|
operator_delete(pppppbVar4,uVar5);
|
|
}
|
|
tmpStringSize = 0;
|
|
tmpStringCapacity = 0xf;
|
|
tmpString[0] = GHIDRA_CAST<uint8_t *****>((GHIDRA_UINT(tmpString[0]) & 0xffffff00));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 7;
|
|
pppppbVar4 = GHIDRA_CAST<uint8_t *****>(descriptionText);
|
|
if (0xf < descriptionTextCapacity) {
|
|
pppppbVar4 = descriptionText[0];
|
|
}
|
|
Font::DrawStringScaled(pFVar3,GHIDRA_CAST<uint8_t *>(pppppbVar4),&descriptionPos,&textColor,&fontSettings);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 5;
|
|
if (0xf < descriptionTextCapacity) {
|
|
uVar5 = descriptionTextCapacity + 1;
|
|
pppppbVar4 = descriptionText[0];
|
|
if (0xfff < uVar5) {
|
|
pppppbVar4 = GHIDRA_CAST<uint8_t *****>(descriptionText[0][-1]);
|
|
uVar5 = descriptionTextCapacity + 0x24;
|
|
if (GHIDRA_CAST<uint8_t *>(0x1f) < GHIDRA_CAST<uint8_t *>((GHIDRA_INT(descriptionText[0]) + (-4 - GHIDRA_INT(pppppbVar4))))) {
|
|
LAB_008e718e:
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
}
|
|
operator_delete(pppppbVar4,uVar5);
|
|
}
|
|
descriptionTextSize = 0;
|
|
descriptionTextCapacity = 0xf;
|
|
descriptionText[0] = GHIDRA_CAST<uint8_t *****>((GHIDRA_UINT(descriptionText[0]) & 0xffffff00));
|
|
}
|
|
}
|
|
local_8 = 0xffffffff;
|
|
statIndex = statIndex + 1;
|
|
statOffset = statOffset + 4;
|
|
statKey = statKey + 0x18;
|
|
if (0xadf < statOffset) {
|
|
ExceptionList = local_10;
|
|
return;
|
|
}
|
|
} while( true );
|
|
}
|