#include "classes.h" // 006ba840 std_string * Menu_Character::ChangeCharacterPage(std_string *param_2, std_string *param_3) { uint8_t bVar1; float fVar2; void **sourceName; uint8_t *suffixCursor; void *freeBlock; char *suffix; uint32_t uVar3; std_string tmpString; std_string sheetPath; uint32_t local_24; char *pcStack_20; void *local_1c; uint8_t *puStack_18; uint32_t local_14; Game *game; bool isChampion; int sourceNameSize; game = g_game; pcStack_20 = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + 0xfffffffc)); puStack_18 = &LAB_00afa6c5; local_1c = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffff0U)); ExceptionList = &local_1c; sheetPath._size = 0; sheetPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(sheetPath._buf)) + 0x0))) = (void *)0x0; local_14 = 0; uVar3 = (this->_SeedEntrySprite)._animDefaultName._size; if (GHIDRA_INT(uVar3) < 0) { LAB_006ba908: suffix = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + 0xfffffffc)); if (*GHIDRA_CAST((GHIDRA_INT((this->_GreedDecoOverlaySprite)._color._offset[0]) + 0xcd)) != '\0') { uVar3 = Level::GetStageID(); (GHIDRA_CAST((tmpString._buf)))->msvc::string::string(game->_ventricleRazorPortals + uVar3 * 0xc4 + 0x5e4); sheetPath._buf[0] = tmpString._buf[0]; sheetPath._buf[1] = tmpString._buf[1]; sheetPath._buf[2] = tmpString._buf[2]; sheetPath._buf[3] = tmpString._buf[3]; sheetPath._buf[4] = tmpString._buf[4]; sheetPath._buf[5] = tmpString._buf[5]; sheetPath._buf[6] = tmpString._buf[6]; sheetPath._buf[7] = tmpString._buf[7]; sheetPath._buf[8] = tmpString._buf[8]; sheetPath._buf[9] = tmpString._buf[9]; sheetPath._buf[10] = tmpString._buf[10]; sheetPath._buf[0xb] = tmpString._buf[0xb]; sheetPath._buf[0xc] = tmpString._buf[0xc]; sheetPath._buf[0xd] = tmpString._buf[0xd]; sheetPath._buf[0xe] = tmpString._buf[0xe]; sheetPath._buf[0xf] = tmpString._buf[0xf]; sheetPath._capacity = tmpString._capacity; sheetPath._size = tmpString._size; suffix = pcStack_20; } } else { fVar2 = (this->_GreedDecoOverlaySprite)._color._offset[0]; sourceNameSize = *GHIDRA_CAST((GHIDRA_CAST(fVar2) + 0x68)); if ((*GHIDRA_CAST((GHIDRA_CAST(fVar2) + 0x6c)) - sourceNameSize) / 0x7c <= GHIDRA_INT(uVar3)) goto LAB_006ba908; sourceName = (void **)(uVar3 * 0x7c + 0x2c + sourceNameSize); suffix = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + 0xfffffffc)); if (&sheetPath != GHIDRA_CAST(sourceName)) { sourceNameSize = GHIDRA_INT((sourceName + 4)); if (0xf < sourceName[5]) { sourceName = *sourceName; } pcStack_20 = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + 0xfffffffc)); (GHIDRA_CAST((sheetPath._buf)))->msvc::string::assign(GHIDRA_CAST(sourceName),*GHIDRA_CAST(sourceNameSize)); suffix = pcStack_20; } } pcStack_20 = suffix; if ((((*GHIDRA_CAST((GHIDRA_INT(&(this->_SeedEntrySprite)._filename._size) + 3)) == '\0') || (uVar3 = (this->_SeedEntrySprite)._filename._capacity, 0x19 < uVar3)) || (sourceNameSize = uVar3 * 0x40, sourceNameSize == -0xc354c0)) || (*GHIDRA_CAST((&DAT_00c354cc + sourceNameSize)) <= 0.0)) { isChampion = false; } else { isChampion = true; } tmpString._size = 0; suffix = "_champion"; tmpString._capacity = 0xf; if (!isChampion) { suffix = GHIDRA_CAST(&s_empty); } (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = (void *)0x0; suffixCursor = GHIDRA_CAST(suffix); do { bVar1 = *suffixCursor; suffixCursor = suffixCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((tmpString._buf)))->msvc::string::assign(GHIDRA_CAST(suffix),GHIDRA_INT(suffixCursor) - GHIDRA_INT((suffix + 1))); local_14 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_14)) + 0x1))),1); anm2_resolve_spritesheet_path(param_2,param_3,&sheetPath,&tmpString,GHIDRA_CAST(0x0)); if (0xf < tmpString._capacity) { uVar3 = tmpString._capacity + 1; freeBlock = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)tmpString._buf)) + 0x0))); if (0xfff < uVar3) { freeBlock = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4); uVar3 = tmpString._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) goto LAB_006baa37; } operator_delete(freeBlock,uVar3); } if (0xf < sheetPath._capacity) { uVar3 = sheetPath._capacity + 1; freeBlock = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)sheetPath._buf)) + 0x0))); if (0xfff < uVar3) { freeBlock = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(sheetPath._buf)) + 0x0))) + -4); uVar3 = sheetPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(sheetPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) { LAB_006baa37: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } ExceptionList = local_1c; return param_2; } // 00946e70 Menu_Character * Menu_Character::constructor() { void *local_10; uint8_t *puStack_c; uint32_t local_8; local_8 = 0xffffffff; puStack_c = &LAB_00b0b65e; local_10 = ExceptionList; ExceptionList = &local_10; this->_PositionY = 0.0; this->_PositionX = 0.0; (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::constructor(); local_8 = 0; (GHIDRA_CAST((&this->_DifficultyOverlaySprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; (GHIDRA_CAST((&this->_GreedDecoOverlaySprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 2; (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 3; (GHIDRA_CAST((GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x494)))))))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 4; (GHIDRA_CAST((&this->_DifficultyPageSprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 5; (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 6; (GHIDRA_CAST((&this->_WinStreakPageSprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 7; (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 8; (this->_eastereggPagePosition).y = 0.0; (this->_eastereggPagePosition).x = 0.0; (GHIDRA_CAST((&this->_SeedUnlockPageSprite)))->ANM2::constructor(); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 9; (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::constructor(); (this->_portraitPositions)._begin = (void *)0x0; (this->_portraitPositions)._end = (void *)0x0; (this->_portraitPositions)._capacity = (void *)0x0; (this->_portraitScales)._begin = (void *)0x0; (this->_portraitScales)._end = (void *)0x0; (this->_portraitScales)._capacity = (void *)0x0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0xc; (GHIDRA_CAST((&this->_SeedEntrySprite)))->ANM2::constructor(); (this->_seedText)._buf[0] = '\0'; (this->_seedText)._buf[1] = '\0'; (this->_seedText)._buf[2] = '\0'; (this->_seedText)._buf[3] = '\0'; (this->_seedText)._size = 0; (this->_seedText)._capacity = 0xf; (this->_seedText)._buf[0] = '\0'; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd84)))) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd94)))) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd98)))) = 0xf; (*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd84))) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd9c)))) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xdac)))) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xdb0)))) = 0xf; (*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd9c))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 0x10; (GHIDRA_CAST((&this->_PageSwapWidgetSprite)))->ANM2::constructor(); local_8 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x1))),0x11); (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::constructor(); this[1].Status = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[1])) + 0x4)))) = 0; ExceptionList = local_10; return this; } // 00947070 void Menu_Character::destructor() { char isLastRef; void *local_10; uint8_t *puStack_c; uint32_t local_8; puStack_c = &LAB_00b0b680; local_10 = ExceptionList; ExceptionList = &local_10; local_8 = 0; if (*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[1])) + 0x4)))) != GHIDRA_CAST(0x0)) { isLastRef = (**(code **)(**GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(this[1])) + 0x4)))) + 0xc)) (__security_cookie ^ GHIDRA_INT(register0x00000010) - 4U); if ((isLastRef != '\0') && (g_renderTargetReleaseFn != (void *)0x0)) { (*g_renderTargetReleaseFn)(this + 1); } } local_8 = 1; (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_TaintedMenuBGDecoSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_TaintedMenuBGDecoSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 2; (GHIDRA_CAST((&this->_PageSwapWidgetSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_PageSwapWidgetSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_PageSwapWidgetSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_PageSwapWidgetSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_PageSwapWidgetSprite))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd9c))))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd84))))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_seedText)._buf)))->msvc::string::_Tidy_deallocate(); local_8 = 3; (GHIDRA_CAST((&this->_SeedEntrySprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_SeedEntrySprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_SeedEntrySprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_SeedEntrySprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_SeedEntrySprite))))->msvc::string::_Tidy_deallocate(); FID_conflict__Tidy(&this->_portraitScales); msvc::vector::_Tidy(); local_8 = 4; (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_CharacterPortraitsSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_CharacterPortraitsSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_CharacterPortraitsSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_CharacterPortraitsSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 5; (GHIDRA_CAST((&this->_SeedUnlockPageSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_SeedUnlockPageSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_SeedUnlockPageSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 6; (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_EastereggPageSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_EastereggPageSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_EastereggPageSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_EastereggPageSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 7; (GHIDRA_CAST((&this->_WinStreakPageSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_WinStreakPageSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_WinStreakPageSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_WinStreakPageSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_WinStreakPageSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 8; (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_SeedPageSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_SeedPageSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_SeedPageSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_SeedPageSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 9; (GHIDRA_CAST((&this->_DifficultyPageSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_DifficultyPageSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_DifficultyPageSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_DifficultyPageSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_DifficultyPageSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 10; (GHIDRA_CAST((GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x494)))))))->ANM2::Reset(); (GHIDRA_CAST((GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4e4)))))))->AnimationState::~AnimationState(); (GHIDRA_CAST((GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4c4)))))))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4ac))))))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x494))))))->msvc::string::_Tidy_deallocate(); local_8 = 0xb; (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_CharacterMenuBGSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_CharacterMenuBGSprite))))->msvc::string::_Tidy_deallocate(); local_8 = 0xc; (GHIDRA_CAST((&this->_GreedDecoOverlaySprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_GreedDecoOverlaySprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_GreedDecoOverlaySprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_GreedDecoOverlaySprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_GreedDecoOverlaySprite))))->msvc::string::_Tidy_deallocate(); local_8 = 0xd; (GHIDRA_CAST((&this->_DifficultyOverlaySprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_DifficultyOverlaySprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_DifficultyOverlaySprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_DifficultyOverlaySprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_DifficultyOverlaySprite))))->msvc::string::_Tidy_deallocate(); local_8 = 0xe; (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Reset(); (GHIDRA_CAST((&(this->_BigCharPageSprite)._overlayAnimState)))->AnimationState::~AnimationState(); (GHIDRA_CAST((&(this->_BigCharPageSprite)._animState)))->AnimationState::~AnimationState(); (GHIDRA_CAST(((this->_BigCharPageSprite)._animDefaultName._buf)))->msvc::string::_Tidy_deallocate(); (GHIDRA_CAST((GHIDRA_CAST(&this->_BigCharPageSprite))))->msvc::string::_Tidy_deallocate(); ExceptionList = local_10; return; } // 00948200 void Menu_Character::LoadGraphics() { uint8_t bVar1; LayerState *layer; std_string *psVar2; uint8_t *nameCursor; uint8_t *expectedName; uint32_t uVar3; uint8_t *expectedName; ANM2 *sprite; bool bVar5; uint8_t auStackY_f8 [128]; void *pvVar6; char *pcVar7; void *textureRefCount; std_string seedUnlockPath; std_string anmPath; uint32_t local_24; uint8_t *puStack_20; void *local_1c; uint8_t *puStack_18; uint32_t local_14; puStack_20 = auStackY_f8 + 0xf4; local_14 = 0xffffffff; puStack_18 = &LAB_00b0b7c5; local_1c = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((auStackY_f8 + 0xe8)); ExceptionList = &local_1c; sprite = &this->_CharacterMenuBGSprite; anmPath._size = 0; anmPath._capacity = 0xf; anmPath._buf[0] = '\0'; anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = msvc::_Allocate(0x30); anmPath._size = 0x25; anmPath._capacity = 0x2f; builtin_strncpy(((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))))->_buf,"gfx/ui/main menu",0x10); ((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))))->_size = 0x6168432f; ((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))))->_capacity = 0x74636172; builtin_strncpy((GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + 0x18)))->_buf,"erMenuBG.anm2",0xe); local_14 = 0; (GHIDRA_CAST((sprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; psVar2 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { psVar2 = GHIDRA_CAST((GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -0x18)))->_capacity); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(psVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(psVar2,uVar3); } textureRefCount = (void *)0x3; pvVar6 = (void *)0x948303; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); (GHIDRA_CAST((auStackY_f8 + 0x84)))->KAGE::SmartPointer::operator_assign(this + 1); (GHIDRA_CAST((layer)))->LayerState::SetTexture(pvVar6,textureRefCount); layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); if (layer->_layerData == (void *)0x0) { anmPath._capacity = 0xf; anmPath._size = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = GHIDRA_CAST(0x0); } else { (GHIDRA_CAST((anmPath._buf)))->msvc::string::string((void *)(GHIDRA_INT(layer->_layerData) + 0x20)); } local_14 = 1; psVar2 = &anmPath; if (0xf < anmPath._capacity) { psVar2 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); } TextureCache::Release(GHIDRA_CAST(psVar2)); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; psVar2 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { psVar2 = GHIDRA_CAST((GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -0x18)))->_capacity); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(psVar2))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(psVar2,uVar3); } expectedName = (this->_CharacterMenuBGSprite)._animState._animData; if (expectedName == GHIDRA_CAST(0x0)) { LAB_009483f9: bVar1 = (GHIDRA_CAST((sprite)))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._animState)))->AnimationState::Rewind(); (this->_CharacterMenuBGSprite)._animState._isPlaying = 1; } } else { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } expectedName = s_Idle; do { bVar1 = *nameCursor; bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_009483e6: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_009483eb; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_009483e6; nameCursor = nameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_009483eb: if ((uVar3 != 0) || ((expectedName[0x34] != 0 && ((this->_CharacterMenuBGSprite)._animState._isPlaying == 0)))) goto LAB_009483f9; } anmPath._size = 0; anmPath._capacity = 0xf; anmPath._buf[0] = '\0'; anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = msvc::_Allocate(0x30); anmPath._size = 0x24; anmPath._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/ui/main menu/PageSwapWidget.anm2",0x25); local_14 = 2; (GHIDRA_CAST((&this->_PageSwapWidgetSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar3); } expectedName = (this->_PageSwapWidgetSprite)._animState._animData; if (expectedName == GHIDRA_CAST(0x0)) { LAB_00948513: bVar1 = (GHIDRA_CAST((&this->_PageSwapWidgetSprite)))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_PageSwapWidgetSprite)._animState)))->AnimationState::Rewind(); (this->_PageSwapWidgetSprite)._animState._isPlaying = 1; } } else { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } expectedName = s_Idle; do { bVar1 = *nameCursor; bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948500: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948505; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_00948500; nameCursor = nameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00948505: if ((uVar3 != 0) || ((expectedName[0x34] != 0 && ((this->_PageSwapWidgetSprite)._animState._isPlaying == 0)))) goto LAB_00948513; } anmPath._size = 0; anmPath._capacity = 0xf; anmPath._buf[0] = '\0'; anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = msvc::_Allocate(0x30); anmPath._size = 0x2a; anmPath._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/ui/main menu/CharacterMenuBGExtra.anm2",0x2b); local_14 = 3; (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar3); } expectedName = (this->_TaintedMenuBGDecoSprite)._animState._animData; anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) & 0xffffff00; if (expectedName == GHIDRA_CAST(0x0)) { LAB_00948653: bVar1 = (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::Rewind(); (this->_TaintedMenuBGDecoSprite)._animState._isPlaying = 1; } } else { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } expectedName = s_Idle; do { bVar1 = *nameCursor; bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948640: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948645; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_00948640; nameCursor = nameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00948645: if ((uVar3 != 0) || ((expectedName[0x34] != 0 && ((this->_TaintedMenuBGDecoSprite)._animState._isPlaying == 0)))) goto LAB_00948653; } if ((g_manager->_persistentGameData)._characterMenuShown < 1) { pcVar7 = "Disappear"; } else { pcVar7 = "Appear"; } bVar1 = (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::SetAnimation(GHIDRA_CAST(pcVar7),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::Rewind(); (this->_TaintedMenuBGDecoSprite)._animState._isPlaying = 1; } if ((this->_TaintedMenuBGDecoSprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_TaintedMenuBGDecoSprite)._animState, *GHIDRA_CAST((GHIDRA_INT((this->_TaintedMenuBGDecoSprite)._animState._animData) + 0x30)) + -1); } anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (void *)0x0; expectedName = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[this->_characterMenuShown * 3]; nameCursor = expectedName; do { bVar1 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((anmPath._buf)))->msvc::string::assign(expectedName,GHIDRA_INT(nameCursor) - GHIDRA_INT((expectedName + 1))); local_14 = 4; (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)anmPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4); uVar3 = anmPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } if (GHIDRA_UINT(this->SelectedCharacterID) < 0x12) { (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Play((&PTR_s_00_Random_00b24140) [(this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 6],0); } UpdateRotations(this); sprite = &this->_DifficultyOverlaySprite; anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (void *)0x0; expectedName = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[this->_characterMenuShown * 3]; nameCursor = expectedName; do { bVar1 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((anmPath._buf)))->msvc::string::assign(expectedName,GHIDRA_INT(nameCursor) - GHIDRA_INT((expectedName + 1))); local_14 = 5; (GHIDRA_CAST((sprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)anmPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4); uVar3 = anmPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } expectedName = (this->_DifficultyOverlaySprite)._animState._animData; if (expectedName == GHIDRA_CAST(0x0)) { LAB_00948883: bVar1 = (GHIDRA_CAST((sprite)))->ANM2::SetAnimation(GHIDRA_CAST("BloodStain"),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_DifficultyOverlaySprite)._animState)))->AnimationState::Rewind(); (this->_DifficultyOverlaySprite)._animState._isPlaying = 1; } } else { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } pcVar7 = "BloodStain"; do { bVar1 = *nameCursor; bVar5 = bVar1 < (uint8_t)*pcVar7; if (bVar1 != *pcVar7) { LAB_00948870: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948875; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < (uint8_t)pcVar7[1]; if (bVar1 != pcVar7[1]) goto LAB_00948870; nameCursor = nameCursor + 2; pcVar7 = pcVar7 + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00948875: if ((uVar3 != 0) || ((expectedName[0x34] != 0 && ((this->_DifficultyOverlaySprite)._animState._isPlaying == 0)))) goto LAB_00948883; } expectedName = GHIDRA_CAST(0x0); if ((this->_DifficultyOverlaySprite)._layerCount != 0) { do { layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(expectedName); expectedName = expectedName + 1; layer->_blendMode[0] = DAT_00c35e78; layer->_blendMode[1] = DAT_00c35e7c; layer->_blendMode[2] = DAT_00c35e80; layer->_blendMode[3] = DAT_00c35e84; layer->_blendMode[4] = DAT_00c35e88; } while (expectedName < GHIDRA_CAST((this->_DifficultyOverlaySprite)._layerCount)); } anmPath._size = 0; anmPath._capacity = 0xf; anmPath._buf[0] = '\0'; anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = msvc::_Allocate(0x30); anmPath._size = 0x23; anmPath._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/ui/main menu/CharacterMenu.anm2",0x24); local_14 = 6; (GHIDRA_CAST((&this->_GreedDecoOverlaySprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar3); } expectedName = (this->_GreedDecoOverlaySprite)._animState._animData; if (expectedName == GHIDRA_CAST(0x0)) { LAB_00948a03: bVar1 = (GHIDRA_CAST((&this->_GreedDecoOverlaySprite)))->ANM2::SetAnimation(GHIDRA_CAST("Greed"),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_GreedDecoOverlaySprite)._animState)))->AnimationState::Rewind(); (this->_GreedDecoOverlaySprite)._animState._isPlaying = 1; } } else { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } pcVar7 = "Greed"; do { bVar1 = *nameCursor; bVar5 = bVar1 < (uint8_t)*pcVar7; if (bVar1 != *pcVar7) { LAB_009489f0: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_009489f5; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < (uint8_t)pcVar7[1]; if (bVar1 != pcVar7[1]) goto LAB_009489f0; nameCursor = nameCursor + 2; pcVar7 = pcVar7 + 2; } while (bVar1 != 0); uVar3 = 0; LAB_009489f5: if ((uVar3 != 0) || ((expectedName[0x34] != 0 && ((this->_GreedDecoOverlaySprite)._animState._isPlaying == 0)))) goto LAB_00948a03; } anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (void *)0x0; expectedName = (&PTR_s_gfx_ui_main_menu_CharacterPortra_00b24124)[this->_characterMenuShown * 3]; nameCursor = expectedName; do { bVar1 = *nameCursor; nameCursor = nameCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((anmPath._buf)))->msvc::string::assign(expectedName,GHIDRA_INT(nameCursor) - GHIDRA_INT((expectedName + 1))); local_14 = 7; (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)anmPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4); uVar3 = anmPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } expectedName = (this->_CharacterPortraitsSprite)._animState._animData; if (expectedName == GHIDRA_CAST(0x0)) { LAB_00948b05: bVar1 = (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::SetAnimation(&DAT_00b7bbf0,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_CharacterPortraitsSprite)._animState)))->AnimationState::Rewind(); (this->_CharacterPortraitsSprite)._animState._isPlaying = 1; } } else { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } expectedName = &DAT_00b7bbf0; do { bVar1 = *nameCursor; bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948af2: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948af7; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_00948af2; nameCursor = nameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00948af7: if ((uVar3 != 0) || ((expectedName[0x34] != 0 && ((this->_CharacterPortraitsSprite)._animState._isPlaying == 0)))) goto LAB_00948b05; } anmPath._size = 0; anmPath._capacity = 0xf; anmPath._buf[0] = '\0'; anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = msvc::_Allocate(0x20); anmPath._size = 0x1f; anmPath._capacity = 0x1f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/ui/main menu/SeedEntry.anm2",0x20); local_14 = 8; (GHIDRA_CAST((&this->_SeedEntrySprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar3); } expectedName = (this->_SeedEntrySprite)._animState._animData; if (expectedName != GHIDRA_CAST(0x0)) { nameCursor = expectedName; if (0xf < *GHIDRA_CAST((expectedName + 0x14))) { nameCursor = *GHIDRA_CAST(expectedName); } expectedName = s_Idle; do { bVar1 = *nameCursor; bVar5 = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_00948c20: uVar3 = -GHIDRA_UINT(bVar5) | 1; goto LAB_00948c25; } if (bVar1 == 0) break; bVar1 = nameCursor[1]; bVar5 = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_00948c20; nameCursor = nameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00948c25: if ((uVar3 == 0) && ((expectedName[0x34] == 0 || ((this->_SeedEntrySprite)._animState._isPlaying != 0)))) goto LAB_00948c51; } bVar1 = (GHIDRA_CAST((&this->_SeedEntrySprite)))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_SeedEntrySprite)._animState)))->AnimationState::Rewind(); (this->_SeedEntrySprite)._animState._isPlaying = 1; } LAB_00948c51: anmPath._size = 0; anmPath._capacity = 0xf; anmPath._buf[0] = '\0'; anmPath._buf[1] = '\0'; anmPath._buf[2] = '\0'; anmPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = msvc::_Allocate(0x30); anmPath._size = 0x26; anmPath._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/ui/main menu/DifficultyWidget.anm2",0x27); local_14 = 9; (GHIDRA_CAST((&this->_DifficultyPageSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar3) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar3 = anmPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar3); } anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) & 0xffffff00; if (((g_manager->_persistentGameData)._achievements[0x155] == 0) && (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) != 2 || (g_game == GHIDRA_CAST(0x0))) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) { bVar5 = false; } else { bVar5 = true; } pcVar7 = "Unlocked"; if (bVar5) { pcVar7 = &DAT_00b7bdc8; } (GHIDRA_CAST((&this->_DifficultyPageSprite)))->ANM2::Play(GHIDRA_CAST(pcVar7),0); anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (void *)0x0; (GHIDRA_CAST((anmPath._buf)))->msvc::string::assign(GHIDRA_CAST("gfx/ui/main menu/SeedWidget.anm2"),0x20); local_14 = 10; (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)anmPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4); uVar3 = anmPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::Play(s_Idle,0); anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (void *)0x0; (GHIDRA_CAST((anmPath._buf)))->msvc::string::assign(GHIDRA_CAST("gfx/ui/main menu/WinStreakWidget.anm2"),0x25); local_14 = 0xb; (GHIDRA_CAST((&this->_WinStreakPageSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)anmPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4); uVar3 = anmPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } (GHIDRA_CAST((&this->_WinStreakPageSprite)))->ANM2::Play(s_Idle,0); anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (void *)0x0; (GHIDRA_CAST((anmPath._buf)))->msvc::string::assign(GHIDRA_CAST("gfx/ui/main menu/SeedSelectionWidget.anm2"),0x29); local_14 = 0xc; (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::Load(&anmPath,1); local_14 = 0xffffffff; if (0xf < anmPath._capacity) { uVar3 = anmPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)anmPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4); uVar3 = anmPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::Play(&DAT_00b7bd88,0); seedUnlockPath._size = 0; seedUnlockPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(seedUnlockPath._buf)) + 0x0))) = (void *)0x0; (GHIDRA_CAST((seedUnlockPath._buf)))->msvc::string::assign(GHIDRA_CAST("gfx/ui/main menu/SeedUnlockPaper.anm2"),0x25); local_14 = 0xd; (GHIDRA_CAST((&this->_SeedUnlockPageSprite)))->ANM2::Load(&seedUnlockPath,1); if (0xf < seedUnlockPath._capacity) { uVar3 = seedUnlockPath._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)seedUnlockPath._buf)) + 0x0))); if (0xfff < uVar3) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(seedUnlockPath._buf)) + 0x0))) + -4); uVar3 = seedUnlockPath._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(seedUnlockPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar3); } ExceptionList = local_1c; return; } // 00948fc0 void Menu_Character::Reset() { uint8_t bVar1; uint8_t *curAnimName; uint32_t uVar2; int *playerConfig; void *pvVar3; char *pcVar4; uint8_t *extraout_ECX; uint8_t *extraout_ECX_00; uint8_t *extraout_ECX_01; std_string *seedTextBuf; uint8_t **characterEntry; int *modCharactersEnd; uint32_t *fillSrc; int iVar5; std_vector *playerConfigs; uint32_t *fillDst; bool isLess; uint8_t auVar6 [12]; uint8_t auVar7 [16]; float fVar8; float fVar9; void *seedString [4]; uint32_t seedStringSize; uint32_t seedStringCapacity; uint32_t defaultPortraitX; Menu_Character *local_3c; float local_38; void *emptyString [4]; uint32_t emptyStringSize; uint32_t emptyStringCapacity; int modCharacterId; float local_18; uint32_t local_14; void *local_10; uint8_t *puStack_c; void *local_8; uint8_t *animData; Manager *manager; MenuManager *menuManager; uint32_t *portraitPositions; manager = g_manager; local_8 = (void *)0xffffffff; puStack_c = &LAB_00b0b805; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((emptyString + 0xc)); ExceptionList = &local_10; this->Status = 0; local_3c = this; if (((manager->_persistentGameData)._achievements[0x155] == 0) && (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((manager)) + 0x8)))) != 2 || (g_game == GHIDRA_CAST(0x0))) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) { animData = (this->_DifficultyPageSprite)._animState._animData; if (animData != GHIDRA_CAST(0x0)) { curAnimName = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { curAnimName = *GHIDRA_CAST(animData); } pcVar4 = "Unlocked"; do { bVar1 = *curAnimName; isLess = bVar1 < (uint8_t)*pcVar4; if (bVar1 != *pcVar4) { LAB_00949062: uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_00949067; } if (bVar1 == 0) break; bVar1 = curAnimName[1]; isLess = bVar1 < (uint8_t)pcVar4[1]; if (bVar1 != pcVar4[1]) goto LAB_00949062; curAnimName = curAnimName + 2; pcVar4 = pcVar4 + 2; } while (bVar1 != 0); uVar2 = 0; LAB_00949067: if ((uVar2 == 0) && ((animData[0x34] == 0 || ((this->_DifficultyPageSprite)._animState._isPlaying != 0)))) goto LAB_00949100; } pcVar4 = "Unlocked"; } else { animData = (this->_DifficultyPageSprite)._animState._animData; if (animData != GHIDRA_CAST(0x0)) { curAnimName = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { curAnimName = *GHIDRA_CAST(animData); } pcVar4 = &DAT_00b7bdc8; do { bVar1 = *curAnimName; isLess = bVar1 < (uint8_t)*pcVar4; if (bVar1 != *pcVar4) { LAB_009490c2: uVar2 = -GHIDRA_UINT(isLess) | 1; goto LAB_009490c7; } if (bVar1 == 0) break; bVar1 = curAnimName[1]; isLess = bVar1 < (uint8_t)pcVar4[1]; if (bVar1 != pcVar4[1]) goto LAB_009490c2; curAnimName = curAnimName + 2; pcVar4 = pcVar4 + 2; } while (bVar1 != 0); uVar2 = 0; LAB_009490c7: if ((uVar2 == 0) && ((animData[0x34] == 0 || ((this->_DifficultyPageSprite)._animState._isPlaying != 0)))) goto LAB_00949100; } pcVar4 = &DAT_00b7bdc8; } bVar1 = (GHIDRA_CAST((&this->_DifficultyPageSprite)))->ANM2::SetAnimation(GHIDRA_CAST(pcVar4),1); pcVar4 = GHIDRA_CAST(extraout_ECX); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_DifficultyPageSprite)._animState)))->AnimationState::Rewind(); (this->_DifficultyPageSprite)._animState._isPlaying = 1; pcVar4 = GHIDRA_CAST(extraout_ECX_00); } LAB_00949100: menuManager = g_menuManager; auVar6 = ZEXT812(0); if (this->Status == 1) { auVar6 = ZEXT812(0xc3f00000); } (*GHIDRA_CAST((GHIDRA_CAST(&(auVar7)) + 0xc))) = 0; (*GHIDRA_CAST((GHIDRA_CAST(&(auVar7)) + 0x0))) = auVar6; g_menuManager->_viewPositionSet[5].x = (*GHIDRA_CAST((GHIDRA_CAST(&(auVar6)) + 0x0))); characterEntry = &PTR_s_00_Random_00b24140; menuManager->_state = 1; iVar5 = 0x12; this->SelectedCharacterID = 1; this->_numCharacters = 0; do { if (((*GHIDRA_CAST((GHIDRA_CAST(((GHIDRA_CAST((GHIDRA_INT(characterEntry) + 6))))) + 0x2))) == '\0') || (bVar1 = Menu_Character_Entry::IsCharacterAvailable (GHIDRA_CAST(characterEntry),GHIDRA_INT(pcVar4)), pcVar4 = GHIDRA_CAST(extraout_ECX_01), bVar1 != 0)) { this->_numCharacters = this->_numCharacters + 1; } characterEntry = GHIDRA_CAST((GHIDRA_INT(characterEntry) + 0x18)); iVar5 = iVar5 + -1; } while (iVar5 != 0); playerConfigs = &(g_manager->_entityConfig)._players; DAT_00c79888 = g_modCharacters; local_38 = 5.74532e-44; modCharactersEnd = g_modCharacters; if (0x29 < GHIDRA_UINT(((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(playerConfigs->_begin)) / 0x148))) { iVar5 = 0x3488; do { playerConfig = GHIDRA_CAST((GHIDRA_INT(playerConfigs->_begin) + iVar5)); if (((char)playerConfig[0x4a] == '\0') && (playerConfig[0x47] == 0)) { modCharacterId = *playerConfig; local_18 = (float)playerConfig[0x49]; if (modCharactersEnd == DAT_00c7988c) { msvc::vector<8byte>::_Emplace_reallocate_global(modCharactersEnd,&modCharacterId); modCharactersEnd = DAT_00c79888; } else { *modCharactersEnd = modCharacterId; modCharactersEnd[1] = GHIDRA_INT(local_18); DAT_00c79888 = DAT_00c79888 + 2; modCharactersEnd = DAT_00c79888; } } local_38 = (float)(GHIDRA_INT(local_38) + 1); playerConfigs = &(g_manager->_entityConfig)._players; iVar5 = iVar5 + 0x148; } while (GHIDRA_UINT(local_38) < GHIDRA_UINT(((GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(playerConfigs->_begin)) / 0x148))); this = local_3c; } iVar5 = (GHIDRA_INT(modCharactersEnd) - GHIDRA_INT(g_modCharacters) >> 3) + this->_numCharacters; this->_numCharacters = iVar5; FUN_0094e3b0(); fVar8 = (*GHIDRA_CAST((GHIDRA_CAST(&((float)auVar7)) + 0x0))) * 0.01 + 2.0; this->_characterWheelDepth = fVar8; local_38 = (fVar8 - 1.0) * 0.5; local_18 = local_38 + 1.0; local_3c = GHIDRA_CAST((local_38 / local_18)); fVar8 = sqrtf(1.0 - (float)local_3c * (float)local_3c); portraitPositions = (this->_portraitPositions)._begin; (this->_portraitPositions)._end = portraitPositions; fVar9 = local_18 - (float)local_3c * local_38; local_18 = (float)this->_numCharacters; fVar8 = (fVar9 * 1.3) / fVar8; this->_characterWheelWidth = fVar8; defaultPortraitX = 0x43700000; this->_scrollSpeed = (360.0 / (float)iVar5) / (fVar8 * 50.0); local_3c = GHIDRA_CAST(0x43070000); if (local_18 != 0.0) { if (GHIDRA_UINT((GHIDRA_INT((this->_portraitPositions)._capacity) - GHIDRA_INT(portraitPositions) >> 3)) < GHIDRA_UINT(local_18)) { msvc::vector::_Resize_reallocate(local_18,&defaultPortraitX); } else { *portraitPositions = 0x43700000; portraitPositions[1] = 0x43070000; fillSrc = portraitPositions; fillDst = portraitPositions + 2; for (uVar2 = GHIDRA_INT(local_18) * 8 - 5U >> 2; uVar2 != 0; uVar2 = uVar2 - 1) { *fillDst = *fillSrc; fillSrc = fillSrc + 1; fillDst = fillDst + 1; } (this->_portraitPositions)._end = portraitPositions + GHIDRA_INT(local_18) * 2; } } pvVar3 = (this->_portraitScales)._begin; (this->_portraitScales)._end = pvVar3; uVar2 = this->_numCharacters; local_38 = 1.0; if (uVar2 != 0) { if (GHIDRA_UINT((GHIDRA_INT((this->_portraitScales)._capacity) - GHIDRA_INT(pvVar3) >> 2)) < uVar2) { msvc::vector::_Resize_reallocate(uVar2,&local_38); } else { pvVar3 = (void *)msvc::fill_n<4byte>(pvVar3,uVar2,&local_38); (this->_portraitScales)._end = pvVar3; } } this->IsCharacterUnlocked = 1; this->IsInputPossible = 1; this->CooldownWhenHoldDirection = 10; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x14)))) = 0; iVar5 = this->_numCharacters + -1; seedTextBuf = &this->_seedText; this->_numCharacters_MINUS_SelectedEntry = iVar5; manager = g_manager; this->_randomRotationVelocity = 0.0; this->_horizontalScrollPosition = ((float)iVar5 * 360.0) / (float)this->_numCharacters; this->Difficulty = (manager->_persistentGameData)._lastDifficulty; if (0xf < (this->_seedText)._capacity) { seedTextBuf = *GHIDRA_CAST((this->_seedText)._buf); } (this->_seedText)._size = 0; seedTextBuf->_buf[0] = '\0'; menuManager = g_menuManager; emptyStringCapacity = 0xf; emptyStringSize = 0; emptyString[0] = (void *)0x0; local_8 = (void *)0x0; (GHIDRA_CAST((GHIDRA_CAST(seedString))))->msvc::string::string(emptyString); (*GHIDRA_CAST((GHIDRA_CAST(&(local_8)) + 0x0))) = 1; uVar2 = Seeds::String2Seed(GHIDRA_CAST(seedString)); (GHIDRA_CAST((&menuManager->_seedsObject)))->Seeds::set_start_seed(uVar2); local_8 = (void *)((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_UINT(local_8))) + 0x1))) << 8); if (0xf < seedStringCapacity) { uVar2 = seedStringCapacity + 1; pvVar3 = seedString[0]; if (0xfff < uVar2) { pvVar3 = *(void **)(GHIDRA_INT(seedString[0]) + -4); uVar2 = seedStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(seedString[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar3,uVar2); } local_8 = (void *)0xffffffff; seedStringSize = 0; seedStringCapacity = 0xf; seedString[0] = (void *)(GHIDRA_UINT(seedString[0]) & 0xffffff00); if (0xf < emptyStringCapacity) { uVar2 = emptyStringCapacity + 1; pvVar3 = emptyString[0]; if (0xfff < uVar2) { pvVar3 = *(void **)(GHIDRA_INT(emptyString[0]) + -4); uVar2 = emptyStringCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptyString[0]) + (-4 - GHIDRA_INT(pvVar3))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar3,uVar2); } set_character_menu_shown(this,(g_manager->_persistentGameData)._characterMenuShown); if ((g_manager->_persistentGameData)._characterMenuShown < 1) { pcVar4 = "Disappear"; } else { pcVar4 = "Appear"; } bVar1 = (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::SetAnimation(GHIDRA_CAST(pcVar4),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::Rewind(); (this->_TaintedMenuBGDecoSprite)._animState._isPlaying = 1; } if ((this->_TaintedMenuBGDecoSprite)._animState._animData != (void *)0x0) { AnimationState::AdvancePosition (&(this->_TaintedMenuBGDecoSprite)._animState, *GHIDRA_CAST((GHIDRA_INT((this->_TaintedMenuBGDecoSprite)._animState._animData) + 0x30)) + -1); } if (((this->_PageSwapWidgetSprite)._color._tint[3] == 0.0) && (this->_characterMenuShown != 0)) { DoPageSwap(this); } this->_seedUnlockPageState = 0; this->_seedUnlockPageTimer = 0; (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd84))))))->msvc::string::assign(&s_empty,0); (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd9c))))))->msvc::string::assign(&s_empty,0); ExceptionList = local_10; return; } // 009495f0 void Menu_Character::set_character_menu_shown(int characterMenuShown) { HWND hWnd; uint8_t bVar1; LayerState *layer; std_string *psVar2; int iconHeight; int iconWidth; HMODULE module; LPARAM smallIcon; uint8_t *strCursor; char *expectedName; void *freeBlock; uint8_t *expectedAnim; Manager *extraout_ECX; Manager *manager; uint32_t uVar3; code *loadImageFn; uint8_t *pbVar4; bool isLess; std_string local_50; HANDLE bigIcon; HWND window; std_string local_30; uint32_t stackCookie; void *local_10; uint8_t *puStack_c; uint32_t local_8; ANM2 *difficultyOverlaySprite; uint8_t *enabledLayers; uint32_t iconResourceId; local_8 = 0xffffffff; puStack_c = &LAB_00b0b84d; local_10 = ExceptionList; stackCookie = __security_cookie ^ GHIDRA_UINT((GHIDRA_INT(register0x00000010) + 0xfffffffcU)); ExceptionList = &local_10; this->_characterMenuShown = characterMenuShown; local_30._size = 0; local_30._capacity = 0xf; pbVar4 = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[characterMenuShown * 3]; (*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) = (void *)0x0; strCursor = pbVar4; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((local_30._buf)))->msvc::string::assign(pbVar4,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar4 + 1))); local_8 = 0; (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Load(&local_30,1); local_8 = 0xffffffff; if (0xf < local_30._capacity) { uVar3 = local_30._capacity + 1; freeBlock = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)local_30._buf)) + 0x0))); if (0xfff < uVar3) { freeBlock = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) + -4); uVar3 = local_30._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } if (GHIDRA_UINT(this->SelectedCharacterID) < 0x12) { (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Play((&PTR_s_00_Random_00b24140) [(this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 6],0); } else { pbVar4 = (this->_BigCharPageSprite)._animState._animData; if (pbVar4 != GHIDRA_CAST(0x0)) { strCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { strCursor = *GHIDRA_CAST(pbVar4); } expectedAnim = &DAT_00b7bbf0; do { bVar1 = *strCursor; isLess = bVar1 < *expectedAnim; if (bVar1 != *expectedAnim) { LAB_00949715: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094971a; } if (bVar1 == 0) break; bVar1 = strCursor[1]; isLess = bVar1 < expectedAnim[1]; if (bVar1 != expectedAnim[1]) goto LAB_00949715; strCursor = strCursor + 2; expectedAnim = expectedAnim + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094971a: if ((uVar3 == 0) && ((pbVar4[0x34] == 0 || ((this->_BigCharPageSprite)._animState._isPlaying != 0)))) goto LAB_0094974d; } bVar1 = (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::SetAnimation(&DAT_00b7bbf0,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_BigCharPageSprite)._animState)))->AnimationState::Rewind(); (this->_BigCharPageSprite)._animState._isPlaying = 1; } } LAB_0094974d: UpdateRotations(this); difficultyOverlaySprite = &this->_DifficultyOverlaySprite; local_30._size = 0; local_30._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) = (void *)0x0; pbVar4 = (&PTR_s_gfx_ui_main_menu_CharacterMenu_a_00b24120)[this->_characterMenuShown * 3]; strCursor = pbVar4; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((local_30._buf)))->msvc::string::assign(pbVar4,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar4 + 1))); local_8 = 1; (GHIDRA_CAST((difficultyOverlaySprite)))->ANM2::Load(&local_30,1); local_8 = 0xffffffff; if (0xf < local_30._capacity) { uVar3 = local_30._capacity + 1; freeBlock = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)local_30._buf)) + 0x0))); if (0xfff < uVar3) { freeBlock = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) + -4); uVar3 = local_30._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } pbVar4 = (this->_DifficultyOverlaySprite)._animState._animData; if (pbVar4 == GHIDRA_CAST(0x0)) { LAB_00949835: bVar1 = (GHIDRA_CAST((difficultyOverlaySprite)))->ANM2::SetAnimation(GHIDRA_CAST("BloodStain"),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_DifficultyOverlaySprite)._animState)))->AnimationState::Rewind(); (this->_DifficultyOverlaySprite)._animState._isPlaying = 1; } } else { strCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { strCursor = *GHIDRA_CAST(pbVar4); } expectedName = "BloodStain"; do { bVar1 = *strCursor; isLess = bVar1 < (uint8_t)*expectedName; if (bVar1 != *expectedName) { LAB_00949822: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00949827; } if (bVar1 == 0) break; bVar1 = strCursor[1]; isLess = bVar1 < (uint8_t)expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_00949822; strCursor = strCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00949827: if ((uVar3 != 0) || ((pbVar4[0x34] != 0 && ((this->_DifficultyOverlaySprite)._animState._isPlaying == 0)))) goto LAB_00949835; } pbVar4 = GHIDRA_CAST(0x0); if ((this->_DifficultyOverlaySprite)._layerCount != 0) { do { layer = (GHIDRA_CAST((difficultyOverlaySprite)))->ANM2::GetLayer(pbVar4); pbVar4 = pbVar4 + 1; layer->_blendMode[0] = DAT_00c35e78; layer->_blendMode[1] = DAT_00c35e7c; layer->_blendMode[2] = DAT_00c35e80; layer->_blendMode[3] = DAT_00c35e84; layer->_blendMode[4] = DAT_00c35e88; } while (pbVar4 < GHIDRA_CAST((this->_DifficultyOverlaySprite)._layerCount)); } local_30._size = 0; local_30._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) = (void *)0x0; pbVar4 = (&PTR_s_gfx_ui_main_menu_CharacterPortra_00b24124)[this->_characterMenuShown * 3]; strCursor = pbVar4; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((local_30._buf)))->msvc::string::assign(pbVar4,GHIDRA_INT(strCursor) - GHIDRA_INT((pbVar4 + 1))); local_8 = 2; (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::Load(&local_30,1); local_8 = 0xffffffff; if (0xf < local_30._capacity) { uVar3 = local_30._capacity + 1; freeBlock = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)local_30._buf)) + 0x0))); if (0xfff < uVar3) { freeBlock = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) + -4); uVar3 = local_30._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) + (-4 - GHIDRA_INT(freeBlock))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(freeBlock,uVar3); } pbVar4 = (this->_CharacterPortraitsSprite)._animState._animData; local_30._size = 0; local_30._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) & 0xffffff00; if (pbVar4 != GHIDRA_CAST(0x0)) { strCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { strCursor = *GHIDRA_CAST(pbVar4); } expectedAnim = &DAT_00b7bbf0; do { bVar1 = *strCursor; isLess = bVar1 < *expectedAnim; if (bVar1 != *expectedAnim) { LAB_00949990: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_00949995; } if (bVar1 == 0) break; bVar1 = strCursor[1]; isLess = bVar1 < expectedAnim[1]; if (bVar1 != expectedAnim[1]) goto LAB_00949990; strCursor = strCursor + 2; expectedAnim = expectedAnim + 2; } while (bVar1 != 0); uVar3 = 0; LAB_00949995: if ((uVar3 == 0) && ((pbVar4[0x34] == 0 || ((this->_CharacterPortraitsSprite)._animState._isPlaying != 0)))) goto LAB_009499c1; } bVar1 = (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::SetAnimation(&DAT_00b7bbf0,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_CharacterPortraitsSprite)._animState)))->AnimationState::Rewind(); (this->_CharacterPortraitsSprite)._animState._isPlaying = 1; } LAB_009499c1: manager = g_manager; (g_manager->_persistentGameData)._characterMenuShown = characterMenuShown; *GHIDRA_CAST(&manager->_persistentGameData) = 1; if (characterMenuShown < 1) { local_50._buf[0] = '\0'; local_50._buf[1] = '\0'; local_50._buf[2] = -0x80; local_50._buf[3] = '?'; local_50._buf[4] = '\0'; local_50._buf[5] = '\0'; local_50._buf[6] = -0x80; local_50._buf[7] = '?'; local_50._buf[8] = '\0'; local_50._buf[9] = '\0'; local_50._buf[10] = -0x80; local_50._buf[0xb] = '?'; local_50._buf[0xc] = '\0'; local_50._buf[0xd] = '\0'; local_50._buf[0xe] = '\0'; local_50._buf[0xf] = '\0'; local_50._size = 0; local_50._capacity = 0x3f800000; enabledLayers = &(*GHIDRA_CAST((GHIDRA_CAST(&((manager->_musicManager)._channels[(manager->_musicManager)._currentChannel])) + 0x16c))); *GHIDRA_CAST(enabledLayers) = *GHIDRA_CAST(enabledLayers) & 0xfffffffe; psVar2 = &local_50; } else { (GHIDRA_CAST((&manager->_musicManager)))->MusicManager::EnableLayer(0,0); psVar2 = &local_30; (*GHIDRA_CAST((GHIDRA_CAST(&(local_30._buf)) + 0x0))) = (void *)0x3f800000; local_30._buf[4] = '\n'; local_30._buf[5] = -0x29; local_30._buf[6] = -0x7d; local_30._buf[7] = '?'; local_30._buf[8] = -0x33; local_30._buf[9] = -0x34; local_30._buf[10] = -0x74; local_30._buf[0xb] = '?'; local_30._buf[0xc] = -0x66; local_30._buf[0xd] = -0x67; local_30._buf[0xe] = -0x67; local_30._buf[0xf] = '>'; local_30._size = 0xbe19999a; local_30._capacity = 0x3f666666; manager = extraout_ECX; } FUN_0098afa0(psVar2,manager); if (_glfw == 0) { _glfwInputError(0x10001,0); window = (HWND)0x0; } else if (DAT_00c73694 == 0x60001) { window = *GHIDRA_CAST((GHIDRA_CAST(g_glfwWindow) + 0x2b4)); } else { _glfwInputError(0x1000e,"Win32: Platform not initialized"); window = (HWND)0x0; } iconHeight = GetSystemMetrics(0xc); iconWidth = GetSystemMetrics(0xb); if (characterMenuShown < 1) { module = GetModuleHandleA((LPCSTR)0x0); loadImageFn = LoadImageA_exref; bigIcon = LoadImageA(module,&DAT_00000065,1,iconWidth,iconHeight,0); iconHeight = GetSystemMetrics(0x32); iconWidth = GetSystemMetrics(0x31); module = GetModuleHandleA((LPCSTR)0x0); iconResourceId = 0x65; } else { module = GetModuleHandleA((LPCSTR)0x0); loadImageFn = LoadImageA_exref; bigIcon = LoadImageA(module,&DAT_00000068,1,iconWidth,iconHeight,0); iconHeight = GetSystemMetrics(0x32); iconWidth = GetSystemMetrics(0x31); module = GetModuleHandleA((LPCSTR)0x0); iconResourceId = 0x68; } smallIcon = (*loadImageFn)(module,iconResourceId,1,iconWidth,iconHeight,0); hWnd = window; SendMessageA(window,0x80,0,smallIcon); SendMessageA(hWnd,0x80,1,(LPARAM)bigIcon); ExceptionList = local_10; return; } // 00949c20 void Menu_Character::Update() { Seeds unk; uint8_t bVar1; int *steamContext; std_string *a; uint8_t *animNameCursor; Manager *this_00; void *ptr; char *expectedNameText; int iVar2; uint8_t *expectedName; uint32_t uVar3; PersistentGameData *persistentGameData; bool isLess; float frame; Seeds aSStackY_2ef0 [128]; uint8_t in_stack_ffffff6c [68]; uint32_t in_stack_ffffffb0; int in_stack_ffffffb4; uint32_t in_stack_ffffffb8; uint32_t in_stack_ffffffbc; uint32_t in_stack_ffffffc0; int in_stack_ffffffc4; uint8_t *pbVar4; int difficulty; int soundId; void *animName [5]; uint32_t animNameCapacity; void *local_8; uint32_t *animNameSize; Manager *manager; local_8 = (void *)(__security_cookie ^ GHIDRA_UINT((animName + 7))); if ((g_manager->_framecount & 1) == 0) { if ((this->_BigCharPageSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_BigCharPageSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_BigCharPageSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_CharacterMenuBGSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_DifficultyPageSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_DifficultyPageSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_DifficultyPageSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_SeedPageSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_SeedPageSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_SeedPageSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_WinStreakPageSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_WinStreakPageSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_WinStreakPageSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_DifficultyOverlaySprite)._loaded != 0) { (GHIDRA_CAST((&(this->_DifficultyOverlaySprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_DifficultyOverlaySprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_EastereggPageSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_EastereggPageSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_EastereggPageSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_SeedUnlockPageSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._overlayAnimState)))->AnimationState::Update(); } switch(this->Difficulty) { case 0: if ((this->_DifficultyPageSprite)._animState._animData != (void *)0x0) { frame = 0.0; code_r0x00949d90: (GHIDRA_CAST((&(this->_DifficultyPageSprite)._animState)))->AnimationState::SetFrameFloat(frame); } break; case 1: if ((this->_DifficultyPageSprite)._animState._animData != (void *)0x0) { frame = 1.0; goto code_r0x00949d90; } break; case 2: if ((this->_DifficultyPageSprite)._animState._animData != (void *)0x0) { frame = 2.0; goto code_r0x00949d90; } break; case 3: if ((this->_DifficultyPageSprite)._animState._animData != (void *)0x0) { frame = 3.0; goto code_r0x00949d90; } } if ((this->Status == 1) && ((this->_SeedEntrySprite)._loaded != 0)) { (GHIDRA_CAST((&(this->_SeedEntrySprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_SeedEntrySprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_TaintedMenuBGDecoSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_PageSwapWidgetSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_PageSwapWidgetSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_PageSwapWidgetSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_CharacterMenuBGSprite)._animState._animData != (void *)0x0) { in_stack_ffffffc4 = 0x949e16; bVar1 = AnimationState::IsEventTriggered (&(this->_CharacterMenuBGSprite)._animState,GHIDRA_CAST("Sound")); manager = g_manager; if (bVar1 != 0) { soundId = 0x23b; seed_fart_sound_override(&soundId); in_stack_ffffffc4 = 0x3f800000; in_stack_ffffffc0 = 0; in_stack_ffffffbc = 2; in_stack_ffffffb8 = 0x3f800000; in_stack_ffffffb0 = 0x949e5b; in_stack_ffffffb4 = soundId; (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); } } } if (this->Status == 3) { if (1.0 < g_menuManager->_fadeOutProgress) { if (this->SelectedCharacterID == 10) { in_stack_ffffffc4 = 0x15; in_stack_ffffffc0 = 0x949ea9; (GHIDRA_CAST((&g_manager->_persistentGameData)))->PersistentGameData::IncreaseEventCounter(0x15,-1); } if ((*GHIDRA_CAST((GHIDRA_CAST(&((g_manager->_gamestate))) + 0x1fdec))) != '\0') { in_stack_ffffffc4 = 0x16; in_stack_ffffffc0 = 0x949ecb; PersistentGameData::IncreaseEventCounter (&g_manager->_persistentGameData,0x16, -(g_manager->_persistentGameData)._eventCounters[0x16]); } persistentGameData = &g_manager->_persistentGameData; if ((*GHIDRA_CAST(persistentGameData) != '\0') && ((g_manager->_persistentGameData)._isFileLoaded != 0)) { *GHIDRA_CAST(persistentGameData) = 0; (GHIDRA_CAST((GHIDRA_CAST(persistentGameData))))->Manager::BackupSaveFile(); manager = g_manager; in_stack_ffffffc4 = 0x949efd; steamContext = GHIDRA_CAST(SteamInternal_ContextInit()); if ((*steamContext == 0) || ((manager->_optionsConfig)._enableSteamCloud == 0)) { (GHIDRA_CAST((persistentGameData)))->PersistentGameData::Save(); } else { (GHIDRA_CAST((persistentGameData)))->PersistentGameData::SaveToSteamCloud(); } } iVar2 = this->SelectedCharacterID; if (iVar2 < 0x12) { iVar2 = *GHIDRA_CAST((&DAT_00b24144 + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 0x12) + iVar2) * 0x18)); } else { iVar2 = *GHIDRA_CAST((GHIDRA_INT(g_modCharacters) + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90) + iVar2 * 8)); } difficulty = this->Difficulty; (GHIDRA_CAST((aSStackY_2ef0 + 0x81)))->Seeds::construct_from_copy(&g_menuManager->_seedsObject); unk._stageSeeds[0xb] = in_stack_ffffffb0; (*GHIDRA_CAST((GHIDRA_CAST(&(unk)) + 0x0))) = in_stack_ffffff6c; unk._stageSeeds[0xc] = in_stack_ffffffb4; unk._stageSeeds[0xd] = in_stack_ffffffb8; unk._playerInitSeed = in_stack_ffffffbc; unk._seedEffects = (void *)in_stack_ffffffc0; unk._seedEffectsCount = in_stack_ffffffc4; (GHIDRA_CAST((this_00)))->Manager::StartNewGame(iVar2,0,unk,difficulty); } } else { if (this->Status != 2) { handle_input(this); } UpdateRotations(this); } if ((this->Status == 4) && (((this->_CharacterMenuBGSprite)._animState._animData == (void *)0x0 || ((this->_CharacterMenuBGSprite)._animState._isPlaying == 0)))) { a = (GHIDRA_CAST((GHIDRA_CAST(&(this->_CharacterMenuBGSprite)._animState))))->ANM2::GetAnimation(GHIDRA_CAST(animName)); animNameSize = &a->_size; if (0xf < a->_capacity) { a = *GHIDRA_CAST(a->_buf); } bVar1 = str_eq(GHIDRA_CAST(a),*animNameSize,GHIDRA_CAST("SwapOut"),7); if (0xf < animNameCapacity) { uVar3 = animNameCapacity + 1; ptr = animName[0]; if (0xfff < uVar3) { ptr = *(void **)(GHIDRA_INT(animName[0]) + -4); uVar3 = animNameCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(animName[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ptr,uVar3); } if (bVar1 == 0) { (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::Play(s_Idle,0); } else { set_character_menu_shown(this,1 - this->_characterMenuShown); render_page_snapshot(this); (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::Play(GHIDRA_CAST("SwapIn"),0); manager = g_manager; soundId = 8; seed_fart_sound_override(&soundId); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); } this->Status = 0; } if (((this->_CharacterMenuBGSprite)._animState._animData == (void *)0x0) || ((this->_CharacterMenuBGSprite)._animState._isPlaying == 0)) { pbVar4 = (this->_CharacterMenuBGSprite)._animState._animData; if (pbVar4 != GHIDRA_CAST(0x0)) { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedName = s_Idle; do { bVar1 = *animNameCursor; isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a0d8: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a0dd; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_0094a0d8; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a0dd: if ((uVar3 == 0) && ((pbVar4[0x34] == 0 || ((this->_CharacterMenuBGSprite)._animState._isPlaying != 0)))) goto LAB_0094a116; } bVar1 = (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._animState)))->AnimationState::Rewind(); (this->_CharacterMenuBGSprite)._animState._isPlaying = 1; } } else { render_page_snapshot(this); } LAB_0094a116: iVar2 = this->_seedUnlockPageState; if (iVar2 == 1) { pbVar4 = (this->_SeedUnlockPageSprite)._animState._animData; if (pbVar4 == GHIDRA_CAST(0x0)) { LAB_0094a176: bVar1 = (GHIDRA_CAST((&this->_SeedUnlockPageSprite)))->ANM2::SetAnimation(GHIDRA_CAST("Appear"),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._animState)))->AnimationState::Rewind(); (this->_SeedUnlockPageSprite)._animState._isPlaying = 1; } } else { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedNameText = "Appear"; do { bVar1 = *animNameCursor; isLess = bVar1 < (uint8_t)*expectedNameText; if (bVar1 != *expectedNameText) { LAB_0094a160: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a165; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < (uint8_t)expectedNameText[1]; if (bVar1 != expectedNameText[1]) goto LAB_0094a160; animNameCursor = animNameCursor + 2; expectedNameText = expectedNameText + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a165: if ((uVar3 != 0) || ((pbVar4[0x34] != 0 && ((this->_SeedUnlockPageSprite)._animState._isPlaying == 0)))) goto LAB_0094a176; } if (((this->_SeedUnlockPageSprite)._animState._animData == (void *)0x0) || ((this->_SeedUnlockPageSprite)._animState._isPlaying == 0)) { this->_seedUnlockPageState = 2; } } else if (iVar2 == 2) { pbVar4 = (this->_SeedUnlockPageSprite)._animState._animData; if (pbVar4 == GHIDRA_CAST(0x0)) { LAB_0094a21b: bVar1 = (GHIDRA_CAST((&this->_SeedUnlockPageSprite)))->ANM2::SetAnimation(s_Idle,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._animState)))->AnimationState::Rewind(); (this->_SeedUnlockPageSprite)._animState._isPlaying = 1; } } else { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedName = s_Idle; do { bVar1 = *animNameCursor; isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a205: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a20a; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_0094a205; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a20a: if ((uVar3 != 0) || ((pbVar4[0x34] != 0 && ((this->_SeedUnlockPageSprite)._animState._isPlaying == 0)))) goto LAB_0094a21b; } iVar2 = this->_seedUnlockPageTimer; if ((g_manager->_framecount & 1) == 0) { iVar2 = iVar2 + 1; this->_seedUnlockPageTimer = iVar2; } if (0x3c < iVar2) { this->_seedUnlockPageState = 3; this->_seedUnlockPageTimer = 0; } } else if (iVar2 == 3) { pbVar4 = (this->_SeedUnlockPageSprite)._animState._animData; if (pbVar4 == GHIDRA_CAST(0x0)) { LAB_0094a2d8: bVar1 = (GHIDRA_CAST((&this->_SeedUnlockPageSprite)))->ANM2::SetAnimation(GHIDRA_CAST("Dissappear"),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_SeedUnlockPageSprite)._animState)))->AnimationState::Rewind(); (this->_SeedUnlockPageSprite)._animState._isPlaying = 1; } } else { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedNameText = "Dissappear"; do { bVar1 = *animNameCursor; isLess = bVar1 < (uint8_t)*expectedNameText; if (bVar1 != *expectedNameText) { LAB_0094a2c2: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a2c7; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < (uint8_t)expectedNameText[1]; if (bVar1 != expectedNameText[1]) goto LAB_0094a2c2; animNameCursor = animNameCursor + 2; expectedNameText = expectedNameText + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a2c7: if ((uVar3 != 0) || ((pbVar4[0x34] != 0 && ((this->_SeedUnlockPageSprite)._animState._isPlaying == 0)))) goto LAB_0094a2d8; } if (((this->_SeedUnlockPageSprite)._animState._animData == (void *)0x0) || ((this->_SeedUnlockPageSprite)._animState._isPlaying == 0)) { this->_seedUnlockPageState = 0; } } pbVar4 = (this->_EastereggPageSprite)._animState._animData; if ((g_menuManager->_seedsObject)._seedEffectsCount == 0) { if (pbVar4 != GHIDRA_CAST(0x0)) { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedName = &DAT_00b7bd88; do { bVar1 = *animNameCursor; isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a3b5: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a3ba; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_0094a3b5; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a3ba: if ((uVar3 == 0) && ((pbVar4[0x34] == 0 || ((this->_EastereggPageSprite)._animState._isPlaying != 0)))) goto LAB_0094a3e6; } pbVar4 = &DAT_00b7bd88; } else { if (pbVar4 != GHIDRA_CAST(0x0)) { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedName = &DAT_00b7bde8; do { bVar1 = *animNameCursor; isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a366: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a36b; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_0094a366; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a36b: if ((uVar3 == 0) && ((pbVar4[0x34] == 0 || ((this->_EastereggPageSprite)._animState._isPlaying != 0)))) goto LAB_0094a3e6; } pbVar4 = &DAT_00b7bde8; } bVar1 = (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::SetAnimation(pbVar4,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_EastereggPageSprite)._animState)))->AnimationState::Rewind(); (this->_EastereggPageSprite)._animState._isPlaying = 1; } LAB_0094a3e6: if ((g_manager->_persistentGameData)._eventCounters[0x71] == 0) { if ((g_manager->_persistentGameData)._eventCounters[0x16] == 0) { return; } pbVar4 = (this->_WinStreakPageSprite)._animState._animData; if (pbVar4 != GHIDRA_CAST(0x0)) { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedName = &DAT_00b7bf30; do { bVar1 = *animNameCursor; isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a4a0: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a4a5; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_0094a4a0; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a4a5: if (uVar3 == 0) { if (pbVar4[0x34] == 0) { return; } if ((this->_WinStreakPageSprite)._animState._isPlaying != 0) { return; } } } pbVar4 = &DAT_00b7bf30; } else { pbVar4 = (this->_WinStreakPageSprite)._animState._animData; if (pbVar4 != GHIDRA_CAST(0x0)) { animNameCursor = pbVar4; if (0xf < *GHIDRA_CAST((pbVar4 + 0x14))) { animNameCursor = *GHIDRA_CAST(pbVar4); } expectedName = &DAT_00b7bf2c; do { bVar1 = *animNameCursor; isLess = bVar1 < *expectedName; if (bVar1 != *expectedName) { LAB_0094a430: uVar3 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a435; } if (bVar1 == 0) break; bVar1 = animNameCursor[1]; isLess = bVar1 < expectedName[1]; if (bVar1 != expectedName[1]) goto LAB_0094a430; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (bVar1 != 0); uVar3 = 0; LAB_0094a435: if (uVar3 == 0) { if (pbVar4[0x34] == 0) { return; } if ((this->_WinStreakPageSprite)._animState._isPlaying != 0) { return; } } } pbVar4 = &DAT_00b7bf2c; } bVar1 = (GHIDRA_CAST((&this->_WinStreakPageSprite)))->ANM2::SetAnimation(pbVar4,1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_WinStreakPageSprite)._animState)))->AnimationState::Rewind(); (this->_WinStreakPageSprite)._animState._isPlaying = 1; } return; } // 0094a500 void Menu_Character::Render() { char cVar1; Vector pos; Vector pos_00; Vector scale; Vector scale_00; Vector pos_01; uint8_t bVar2; uint8_t *pbVar3; uint32_t uVar4; void *pvVar5; float *nullFrame; LayerState *pLVar6; std_string *seedTextChars; std_string *seedText; void *settings; KColor *color; int iVar7; Font *pFVar8; AnimationLayer *bgLayer; uint8_t *pbVar9; int iVar10; KColor *color_00; Font **copyLen; void **textEnd; KColor *color_01; Seeds *seeds; AnimationState *secondAnimState; Font *pFVar11; ANM2 *bgAnimation; bool isLess; float fVar12; float fVar13; uint32_t uStack_114; uint32_t uStack_110; uint32_t uStack_10c; float greedDecoAlpha; uint32_t local_f4; uint32_t uStack_f0; uint32_t local_ec; uint32_t fontSettings; uint32_t local_d4; uint32_t local_d0; uint32_t local_cc; uint32_t local_c8; uint32_t local_c4; uint32_t local_c0; uint32_t seedCountSettings; uint32_t local_b4; KColor local_b0; Menu_Character *self; uint32_t textSettings; uint32_t local_94; KColor local_90; uint8_t isAchievementsDisallowed; float glyphX; Font *local_74; Font *local_70; Vector renderPos; Vector basePos; Font *textBuf [4]; int textBufSize; uint32_t textBufCapacity; short local_44 [8]; uint32_t local_34; void *pvStack_30; void *pvStack_2c; void *pvStack_28; uint32_t local_24; void *pvStack_20; std_map local_1c; uint32_t ehState; ColorMod *greedDecoColor; Manager *temp_3f620328c3; pvStack_20 = local_44 + 0x20; ehState = -1; local_1c._size = GHIDRA_UINT(&LAB_00b0b8da); local_1c._head = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((local_44 + 0x1a)); ExceptionList = &(GHIDRA_CAST(textBuf))->_charsBlock; basePos.x = (g_menuManager->_ViewPosition).x + this->_PositionX; basePos.y = (g_menuManager->_ViewPosition).y + this->_PositionY; renderPos.x = basePos.x + 480.0; renderPos.y = basePos.y + 0.0; self = this; pvVar5 = local_44 + 0x20; if ((this->_SeedEntrySprite)._loaded != 0) { if ((this->_SeedEntrySprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_SeedEntrySprite)._animState,&renderPos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_SeedEntrySprite)._overlayAnimState; } else { pvStack_20 = local_44 + 0x20; AnimationState::Render (&(this->_SeedEntrySprite)._overlayAnimState,&renderPos,&g_vectorZero,&g_vectorZero) ; secondAnimState = &(this->_SeedEntrySprite)._animState; } AnimationState::Render(secondAnimState,&renderPos,&g_vectorZero,&g_vectorZero); pvVar5 = pvStack_20; } pvStack_20 = pvVar5; if ((this->_CharacterMenuBGSprite)._loaded != 0) { if ((this->_CharacterMenuBGSprite)._overlayRenderFirst == 0) { pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 0 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x38)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4 )),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 0 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x38)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames; goto LAB_0094a6ef; } } else { pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 0 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x38)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 0 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x38)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._animState._layerFrames; LAB_0094a6ef: AnimationLayer::RenderFrame (bgLayer,&basePos,*GHIDRA_CAST((GHIDRA_CAST(pvVar5) + iVar10 * 4)),&g_vectorZero,&g_vectorZero, bgAnimation); } } } if ((this->_TaintedMenuBGDecoSprite)._loaded != 0) { if ((this->_TaintedMenuBGDecoSprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_TaintedMenuBGDecoSprite)._animState,&basePos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_TaintedMenuBGDecoSprite)._overlayAnimState; } else { AnimationState::Render (&(this->_TaintedMenuBGDecoSprite)._overlayAnimState,&basePos,&g_vectorZero, &g_vectorZero); secondAnimState = &(this->_TaintedMenuBGDecoSprite)._animState; } AnimationState::Render(secondAnimState,&basePos,&g_vectorZero,&g_vectorZero); } if ((this->_CharacterMenuBGSprite)._loaded != 0) { if ((this->_CharacterMenuBGSprite)._overlayRenderFirst == 0) { pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 1 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x3c)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4 )),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 1 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x3c)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames; goto LAB_0094a86f; } } else { pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 1 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x3c)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 1 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x3c)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._animState._layerFrames; LAB_0094a86f: AnimationLayer::RenderFrame (bgLayer,&basePos,*GHIDRA_CAST((GHIDRA_CAST(pvVar5) + iVar10 * 4)),&g_vectorZero,&g_vectorZero, bgAnimation); } } if ((this->_CharacterMenuBGSprite)._loaded != 0) { if ((this->_CharacterMenuBGSprite)._overlayRenderFirst == 0) { pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 4 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x48)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 4 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x48)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames; goto LAB_0094a994; } } else { pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 4 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x48)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 4 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x48)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._animState._layerFrames; LAB_0094a994: AnimationLayer::RenderFrame (bgLayer,&basePos,*GHIDRA_CAST((GHIDRA_CAST(pvVar5) + iVar10 * 4)),&g_vectorZero,&g_vectorZero ,bgAnimation); } } } } if (this->Status == 4) { LAB_0094aa0a: if ((this->_CharacterMenuBGSprite)._loaded != 0) { if ((this->_CharacterMenuBGSprite)._overlayRenderFirst == 0) { pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 3 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x44)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 3 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x44)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames; goto LAB_0094ab18; } } else { pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 3 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x44)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 3 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x44)), -1 < iVar10)) { bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._animState._layerFrames; LAB_0094ab18: AnimationLayer::RenderFrame (bgLayer,&basePos,*GHIDRA_CAST((GHIDRA_CAST(pvVar5) + iVar10 * 4)),&g_vectorZero,&g_vectorZero ,bgAnimation); } } } if ((this->_CharacterMenuBGSprite)._animState._animData == (void *)0x0) { KAGE_LogMessage(0x10,GHIDRA_CAST("AnimationData is NULL\n")); } if (*GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._animation) + 0x80)) < 4) { KAGE_LogMessage(0x10,GHIDRA_CAST("LayerId out of bounds\n")); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (2 < *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._animation) + 0x80)))) && ((iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x44)), -1 < iVar10 && (iVar10 < *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x1c)))))) { iVar7 = iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)); iVar10 = *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4)); if (((-1 < iVar10) && (iVar10 < *GHIDRA_CAST((iVar7 + 8)))) && ((iVar10 = iVar10 * 0x6c + *GHIDRA_CAST((iVar7 + 4)), iVar10 != 0 && (*GHIDRA_CAST((iVar10 + 0x2c)) != '\0')))) { renderPos.x = *GHIDRA_CAST((iVar10 + 0x10)) - *GHIDRA_CAST((iVar10 + 0x20)) * (GHIDRA_CAST((iVar10 + 0x18)))->x; renderPos.y = *GHIDRA_CAST((iVar10 + 0x14)) - *GHIDRA_CAST((iVar10 + 0x1c)) * *GHIDRA_CAST((iVar10 + 0x24)); render_portraits(this,&basePos,&renderPos,GHIDRA_CAST((iVar10 + 0x18))); } } } else { pbVar3 = (this->_CharacterMenuBGSprite)._animState._animData; if (pbVar3 == GHIDRA_CAST(0x0)) { pbVar3 = &s_empty; } else if (0xf < *GHIDRA_CAST((pbVar3 + 0x14))) { pbVar3 = *GHIDRA_CAST(pbVar3); } pbVar9 = s_Idle; do { bVar2 = *pbVar3; isLess = bVar2 < *pbVar9; if (bVar2 != *pbVar9) { LAB_0094a9f0: uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094a9f5; } if (bVar2 == 0) break; bVar2 = pbVar3[1]; isLess = bVar2 < pbVar9[1]; if (bVar2 != pbVar9[1]) goto LAB_0094a9f0; pbVar3 = pbVar3 + 2; pbVar9 = pbVar9 + 2; } while (bVar2 != 0); uVar4 = 0; LAB_0094a9f5: if (uVar4 != 0) goto LAB_0094aa0a; render_wheel(this,&basePos,0); } if ((this->_CharacterMenuBGSprite)._loaded != 0) { if ((this->_CharacterMenuBGSprite)._overlayRenderFirst == 0) { pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, 2 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x40)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._animState._layerFrames) + iVar10 * 4 )),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 == (void *)0x0) || (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, bgAnimation->_layerCount < 3)) || (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x40)), iVar10 < 0)) goto LAB_0094ad1d; bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames; } else { pvVar5 = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; if (((pvVar5 != (void *)0x0) && (bgAnimation = (this->_CharacterMenuBGSprite)._overlayAnimState._animation, 2 < bgAnimation->_layerCount)) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x40)), -1 < iVar10)) { AnimationLayer::RenderFrame (GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))),&basePos, *GHIDRA_CAST((GHIDRA_INT((this->_CharacterMenuBGSprite)._overlayAnimState._layerFrames) + iVar10 * 4)),&g_vectorZero,&g_vectorZero,bgAnimation); } pvVar5 = (this->_CharacterMenuBGSprite)._animState._animData; if (((pvVar5 == (void *)0x0) || (bgAnimation = (this->_CharacterMenuBGSprite)._animState._animation, bgAnimation->_layerCount < 3)) || (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x40)), iVar10 < 0)) goto LAB_0094ad1d; bgLayer = GHIDRA_CAST((iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)))); pvVar5 = (this->_CharacterMenuBGSprite)._animState._layerFrames; } AnimationLayer::RenderFrame (bgLayer,&basePos,*GHIDRA_CAST((GHIDRA_CAST(pvVar5) + iVar10 * 4)),&g_vectorZero,&g_vectorZero, bgAnimation); } LAB_0094ad1d: if (0.0 < (this->_PageSwapWidgetSprite)._color._tint[3]) { renderPos.x = basePos.x + 54.0; renderPos.y = basePos.y + 50.0; (GHIDRA_CAST((GHIDRA_CAST(&this->_PageSwapWidgetSprite))))->Sprite::RenderLayer(0,&renderPos,&g_vectorZero, &g_vectorZero); (GHIDRA_CAST((GHIDRA_CAST(&this->_PageSwapWidgetSprite))))->Sprite::RenderLayer(1,&renderPos,&g_vectorZero, &g_vectorZero); nullFrame = (GHIDRA_CAST((&(this->_PageSwapWidgetSprite)._animState)))->AnimationState::GetNullFrameById(0); local_74 = GHIDRA_CAST((renderPos.y + nullFrame[1])); glyphX = renderPos.x + *nullFrame; local_c0 = 0; pos.y = (float)local_74; pos.x = glyphX; scale.y = g_vectorOne.y; scale.x = g_vectorOne.x; bVar2 = Manager::render_controller_action_glyph (g_manager,g_menuControllerIndex,0x19,0,1, (ColorMod) ZEXT1644(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))),pos, scale); if (bVar2 == 0) { (GHIDRA_CAST((GHIDRA_CAST(&this->_PageSwapWidgetSprite))))->Sprite::RenderLayer(2,&renderPos,&g_vectorZero, &g_vectorZero); } } if ((this->SelectedCharacterID < 0x12) && (this->SelectedCharacterID != 0)) { renderPos.x = basePos.x + 80.0; renderPos.y = basePos.y + 50.0; (GHIDRA_CAST((GHIDRA_CAST(&this->_completionWidget))))->CompletionWidget::Render(&renderPos,&g_vectorOne); } renderPos.x = basePos.x + 365.0; renderPos.y = basePos.y + 120.0; if ((this->_DifficultyPageSprite)._loaded != 0) { if ((this->_DifficultyPageSprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_DifficultyPageSprite)._animState,&renderPos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_DifficultyPageSprite)._overlayAnimState; } else { AnimationState::Render (&(this->_DifficultyPageSprite)._overlayAnimState,&renderPos,&g_vectorZero, &g_vectorZero); secondAnimState = &(this->_DifficultyPageSprite)._animState; } AnimationState::Render(secondAnimState,&renderPos,&g_vectorZero,&g_vectorZero); } renderPos.x = basePos.x + 350.0; renderPos.y = basePos.y + 45.0; if ((this->_SeedPageSprite)._loaded != 0) { if ((this->_SeedPageSprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_SeedPageSprite)._animState,&renderPos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_SeedPageSprite)._overlayAnimState; } else { AnimationState::Render (&(this->_SeedPageSprite)._overlayAnimState,&renderPos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_SeedPageSprite)._animState; } AnimationState::Render(secondAnimState,&renderPos,&g_vectorZero,&g_vectorZero); } greedDecoAlpha = this->_greedDecoAlpha; if ((1.0 <= greedDecoAlpha) || ((this->Difficulty != 2 && (this->Difficulty != 3)))) { if ((0.0 < greedDecoAlpha) && ((this->Difficulty != 2 && (this->Difficulty != 3)))) { greedDecoAlpha = greedDecoAlpha - 0.05; this->_greedDecoAlpha = greedDecoAlpha; } } else { greedDecoAlpha = greedDecoAlpha + 0.05; this->_greedDecoAlpha = greedDecoAlpha; } greedDecoColor = &(this->_GreedDecoOverlaySprite)._color; uStack_114 = 0x3f800000; uStack_110 = 0x3f800000; uStack_10c = 0x3f800000; local_f4 = 0; uStack_f0 = 0; local_ec = 0; if (greedDecoColor != GHIDRA_CAST(&uStack_114)) { (this->_GreedDecoOverlaySprite)._color._colorize[0] = 0.0; (this->_GreedDecoOverlaySprite)._color._colorize[1] = 0.0; (this->_GreedDecoOverlaySprite)._color._colorize[2] = 0.0; (this->_GreedDecoOverlaySprite)._color._colorize[3] = 0.0; greedDecoColor->_tint[0] = 1.0; (this->_GreedDecoOverlaySprite)._color._tint[1] = 1.0; (this->_GreedDecoOverlaySprite)._color._tint[2] = 1.0; (this->_GreedDecoOverlaySprite)._color._tint[3] = greedDecoAlpha; (this->_GreedDecoOverlaySprite)._color._offset[0] = 0.0; (this->_GreedDecoOverlaySprite)._color._offset[1] = 0.0; (this->_GreedDecoOverlaySprite)._color._offset[2] = 0.0; } if ((this->_GreedDecoOverlaySprite)._loaded != 0) { if ((this->_GreedDecoOverlaySprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_GreedDecoOverlaySprite)._animState,&basePos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_GreedDecoOverlaySprite)._overlayAnimState; } else { AnimationState::Render (&(this->_GreedDecoOverlaySprite)._overlayAnimState,&basePos,&g_vectorZero, &g_vectorZero); secondAnimState = &(this->_GreedDecoOverlaySprite)._animState; } AnimationState::Render(secondAnimState,&basePos,&g_vectorZero,&g_vectorZero); } if ((this->_seedText)._size == 0) { pLVar6 = (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x1)); local_70 = GHIDRA_CAST(0x43b28000); local_74 = GHIDRA_CAST(0x42380000); pLVar6->_visible = 1; if (*GHIDRA_CAST(&g_manager->_stringTable) == 2) { local_70 = GHIDRA_CAST(0x43b68000); local_74 = GHIDRA_CAST(0x42440000); } if ((this->_SeedPageSprite)._animState._animData == (void *)0x0) { KAGE_LogMessage(0x10,GHIDRA_CAST("AnimationData is NULL\n")); } if (*GHIDRA_CAST((GHIDRA_INT((this->_SeedPageSprite)._animState._animation) + 0x80)) < 3) { KAGE_LogMessage(0x10,GHIDRA_CAST("LayerId out of bounds\n")); } pvVar5 = (this->_SeedPageSprite)._animState._animData; pFVar11 = local_74; pFVar8 = local_70; if ((((pvVar5 != (void *)0x0) && (1 < *GHIDRA_CAST((GHIDRA_INT((this->_SeedPageSprite)._animState._animation) + 0x80)))) && (iVar10 = *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x40)), -1 < iVar10)) && (iVar10 < *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x1c)))) { iVar7 = *GHIDRA_CAST((GHIDRA_INT((this->_SeedPageSprite)._animState._layerFrames) + iVar10 * 4)); iVar10 = iVar10 * 0x10 + *GHIDRA_CAST((GHIDRA_CAST(pvVar5) + 0x18)); if (((-1 < iVar7) && (iVar7 < *GHIDRA_CAST((iVar10 + 8)))) && (iVar10 = iVar7 * 0x6c + *GHIDRA_CAST((iVar10 + 4)), iVar10 != 0)) { pFVar11 = GHIDRA_CAST(((float)local_74 + *GHIDRA_CAST((iVar10 + 0x14)))); pFVar8 = GHIDRA_CAST(((float)local_70 + *GHIDRA_CAST((iVar10 + 0x10)))); } } renderPos.y = (float)pFVar11 + basePos.y; renderPos.x = (float)pFVar8 + basePos.x; local_c0 = 0; pos_00.y = renderPos.y; pos_00.x = renderPos.x; scale_00.y = g_vectorOne.y; scale_00.x = g_vectorOne.x; bVar2 = Manager::render_controller_action_glyph (g_manager,g_menuControllerIndex,0x1c,0,1, (ColorMod) ZEXT1644(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))), pos_00,scale_00); if (bVar2 == 0) { pLVar6 = (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x2)); pLVar6->_visible = 1; } else { pLVar6 = (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x2)); pLVar6->_visible = 0; } } else { pLVar6 = (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x1)); pLVar6->_visible = 0; pLVar6 = (GHIDRA_CAST((&this->_SeedPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x2)); textSettings = 0; local_94 = 0xffff; local_90._red = 0.0; pLVar6->_visible = 0; local_74 = &g_manager->_font1_TeamMeatEx10; local_90._green = 1.0; local_90._blue = -NAN; local_90._alpha = 0.0; local_90._unk = 0; ehState = 0; (GHIDRA_CAST((&local_b0)))->KColor::SetFromARGB(0xff362f2d); seedText = &this->_seedText; seedTextChars = seedText; if (0xf < (this->_seedText)._capacity) { seedTextChars = *GHIDRA_CAST(seedText->_buf); } iVar10 = (GHIDRA_CAST((local_74)))->Font::get_string_width_n(GHIDRA_CAST(seedTextChars),-1); seedTextChars = seedText; if (0xf < (this->_seedText)._capacity) { seedTextChars = *GHIDRA_CAST(seedText->_buf); } (GHIDRA_CAST((local_74)))->Font::DrawString(GHIDRA_CAST(seedTextChars),&local_b0,&textSettings, (basePos.x + 400.0) - (float)((double)iVar10 + __uint_to_double_fixup[-(iVar10 >> 0x1f)]) * 0.5, basePos.y + 57.0); local_74 = GHIDRA_CAST((this->_seedText)._size); local_70 = GHIDRA_CAST(0x4); copyLen = &local_74; if (GHIDRA_CAST(0x3) < local_74) { copyLen = &local_70; } local_34 = (void *)0x0; pvStack_30 = (void *)0x0; pvStack_2c = (void *)0x0; pvStack_28 = (void *)0x0; if (0xf < (this->_seedText)._capacity) { seedText = *GHIDRA_CAST(seedText->_buf); } memcpy(&(GHIDRA_CAST(textBuf))->_chars,seedText,(size_t)*copyLen); temp_3f620328c3 = g_manager; textSettings = 0; local_94 = 0xffff; local_90._red = 0.0; local_90._green = 1.0; local_90._blue = -NAN; local_90._alpha = 0.0; local_90._unk = 0; ehState = 1; (GHIDRA_CAST((&local_b0)))->KColor::SetFromARGB(0xff362f2d); renderPos.y = basePos.x + 480.0 + 185.0; (GHIDRA_CAST((&temp_3f620328c3->_font3_TeamMeatEx16)))->Font::DrawString(GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_chars), color_00,&textSettings,renderPos.y,basePos.y + 35.0); ehState = -1; uVar4 = (this->_seedText)._size; if (4 < uVar4) { local_74 = GHIDRA_CAST((uVar4 - 4)); local_70 = GHIDRA_CAST(0x4); seedText = &this->_seedText; copyLen = &local_74; if (GHIDRA_CAST(0x3) < local_74) { copyLen = &local_70; } local_34 = (void *)0x0; pvStack_30 = (void *)0x0; pvStack_2c = (void *)0x0; pvStack_28 = (void *)0x0; if (0xf < (this->_seedText)._capacity) { seedText = *GHIDRA_CAST(seedText->_buf); } memcpy(&(GHIDRA_CAST(textBuf))->_chars,seedText->_buf + 5,(size_t)*copyLen); temp_3f620328c3 = g_manager; textEnd = &(GHIDRA_CAST(textBuf))->_chars; do { cVar1 = *GHIDRA_CAST(textEnd); textEnd = (void **)(GHIDRA_INT(textEnd) + 1); } while (cVar1 != '\0'); if (textEnd != (void **)(GHIDRA_INT(&(GHIDRA_CAST(textBuf))->_chars) + 1U)) { (GHIDRA_CAST((GHIDRA_CAST(&fontSettings))))->FontSettings::constructor(); ehState = 2; (GHIDRA_CAST((&local_b0)))->KColor::SetFromARGB(0xff362f2d); (GHIDRA_CAST((&temp_3f620328c3->_font3_TeamMeatEx16)))->Font::DrawString(GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_chars), color_01,settings,renderPos.y,basePos.y + 60.0); ehState = -1; local_c4 = 0; local_c0 = 0; this = self; } } } renderPos.x = (g_menuManager->_ViewPosition).x + this->_PositionX + 45.0; renderPos.y = (g_menuManager->_ViewPosition).y + this->_PositionY + 140.0; if ((this->_WinStreakPageSprite)._loaded != 0) { if ((this->_WinStreakPageSprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_WinStreakPageSprite)._animState,&renderPos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_WinStreakPageSprite)._overlayAnimState; } else { AnimationState::Render (&(this->_WinStreakPageSprite)._overlayAnimState,&renderPos,&g_vectorZero, &g_vectorZero); secondAnimState = &(this->_WinStreakPageSprite)._animState; } AnimationState::Render(secondAnimState,&renderPos,&g_vectorZero,&g_vectorZero); } if (((g_manager->_persistentGameData)._eventCounters[0x16] != 0) || (pbVar3 = &DAT_00b7bf38, (g_manager->_persistentGameData)._eventCounters[0x71] == 0)) { pbVar3 = &DAT_00b66130; } sprintf(GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_scaleW),pbVar3); temp_3f620328c3 = g_manager; textSettings = 0; local_94 = 0xffff; local_90._red = 0.0; local_90._green = 1.0; local_90._blue = -NAN; local_90._alpha = 0.0; local_90._unk = 0; ehState = 3; (GHIDRA_CAST((&local_b0)))->KColor::SetFromARGB(0xff362f2d); iVar10 = Font::get_string_width_n (&temp_3f620328c3->_font1_TeamMeatEx10,GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_scaleW),-1); (GHIDRA_CAST((&temp_3f620328c3->_font1_TeamMeatEx10)))->Font::DrawString(GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_scaleW), &local_b0,&textSettings, (basePos.x + 85.0) - (float)((double)iVar10 + __uint_to_double_fixup[-(iVar10 >> 0x1f)]) * 0.5, basePos.y + 162.0); ehState = -1; iVar10 = Seeds::CountUnlockedSeedEffects(); if (0 < iVar10) { fVar12 = (g_menuManager->_ViewPosition).y; seeds = &g_menuManager->_seedsObject; fVar13 = this->_PositionY; (this->_eastereggPagePosition).x = (g_menuManager->_ViewPosition).x + this->_PositionX + 404.0; (this->_eastereggPagePosition).y = fVar12 + fVar13 + 238.0; isAchievementsDisallowed = (GHIDRA_CAST((seeds)))->Seeds::AchievementUnlocksDisallowed(); pLVar6 = (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); pLVar6->_visible = isAchievementsDisallowed; (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::Render(&this->_eastereggPagePosition,&g_vectorZero, &g_vectorZero); if (((this->_EastereggPageSprite)._animState._animData != (void *)0x0) && (nullFrame = AnimationState::GetNullFrame (&(this->_EastereggPageSprite)._animState,GHIDRA_CAST("ButtonIcon")), nullFrame != GHIDRA_CAST(0x0))) { basePos.y = nullFrame[1] + (this->_eastereggPagePosition).y; basePos.x = *nullFrame + (this->_eastereggPagePosition).x; pos_01.y = basePos.y; pos_01.x = basePos.x; bVar2 = render_input_button_icon (g_menuControllerIndex,0x18,0,1, (ColorMod) ZEXT1644(CONCAT412(0x3f800000,CONCAT48(0x3f800000,0x3f8000003f800000))), pos_01); if (bVar2 == 0) { pLVar6 = (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::GetLayer(&DAT_00000004); pLVar6->_visible = 1; } else { pLVar6 = (GHIDRA_CAST((&this->_EastereggPageSprite)))->ANM2::GetLayer(&DAT_00000004); pLVar6->_visible = 0; } } if ((g_menuManager->_seedsObject)._seedEffectsCount != 0) { sprintf(GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_chars),s__d); temp_3f620328c3 = g_manager; seedCountSettings = 0; local_b4 = 0xffff; local_b0._red = 0.0; local_b0._green = 1.0; local_b0._blue = -NAN; local_b0._alpha = 0.0; local_b0._unk = 0; ehState = 4; (GHIDRA_CAST((&local_90)))->KColor::SetFromARGB(0xff3d3234); (GHIDRA_CAST((&temp_3f620328c3->_font1_TeamMeatEx10)))->Font::DrawString(GHIDRA_CAST(&(GHIDRA_CAST(textBuf))->_chars), color,&seedCountSettings,(this->_eastereggPagePosition).x - 18.0, (this->_eastereggPagePosition).y - 10.0); ehState = -1; } } if (this->_seedUnlockPageState != 0) { basePos.y = g_screenHeight * 0.5; basePos.x = g_screenWidth * 0.5; if ((this->_SeedUnlockPageSprite)._loaded != 0) { if ((this->_SeedUnlockPageSprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_SeedUnlockPageSprite)._animState,&basePos,&g_vectorZero,&g_vectorZero); secondAnimState = &(this->_SeedUnlockPageSprite)._overlayAnimState; } else { AnimationState::Render (&(this->_SeedUnlockPageSprite)._overlayAnimState,&basePos,&g_vectorZero, &g_vectorZero); secondAnimState = &(this->_SeedUnlockPageSprite)._animState; } AnimationState::Render(secondAnimState,&basePos,&g_vectorZero,&g_vectorZero); } if (this->_seedUnlockPageState == 2) { local_70 = &g_manager->_font1_TeamMeatEx10; (GHIDRA_CAST((GHIDRA_CAST(textBuf))))->msvc::string::string(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd84)))); ehState = 5; pFVar11 = GHIDRA_CAST(textBuf); if (0xf < textBufCapacity) { pFVar11 = textBuf[0]; } local_74 = GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((pFVar11)) + 0x0))) + textBufSize)); pFVar8 = GHIDRA_CAST(textBuf); if (0xf < textBufCapacity) { pFVar8 = textBuf[0]; } if (pFVar8 != GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((pFVar11)) + 0x0))) + textBufSize))) { iVar10 = GHIDRA_INT(pFVar11) - GHIDRA_INT(pFVar8); do { iVar7 = toupper(GHIDRA_INT((char)*GHIDRA_CAST(pFVar8))); *GHIDRA_CAST((GHIDRA_CAST(pFVar8) + iVar10)) = (uint8_t)iVar7; pFVar8 = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((pFVar8)) + 0x1)))); } while (pFVar8 != local_74); this = self; } pFVar11 = local_70; pFVar8 = GHIDRA_CAST(textBuf); if (0xf < textBufCapacity) { pFVar8 = textBuf[0]; } iVar10 = (GHIDRA_CAST((local_70)))->Font::get_string_width_n(GHIDRA_CAST(pFVar8),-1); fVar13 = 0.5; fontSettings = 0; local_d4 = 0xffff; local_d0 = 0; local_cc = 0x3f800000; local_c8 = 0xffffffff; local_c4 = 0; local_c0 = 0; fVar12 = (float)((double)iVar10 + __uint_to_double_fixup[-(iVar10 >> 0x1f)]) * 0.5; (*GHIDRA_CAST((GHIDRA_CAST(&(ehState)) + 0x0))) = 6; (GHIDRA_CAST((&local_b0)))->KColor::SetFromARGB(0xff362f2d); pFVar8 = GHIDRA_CAST(textBuf); if (0xf < textBufCapacity) { pFVar8 = textBuf[0]; } (GHIDRA_CAST((pFVar11)))->Font::DrawString(GHIDRA_CAST(pFVar8),&local_b0,&fontSettings, g_screenWidth * fVar13 - fVar12,g_screenHeight * fVar13 - 26.0); pbVar3 = &(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xd9c))); (*GHIDRA_CAST((GHIDRA_CAST(&(ehState)) + 0x0))) = 5; if (GHIDRA_CAST(textBuf) != GHIDRA_CAST(pbVar3)) { if (0xf < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xdb0))))) { pbVar3 = *GHIDRA_CAST(pbVar3); } (GHIDRA_CAST((GHIDRA_CAST(textBuf))))->msvc::string::assign(pbVar3,*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0xdac))))); } pFVar8 = GHIDRA_CAST(textBuf); if (0xf < textBufCapacity) { pFVar8 = textBuf[0]; } iVar10 = (GHIDRA_CAST((pFVar11)))->Font::get_string_width_n(GHIDRA_CAST(pFVar8),-1); fVar13 = 0.5; fontSettings = 0; local_d4 = 0xffff; local_d0 = 0; local_cc = 0x3f800000; local_c8 = 0xffffffff; local_c4 = 0; local_c0 = 0; fVar12 = (float)((double)iVar10 + __uint_to_double_fixup[-(iVar10 >> 0x1f)]) * 0.5; ehState = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(ehState)) + 0x1))),7); (GHIDRA_CAST((&local_b0)))->KColor::SetFromARGB(0xff362f2d); pFVar8 = GHIDRA_CAST(textBuf); if (0xf < textBufCapacity) { pFVar8 = textBuf[0]; } (GHIDRA_CAST((pFVar11)))->Font::DrawString(GHIDRA_CAST(pFVar8),&local_b0,&fontSettings, g_screenWidth * fVar13 - fVar12,g_screenHeight * fVar13 + 0.0); if (0xf < textBufCapacity) { uVar4 = textBufCapacity + 1; pFVar11 = textBuf[0]; if (0xfff < uVar4) { pFVar11 = GHIDRA_CAST(textBuf[0][-1]._missingCharacter); uVar4 = textBufCapacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST((GHIDRA_INT(textBuf[0]) + (-4 - GHIDRA_INT(pFVar11))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pFVar11,uVar4); } } } ExceptionList = local_1c._head; return; } // 0094bbd0 void Menu_Character::render_wheel(Vector *param_2, char param_3) { Vector *pVVar1; uint8_t *edenTokensFormat; int iVar2; AnimationState *lastAnimState; float y; KColor textColor; uint32_t uStack_f8; uint32_t uStack_f4; uint32_t uStack_f0; float overlayAlpha; uint32_t local_d8; uint32_t uStack_d4; uint32_t local_d0; uint32_t drawSettings; uint32_t local_c8; uint32_t local_c4; uint32_t local_c0; uint32_t local_bc; uint32_t local_b8; uint32_t local_b4; Menu_Character *savedThis; Vector *savedPosition; uint8_t edenTokensText [132]; uint32_t local_24; uint8_t *puStack_20; void *local_1c; uint8_t *puStack_18; uint32_t local_14; ColorMod *overlaySpriteColor; Font *temp_27f83029b04; puStack_20 = edenTokensText + 0xa4; local_14 = 0xffffffff; puStack_18 = &LAB_00b0b920; local_1c = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((edenTokensText + 0x98)); ExceptionList = &local_1c; savedPosition = param_2; savedThis = this; if (this->SelectedCharacterID < 0x12) { puStack_20 = edenTokensText + 0xa4; (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Render(param_2,&g_vectorZero,&g_vectorZero); } else { ModManager::RenderCustomCharacterMenu (*GHIDRA_CAST((GHIDRA_INT(g_modCharacters) + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90) + this->SelectedCharacterID * 8)),param_2,GHIDRA_CAST(&this->_BigCharPageSprite)); } if (param_3 == '\0') { render_portraits(this,param_2,&g_vectorZero,&g_vectorOne); } if (this->SelectedCharacterID == 10) { temp_27f83029b04 = &g_manager->_font2_TeamMeatEx12; edenTokensFormat = string_table_translate(&g_manager->_stringTable,GHIDRA_CAST("#EDEN_TOKENS_COUNT")) ; sprintf(edenTokensText,edenTokensFormat); drawSettings = 0; local_c8 = 0xffff; local_c4 = 0; local_c0 = 0x3f800000; local_bc = 0xffffffff; local_b8 = 0; local_b4 = 0; local_14 = 0; (GHIDRA_CAST((&textColor)))->KColor::SetFromARGB(0xff362f2d); pVVar1 = savedPosition; y = savedPosition->y + 215.0; iVar2 = (GHIDRA_CAST((temp_27f83029b04)))->Font::get_string_width_n(edenTokensText,-1); (GHIDRA_CAST((temp_27f83029b04)))->Font::DrawString(edenTokensText,&textColor,&drawSettings, (pVVar1->x + 240.0) - (float)((double)iVar2 + __uint_to_double_fixup[-(iVar2 >> 0x1f)]) * 0.5,y); local_14 = 0xffffffff; this = savedThis; param_2 = savedPosition; } overlayAlpha = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x30)))); if ((1.0 <= overlayAlpha) || ((this->Difficulty != 1 && (this->Difficulty != 3)))) { if ((0.0 < overlayAlpha) && ((this->Difficulty != 1 && (this->Difficulty != 3)))) { overlayAlpha = overlayAlpha - 0.05; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x30)))) = overlayAlpha; } } else { overlayAlpha = overlayAlpha + 0.05; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x30)))) = overlayAlpha; } overlaySpriteColor = &(this->_DifficultyOverlaySprite)._color; uStack_f8 = 0x3f800000; uStack_f4 = 0x3f800000; uStack_f0 = 0x3f800000; local_d8 = 0; uStack_d4 = 0; local_d0 = 0; if (overlaySpriteColor != GHIDRA_CAST(&uStack_f8)) { (this->_DifficultyOverlaySprite)._color._colorize[0] = 0.0; (this->_DifficultyOverlaySprite)._color._colorize[1] = 0.0; (this->_DifficultyOverlaySprite)._color._colorize[2] = 0.0; (this->_DifficultyOverlaySprite)._color._colorize[3] = 0.0; overlaySpriteColor->_tint[0] = 1.0; (this->_DifficultyOverlaySprite)._color._tint[1] = 1.0; (this->_DifficultyOverlaySprite)._color._tint[2] = 1.0; (this->_DifficultyOverlaySprite)._color._tint[3] = overlayAlpha; (this->_DifficultyOverlaySprite)._color._offset[0] = 0.0; (this->_DifficultyOverlaySprite)._color._offset[1] = 0.0; (this->_DifficultyOverlaySprite)._color._offset[2] = 0.0; } if ((this->_DifficultyOverlaySprite)._loaded != 0) { if ((this->_DifficultyOverlaySprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_DifficultyOverlaySprite)._animState,param_2,&g_vectorZero,&g_vectorZero); lastAnimState = &(this->_DifficultyOverlaySprite)._overlayAnimState; } else { AnimationState::Render (&(this->_DifficultyOverlaySprite)._overlayAnimState,param_2,&g_vectorZero, &g_vectorZero); lastAnimState = &(this->_DifficultyOverlaySprite)._animState; } AnimationState::Render(lastAnimState,param_2,&g_vectorZero,&g_vectorZero); } ExceptionList = local_1c; return; } // 0094bee0 void Menu_Character::render_portraits(Vector *position, Vector *offset, Vector *scale) { uint32_t uVar1; uint8_t bVar2; void *orderList; void *extraout_ECX; void *extraout_ECX_00; int iVar4; int iVar5; int iVar6; float fVar7; float fVar8; void *local_84; void *local_80; Vector local_7c; Vector local_74; Vector customPortraitPos; float local_64; float fStack_60; float fStack_5c; uint32_t uStack_58; float offsetR; float offsetG; float offsetB; ColorMod customPortraitColor; uint32_t local_c; ModManager *characterIndex; void *orderList; ColorMod *portraitColor; local_c = __security_cookie ^ GHIDRA_UINT(&local_84); if ((*GHIDRA_CAST((*GHIDRA_CAST(ThreadLocalStoragePointer) + 0xc)) < DAT_00c94174) && (_Init_thread_header(&DAT_00c94174), DAT_00c94174 == -1)) { _atexit(GHIDRA_CAST<_func_4879 *>(&LAB_00b16750)); _Init_thread_footer(&DAT_00c94174); } DAT_00c9417c = g_characterPortraitOrder; uVar1 = this->_numCharacters; local_84 = g_characterPortraitOrder; orderList = g_characterPortraitOrder; if (uVar1 != 0) { if (GHIDRA_UINT((DAT_00c94180 - GHIDRA_INT(g_characterPortraitOrder) >> 4)) < uVar1) { msvc::vector<16byte>::_Resize_reallocate(uVar1,&local_80); orderList = extraout_ECX; } else { DAT_00c9417c = (void *)FUN_0094e520(g_characterPortraitOrder,uVar1,local_80); orderList = extraout_ECX_00; } } local_80 = (void *)0x12; local_74.x = 0.0; iVar6 = 0; local_7c.x = (float)&PTR_s_00_Random_00b24140; iVar4 = 0; local_84 = g_characterPortraitOrder; do { if (((*GHIDRA_CAST((GHIDRA_CAST(((GHIDRA_CAST((GHIDRA_INT(local_7c.x) + 6))))) + 0x2))) == '\0') || (bVar2 = Menu_Character_Entry::IsCharacterAvailable (GHIDRA_CAST(local_7c.x),GHIDRA_INT(orderList)), bVar2 != 0)) { *GHIDRA_CAST((iVar4 + GHIDRA_INT(local_84))) = local_74.x; orderList = g_characterPortraitOrder; orderList = (this->_portraitPositions)._begin; *GHIDRA_CAST((iVar4 + 4 + GHIDRA_INT(g_characterPortraitOrder))) = *GHIDRA_CAST((GHIDRA_CAST(orderList) + iVar6 * 8)); *GHIDRA_CAST((iVar4 + 8 + GHIDRA_INT(orderList))) = *GHIDRA_CAST((GHIDRA_CAST(orderList) + iVar6 * 8 + 4)); iVar5 = iVar6 * 4; iVar6 = iVar6 + 1; *GHIDRA_CAST((iVar4 + 0xc + GHIDRA_INT(g_characterPortraitOrder))) = *GHIDRA_CAST((GHIDRA_INT((this->_portraitScales)._begin) + iVar5)); iVar4 = iVar4 + 0x10; local_84 = g_characterPortraitOrder; } local_74.x = (float)(GHIDRA_INT(local_74.x) + 1); local_7c.x = (float)(GHIDRA_INT(local_7c.x) + 0x18); local_80 = (void *)(GHIDRA_INT(local_80) + -1); orderList = local_84; } while (local_80 != (void *)0x0); iVar4 = this->_numCharacters; local_80 = (void *)0x0; if (iVar6 < iVar4) { local_80 = (void *)(0x12 - iVar6); iVar5 = iVar6 << 4; while( true ) { *GHIDRA_CAST((iVar5 + GHIDRA_INT(orderList))) = GHIDRA_INT(local_80) + iVar6; orderList = g_characterPortraitOrder; orderList = (this->_portraitPositions)._begin; *GHIDRA_CAST((iVar5 + 4 + GHIDRA_INT(g_characterPortraitOrder))) = *GHIDRA_CAST((GHIDRA_CAST(orderList) + iVar6 * 8)); *GHIDRA_CAST((iVar5 + 8 + GHIDRA_INT(orderList))) = *GHIDRA_CAST((GHIDRA_CAST(orderList) + iVar6 * 8 + 4)); iVar4 = iVar6 * 4; iVar6 = iVar6 + 1; *GHIDRA_CAST((iVar5 + 0xc + GHIDRA_INT(g_characterPortraitOrder))) = *GHIDRA_CAST((GHIDRA_INT((this->_portraitScales)._begin) + iVar4)); iVar4 = this->_numCharacters; if (iVar4 <= iVar6) break; orderList = g_characterPortraitOrder; iVar5 = iVar5 + 0x10; } } portrait_list_sort(0,iVar4 + -1); local_84 = (void *)0x0; if (0 < this->_numCharacters) { iVar4 = 0; do { if (*GHIDRA_CAST((iVar4 + GHIDRA_INT(g_characterPortraitOrder))) < 0x12) { iVar6 = *GHIDRA_CAST((iVar4 + GHIDRA_INT(g_characterPortraitOrder))) + this->_characterMenuShown * 0x12; local_80 = (void *)(iVar6 * 3); bVar2 = (GHIDRA_CAST((&this->_CharacterPortraitsSprite)))->ANM2::SetAnimation((&PTR_s_00_Random_00b24140)[iVar6 * 6],1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_CharacterPortraitsSprite)._animState)))->AnimationState::Rewind(); (this->_CharacterPortraitsSprite)._animState._isPlaying = 1; } iVar6 = *GHIDRA_CAST((&DAT_00b24144 + GHIDRA_INT(local_80) * 8)); if ((iVar6 < 0) || (local_80 = (g_manager->_entityConfig)._players._begin, (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(local_80)) / 0x148 <= iVar6)) { orderList = (void *)0x0; } else { orderList = (void *)(iVar6 * 0x148 + GHIDRA_INT(local_80)); } uVar1 = *GHIDRA_CAST((GHIDRA_CAST(orderList) + 0xe8)); if ((GHIDRA_INT(uVar1) < 0) || (((uVar1 < 0x282 && (((uVar1 == 0 || ((g_manager->_persistentGameData)._achievements[uVar1] != 0)) || (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) == 2 && (g_game != GHIDRA_CAST(0x0))) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))))) && (((iVar6 != 9 && (iVar6 != 0x1e)) || ((g_manager->_persistentGameData)._eventCounters[0x15] != 0)))))) { iVar6 = 0; } else { iVar6 = 1; } if ((this->_CharacterPortraitsSprite)._animState._animData != (void *)0x0) { (GHIDRA_CAST((&(this->_CharacterPortraitsSprite)._animState)))->AnimationState::SetFrameFloat((float)iVar6); } } characterIndex = *GHIDRA_CAST((iVar4 + GHIDRA_INT(g_characterPortraitOrder))); fVar7 = *GHIDRA_CAST((iVar4 + 0xc + GHIDRA_INT(g_characterPortraitOrder))); if (GHIDRA_INT(characterIndex) < 0x12) { portraitColor = &(this->_CharacterPortraitsSprite)._color; uStack_58 = 0x3f800000; fVar8 = scale->y; (this->_CharacterPortraitsSprite)._scale.x = fVar7 * scale->x; (this->_CharacterPortraitsSprite)._scale.y = fVar7 * fVar8; local_64 = *GHIDRA_CAST((iVar4 + 0xc + GHIDRA_INT(g_characterPortraitOrder))); fVar7 = 1.0 - local_64; offsetR = (fVar7 * 231.0) / 255.0; offsetB = (fVar7 * 220.0) / 255.0; offsetG = (fVar7 * 221.0) / 255.0; if (portraitColor != GHIDRA_CAST(&local_64)) { (this->_CharacterPortraitsSprite)._color._colorize[0] = 0.0; (this->_CharacterPortraitsSprite)._color._colorize[1] = 0.0; (this->_CharacterPortraitsSprite)._color._colorize[2] = 0.0; (this->_CharacterPortraitsSprite)._color._colorize[3] = 0.0; portraitColor->_tint[0] = local_64; (this->_CharacterPortraitsSprite)._color._tint[1] = local_64; (this->_CharacterPortraitsSprite)._color._tint[2] = local_64; (this->_CharacterPortraitsSprite)._color._tint[3] = 1.0; *GHIDRA_CAST((this->_CharacterPortraitsSprite)._color._offset) = CONCAT44(offsetG,offsetR) ; (this->_CharacterPortraitsSprite)._color._offset[2] = offsetB; } local_7c.x = scale->x * *GHIDRA_CAST((iVar4 + 4 + GHIDRA_INT(g_characterPortraitOrder))) + position->x + offset->x; local_7c.y = *GHIDRA_CAST((iVar4 + 8 + GHIDRA_INT(g_characterPortraitOrder))) * scale->y + offset->y + position->y; fStack_60 = local_64; fStack_5c = local_64; if ((this->_CharacterPortraitsSprite)._loaded != 0) { if ((this->_CharacterPortraitsSprite)._overlayRenderFirst == 0) { AnimationState::Render (&(this->_CharacterPortraitsSprite)._animState,&local_7c,&g_vectorZero, &g_vectorZero); AnimationState::Render (&(this->_CharacterPortraitsSprite)._overlayAnimState,&local_7c,&g_vectorZero, &g_vectorZero); } else { AnimationState::Render (&(this->_CharacterPortraitsSprite)._overlayAnimState,&local_7c,&g_vectorZero, &g_vectorZero); AnimationState::Render (&(this->_CharacterPortraitsSprite)._animState,&local_7c,&g_vectorZero, &g_vectorZero); } } } else { fVar8 = 1.0 - fVar7; local_74.x = scale->x * fVar7; customPortraitColor._tint[3] = 1.0; local_74.y = scale->y * fVar7; customPortraitColor._colorize[0] = 0.0; customPortraitColor._colorize[1] = 0.0; customPortraitColor._colorize[2] = 0.0; customPortraitColor._colorize[3] = 0.0; customPortraitColor._offset[0] = (fVar8 * 231.0) / 255.0; customPortraitColor._offset[1] = (fVar8 * 221.0) / 255.0; customPortraitColor._offset[2] = (fVar8 * 220.0) / 255.0; customPortraitPos.x = position->x + offset->x + scale->x * *GHIDRA_CAST((iVar4 + 4 + GHIDRA_INT(g_characterPortraitOrder))); customPortraitPos.y = scale->y * *GHIDRA_CAST((iVar4 + 8 + GHIDRA_INT(g_characterPortraitOrder))) + offset->y + position->y; customPortraitColor._tint[0] = fVar7; customPortraitColor._tint[1] = fVar7; customPortraitColor._tint[2] = fVar7; ModManager::RenderCustomCharacterPortraits (characterIndex, *GHIDRA_CAST((GHIDRA_INT(g_modCharacters) + GHIDRA_INT(characterIndex) * 8 + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90))), &customPortraitPos,&customPortraitColor,&local_74); } local_84 = (void *)(GHIDRA_INT(local_84) + 1); iVar4 = iVar4 + 0x10; } while (GHIDRA_INT(local_84) < this->_numCharacters); } return; } // 0094c4e0 void Menu_Character::seed_add_char(uint8_t ch) { std_string *seedText; uint8_t upperChar; upperChar = ch - 0x20; if (0x19 < (uint8_t)(ch + 0x9f)) { upperChar = ch; } if ((('@' < (char)upperChar) && ((char)upperChar < '[')) || (((uint8_t)(upperChar - 0x30) < 10 && (upperChar != 0x35)))) { seedText = &this->_seedText; if ((this->_seedText)._size == 4) { (GHIDRA_CAST((seedText->_buf)))->msvc::string::push_back(0x20); } if (upperChar != 0x49) { if (upperChar == 0x4f) { (GHIDRA_CAST((seedText->_buf)))->msvc::string::push_back(0x30); return; } if (upperChar == 0x55) { (GHIDRA_CAST((seedText->_buf)))->msvc::string::push_back(0x56); return; } (GHIDRA_CAST((seedText->_buf)))->msvc::string::push_back(upperChar); return; } (GHIDRA_CAST((seedText->_buf)))->msvc::string::push_back(0x31); } return; } // 0094c580 void Menu_Character::handle_input() { int *piVar1; std_string seed; KColor fadeColor; char cVar2; uint8_t bVar3; char isSeedEffectsPressed; char isPageSwapPressed; char isSeedEffectsPressed; char isKeyPressed; int wrappedEntry; MenuManager *menuManager; int extraout_ECX; int extraout_ECX_00; int extraout_ECX_01; int unused; std_string *seedBuf; void *ptr; char *extraout_EDX; char *pcVar5; Menu_Character_Entry *entry; Manager *manager; int characterId; char *pcVar6; char *pcVar7; float viewOffsetX; char acStackY_138 [128]; uint32_t uVar8; uint32_t uVar9; uint32_t uVar10; uint32_t uVar11; code *pcVar12; char **ppcVar13; uint32_t uVar14; int iVar15; int local_34; char *local_30; void *emptySeed [4]; uint32_t emptySeedSize; uint32_t emptySeedCapacity; uint32_t local_14; void *local_10; uint8_t *puStack_c; void *local_8; local_8 = (void *)0xffffffff; puStack_c = &LAB_00afd29d; local_10 = ExceptionList; local_14 = __security_cookie ^ GHIDRA_UINT((emptySeed + 10)); ExceptionList = &local_10; if (this->Status == 0) { ppcVar13 = &local_30; iVar15 = 0; uVar14 = 0; pcVar12 = FUN_00a209e0; uVar11 = 0xffffffff; local_30 = GHIDRA_CAST(0xe); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); menuManager = g_menuManager; manager = g_manager; if (cVar2 == '\0') { cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); manager = g_manager; if (cVar2 == '\0') { cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); manager = g_manager; if (cVar2 == '\0') { cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if (cVar2 == '\0') { local_30 = GHIDRA_CAST(0x14); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if (((cVar2 != '\0') && (this->IsInputPossible != 0)) && (iVar15 = this->CooldownWhenHoldDirection, this->CooldownWhenHoldDirection = iVar15 + -1, iVar15 < 1)) goto LAB_0094c9ac; cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); iVar15 = extraout_ECX; if (cVar2 == '\0') { local_30 = GHIDRA_CAST(0x15); cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if ((cVar2 != '\0') && (this->IsInputPossible != 0)) { iVar15 = this->CooldownWhenHoldDirection; this->CooldownWhenHoldDirection = iVar15 + -1; if (iVar15 < 1) goto LAB_0094c92d; } cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if (cVar2 != '\0') { FUN_00929660(); FUN_0098aec0(); } goto LAB_0094ca89; } LAB_0094c92d: characterId = this->SelectedCharacterID + 1; this->CooldownWhenHoldDirection = 10; piVar1 = &this->_numCharacters_MINUS_SelectedEntry; *piVar1 = *piVar1 + -1; this->SelectedCharacterID = characterId; if (*piVar1 < 0) { this->_numCharacters_MINUS_SelectedEntry = this->_numCharacters + -1; } if (characterId < 0x12) { entry = GHIDRA_CAST((&PTR_s_00_Random_00b24140 + characterId * 6)); local_34 = characterId; do { characterId = local_34; if (((*GHIDRA_CAST((GHIDRA_CAST(&(entry[2])) + 0x2))) == '\0') || (bVar3 = (GHIDRA_CAST((entry)))->Menu_Character_Entry::IsCharacterAvailable(iVar15), bVar3 != 0)) break; entry = entry + 8; characterId = local_34 + 1; this->SelectedCharacterID = characterId; iVar15 = extraout_ECX_00; local_34 = characterId; } while (characterId < 0x12); } if ((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12 <= characterId) { this->SelectedCharacterID = 0; } local_34 = 0xc3; } else { LAB_0094c9ac: piVar1 = &this->SelectedCharacterID; *piVar1 = *piVar1 + -1; characterId = this->SelectedCharacterID; this->CooldownWhenHoldDirection = 10; iVar15 = this->_numCharacters_MINUS_SelectedEntry + 1; this->_numCharacters_MINUS_SelectedEntry = iVar15; if (*piVar1 < 0) { characterId = (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x11; this->SelectedCharacterID = characterId; } wrappedEntry = iVar15; if (this->_numCharacters <= iVar15) { wrappedEntry = 0; } this->_numCharacters_MINUS_SelectedEntry = wrappedEntry; if (characterId < 0x12) { entry = GHIDRA_CAST((&PTR_s_00_Random_00b24140 + characterId * 6)); do { if (((*GHIDRA_CAST((GHIDRA_CAST(&(entry[2])) + 0x2))) == '\0') || (bVar3 = (GHIDRA_CAST((entry)))->Menu_Character_Entry::IsCharacterAvailable(iVar15), bVar3 != 0)) break; characterId = characterId + -1; entry = entry + -8; this->SelectedCharacterID = characterId; iVar15 = extraout_ECX_01; } while (characterId < 0x12); } local_34 = 0xc2; } manager = g_manager; seed_fart_sound_override(&local_34); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_34,1.0,0,0,1.0,0.0); if (this->SelectedCharacterID < 0x12) { (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::Play((&PTR_s_00_Random_00b24140) [(this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 6],0); } goto LAB_0094ca89; } switch(this->Difficulty) { case 0: goto switchD_0094c6c7_caseD_2; case 1: goto switchD_0094c6c7_caseD_3; case 2: if (((g_manager->_persistentGameData)._achievements[0x155] == 0) && (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) != 2 || (g_game == GHIDRA_CAST(0x0))) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) { this->Difficulty = 0; } else { this->Difficulty = 3; } break; case 3: goto switchD_0094c6c7_caseD_1; } } else { switch(this->Difficulty) { case 0: if (((g_manager->_persistentGameData)._achievements[0x155] == 0) && (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) != 2 || (g_game == GHIDRA_CAST(0x0))) || (((g_game->_dailyChallenge)._id == 0 && (g_game->_isDebug == 0)))))) { this->Difficulty = 2; } else { this->Difficulty = 3; } break; case 1: switchD_0094c6c7_caseD_1: manager = g_manager; this->Difficulty = 0; break; case 2: switchD_0094c6c7_caseD_2: manager = g_manager; this->Difficulty = 1; break; case 3: switchD_0094c6c7_caseD_3: manager = g_manager; this->Difficulty = 2; } } local_34 = 0x11a; seed_fart_sound_override(&local_34); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_34,1.0,2,0,1.0,0.0); manager = g_manager; (g_manager->_persistentGameData)._lastDifficulty = this->Difficulty; *GHIDRA_CAST(&manager->_persistentGameData) = 1; } else if (this->SelectedCharacterID == 0) { this->Status = 2; menuManager->_viewPositionSet[5].x = 0.0; menuManager->_state = 1; SelectRandomChar(this); input_poll_active_device(); } else if (this->IsCharacterUnlocked == 0) { local_34 = 0xbb; seed_fart_sound_override(&local_34); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_34,1.0,2,0,1.0,0.0); } else { g_manager->_selectedDifficulty = this->Difficulty; (GHIDRA_CAST((GHIDRA_CAST((emptySeed + -0xf)))))->KColor::SetFromARGB(0xff000000); fadeColor._green = (float)pcVar12; fadeColor._red = (float)uVar11; fadeColor._blue = (float)ppcVar13; fadeColor._alpha = (float)uVar14; fadeColor._unk = iVar15; MenuManager::start_game(fadeColor); this->Status = 3; } } LAB_0094ca89: cVar2 = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); isPageSwapPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if (this->Status != 1) goto LAB_0094ceb0; local_30 = GHIDRA_CAST(0xe); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if (isSeedEffectsPressed == '\0') { local_30 = GHIDRA_CAST(0xf); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); manager = g_manager; if (isSeedEffectsPressed == '\0') { local_30 = GHIDRA_CAST(0x155); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(); if (isSeedEffectsPressed == '\0') { local_30 = GHIDRA_CAST(0x159); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_30,0); if (isSeedEffectsPressed != '\0') goto LAB_0094cc67; LAB_0094cc94: local_30 = GHIDRA_CAST(0x157); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_30,0); if (isSeedEffectsPressed == '\0') { local_30 = GHIDRA_CAST(0x15b); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a20730,&local_30,0); if (isSeedEffectsPressed != '\0') goto LAB_0094cce6; } else { LAB_0094cce6: local_30 = GHIDRA_CAST(0x56); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_30,0); if (isSeedEffectsPressed != '\0') goto LAB_0094cdef; } if ((this->_seedText)._size < 9) { isSeedEffectsPressed = 'A'; pcVar6 = GHIDRA_CAST(0x41); local_34 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_34)) + 0x1))),0x41); do { local_30 = pcVar6; isKeyPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_30,0); if (isKeyPressed != '\0') { seed_add_char(this,(uint8_t)local_34); } isSeedEffectsPressed = isSeedEffectsPressed + '\x01'; pcVar6 = pcVar6 + 1; local_34 = CONCAT31((*GHIDRA_CAST((GHIDRA_CAST(&(local_34)) + 0x1))),isSeedEffectsPressed); } while (isSeedEffectsPressed < '['); pcVar6 = GHIDRA_CAST(0x30); do { local_30 = pcVar6; isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_30,0); if (isSeedEffectsPressed != '\0') { seed_add_char(this,(uint8_t)pcVar6); } pcVar6 = pcVar6 + 1; } while (GHIDRA_INT(pcVar6) < 0x3a); pcVar6 = GHIDRA_CAST(0x140); do { local_30 = pcVar6; isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_30,0); if (isSeedEffectsPressed != '\0') { seed_add_char(this,(char)pcVar6 - 0x10); } pcVar6 = pcVar6 + 1; } while (GHIDRA_INT(pcVar6) < 0x14a); } } else { LAB_0094cc67: local_30 = GHIDRA_CAST(0x56); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0xffffffff,FUN_00a207d0,&local_30,0); if (isSeedEffectsPressed == '\0') goto LAB_0094cc94; LAB_0094cdef: if (_glfw == 0) { _glfwInputError(0x10001); } else { local_30 = GHIDRA_CAST((*DAT_00c736d0)()); if (local_30 != GHIDRA_CAST(0x0)) { pcVar6 = local_30 + 1; pcVar7 = local_30; do { isSeedEffectsPressed = *pcVar7; pcVar7 = pcVar7 + 1; } while (isSeedEffectsPressed != '\0'); if (pcVar7 != pcVar6) { FUN_0040c2f0(); uVar10 = 0; pcVar5 = extraout_EDX; do { if (8 < (this->_seedText)._size) break; seed_add_char(this,pcVar5[uVar10]); uVar10 = uVar10 + 1; pcVar5 = local_30; } while (uVar10 < GHIDRA_UINT((GHIDRA_INT(pcVar7) - GHIDRA_INT(pcVar6)))); } } } } local_30 = GHIDRA_CAST(0x103); isSeedEffectsPressed = (**(code **)(PTR_vftable_00c57b18 + 0x74))(0,FUN_00a207d0,&local_30,0); if ((isSeedEffectsPressed != '\0') && ((this->_seedText)._size != 0)) { FUN_00684ee0(); } goto LAB_0094ceb0; } local_34 = 8; seed_fart_sound_override(&local_34); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_34,1.0,0,0,1.0,0.0); menuManager = g_menuManager; seedBuf = &this->_seedText; if (0xf < (this->_seedText)._capacity) { seedBuf = *GHIDRA_CAST((this->_seedText)._buf); } (this->_seedText)._size = 0; seedBuf->_buf[0] = '\0'; *GHIDRA_CAST(&menuManager->_seedsObject) = 0; } else { submit_seed(this); menuManager = g_menuManager; } this->Status = 0; menuManager->_viewPositionSet[5].x = 0.0; menuManager->_state = 1; g_manager->_isHotkeysEnabled = 1; LAB_0094ceb0: if (this->Status == 0) { if ((isSeedEffectsPressed != '\0') && (iVar15 = Seeds::CountUnlockedSeedEffects(), 0 < iVar15)) { MenuManager::push_menu(6,unused); } manager = g_manager; if (cVar2 != '\0') { this->Status = 1; local_34 = 8; seed_fart_sound_override(&local_34); uVar10 = 0; uVar9 = 0x3f800000; uVar8 = 0; uVar14 = 0; uVar11 = 0x3f800000; iVar15 = local_34; (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_34,1.0,0,0,1.0,0.0); menuManager = g_menuManager; if (this->Status == 1) { viewOffsetX = -480.0; } else { viewOffsetX = 0.0; } g_menuManager->_viewPositionSet[5].x = viewOffsetX; manager = g_manager; seedBuf = &this->_seedText; menuManager->_state = 1; manager->_isHotkeysEnabled = 0; if (0xf < (this->_seedText)._capacity) { seedBuf = *GHIDRA_CAST((this->_seedText)._buf); } (this->_seedText)._size = 0; seedBuf->_buf[0] = '\0'; emptySeedCapacity = 0xf; emptySeedSize = 0; emptySeed[0] = (void *)0x0; local_8 = (void *)0x0; (GHIDRA_CAST((acStackY_138 + 0x90)))->msvc::string::string(emptySeed); seed._buf[4] = (char)uVar11; seed._buf[5] = (char)(GHIDRA_UINT(uVar11) >> 8); seed._buf[6] = (char)(GHIDRA_UINT(uVar11) >> 0x10); seed._buf[7] = (char)(GHIDRA_UINT(uVar11) >> 0x18); seed._buf[0] = (char)iVar15; seed._buf[1] = (char)(GHIDRA_UINT(iVar15) >> 8); seed._buf[2] = (char)(GHIDRA_UINT(iVar15) >> 0x10); seed._buf[3] = (char)(GHIDRA_UINT(iVar15) >> 0x18); seed._buf[8] = (char)uVar14; seed._buf[9] = (char)(GHIDRA_UINT(uVar14) >> 8); seed._buf[10] = (char)(GHIDRA_UINT(uVar14) >> 0x10); seed._buf[0xb] = (char)(GHIDRA_UINT(uVar14) >> 0x18); seed._buf[0xc] = (char)uVar8; seed._buf[0xd] = (char)(GHIDRA_UINT(uVar8) >> 8); seed._buf[0xe] = (char)(GHIDRA_UINT(uVar8) >> 0x10); seed._buf[0xf] = (char)(GHIDRA_UINT(uVar8) >> 0x18); seed._size = uVar9; seed._capacity = uVar10; (GHIDRA_CAST((&menuManager->_seedsObject)))->Seeds::SetStartSeed(seed); local_8 = (void *)0xffffffff; if (0xf < emptySeedCapacity) { uVar10 = emptySeedCapacity + 1; ptr = emptySeed[0]; if (0xfff < uVar10) { ptr = *(void **)(GHIDRA_INT(emptySeed[0]) + -4); uVar10 = emptySeedCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(emptySeed[0]) + (-4 - GHIDRA_INT(ptr))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(ptr,uVar10); } } if ((isPageSwapPressed != '\0') && (0.0 < (this->_PageSwapWidgetSprite)._color._tint[3])) { DoPageSwap(this); } } ExceptionList = local_10; return; } // 0094d040 void Menu_Character::submit_seed() { uint8_t bVar1; int iVar2; std_string seedString; std_string seedString_00; std_string seed; int seedEffect; uint8_t *localizedText; void *ptr; std_string *seedTextPtr; uint8_t *strCursor; uint32_t size; int iVar3; uint32_t *seedTitleText; void *specialSeedEntry; uint32_t uVar4; char acStackY_d8 [128]; uint32_t in_stack_ffffffac; Menu_Character *pMVar5; uint32_t in_stack_ffffffb0; uint32_t uVar6; uint32_t in_stack_ffffffb4; uint32_t uVar7; uint32_t in_stack_ffffffb8; uint32_t uVar8; uint32_t in_stack_ffffffbc; uint32_t uVar9; uint32_t in_stack_ffffffc0; Menu_Character *local_28; uint8_t local_21; std_string tmpText; uint32_t local_8; Manager *manager; MenuManager *menuManager; local_8 = __security_cookie ^ GHIDRA_UINT(((&tmpText)[1]._buf + 4)); local_28 = this; (GHIDRA_CAST((acStackY_d8 + 0x84)))->msvc::string::string(&this->_seedText); seedString._buf[4] = (char)in_stack_ffffffb0; seedString._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 8); seedString._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x10); seedString._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x18); seedString._buf[0] = (char)in_stack_ffffffac; seedString._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 8); seedString._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x10); seedString._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x18); seedString._buf[8] = (char)in_stack_ffffffb4; seedString._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 8); seedString._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x10); seedString._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x18); seedString._buf[0xc] = (char)in_stack_ffffffb8; seedString._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 8); seedString._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x10); seedString._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x18); seedString._size = in_stack_ffffffbc; seedString._capacity = in_stack_ffffffc0; seedEffect = Seeds::GetSeedEffect(seedString); seedTextPtr = &this->_seedText; if (seedEffect == 0) { uVar4 = Seeds::String2Seed(seedTextPtr); manager = g_manager; if (uVar4 != 0) { local_28 = GHIDRA_CAST(0x8); seed_fart_sound_override(GHIDRA_CAST(&local_28)); uVar4 = 0; uVar9 = 0x3f800000; uVar8 = 0; uVar7 = 0; uVar6 = 0x3f800000; pMVar5 = local_28; (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,0,0,1.0,0.0); menuManager = g_menuManager; (GHIDRA_CAST((acStackY_d8 + 0x84)))->msvc::string::string(seedTextPtr); seed._buf[4] = (char)uVar6; seed._buf[5] = (char)(GHIDRA_UINT(uVar6) >> 8); seed._buf[6] = (char)(GHIDRA_UINT(uVar6) >> 0x10); seed._buf[7] = (char)(GHIDRA_UINT(uVar6) >> 0x18); (*GHIDRA_CAST((GHIDRA_CAST(&(seed._buf)) + 0x0))) = pMVar5; seed._buf[8] = (char)uVar7; seed._buf[9] = (char)(GHIDRA_UINT(uVar7) >> 8); seed._buf[10] = (char)(GHIDRA_UINT(uVar7) >> 0x10); seed._buf[0xb] = (char)(GHIDRA_UINT(uVar7) >> 0x18); seed._buf[0xc] = (char)uVar8; seed._buf[0xd] = (char)(GHIDRA_UINT(uVar8) >> 8); seed._buf[0xe] = (char)(GHIDRA_UINT(uVar8) >> 0x10); seed._buf[0xf] = (char)(GHIDRA_UINT(uVar8) >> 0x18); seed._size = uVar9; seed._capacity = uVar4; (GHIDRA_CAST((&menuManager->_seedsObject)))->Seeds::SetStartSeed(seed); *GHIDRA_CAST(&g_menuManager->_seedsObject) = 1; return; } local_28 = GHIDRA_CAST(0xbb); seed_fart_sound_override(GHIDRA_CAST(&local_28)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_28),1.0,2,0,1.0,0.0); if (0xf < (this->_seedText)._capacity) { seedTextPtr = *GHIDRA_CAST(seedTextPtr->_buf); } (this->_seedText)._size = 0; seedTextPtr->_buf[0] = '\0'; *GHIDRA_CAST(&g_menuManager->_seedsObject) = 0; return; } (GHIDRA_CAST((acStackY_d8 + 0x84)))->msvc::string::string(seedTextPtr); seedString_00._buf[4] = (char)in_stack_ffffffb0; seedString_00._buf[5] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 8); seedString_00._buf[6] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x10); seedString_00._buf[7] = (char)(GHIDRA_UINT(in_stack_ffffffb0) >> 0x18); seedString_00._buf[0] = (char)in_stack_ffffffac; seedString_00._buf[1] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 8); seedString_00._buf[2] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x10); seedString_00._buf[3] = (char)(GHIDRA_UINT(in_stack_ffffffac) >> 0x18); seedString_00._buf[8] = (char)in_stack_ffffffb4; seedString_00._buf[9] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 8); seedString_00._buf[10] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x10); seedString_00._buf[0xb] = (char)(GHIDRA_UINT(in_stack_ffffffb4) >> 0x18); seedString_00._buf[0xc] = (char)in_stack_ffffffb8; seedString_00._buf[0xd] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 8); seedString_00._buf[0xe] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x10); seedString_00._buf[0xf] = (char)(GHIDRA_UINT(in_stack_ffffffb8) >> 0x18); seedString_00._size = in_stack_ffffffbc; seedString_00._capacity = in_stack_ffffffc0; seedEffect = Seeds::GetSeedEffect(seedString_00); manager = g_manager; local_21 = *GHIDRA_CAST((GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + seedEffect + 0x74)); if ((*GHIDRA_CAST((GHIDRA_CAST(&((g_manager->_persistentGameData))) + 0x1))) == '\0') { *GHIDRA_CAST((GHIDRA_INT((g_manager->_persistentGameData)._cutsceneCounters) + seedEffect + 0x74)) = 1 ; (*GHIDRA_CAST((GHIDRA_CAST(&((manager->_persistentGameData))) + 0xf14))) = 0; *GHIDRA_CAST(&manager->_persistentGameData) = 1; KAGE_LogMessage(1,GHIDRA_CAST("Seed %d added to SaveState\n")); } (GHIDRA_CAST((&g_manager->_persistentGameData)))->PersistentGameData::Save(); (GHIDRA_CAST((&g_menuManager->_seedsObject)))->Seeds::RemoveBlockingSeedEffects(seedEffect); (GHIDRA_CAST((&g_menuManager->_seedsObject)))->Seeds::AddSeedEffect(seedEffect); (GHIDRA_CAST((&g_menuManager->_menuSpecialSeeds)))->Menu_SpecialSeeds::Reset(); manager = g_manager; if (local_21 == 0) { localizedText = &(*GHIDRA_CAST((GHIDRA_CAST((g_menuManager)) + 0x264c))); if (0xf < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_menuManager)) + 0x2660))))) { localizedText = *GHIDRA_CAST(localizedText); } if (*localizedText == 0x23) { local_21 = 0; StringTable::get_string (&g_manager->_stringTable,GHIDRA_CAST("SeedMenu"),*GHIDRA_CAST(&g_manager->_stringTable), localizedText + 1,&local_21); if (local_21 == 0) { local_21 = 0; localizedText = StringTable::get_string (&manager->_stringTable,GHIDRA_CAST("SeedMenu"),*GHIDRA_CAST(&manager->_stringTable), localizedText + 1,&local_21); } } (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) = (void *)0x0; tmpText._size = 0; tmpText._capacity = 0xf; strCursor = localizedText; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((tmpText._buf)))->msvc::string::assign(localizedText,GHIDRA_INT(strCursor) - GHIDRA_INT((localizedText + 1))); pMVar5 = local_28; seedTitleText = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_28)) + 0xd84)))); if (GHIDRA_CAST(seedTitleText) != &tmpText) { uVar4 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_28)) + 0xd98)))); if (0xf < uVar4) { specialSeedEntry = (void *)*seedTitleText; size = uVar4 + 1; ptr = specialSeedEntry; if (0xfff < size) { ptr = *(void **)(GHIDRA_CAST(specialSeedEntry) + -4); size = uVar4 + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(specialSeedEntry) + (-4 - GHIDRA_INT(ptr))))) goto LAB_0094d3a4; } operator_delete(ptr,size); } *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xd94)))) = 0; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xd98)))) = 0xf; goto LAB_0094d2b9; } LAB_0094d2cc: if (0xf < tmpText._capacity) { uVar4 = tmpText._capacity + 1; specialSeedEntry = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)tmpText._buf)) + 0x0))); if (0xfff < uVar4) { specialSeedEntry = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) + -4); uVar4 = tmpText._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) + (-4 - GHIDRA_INT(specialSeedEntry))))) goto LAB_0094d3a4; } operator_delete(specialSeedEntry,uVar4); } } else { localizedText = &(*GHIDRA_CAST((GHIDRA_CAST((g_menuManager)) + 0x2664))); if (0xf < *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_menuManager)) + 0x2678))))) { localizedText = *GHIDRA_CAST(localizedText); } if (*localizedText == 0x23) { local_21 = 0; StringTable::get_string (&g_manager->_stringTable,GHIDRA_CAST("SeedMenu"),*GHIDRA_CAST(&g_manager->_stringTable), localizedText + 1,&local_21); if (local_21 == 0) { local_21 = 0; localizedText = StringTable::get_string (&manager->_stringTable,GHIDRA_CAST("SeedMenu"),*GHIDRA_CAST(&manager->_stringTable), localizedText + 1,&local_21); } } (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) = (void *)0x0; tmpText._size = 0; tmpText._capacity = 0xf; strCursor = localizedText; do { bVar1 = *strCursor; strCursor = strCursor + 1; } while (bVar1 != 0); (GHIDRA_CAST((tmpText._buf)))->msvc::string::assign(localizedText,GHIDRA_INT(strCursor) - GHIDRA_INT((localizedText + 1))); seedTitleText = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_28)) + 0xd84)))); if (GHIDRA_CAST(seedTitleText) == &tmpText) goto LAB_0094d2cc; (GHIDRA_CAST((GHIDRA_CAST(seedTitleText))))->msvc::string::_Tidy_deallocate(); LAB_0094d2b9: *seedTitleText = (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))); seedTitleText[1] = (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x4))); seedTitleText[2] = (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x8))); seedTitleText[3] = (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0xc))); *GHIDRA_CAST((seedTitleText + 4)) = CONCAT44(tmpText._capacity,tmpText._size); } uVar4 = 0; specialSeedEntry = *(void **)&(*GHIDRA_CAST((GHIDRA_CAST((g_menuManager)) + 0x267c))); iVar3 = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_menuManager)) + 0x2680)))) - GHIDRA_INT(specialSeedEntry); iVar2 = iVar3 >> 0x1f; iVar3 = iVar3 / 0x28 + iVar2; if (iVar3 != iVar2) { do { if (*GHIDRA_CAST((GHIDRA_CAST(specialSeedEntry) + 0xc)) == seedEffect) { (GHIDRA_CAST((specialSeedEntry)))->SpecialSeed::get_display_name(&tmpText); goto LAB_0094d345; } uVar4 = uVar4 + 1; specialSeedEntry = (void *)(GHIDRA_INT(specialSeedEntry) + 0x28); } while (uVar4 < GHIDRA_UINT((iVar3 - iVar2))); } (*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) = (void *)0x0; tmpText._capacity = 0xf; tmpText._size = 0; LAB_0094d345: pMVar5 = local_28; if (GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((local_28)) + 0xd9c)))) == &tmpText) { if (0xf < tmpText._capacity) { uVar4 = tmpText._capacity + 1; specialSeedEntry = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)tmpText._buf)) + 0x0))); if (0xfff < uVar4) { specialSeedEntry = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) + -4); uVar4 = tmpText._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpText._buf)) + 0x0))) + (-4 - GHIDRA_INT(specialSeedEntry))))) { LAB_0094d3a4: /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(specialSeedEntry,uVar4); } } else { (GHIDRA_CAST((&(*GHIDRA_CAST((GHIDRA_CAST((local_28)) + 0xd9c))))))->msvc::string::_Tidy_deallocate(); (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xd9c))) = tmpText._buf[0]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xd9d))) = tmpText._buf[1]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xd9e))) = tmpText._buf[2]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xd9f))) = tmpText._buf[3]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda0))) = tmpText._buf[4]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda1))) = tmpText._buf[5]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda2))) = tmpText._buf[6]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda3))) = tmpText._buf[7]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda4))) = tmpText._buf[8]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda5))) = tmpText._buf[9]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda6))) = tmpText._buf[10]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda7))) = tmpText._buf[0xb]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda8))) = tmpText._buf[0xc]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xda9))) = tmpText._buf[0xd]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xdaa))) = tmpText._buf[0xe]; (*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xdab))) = tmpText._buf[0xf]; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((pMVar5)) + 0xdac)))) = CONCAT44(tmpText._capacity,tmpText._size); } pMVar5->_seedUnlockPageState = 1; seedTextPtr = &pMVar5->_seedText; pMVar5->_seedUnlockPageTimer = 0; if (0xf < (pMVar5->_seedText)._capacity) { seedTextPtr = *GHIDRA_CAST((pMVar5->_seedText)._buf); } (pMVar5->_seedText)._size = 0; seedTextPtr->_buf[0] = '\0'; *GHIDRA_CAST(&g_menuManager->_seedsObject) = 0; return; } // 0094d500 void Menu_Character::UpdateRotations() { KColor fadeColor; uint8_t bVar1; void *pvVar2; LayerState *layer; int iVar3; uint8_t *curAnimName; uint32_t uVar4; int extraout_ECX; Menu_Character_Entry *wantedAnimName; uint8_t *pbVar5; int nextCharacterId; bool isLess; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; uint8_t isMarkUnlocked; Manager *cachedManager; float local_1c; uint32_t local_18; Menu_Character_Entry *local_14; void *local_10; float cosPortraitAngle; float portraitIdx; ANM2 *bigCharSprite; Manager *manager; MenuManager *menuManager; int *randomRotationAmount; manager = g_manager; fVar9 = 0.0; cachedManager = g_manager; (this->_PageSwapWidgetSprite)._color._tint[3] = 0.0; local_18 = 0; do { iVar3 = *GHIDRA_CAST((GHIDRA_INT(&DAT_00b242f4) + local_18)); if ((iVar3 < 0) || (local_10 = (manager->_entityConfig)._players._begin, (GHIDRA_INT((manager->_entityConfig)._players._end) - GHIDRA_INT(local_10)) / 0x148 <= iVar3)) { pvVar2 = (void *)0x0; } else { pvVar2 = (void *)(iVar3 * 0x148 + GHIDRA_INT(local_10)); } uVar4 = *GHIDRA_CAST((GHIDRA_CAST(pvVar2) + 0xe8)); fVar10 = 1.0; if ((GHIDRA_INT(uVar4) < 0) || ((uVar4 < 0x282 && ((((uVar4 == 0 || ((manager->_persistentGameData)._achievements[uVar4] != 0)) || (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((manager)) + 0x8)))) == 2 && (g_game != GHIDRA_CAST(0x0))) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))) && (((iVar3 != 9 && (iVar3 != 0x1e)) || ((manager->_persistentGameData)._eventCounters[0x15] != 0)))))))) { (this->_PageSwapWidgetSprite)._color._tint[3] = 1.0; break; } local_18 = local_18 + 0x18; } while (local_18 < 0x1b0); uVar4 = 0; if (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3 != 0) { do { if (g_modCharacters[uVar4 * 2] != g_modCharacters[uVar4 * 2 + 1]) { (this->_PageSwapWidgetSprite)._color._tint[3] = 1.0; break; } uVar4 = uVar4 + 1; } while (uVar4 < GHIDRA_UINT((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3))); } iVar3 = this->SelectedCharacterID; if ((iVar3 < 0x12) && (bVar1 = Menu_Character_Entry::IsCharacterAvailable ((Menu_Character_Entry *) (&PTR_s_00_Random_00b24140 + (iVar3 + this->_characterMenuShown * 0x12) * 6 ),uVar4), bVar1 == 0)) { this->IsCharacterUnlocked = 0; pbVar5 = &DAT_00000004; bigCharSprite = &this->_BigCharPageSprite; do { layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(pbVar5); pbVar5 = pbVar5 + 1; layer->_visible = 0; } while (GHIDRA_INT(pbVar5) < 0x10); layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x10)); layer->_visible = 1; layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); layer->_visible = 1; if (((this->_BigCharPageSprite)._animState._animData != (void *)0x0) && ((3 < *GHIDRA_CAST((GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80)) || (KAGE_LogMessage(0x10,GHIDRA_CAST("LayerId out of bounds\n")), 3 < *GHIDRA_CAST((GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80)))))) { pvVar2 = (this->_BigCharPageSprite)._animState._animData; local_10 = *(void **)(GHIDRA_CAST(pvVar2) + 0x44); if ((pvVar2 == (void *)0x0) || ((GHIDRA_INT(local_10) < 0 || (*GHIDRA_CAST((GHIDRA_CAST(pvVar2) + 0x1c)) <= GHIDRA_INT(local_10))))) { KAGE_LogMessage(0x10,GHIDRA_CAST("id out of bounds\n")); } fVar9 = 1.0; LAB_0094d92f: *GHIDRA_CAST((GHIDRA_INT((this->_BigCharPageSprite)._animState._layerFrames) + GHIDRA_INT(local_10) * 4)) = 0; AnimationState::AdvanceLayerPosition (&(this->_BigCharPageSprite)._animState,GHIDRA_INT(local_10),fVar9); } } else { this->IsCharacterUnlocked = 1; if (0x11 < iVar3) goto LAB_0094d956; pbVar5 = &DAT_00000004; do { layer = (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::GetLayer(pbVar5); pbVar5 = pbVar5 + 1; layer->_visible = 1; } while (GHIDRA_INT(pbVar5) < 0x10); if (this->SelectedCharacterID < 0x12) { iVar3 = (this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 0x18; uVar4 = *GHIDRA_CAST((&DAT_00b2414c + iVar3)); if ((uVar4 == 0) || ((uVar4 != 0xfffffffe && ((GHIDRA_INT(uVar4) < 0 || ((uVar4 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar4] != 0 || (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) == 2 && (g_game != GHIDRA_CAST(0x0))) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))))))))))) { isMarkUnlocked = 1; } else { isMarkUnlocked = 0; } bigCharSprite = &this->_BigCharPageSprite; layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(&DAT_00000008); layer->_visible = isMarkUnlocked; layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(&DAT_00000007); layer->_visible = isMarkUnlocked; uVar4 = *GHIDRA_CAST((&DAT_00b24150 + iVar3)); if ((uVar4 == 0) || ((uVar4 != 0xfffffffe && ((GHIDRA_INT(uVar4) < 0 || ((uVar4 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar4] != 0 || (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) == 2 && (g_game != GHIDRA_CAST(0x0))) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))))))))))) { isMarkUnlocked = 1; } else { isMarkUnlocked = 0; } layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(&DAT_0000000d); layer->_visible = isMarkUnlocked; layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(GHIDRA_CAST(0xc)); layer->_visible = isMarkUnlocked; uVar4 = *GHIDRA_CAST((&DAT_00b24154 + iVar3)); if ((uVar4 == 0) || ((uVar4 != 0xfffffffe && ((GHIDRA_INT(uVar4) < 0 || ((uVar4 < 0x282 && (((g_manager->_persistentGameData)._achievements[uVar4] != 0 || (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) == 2 && (g_game != GHIDRA_CAST(0x0))) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))))))))))) { isMarkUnlocked = 1; } else { isMarkUnlocked = 0; } layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(&DAT_0000000f); layer->_visible = isMarkUnlocked; layer = (GHIDRA_CAST((bigCharSprite)))->ANM2::GetLayer(&DAT_0000000e); layer->_visible = isMarkUnlocked; } layer = (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x10)); layer->_visible = 0; layer = (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); layer->_visible = 1; if (((this->_BigCharPageSprite)._animState._animData != (void *)0x0) && ((3 < *GHIDRA_CAST((GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80)) || (KAGE_LogMessage(0x10,GHIDRA_CAST("LayerId out of bounds\n")), 3 < *GHIDRA_CAST((GHIDRA_INT((this->_BigCharPageSprite)._animState._animation) + 0x80)))))) { pvVar2 = (this->_BigCharPageSprite)._animState._animData; local_10 = *(void **)(GHIDRA_CAST(pvVar2) + 0x44); if ((pvVar2 == (void *)0x0) || ((GHIDRA_INT(local_10) < 0 || (*GHIDRA_CAST((GHIDRA_CAST(pvVar2) + 0x1c)) <= GHIDRA_INT(local_10))))) { KAGE_LogMessage(0x10,GHIDRA_CAST("id out of bounds\n")); } fVar9 = 0.0; goto LAB_0094d92f; } } fVar9 = 0.0; fVar10 = 1.0; cachedManager = g_manager; LAB_0094d956: local_18 = this->_numCharacters; this->IsInputPossible = 0; local_1c = 0.0; if (0 < GHIDRA_INT(local_18)) { do { portraitIdx = local_1c; fVar8 = this->_scrollSpeed; local_10 = (void *)-(((float)GHIDRA_INT(local_1c) * 6.2831855) / (float)GHIDRA_INT(local_18)); fVar7 = (360.0 / (float)GHIDRA_INT(local_18)) * (float)this->_numCharacters_MINUS_SelectedEntry; if (this->Status == 2) { fVar6 = ((float)this->_randomRotationAmount - 60.0) / -60.0; if (fVar6 <= fVar9) { fVar6 = fVar9; } if (fVar10 <= fVar6) { fVar6 = fVar10; } fVar8 = (fVar8 / 6.0 - this->_randomRotationVelocity) * fVar6 + this->_randomRotationVelocity; } local_1c = this->_horizontalScrollPosition; if (fVar7 <= local_1c) { if (local_1c <= fVar7) { if (this->Status == 2) { randomRotationAmount = &this->_randomRotationAmount; *randomRotationAmount = *randomRotationAmount + -1; if (*randomRotationAmount < 0) { fadeColor._alpha = 1.0; fadeColor._red = 0.0; fadeColor._green = 0.0; fadeColor._blue = 0.0; fadeColor._unk = 0; MenuManager::start_game(fadeColor); menuManager = g_menuManager; this->Status = 3; menuManager->_viewPositionSet[5].x = 0.0; menuManager->_state = 1; } else { iVar3 = this->_numCharacters_MINUS_SelectedEntry + -1; nextCharacterId = this->SelectedCharacterID + 1; this->_numCharacters_MINUS_SelectedEntry = iVar3; this->SelectedCharacterID = nextCharacterId; if (iVar3 < 0) { this->_numCharacters_MINUS_SelectedEntry = local_18 + -1; } local_18 = nextCharacterId; if (nextCharacterId < 0x12) { local_14 = GHIDRA_CAST((&PTR_s_00_Random_00b24140 + nextCharacterId * 6)) ; iVar3 = 2; do { if (((*GHIDRA_CAST((GHIDRA_CAST(&(local_14[2])) + 0x2))) == '\0') || (bVar1 = (GHIDRA_CAST((local_14)))->Menu_Character_Entry::IsCharacterAvailable(iVar3), bVar1 != 0 )) break; local_18 = local_18 + 1; local_14 = local_14 + 8; this->SelectedCharacterID = local_18; iVar3 = extraout_ECX; } while (GHIDRA_INT(local_18) < 0x12); } if ((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12 <= GHIDRA_INT(local_18)) { this->SelectedCharacterID = 0; } local_14 = GHIDRA_CAST(0xc3); seed_fart_sound_override(GHIDRA_CAST(&local_14)); (GHIDRA_CAST((&cachedManager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_14),1.0,0,0,1.0,0.0); if (this->SelectedCharacterID < 0x12) { pbVar5 = (this->_BigCharPageSprite)._animState._animData; local_14 = (Menu_Character_Entry *) (&PTR_s_00_Random_00b24140) [(this->SelectedCharacterID + this->_characterMenuShown * 0x12) * 6]; if (pbVar5 != GHIDRA_CAST(0x0)) { curAnimName = pbVar5; wantedAnimName = local_14; if (0xf < *GHIDRA_CAST((pbVar5 + 0x14))) { curAnimName = *GHIDRA_CAST(pbVar5); } do { bVar1 = *curAnimName; isLess = bVar1 < *GHIDRA_CAST(wantedAnimName); if (bVar1 != *GHIDRA_CAST(wantedAnimName)) { LAB_0094dc27: uVar4 = -GHIDRA_UINT(isLess) | 1; goto LAB_0094dc2c; } if (bVar1 == 0) break; bVar1 = curAnimName[1]; isLess = bVar1 < (*GHIDRA_CAST((GHIDRA_CAST(((uint8_t)wantedAnimName)) + 0x1))); if (bVar1 != (*GHIDRA_CAST((GHIDRA_CAST((wantedAnimName)) + 0x1)))) goto LAB_0094dc27; curAnimName = curAnimName + 2; wantedAnimName = GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((wantedAnimName)) + 0x2)))); } while (bVar1 != 0); uVar4 = 0; LAB_0094dc2c: if ((uVar4 == 0) && ((pbVar5[0x34] == 0 || ((this->_BigCharPageSprite)._animState._isPlaying != 0)) )) goto LAB_0094dc62; } bVar1 = (GHIDRA_CAST((&this->_BigCharPageSprite)))->ANM2::SetAnimation(GHIDRA_CAST(local_14),1); if (bVar1 != 0) { (GHIDRA_CAST((&(this->_BigCharPageSprite)._animState)))->AnimationState::Rewind(); (this->_BigCharPageSprite)._animState._isPlaying = 1; } } } LAB_0094dc62: local_1c = this->_horizontalScrollPosition; cachedManager = g_manager; } else { this->IsInputPossible = 1; } } else { fVar7 = local_1c - fVar7; fVar9 = fVar7; if (fVar8 <= fVar7) { fVar9 = fVar8; } if (180.0 <= fVar7) { local_1c = local_1c + fVar9; this->_horizontalScrollPosition = local_1c; } else { local_1c = local_1c - fVar9; this->_horizontalScrollPosition = local_1c; } } } else { fVar7 = fVar7 - local_1c; fVar9 = fVar7; if (fVar8 <= fVar7) { fVar9 = fVar8; } if (180.0 <= fVar7) { local_1c = local_1c - fVar9; this->_horizontalScrollPosition = local_1c; } else { local_1c = fVar9 + local_1c; this->_horizontalScrollPosition = local_1c; } } if (0.0 <= local_1c) { if (360.0 < local_1c) { this->_horizontalScrollPosition = 0.0; local_1c = 0.0; } } else { this->_horizontalScrollPosition = 360.0; local_1c = 360.0; } cosPortraitAngle = cos((float)local_10); fVar9 = sin((float)local_10); local_10 = (void *)((90.0 - local_1c) * 0.017453292); local_14 = GHIDRA_CAST(cos((float)local_10)); fVar10 = sin((float)local_10); fVar7 = (float)local_14 * fVar9 + fVar10 * cosPortraitAngle; fVar8 = (fVar7 - 1.0) * -0.5; if (fVar8 <= 0.0) { fVar8 = 0.0; } if (1.0 <= fVar8) { fVar8 = 1.0; } fVar6 = (this->_characterWheelDepth - 1.0) * fVar8 + 1.0; fVar8 = this->_characterWheelWidth; *GHIDRA_CAST((GHIDRA_INT((this->_portraitScales)._begin) + GHIDRA_INT(portraitIdx) * 4)) = 1.0 / fVar6; pvVar2 = (this->_portraitPositions)._begin; *GHIDRA_CAST((GHIDRA_CAST(pvVar2) + GHIDRA_INT(portraitIdx) * 8)) = ((((float)local_14 * cosPortraitAngle - fVar10 * fVar9) * 70.0) / fVar6) * fVar8 + 240.0; fVar10 = 1.0; *GHIDRA_CAST((GHIDRA_CAST(pvVar2) + GHIDRA_INT(portraitIdx) * 8 + 4)) = ((fVar7 * 70.0) / fVar6) * 0.4 + 85.0; local_1c = (float)(GHIDRA_INT(portraitIdx) + 1); local_18 = this->_numCharacters; fVar9 = 0.0; } while (GHIDRA_INT(local_1c) < GHIDRA_INT(local_18)); } if (this->SelectedCharacterID < 0x12) { this->_completionWidget = *(uint32_t *) (&DAT_00b24144 + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 0x12) + this->SelectedCharacterID) * 0x18); CompletionMarks::update_layers(); } return; } // 0094de50 void Menu_Character::SelectRandomChar() { uint8_t isAvailable; uint64_t *candidates; void *pvVar1; int extraout_ECX; int iVar2; EntityConfig_Player *playerConfig; uint32_t uVar3; uint64_t *heapBytes; uint32_t uVar4; uint8_t **menuEntry; int iVar5; int entryIndex; void *displayName [4]; uint32_t displayNameSize; uint32_t displayNameCapacity; uint32_t local_24; uint8_t *puStack_20; void *local_1c; uint8_t *puStack_18; void *local_14; int64_t allocBytes; uint64_t prevBytes; puStack_20 = GHIDRA_CAST((displayName + 0xe)); local_14 = (void *)0xffffffff; puStack_18 = &LAB_00b0b95d; local_1c = ExceptionList; local_24 = __security_cookie ^ GHIDRA_UINT((displayName + 0xb)); ExceptionList = &local_1c; uVar4 = 0; allocBytes = (uint64_t)((DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12) * 4; candidates = operator_new_tracked (-GHIDRA_UINT((GHIDRA_INT(((uint64_t)allocBytes >> 0x20)) != 0)) | GHIDRA_UINT(allocBytes)); iVar5 = 1; *candidates = 0xffffffffffffffff; candidates[1] = 0xffffffffffffffff; candidates[2] = 0xffffffffffffffff; candidates[3] = 0xffffffffffffffff; candidates[4] = 0xffffffffffffffff; candidates[5] = 0xffffffffffffffff; candidates[6] = 0xffffffffffffffff; candidates[7] = 0xffffffffffffffff; candidates[8] = 0xffffffffffffffff; do { iVar2 = *GHIDRA_CAST((&DAT_00b24144 + (iVar5 + this->_characterMenuShown * 0x12) * 0x18)); if ((iVar2 < 0) || (pvVar1 = (g_manager->_entityConfig)._players._begin, (GHIDRA_INT((g_manager->_entityConfig)._players._end) - GHIDRA_INT(pvVar1)) / 0x148 <= iVar2)) { pvVar1 = (void *)0x0; } else { pvVar1 = (void *)(iVar2 * 0x148 + GHIDRA_INT(pvVar1)); } uVar3 = *GHIDRA_CAST((GHIDRA_CAST(pvVar1) + 0xe8)); if ((GHIDRA_INT(uVar3) < 0) || (((uVar3 < 0x282 && (((uVar3 == 0 || ((g_manager->_persistentGameData)._achievements[uVar3] != 0)) || (((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((g_manager)) + 0x8)))) == 2 && (g_game != GHIDRA_CAST(0x0))) && (((g_game->_dailyChallenge)._id != 0 || (g_game->_isDebug != 0)))))))) && (((iVar2 != 9 && (iVar2 != 0x1e)) || ((g_manager->_persistentGameData)._eventCounters[0x15] != 0)))))) { *GHIDRA_CAST((GHIDRA_CAST(candidates) + uVar4 * 4)) = iVar5; uVar4 = uVar4 + 1; } iVar5 = iVar5 + 1; } while (iVar5 < 0x12); iVar5 = 0x12; if (0x12 < (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12) { do { *GHIDRA_CAST((GHIDRA_CAST(candidates) + uVar4 * 4)) = iVar5; iVar5 = iVar5 + 1; uVar4 = uVar4 + 1; } while (iVar5 < (DAT_00c79888 - GHIDRA_INT(g_modCharacters) >> 3) + 0x12); } if (uVar4 == 0) { uVar3 = 0; } else { uVar3 = Random(); uVar3 = uVar3 % uVar4; } entryIndex = 0; iVar5 = *GHIDRA_CAST((GHIDRA_CAST(candidates) + uVar3 * 4)); iVar2 = this->_numCharacters; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x14)))) = iVar5; this->_randomRotationAmount = iVar5 + iVar2 * 2 + iVar2; this->_randomRotationVelocity = (360.0 / (float)iVar2) / 30.0; if (0 < iVar5) { menuEntry = &PTR_s_00_Random_00b24140; do { if (0xb242ef < GHIDRA_INT(menuEntry)) break; if (((*GHIDRA_CAST((GHIDRA_CAST(((GHIDRA_CAST((GHIDRA_INT(menuEntry) + 6))))) + 0x2))) != '\0') && (isAvailable = Menu_Character_Entry::IsCharacterAvailable (GHIDRA_CAST(menuEntry),iVar2), iVar2 = extraout_ECX, isAvailable == 0)) { this->_randomRotationAmount = this->_randomRotationAmount + -1; } entryIndex = entryIndex + 1; menuEntry = GHIDRA_CAST((GHIDRA_INT(menuEntry) + 0x18)); } while (entryIndex < iVar5); } if (iVar5 < 0x12) { iVar5 = *GHIDRA_CAST((&DAT_00b24144 + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 0x12) + iVar5) * 0x18)); } else { iVar5 = *GHIDRA_CAST((GHIDRA_INT(g_modCharacters) + ((-GHIDRA_UINT((this->_characterMenuShown != 0)) & 4) - 0x90) + iVar5 * 8)); } playerConfig = (EntityConfig_Player *) (iVar5 * 0x148 + GHIDRA_INT((g_manager->_entityConfig)._players._begin)); (GHIDRA_CAST((playerConfig)))->EntityConfig_Player::GetDisplayName(GHIDRA_CAST(displayName),playerConfig); local_14 = (void *)0x0; KAGE_LogMessage(1,GHIDRA_CAST("random: %s\n")); if (0xf < displayNameCapacity) { uVar4 = displayNameCapacity + 1; pvVar1 = displayName[0]; if (0xfff < uVar4) { pvVar1 = *(void **)(GHIDRA_INT(displayName[0]) + -4); uVar4 = displayNameCapacity + 0x24; if (0x1f < GHIDRA_UINT((GHIDRA_INT(displayName[0]) + (-4 - GHIDRA_INT(pvVar1))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar1,uVar4); } displayNameSize = 0; displayNameCapacity = 0xf; displayName[0] = (void *)(GHIDRA_UINT(displayName[0]) & 0xffffff00); if (g_mainHeap == (void *)0x0) { heapBytes = &g_allocatedBytesNoHeap; } else { heapBytes = GHIDRA_CAST((GHIDRA_INT(g_mainHeap) + 0x30)); } if (candidates != GHIDRA_CAST(0x0)) { uVar4 = *GHIDRA_CAST((GHIDRA_CAST(candidates) + -4)); prevBytes = *heapBytes; *GHIDRA_CAST(heapBytes) = GHIDRA_UINT(*heapBytes) - uVar4; *GHIDRA_CAST((GHIDRA_CAST(heapBytes) + 4)) = *GHIDRA_CAST((GHIDRA_CAST(heapBytes) + 4)) - GHIDRA_UINT((GHIDRA_UINT(prevBytes) < uVar4)); free(GHIDRA_CAST((GHIDRA_INT(candidates) + -4))); } ExceptionList = local_1c; return; } // 0094e170 void Menu_Character::render_page_snapshot() { uint32_t *renderTargetEntry; uint64_t newEntry; newEntry = 0; msvc::vector::resize(&newEntry); renderTargetEntry = msvc::deque::back(); if (GHIDRA_CAST((renderTargetEntry + 1)) != GHIDRA_CAST(0x0)) { *GHIDRA_CAST((renderTargetEntry + 1)) = (uint8_t)(g_graphicsManager_flags >> 5) & 1; } *renderTargetEntry = g_graphicsManager_renderTarget; (GHIDRA_CAST((&DAT_00c798e0)))->KAGE_Graphics::SetRenderTarget((void *)this[1].Status,0); (GHIDRA_CAST((&DAT_00c798e0)))->RenderTarget::Clear(); g_graphicsManager_blendMode[0] = 0; g_graphicsManager_blendMode[1] = 6; g_graphicsManager_blendMode[2] = 7; g_graphicsManager_blendMode[3] = 1; g_graphicsManager_blendMode[4] = 1; render_wheel(this,&g_vectorZero,1); _glfw_context_reset(1); pop_render_target(); return; } // 0094e210 void Menu_Character::DoPageSwap() { uint8_t local_AL_108; uint8_t *curAnimName; uint32_t cmpResult; char *wantedAnimName; uint8_t *faceNameCursor; bool isLess; Menu_Character *local_8; uint8_t *animData; Manager *manager; this->Status = 4; animData = (this->_CharacterMenuBGSprite)._animState._animData; if (animData == GHIDRA_CAST(0x0)) { LAB_0094e273: local_8 = this; local_AL_108 = (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::SetAnimation(GHIDRA_CAST("SwapOut"),1); if (local_AL_108 != 0) { (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._animState)))->AnimationState::Rewind(); (this->_CharacterMenuBGSprite)._animState._isPlaying = 1; } } else { curAnimName = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { curAnimName = *GHIDRA_CAST(animData); } wantedAnimName = "SwapOut"; do { local_AL_108 = *curAnimName; isLess = local_AL_108 < (uint8_t)*wantedAnimName; if (local_AL_108 != *wantedAnimName) { LAB_0094e260: cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0094e265; } if (local_AL_108 == 0) break; local_AL_108 = curAnimName[1]; isLess = local_AL_108 < (uint8_t)wantedAnimName[1]; if (local_AL_108 != wantedAnimName[1]) goto LAB_0094e260; curAnimName = curAnimName + 2; wantedAnimName = wantedAnimName + 2; } while (local_AL_108 != 0); cmpResult = 0; LAB_0094e265: if ((cmpResult != 0) || ((animData[0x34] != 0 && ((this->_CharacterMenuBGSprite)._animState._isPlaying == 0)))) goto LAB_0094e273; } animData = (this->_CharacterMenuBGSprite)._overlayAnimState._animData; local_8 = GHIDRA_CAST((&PTR_s_Face1_00b24134)[this->_characterMenuShown * -3]); if (animData != GHIDRA_CAST(0x0)) { curAnimName = animData; faceNameCursor = GHIDRA_CAST(local_8); if (0xf < *GHIDRA_CAST((animData + 0x14))) { curAnimName = *GHIDRA_CAST(animData); } do { local_AL_108 = *curAnimName; isLess = local_AL_108 < *faceNameCursor; if (local_AL_108 != *faceNameCursor) { LAB_0094e2e0: cmpResult = -GHIDRA_UINT(isLess) | 1; goto LAB_0094e2e5; } if (local_AL_108 == 0) break; local_AL_108 = curAnimName[1]; isLess = local_AL_108 < faceNameCursor[1]; if (local_AL_108 != faceNameCursor[1]) goto LAB_0094e2e0; curAnimName = curAnimName + 2; faceNameCursor = faceNameCursor + 2; } while (local_AL_108 != 0); cmpResult = 0; LAB_0094e2e5: if ((cmpResult == 0) && ((animData[0x34] == 0 || ((this->_CharacterMenuBGSprite)._overlayAnimState._isPlaying != 0))) ) goto LAB_0094e310; } local_AL_108 = (GHIDRA_CAST((&this->_CharacterMenuBGSprite)))->ANM2::SetOverlayAnimation(GHIDRA_CAST(local_8),1); if (local_AL_108 != 0) { (GHIDRA_CAST((&(this->_CharacterMenuBGSprite)._overlayAnimState)))->AnimationState::Rewind(); (this->_CharacterMenuBGSprite)._overlayAnimState._isPlaying = 1; } LAB_0094e310: render_page_snapshot(this); if (this->_characterMenuShown == 0) { local_AL_108 = (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::SetAnimation(GHIDRA_CAST("Appear"),1); if (local_AL_108 != 0) { (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::Rewind(); (this->_TaintedMenuBGDecoSprite)._animState._isPlaying = 1; } local_8 = GHIDRA_CAST(0x23a); } else { local_AL_108 = (GHIDRA_CAST((&this->_TaintedMenuBGDecoSprite)))->ANM2::SetAnimation(GHIDRA_CAST("Disappear"),1); if (local_AL_108 != 0) { (GHIDRA_CAST((&(this->_TaintedMenuBGDecoSprite)._animState)))->AnimationState::Rewind(); (this->_TaintedMenuBGDecoSprite)._animState._isPlaying = 1; } local_8 = GHIDRA_CAST(0x239); } manager = g_manager; seed_fart_sound_override(GHIDRA_CAST(&local_8)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_8),1.0,2,0,1.0,0.0); return; }