#include "classes.h" // 008372e0 void GenericPopup::Render() { byte bVar1; GenericPopup animName; int textWidth; AnimationState *frontAnimState; byte *idleName; int line; GenericPopup *lineText; bool bVar2; float y; float alignFactor; undefined4 drawSettings; undefined4 local_3c; undefined4 local_38; undefined4 local_34; undefined4 local_30; undefined4 local_2c; undefined4 local_28; Font *font; float lineOffsetY; Vector local_1c; uint local_14; void *local_10; undefined1 *puStack_c; undefined4 local_8; local_8 = 0xffffffff; puStack_c = &LAB_00b0245d; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; if ((this[0xd] != (GenericPopup)0x0) && (*GHIDRA_CAST((this + 0x11)) != '\0')) { font = &g_manager->_font2_TeamMeatEx12; local_1c.x = (g_screenWidth - 480.0) * 0.5; local_1c.y = (g_screenHeight - 270.0) * 0.5; if ((*GHIDRA_CAST((GHIDRA_CAST(&(this[0x42])) + 0x1))) != '\0') { if (*GHIDRA_CAST((this + 0x1c)) == '\0') { AnimationState::Render(GHIDRA_CAST((this + 0xc)),&local_1c,&g_vectorZero,&g_vectorZero) ; frontAnimState = GHIDRA_CAST((this + 0x14)); } else { AnimationState::Render (GHIDRA_CAST((this + 0x14)),&local_1c,&g_vectorZero,&g_vectorZero); frontAnimState = GHIDRA_CAST((this + 0xc)); } AnimationState::Render(frontAnimState,&local_1c,&g_vectorZero,&g_vectorZero); } animName = this[0xd]; if ((animName != (GenericPopup)0x0) && (*GHIDRA_CAST((this + 0x11)) != '\0')) { if (0xf < *GHIDRA_CAST((GHIDRA_CAST(animName) + 0x14))) { animName = *GHIDRA_CAST(animName); } idleName = s_Idle; do { bVar1 = *GHIDRA_CAST(animName); bVar2 = bVar1 < *idleName; if (bVar1 != *idleName) { LAB_00837400: local_1c.x = (float)(-GHIDRA_UINT(bVar2) | 1); goto LAB_00837405; } if (bVar1 == 0) break; bVar1 = *GHIDRA_CAST((GHIDRA_CAST(animName) + 1)); bVar2 = bVar1 < idleName[1]; if (bVar1 != idleName[1]) goto LAB_00837400; animName = (GenericPopup)(GHIDRA_INT(animName) + 2); idleName = idleName + 2; } while (bVar1 != 0); local_1c.x = 0.0; LAB_00837405: if (local_1c.x == 0.0) { lineOffsetY = -32.0; lineText = this + 0x4a; line = 0; local_1c.y = 18.0; do { alignFactor = 0.5; if (*lineText != (GenericPopup)0x0) { drawSettings = 0; local_3c = 0xffff; local_38 = 0; local_34 = 0x3f800000; local_30 = 0xffffffff; local_2c = 0; local_28 = 0; local_8 = 0; y = g_screenHeight * 0.5 + (&lineOffsetY)[line]; textWidth = (GHIDRA_CAST((font)))->Font::get_string_width_utf16(GHIDRA_CAST(*lineText),-1); Font::draw_string_wide_unscaled (font,GHIDRA_CAST(*lineText), g_screenWidth * alignFactor - (float)((double)textWidth + __uint_to_double_fixup[-(textWidth >> 0x1f)]) * alignFactor,y,GHIDRA_CAST((this + 0x45)),&drawSettings); } line = line + 1; lineText = lineText + 1; } while (line < 3); } } } ExceptionList = local_10; return; } // 009c6130 void GenericPopup::destructor() { char isLastRef; uint uVar1; void *local_10; undefined1 *puStack_c; undefined4 local_8; puStack_c = &LAB_00af0b40; local_10 = ExceptionList; uVar1 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 4U; ExceptionList = &local_10; this[0x53] = (GenericPopup)KAGE::Network::Multiplayer::ConstLobby::vftable; local_8 = 0; if (this[0x55] != (GenericPopup)0x0) { isLastRef = (**(code **)(*GHIDRA_CAST(this[0x55]) + 0xc))(uVar1); if ((isLastRef != '\0') && (g_lobbyReleaseFn != (void *)0x0)) { (*g_lobbyReleaseFn)(this + 0x54); } } (GHIDRA_CAST((GHIDRA_CAST((this + 0x4d)))))->std::string::_Tidy_deallocate(); local_8 = 1; (GHIDRA_CAST((GHIDRA_CAST(this))))->ANM2::Reset(); (GHIDRA_CAST((GHIDRA_CAST((this + 0x14)))))->AnimationState::~AnimationState(); (GHIDRA_CAST((GHIDRA_CAST((this + 0xc)))))->AnimationState::~AnimationState(); (GHIDRA_CAST((GHIDRA_CAST((this + 6)))))->std::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(this))))->std::string::_Tidy_deallocate(); ExceptionList = local_10; return; }