#include "classes.h" // 00435fc0 byte GridEntity_Door::IsOpen() { return (this->_desc)._state == 2; } // 00435fd0 byte GridEntity_Door::IsLocked() { int temp_5fc7b31e12; temp_5fc7b31e12 = (this->_desc)._variant; if ((((temp_5fc7b31e12 == 1) || (temp_5fc7b31e12 == 4)) || (temp_5fc7b31e12 == 3)) || ((temp_5fc7b31e12 == 2 || (temp_5fc7b31e12 == 5)))) { return 1; } return 0; } // 005cd5e0 int GridEntity_Door::Direction() { return this->_direction; } // 005cd5f0 byte GridEntity_Door::IsRoomType(int roomType) { if ((this->_currentRoomType == roomType) || (this->_targetRoomType == roomType)) { return 1; } return 0; } // 0060cfe0 int GridEntity_Door::TargetRoomIndex() { return this->_targetRoomIdx; } // 0060cff0 bool GridEntity_Door::IsKeyFamiliarTarget() { int in_ECX; return *GHIDRA_CAST((in_ECX + 8)) == 5; } // 0070c5c0 void GridEntity_Door::Update() { void *pvVar1; qword qVar2; byte isChallengeOpen; int iVar3; uint uVar4; std_string *animName; byte *animNameCursor; uint forcedCurses; uint preventedCurses; Entity_Player *player; RoomDescriptor *targetRoomDesc; LayerState *layer; char *expectedName; int iVar5; uint uVar6; bool isLess; double dVar7; undefined4 uVar8; ColorMod *pCVar9; undefined1 auStack_f4 [47]; byte local_c5; float local_c4; float boxTop; float local_bc; float local_b8; undefined4 auStack_b4 [8]; undefined4 uStack_94; undefined4 uStack_90; undefined4 uStack_8c; ColorMod local_88; undefined4 uStack_5c; undefined4 local_58; undefined4 uStack_54; undefined4 uStack_50; undefined4 uStack_4c; uint local_44; byte *animData; AnimationState *animState; uint *flagsHigh; Game *game; Manager *manager; float playerX; float playerY; int *roomConfig; local_44 = __security_cookie ^ GHIDRA_UINT(auStack_f4); this->_updateCount = this->_updateCount + 1; game = g_game; if ((this->_desc)._variant == 5) { uVar6 = *GHIDRA_CAST((GHIDRA_INT(&g_game->_gameStateFlags) + 4)); if ((uVar6 & 0x20000) != 0) { *GHIDRA_CAST(&g_game->_gameStateFlags) = GHIDRA_INT(g_game->_gameStateFlags); *GHIDRA_CAST((GHIDRA_INT(&game->_gameStateFlags) + 4)) = uVar6 | 0x20000; (this->_desc)._variant = 8; UpdateAnimation(this); Open(this); } } iVar3 = get_secret_exit_kind(this); game = g_game; if ((iVar3 == 4) && ((g_game->_gameStateFlags & 0x10000000000000) != 0)) { iVar3 = (this->_desc)._variant; if ((iVar3 == 1) || ((((iVar3 == 4 || (iVar3 == 3)) || (iVar3 == 2)) || ((iVar3 == 5 || ((this->_desc)._state != 2)))))) { if ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x44)) & 1) != 0) { if (iVar3 != 4) { if (iVar3 == 5) { qVar2 = g_game->_gameStateFlags; flagsHigh = GHIDRA_CAST((GHIDRA_INT(&g_game->_gameStateFlags) + 4)); *flagsHigh = *flagsHigh | 0x20000; *GHIDRA_CAST(&game->_gameStateFlags) = GHIDRA_INT(qVar2); } (this->_desc)._variant = 8; UpdateAnimation(this); } Open(this); } goto LAB_0070c6c5; } LAB_0070c6cb: if ((this->_doorFlags & 0x10) != 0) goto LAB_0070c737; if ((this->_targetRoomIdx == -7) || (g_game->_currentRoomIdx == -7)) { LAB_0070c718: if (((this->_sprite)._animState._animData == (void *)0x0) || ((this->_sprite)._animState._isPlaying == 0)) { LAB_0070c72b: this->_collisionClass = 5; } } else { if (this->_targetRoomType != 5) { if (this->_targetRoomType == 0x1b) { isChallengeOpen = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::HasPhotoDoor(); if (isChallengeOpen != 0) goto LAB_0070c718; } goto LAB_0070c72b; } if (g_game->_stage == 9) goto LAB_0070c718; this->_collisionClass = 5; } } else { LAB_0070c6c5: if ((this->_desc)._state == 2) goto LAB_0070c6cb; LAB_0070c737: animName = &this->_closeAnimation; this->_collisionClass = 4; if (0xf < (this->_closeAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } isChallengeOpen = (GHIDRA_CAST((&this->_sprite)))->ANM2::IsPlaying(GHIDRA_CAST(animName)); if (((isChallengeOpen != 0) && (pvVar1 = (this->_sprite)._animState._animData, pvVar1 != (void *)0x0)) && (*GHIDRA_CAST((GHIDRA_CAST(pvVar1) + 0x34)) == '\0')) { dVar7 = floor((double)(this->_sprite)._animState._animFrame); manager = g_manager; local_c4 = (float)dVar7; if (GHIDRA_INT(dVar7) == 2) { local_c4 = 6.44597e-44; if ((this->_doorFlags & 8) == 0) { local_c4 = 4.90454e-44; } seed_fart_sound_override(GHIDRA_CAST(&local_c4)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,10,0,1.0,0.0); } } } uVar6 = this->_doorFlags; uVar4 = uVar6 & 0xff; if (((uVar6 & 8) != 0) && ((this->_desc)._state == 2)) { animName = &this->_openAnimation; if (0xf < (this->_openAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } uVar8 = 0x70c823; local_c5 = (byte)uVar6; isChallengeOpen = (GHIDRA_CAST((&this->_sprite)))->ANM2::IsPlaying(GHIDRA_CAST(animName)); if (isChallengeOpen == 0) { LAB_0070c871: uVar4 = GHIDRA_UINT(local_c5); } else { pvVar1 = (this->_sprite)._animState._animData; if ((pvVar1 == (void *)0x0) || (uVar4 = this->_doorFlags & 0xff, *GHIDRA_CAST((GHIDRA_CAST(pvVar1) + 0x34)) == '\0')) { local_c5 = (byte)this->_doorFlags; iVar3 = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetFrame(); if (iVar3 != 2) goto LAB_0070c871; FUN_0070bfa0(0x2f,10,uVar8,0x3f800000); uVar4 = GHIDRA_UINT((byte)this->_doorFlags); } } } if ((((this->_desc)._variant == 8) && ((((uVar4 & 1) != 0 || (this->_targetRoomType == 0x17)) && (this->_currentRoomType == 1)))) && (((this->_sprite)._animState._animData == (void *)0x0 || ((this->_sprite)._animState._isPlaying == 0)))) { iVar3 = (this->_desc)._state; if (iVar3 == 2) { (GHIDRA_CAST((&this->_sprite)))->ANM2::Play(GHIDRA_CAST("Opened"),0); } else if (iVar3 == 1) { (GHIDRA_CAST((&this->_sprite)))->ANM2::Play(GHIDRA_CAST("Closed"),0); } } else { iVar3 = this->_currentRoomType; if ((iVar3 == 7) || (((iVar5 = this->_targetRoomType, iVar5 == 7 || (iVar3 == 8)) || ((iVar5 == 8 || ((iVar3 == 0x1d || (iVar5 == 0x1d)))))))) { LAB_0070c926: animName = &this->_openAnimation; if (0xf < (this->_openAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } isChallengeOpen = (GHIDRA_CAST((&this->_sprite)))->ANM2::IsFinishedImpl(GHIDRA_CAST(animName)); if (isChallengeOpen != 0) { animData = (this->_sprite)._animState._animData; if (animData != GHIDRA_CAST(0x0)) { animNameCursor = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { animNameCursor = *GHIDRA_CAST(animData); } expectedName = "Opened"; do { isChallengeOpen = *animNameCursor; isLess = isChallengeOpen < (byte)*expectedName; if (isChallengeOpen != *expectedName) { LAB_0070c980: uVar6 = -GHIDRA_UINT(isLess) | 1; goto LAB_0070c985; } if (isChallengeOpen == 0) break; isChallengeOpen = animNameCursor[1]; isLess = isChallengeOpen < (byte)expectedName[1]; if (isChallengeOpen != expectedName[1]) goto LAB_0070c980; animNameCursor = animNameCursor + 2; expectedName = expectedName + 2; } while (isChallengeOpen != 0); uVar6 = 0; LAB_0070c985: if ((uVar6 == 0) && ((animData[0x34] == 0 || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_0070c9b8; } isChallengeOpen = (GHIDRA_CAST((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST("Opened"),1); if (isChallengeOpen != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; } } } else if (iVar5 == 5) { targetRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if ((targetRoomDesc->Flags & 1) == 0) goto LAB_0070c926; } } LAB_0070c9b8: uVar6 = g_game->_debugCurses; uVar4 = g_game->_curses; forcedCurses = Seeds::GetForcedCurses(); preventedCurses = Seeds::GetPreventedCurses(); if ((((~preventedCurses & (forcedCurses | uVar6 | uVar4) & 0x10) == 0) || (this->_targetRoomType != 1)) || (local_c5 = '\x01', this->_currentRoomType != 1)) { local_c5 = '\0'; } if ((((this->_doorFlags & 4) != 0) && (uVar6 = this->_direction, uVar6 < 4)) && ((this->_desc)._varData == 0)) { local_88._tint[0] = -43.0; local_88._tint[1] = -20.0; local_88._tint[2] = 15.0; local_88._tint[3] = 20.0; iVar3 = *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0xc)); local_88._colorize[0] = -20.0; local_88._colorize[1] = -43.0; local_88._colorize[2] = 20.0; local_88._colorize[3] = 15.0; local_88._offset[0] = -15.0; local_88._offset[1] = -20.0; local_88._offset[2] = 43.0; uStack_5c = 0x41a00000; local_58 = 0xc1a00000; uStack_54 = 0xc1700000; uStack_50 = 0x41a00000; uStack_4c = 0x422c0000; local_bc = (float)(this->_gridIndex % iVar3) * 40.0 + 40.0; local_b8 = (float)(this->_gridIndex / iVar3) * 40.0 + 120.0; local_c4 = local_bc + local_88._tint[uVar6 * 4]; local_bc = local_bc + local_88._tint[uVar6 * 4 + 2]; boxTop = local_b8 + local_88._tint[uVar6 * 4 + 1]; local_b8 = local_b8 + local_88._tint[uVar6 * 4 + 3]; uVar6 = 0; if (GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2 != 0) { do { player = (GHIDRA_CAST((g_game)))->Game::GetPlayer(uVar6); if (((player->_entityGridCollisionClass == 5) || (*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 8)) == 10)) || (local_c5 != '\0')) { playerX = (player->_pos).x; playerY = (player->_pos).y; if ((local_c4 <= playerX) && (boxTop <= playerY)) { if (playerX <= local_bc) { if (playerY <= local_b8) { Game::save_rewind_state(this->_slot); local_88._tint[0] = 0.0; local_88._tint[1] = 0.0; local_88._tint[2] = 0.0; local_88._tint[3] = 0.0; local_88._colorize[0] = g_vectorZero.x; local_88._colorize[1] = g_vectorZero.y; local_88._colorize[2] = g_vectorZero.x; local_88._colorize[3] = g_vectorZero.y; local_88._offset[0] = 0.0; local_88._offset[1] = 0.0; player->TakeDamage(0x3f800000,0x10010000,0,&local_88); } } } } uVar6 = uVar6 + 1; } while (uVar6 < GHIDRA_UINT((GHIDRA_INT((g_game->_playerManager)._playerList._end) - GHIDRA_INT((g_game->_playerManager)._playerList._begin) >> 2))); } } if ((((((this->_targetRoomType == 0xb) && ((this->_doorFlags & 8) != 0)) && (this->_isBusted == 0) ) && ((this->_currentRoomType != 0x1d && ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x44)) >> 10 & 1) == 0)))) && ((this->_desc)._state != 1)) && (this->_isUnlockedByPlayer == 0)) { isChallengeOpen = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::CanOpenChallengeRoom(this->_targetRoomIdx); if (isChallengeOpen == 0) { Close(this,0); } } animState = &(this->_sprite)._animState; if ((this->_sprite)._loaded != 0) { (GHIDRA_CAST((animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_sprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_extraSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_extraSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_extraSprite)._overlayAnimState)))->AnimationState::Update(); } if ((this->_sprite)._animState._animData != (void *)0x0) { isChallengeOpen = (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::WasEventTriggered(GHIDRA_CAST("ScreenshakeStop")); if (isChallengeOpen == 0) { if ((this->_sprite)._animState._animData != (void *)0x0) { isChallengeOpen = (GHIDRA_CAST((animState)))->AnimationState::WasEventTriggered(GHIDRA_CAST("ScreenshakeStart")); if (isChallengeOpen != 0) { (GHIDRA_CAST((g_game)))->Game::ShakeScreen(4); if ((this->_sprite)._animState._animData != (void *)0x0) { isChallengeOpen = (GHIDRA_CAST((animState)))->AnimationState::IsEventTriggered(GHIDRA_CAST("ScreenshakeStart")) ; manager = g_manager; if (isChallengeOpen != 0) { local_c4 = 7.28675e-44; seed_fart_sound_override(GHIDRA_CAST(&local_c4)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,0.33,0.0); } } } } } else { (GHIDRA_CAST((g_game)))->Game::ShakeScreen(0); } } if (this->_targetRoomType == 0x1b) { iVar3 = get_secret_exit_kind(this); if ((iVar3 == 3) && ((this->_sprite)._animState._animData != (void *)0x0)) { isChallengeOpen = (GHIDRA_CAST((animState)))->AnimationState::IsEventTriggered(GHIDRA_CAST("Sound")); if (isChallengeOpen != 0) { isChallengeOpen = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::HasPhotoDoor(); manager = g_manager; if (isChallengeOpen == 0) { local_c4 = 9.52883e-44; seed_fart_sound_override(GHIDRA_CAST(&local_c4)); uVar8 = 0x3f800000; (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,1.0,0.0); if ((this->_desc)._variant == 8) { FUN_0070bfa0(0x9c,2,uVar8,0x3f800000); } } else { local_c4 = 7.28675e-44; seed_fart_sound_override(GHIDRA_CAST(&local_c4)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,0.33,0.0); } } if ((this->_sprite)._animState._animData != (void *)0x0) { isChallengeOpen = (GHIDRA_CAST((animState)))->AnimationState::IsEventTriggered(&DAT_00b64ba4); if (isChallengeOpen != 0) { (GHIDRA_CAST((g_game)))->Game::ShakeScreen(8); SpawnDust(this); } } } } targetRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if ((targetRoomDesc->Flags & 0x40000U) != 0) { layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST("Background")); if (layer != GHIDRA_CAST(0x0)) { uStack_94 = 0; uStack_90 = 0; uStack_8c = 0; if (&layer->_color != GHIDRA_CAST(auStack_b4)) { (layer->_color)._tint[0] = 1.0; (layer->_color)._tint[1] = 1.0; (layer->_color)._tint[2] = 1.0; (layer->_color)._tint[3] = 1.0; (layer->_color)._offset[0] = 0.0; (layer->_color)._offset[1] = 0.0; (layer->_color)._colorize[0] = 0.8; (layer->_color)._colorize[1] = 1.1; (layer->_color)._colorize[2] = 1.8; (layer->_color)._colorize[3] = 0.8; (layer->_color)._offset[2] = 0.0; } } } roomConfig = *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x10)); if ((((roomConfig != GHIDRA_CAST(0x0)) && (*roomConfig == 0x23)) && (pvVar1 = targetRoomDesc->Data, pvVar1 != (void *)0x0)) && (((*GHIDRA_CAST((GHIDRA_CAST(pvVar1) + 8)) == 1 && (*GHIDRA_CAST((GHIDRA_CAST(pvVar1) + 0x10)) == 3)) && (g_game->_stageType == 1)))) { uVar6 = Random(); local_c4 = (float)((double)GHIDRA_INT(uVar6) + __uint_to_double_fixup[-(GHIDRA_INT(uVar6) >> 0x1f)]) * 2.3283064e-10 * 0.2 + 0.5; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); local_88._offset[0] = 0.0; local_88._colorize[0] = 0.0; local_88._colorize[1] = 0.0; local_88._colorize[2] = 0.0; local_88._colorize[3] = 0.0; local_88._offset[1] = 0.0; layer->_visible = 1; pCVar9 = &local_88; local_88._offset[2] = 0.0; local_88._tint[0] = 0.9; local_88._tint[1] = 0.93; local_88._tint[2] = 1.0; local_88._tint[3] = local_c4; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); (GHIDRA_CAST((GHIDRA_CAST(&layer->_color))))->Color::operator_assign(pCVar9); pCVar9 = &local_88; local_88._tint[0] = 1.0; local_88._tint[1] = 1.0; local_88._tint[2] = 1.0; local_88._tint[3] = 1.0; local_88._colorize[0] = 3.0; local_88._colorize[1] = 3.0; local_88._colorize[2] = 3.2; local_88._colorize[3] = local_c4; local_88._offset[0] = 0.0; local_88._offset[1] = 0.0; local_88._offset[2] = 0.0; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x0)); (GHIDRA_CAST((GHIDRA_CAST(&layer->_color))))->Color::operator_assign(pCVar9); } if ((this->_desc)._state != 2) { iVar3 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::GetTrinketMultiplier(0x3e); if (1 < iVar3) { if ((this->_currentRoomType != 7) && (this->_targetRoomType != 7)) { iVar3 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::GetTrinketMultiplier(0x3e); if ((iVar3 < 3) || ((this->_currentRoomType != 8 && (this->_targetRoomType != 8)))) goto LAB_0070d1ab; } iVar5 = 300; iVar3 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::GetTrinketMultiplier(0x3e); manager = g_manager; if (2 < iVar3) { iVar5 = 0x96; } if (*GHIDRA_CAST(g_game->_room) == '\0') { iVar3 = -1; } else { iVar3 = g_game->_frameCount - *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0x11f0)); } if ((iVar3 % iVar5 < 0xb) && (iVar3 % iVar5 == 0)) { local_c4 = 1.42092e-42; seed_fart_sound_override(GHIDRA_CAST(&local_c4)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(GHIDRA_INT(local_c4),1.0,2,0,1.0,0.0); isChallengeOpen = (GHIDRA_CAST((&this->_sparkleSprite)))->ANM2::SetAnimation(GHIDRA_CAST("Sparkle"),1); if (isChallengeOpen != 0) { (GHIDRA_CAST((&(this->_sparkleSprite)._animState)))->AnimationState::Rewind(); (this->_sparkleSprite)._animState._isPlaying = 1; } } } } LAB_0070d1ab: if ((this->_sparkleSprite)._loaded != 0) { (GHIDRA_CAST((&(this->_sparkleSprite)._animState)))->AnimationState::Update(); (GHIDRA_CAST((&(this->_sparkleSprite)._overlayAnimState)))->AnimationState::Update(); } return; } // 0070d360 int GridEntity_Door::get_secret_exit_kind() { RoomDescriptor *roomDesc; int roomData; if (this->_targetRoomType == 0x1b) { roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if (roomDesc->Data != (void *)0x0) { return *GHIDRA_CAST((GHIDRA_CAST(roomDesc->Data) + 0x10)); } } else if (this->_currentRoomType == 0x1b) { roomData = *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x10)); if (roomData != 0) { return *GHIDRA_CAST((roomData + 0x10)); } } else { if (this->_targetRoomType == 5) { roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); } else { if (this->_currentRoomType != 5) { return 0; } roomDesc = *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)); } if ((roomDesc->Data != (void *)0x0) && (*GHIDRA_CAST((GHIDRA_CAST(roomDesc->Data) + 0x10)) == 0x5a)) { return 4; } } return 0; } // 0070d3f0 void GridEntity_Door::LoadSprite() { bool bVar1; undefined1 *puVar2; byte bVar3; int iVar4; LayerState *layer; RoomDescriptor *roomDesc; RoomDescriptor *targetRoomDesc; int iVar5; ColorMod *extraout_EAX; ColorMod *extraout_EAX_00; Entity_Player *payToPlayOwner; void *pvVar6; byte unk; byte extraout_CL; byte extraout_CL_00; byte extraout_CL_01; byte extraout_CL_02; byte extraout_CL_03; byte extraout_CL_04; byte extraout_CL_05; byte extraout_CL_06; byte extraout_CL_07; byte extraout_CL_08; byte extraout_CL_09; byte extraout_CL_10; byte extraout_CL_11; byte extraout_CL_12; byte unk_00; std_string *pathString; char *pcVar7; Game *extraout_ECX; byte *pathEnd; uint uVar8; uint uVar9; ANM2 *sprite; float colorizeB; ColorMod roomColor; float offsetLength; byte *local_190; std_string barDoorPath; std_string devilTreasureDoorPath; std_string devilRoomDoorPath; std_string ambushDoorPath; std_string bossAmbushDoorPath; std_string momsHeartDoorPath; std_string mausoleumDoorPath; std_string secretExitPath; undefined1 local_c8 [44]; std_string mineshaftDarkPath; std_string mineshaftLightPath; std_string anmPath; std_string doorAnmPath; std_string tmpString; uint stackCookie; undefined1 *puStack_20; void *savedExceptionList; undefined1 *puStack_18; undefined4 ehState; ColorMod *color; float colorizeA; float colorizeB; float colorizeG; float colorizeR; Game *game; int *roomData; void *targetRoomData; int targetRoomType; float tintA; float tintB; float tintG; float tintR; puStack_20 = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + -4)); ehState = 0xffffffff; puStack_18 = &LAB_00afc928; savedExceptionList = ExceptionList; stackCookie = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U; ExceptionList = &savedExceptionList; puVar2 = GHIDRA_CAST((GHIDRA_INT(register0x00000010) + -4)); if ((this->_extraSprite)._loaded != 0) { (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Reset(); puVar2 = puStack_20; } puStack_20 = puVar2; bVar1 = true; this->_doorFlags = 0; (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(s_Open,4); (GHIDRA_CAST(((this->_closeAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Close"),5); offsetLength = 15.0; if (this->_targetRoomIdx == -100) { tmpString._size = 0; tmpString._capacity = 0xf; tmpString._buf[0] = '\0'; tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = std::_Allocate(0x30); tmpString._size = 0x22; tmpString._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))),"gfx/grid/door_downpour_mirror.anm2",0x23); ehState = 0; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&tmpString,1); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar8 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { LAB_0070d535: ehState = 0xffffffff; /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar8); } this->_doorFlags = this->_doorFlags | 0x10; (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Break"),5); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Break"),5); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Closed"),6); goto LAB_0070eb83; } if (this->_targetRoomIdx == -0x65) { if (g_game->_currentDimensionIdx == 1) { mineshaftLightPath._size = 0; mineshaftLightPath._capacity = 0xf; mineshaftLightPath._buf[0] = '\0'; mineshaftLightPath._buf[1] = '\0'; mineshaftLightPath._buf[2] = '\0'; mineshaftLightPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftLightPath._buf)) + 0x0))) = std::_Allocate(0x30); mineshaftLightPath._size = 0x28; mineshaftLightPath._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(mineshaftLightPath._buf))) + 0x0))), "gfx/grid/door_mines_mineshaft_light.anm2",0x29); ehState = 1; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&mineshaftLightPath,1); ehState = 0xffffffff; if (0xf < mineshaftLightPath._capacity) { uVar8 = mineshaftLightPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(mineshaftLightPath._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftLightPath._buf)) + 0x0))) + -4)); uVar8 = mineshaftLightPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftLightPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar8); } mineshaftLightPath._size = 0; mineshaftLightPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftLightPath._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftLightPath._buf)) + 0x0))) & 0xffffff00; } else { mineshaftDarkPath._size = 0; mineshaftDarkPath._capacity = 0xf; mineshaftDarkPath._buf[0] = '\0'; mineshaftDarkPath._buf[1] = '\0'; mineshaftDarkPath._buf[2] = '\0'; mineshaftDarkPath._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftDarkPath._buf)) + 0x0))) = std::_Allocate(0x30); mineshaftDarkPath._size = 0x27; mineshaftDarkPath._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(mineshaftDarkPath._buf))) + 0x0))),"gfx/grid/door_mines_mineshaft_dark.anm2" ,0x28); ehState = 2; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&mineshaftDarkPath,1); ehState = 0xffffffff; if (0xf < mineshaftDarkPath._capacity) { uVar8 = mineshaftDarkPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(mineshaftDarkPath._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftDarkPath._buf)) + 0x0))) + -4)); uVar8 = mineshaftDarkPath._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftDarkPath._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar8); } mineshaftDarkPath._size = 0; mineshaftDarkPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftDarkPath._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(mineshaftDarkPath._buf)) + 0x0))) & 0xffffff00; } this->_doorFlags = this->_doorFlags | 0x20; if ((this->_desc)._variant == 4) { bVar1 = false; (GHIDRA_CAST(((this->_closeAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Collapse"),8); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Collapsed"),9); } goto LAB_0070eb83; } iVar4 = this->_currentRoomType; if (iVar4 == 7) { LAB_0070e8c5: 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))) = std::_Allocate(0x20); anmPath._size = 0x15; anmPath._capacity = 0x1f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/door_sparkle.anm2",0x16); ehState = 3; (GHIDRA_CAST((&this->_sparkleSprite)))->ANM2::Load(&anmPath,1); ehState = 0xffffffff; if (0xf < anmPath._capacity) { uVar8 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar8 = 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,uVar8); } anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) & 0xffffff00; LAB_0070e980: tmpString._size = 0; tmpString._capacity = 0xf; tmpString._buf[0] = '\0'; tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; if (*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0x1d18)) == 0x10) { (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = std::_Allocate(0x30); tmpString._size = 0x2a; tmpString._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))),"gfx/grid/door_08_holeinwall _darkroom.anm2",0x2b ); ehState = 4; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&tmpString,1); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar8 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar8); } tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) & 0xffffff00; } else { (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = std::_Allocate(0x30); tmpString._size = 0x20; tmpString._capacity = 0x2f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))),"gfx/grid/Door_08_HoleInWall.anm2",0x21); ehState = 5; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&tmpString,0); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar8 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar8); } tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) & 0xffffff00; Sprite::ReplaceSpritesheet (GHIDRA_CAST(&this->_sprite),0, (std_string *) (GHIDRA_INT(g_game->_room) + *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0x1d18)) * 0x13c + 0x1e24)); (GHIDRA_CAST((&this->_sprite)))->ANM2::LoadGraphics(unk_00); } pvVar6 = g_game->_room; tintR = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72d0)); tintG = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72d4)); tintB = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72d8)); tintA = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72dc)); colorizeB = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72f8)); colorizeR = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72e0)); colorizeG = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72e4)); colorizeB = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72e8)); colorizeA = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72ec)); color = &(this->_sprite)._color; if (color != &roomColor) { *GHIDRA_CAST((this->_sprite)._color._offset) = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x72f0)); color->_tint[0] = tintR; (this->_sprite)._color._tint[1] = tintG; (this->_sprite)._color._tint[2] = tintB; (this->_sprite)._color._tint[3] = tintA; (this->_sprite)._color._offset[2] = colorizeB; (this->_sprite)._color._colorize[0] = colorizeR; (this->_sprite)._color._colorize[1] = colorizeG; (this->_sprite)._color._colorize[2] = colorizeB; (this->_sprite)._color._colorize[3] = colorizeA; } this->_doorFlags = this->_doorFlags | 2; offsetLength = 0.0; goto LAB_0070eb83; } targetRoomType = this->_targetRoomType; if ((((targetRoomType == 7) || (iVar4 == 8)) || (targetRoomType == 8)) || ((iVar4 == 0x1d || (targetRoomType == 0x1d)))) { if ((this->_targetRoomType == 7) || ((iVar4 == 8 || (this->_targetRoomType == 8)))) goto LAB_0070e8c5; goto LAB_0070e980; } iVar4 = get_secret_exit_kind(this); if (iVar4 == 0) { bVar3 = IsRoomType(this,10); if ((bVar3 != 0) || (((uVar8 = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetCurses(), (uVar8 & 0x10) != 0 && (this->_targetRoomType == 1)) && (this->_currentRoomType == 1)))) { std::string::string_from_cstr (local_c8 + 0x14,GHIDRA_CAST("gfx/grid/Door_04_SelfSacrificeRoomDoor.anm2")); ehState = 0xd; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),1); ehState = 0xffffffff; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); bVar3 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::AnyoneHasTrinket(0x97); if ((bVar3 != 0) || ((this->_desc)._varData == 1)) { uVar8 = 0; bVar3 = extraout_CL_10; if ((this->_sprite)._layerCount != 0) { do { tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = GHIDRA_CAST(0x0); (GHIDRA_CAST((tmpString._buf)))->std::string::assign(GHIDRA_CAST("gfx/grid/door_04_selfsacrificeroomdoor_nospikes.png"),0x33); ehState = 0xe; (GHIDRA_CAST((GHIDRA_CAST(&this->_sprite))))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); ehState = 0xffffffff; bVar3 = extraout_CL_11; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar9) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar9 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); bVar3 = extraout_CL_12; } uVar8 = uVar8 + 1; } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } (GHIDRA_CAST((&this->_sprite)))->ANM2::LoadGraphics(bVar3); (this->_desc)._varData = 1; } this->_doorFlags = this->_doorFlags | 4; goto LAB_0070eb83; } bVar3 = IsRoomType(this,9); if (bVar3 != 0) { (GHIDRA_CAST((doorAnmPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_05_ArcadeRoomDoor.anm2")) ; ehState = 0xf; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); ehState = 0xffffffff; (GHIDRA_CAST((doorAnmPath._buf)))->std::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyClosed"),9); (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(s_Open,4); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyOpen"),7); (GHIDRA_CAST((&this->_sprite)))->ANM2::LoadGraphics(unk); this->_doorFlags = this->_doorFlags | 1; goto LAB_0070eb83; } if (this->_targetRoomType == 0x17) { (GHIDRA_CAST((doorAnmPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_32_ExitDoor.anm2")); ehState = 0x10; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); ehState = 0xffffffff; (GHIDRA_CAST((doorAnmPath._buf)))->std::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(s_Open,4); goto LAB_0070eb83; } bVar3 = IsRoomType(this,4); game = g_game; if (bVar3 != 0) { bVar3 = (GHIDRA_CAST((g_game)))->Game::IsGreedMode(); if (((bVar3 == 0) || (game->_greedModeTreasureRoomIdx == this->_targetRoomIdx)) || (game->_greedModeTreasureRoomIdx == game->_currentRoomIdx)) { roomDesc = (GHIDRA_CAST((game)))->Game::GetCurrentRoomDesc(); if (((GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0) && (roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1), (GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0)) { std::string::string_from_cstr (doorAnmPath._buf,GHIDRA_CAST("gfx/grid/Door_02_TreasureRoomDoor.anm2")); ehState = 0x13; } else { std::string::string_from_cstr (doorAnmPath._buf,GHIDRA_CAST("gfx/grid/Door_02_TreasureRoomDoor_Devil.anm2")); ehState = 0x12; } } else { std::string::string_from_cstr (doorAnmPath._buf,GHIDRA_CAST("gfx/grid/Door_31_TreasureRoomDoorGreed.anm2")); ehState = 0x11; } LAB_0070dd51: (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); ehState = 0xffffffff; (GHIDRA_CAST((doorAnmPath._buf)))->std::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(s_Open,4); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyOpen"),7); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyClosed"),9); goto LAB_0070eb83; } bVar3 = IsRoomType(this,0x18); if (bVar3 != 0) { std::string::string_from_cstr (doorAnmPath._buf,GHIDRA_CAST("gfx/grid/Door_00x_PlanetariumDoor.anm2")); ehState = 0x14; goto LAB_0070dd51; } bVar3 = IsRoomType(this,0x11); game = g_game; if (bVar3 != 0) { (GHIDRA_CAST((doorAnmPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_15_BossRushDoor.anm2")); ehState = 0x15; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); ehState = 0xffffffff; (GHIDRA_CAST((doorAnmPath._buf)))->std::string::_Tidy_deallocate(); LAB_0070e789: (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Opened"),6); goto LAB_0070eb83; } if ((this->_targetRoomIdx == -8) || (g_game->_currentRoomIdx == -8)) { (GHIDRA_CAST((local_c8 + 0x14)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/door_29_doortobluewomb.anm2")); ehState = 0x16; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),0); ehState = 0xffffffff; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); bVar3 = extraout_CL_07; if ((g_game->_currentRoomIdx == -8) && (uVar8 = 0, (this->_sprite)._layerCount != 0)) { do { tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = GHIDRA_CAST(0x0); (GHIDRA_CAST((tmpString._buf)))->std::string::assign(GHIDRA_CAST("gfx/grid/door_29_doortobluewomb_blue.png"),0x28); ehState = 0x17; (GHIDRA_CAST((GHIDRA_CAST(&this->_sprite))))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); ehState = 0xffffffff; bVar3 = extraout_CL_08; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar9) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar9 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); bVar3 = extraout_CL_09; } uVar8 = uVar8 + 1; } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } (GHIDRA_CAST((&this->_sprite)))->ANM2::LoadGraphics(bVar3); goto LAB_0070e789; } if ((this->_targetRoomIdx == -7) || (g_game->_currentRoomIdx == -7)) { (GHIDRA_CAST((local_c8 + 0x14)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_24_MegaSatanDoor.anm2")); ehState = 0x18; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),1); ehState = 0xffffffff; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_closeAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Closed"),6); goto LAB_0070eb83; } if (g_game->_stage == 9) { bVar3 = IsRoomType(this,5); if ((((bVar3 != 0) && (-1 < game->_currentRoomIdx)) && (-1 < this->_targetRoomIdx)) || ((this->_targetRoomIdx == -9 || (game->_currentRoomIdx == -9)))) { (GHIDRA_CAST((doorAnmPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/door_30_HushDoor.anm2")); ehState = 0x19; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); ehState = 0xffffffff; (GHIDRA_CAST((doorAnmPath._buf)))->std::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_closeAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Closed"),6); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Closed"),6); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Opening"),7); (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Opening"),7); goto LAB_0070eb83; } } bVar3 = IsRoomType(this,5); if (bVar3 == 0) { bVar3 = IsRoomType(this,0xb); if (bVar3 != 0) { roomDesc = (GHIDRA_CAST((game)))->Game::GetCurrentRoomDesc(); targetRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); pvVar6 = roomDesc->Data; if (((pvVar6 == (void *)0x0) || (targetRoomData = targetRoomDesc->Data, targetRoomData == (void *)0x0)) || (((*GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 8)) != 0xb || (*GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x10)) != 1)) && ((*GHIDRA_CAST((GHIDRA_CAST(targetRoomData) + 8)) != 0xb || (*GHIDRA_CAST((GHIDRA_CAST(targetRoomData) + 0x10)) != 1)))))) { std::string::string_from_cstr (ambushDoorPath._buf,GHIDRA_CAST("gfx/grid/Door_03_AmbushRoomDoor.anm2")); ehState = 0x1c; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&ambushDoorPath,1); pathString = &ambushDoorPath; } else { std::string::string_from_cstr (bossAmbushDoorPath._buf,GHIDRA_CAST("gfx/grid/Door_09_BossAmbushRoomDoor.anm2")); ehState = 0x1b; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&bossAmbushDoorPath,1); pathString = &bossAmbushDoorPath; } ehState = 0xffffffff; (GHIDRA_CAST((pathString->_buf)))->std::string::_Tidy_deallocate(); this->_doorFlags = this->_doorFlags | 8; goto LAB_0070eb83; } bVar3 = IsRoomType(this,0xe); if (bVar3 != 0) { roomDesc = (GHIDRA_CAST((game)))->Game::GetCurrentRoomDesc(); if (((GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0) && (roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1), (GHIDRA_UINT(roomDesc->Flags) >> 0xb & 1) == 0)) { std::string::string_from_cstr (devilRoomDoorPath._buf,GHIDRA_CAST("gfx/grid/Door_07_DevilRoomDoor.anm2")); ehState = 0x1e; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&devilRoomDoorPath,1); ehState = 0xffffffff; (GHIDRA_CAST((devilRoomDoorPath._buf)))->std::string::_Tidy_deallocate(); } else { std::string::string_from_cstr (devilTreasureDoorPath._buf, GHIDRA_CAST("gfx/grid/Door_02_TreasureRoomDoor_Devil.anm2")); ehState = 0x1d; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&devilTreasureDoorPath,1); ehState = 0xffffffff; (GHIDRA_CAST((devilTreasureDoorPath._buf)))->std::string::_Tidy_deallocate(); } goto LAB_0070eb83; } bVar3 = IsRoomType(this,0xf); if (bVar3 != 0) { (GHIDRA_CAST((local_c8 + 0x14)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_07_HolyRoomDoor.anm2")); ehState = 0x1f; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),1); ehState = 0xffffffff; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); goto LAB_0070eb83; } roomData = *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(game->_room) + 4)) + 0x10)); if ((roomData != GHIDRA_CAST(0x0)) && (*roomData == 0x23)) { sprite = &this->_sprite; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_House.anm2")); ehState = 0x20; (GHIDRA_CAST((sprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),0); ehState = 0xffffffff; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); layer->_visible = 0; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(&DAT_00000004); game = g_game; layer->_visible = 0; iVar4 = *GHIDRA_CAST((GHIDRA_CAST(game->_room) + 4)); roomDesc = (GHIDRA_CAST((GHIDRA_CAST(game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if ((iVar4 == 0) || ((targetRoomType = *GHIDRA_CAST((iVar4 + 0x10)), targetRoomType == 0 || (*GHIDRA_CAST((targetRoomType + 8)) != 1)))) { targetRoomType = -1; } else { targetRoomType = *GHIDRA_CAST((targetRoomType + 0x10)); } if (((roomDesc == GHIDRA_CAST(0x0)) || (pvVar6 = roomDesc->Data, pvVar6 == (void *)0x0) ) || (*GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 8)) != 1)) { iVar5 = -1; } else { iVar5 = *GHIDRA_CAST((GHIDRA_CAST(pvVar6) + 0x10)); } if ((targetRoomType == 0) || (iVar5 == 0)) { uVar8 = 0; if ((this->_sprite)._layerCount != 0) { do { tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = GHIDRA_CAST(0x0); (GHIDRA_CAST((tmpString._buf)))->std::string::assign(GHIDRA_CAST("gfx/grid/door_house_cracked.png"),0x1f); ehState = 0x21; (GHIDRA_CAST((GHIDRA_CAST(&this->_sprite))))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar9) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar9 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); } uVar8 = uVar8 + 1; } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } } else { uVar8 = *GHIDRA_CAST((iVar4 + 0x44)); if ((((uVar8 >> 10 & 1) != 0) || ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) != 0)) || (g_game->_currentDimensionIdx == 2)) { uVar9 = 0; if ((this->_sprite)._layerCount != 0) { do { tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = GHIDRA_CAST(0x0); (GHIDRA_CAST((tmpString._buf)))->std::string::assign(GHIDRA_CAST("gfx/grid/door_closet_red.png"),0x1c); ehState = 0x22; (GHIDRA_CAST((GHIDRA_CAST(&this->_sprite))))->Sprite::ReplaceSpritesheet(uVar9,&tmpString); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar8 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) goto LAB_0070d535; } operator_delete(pcVar7,uVar8); } uVar9 = uVar9 + 1; } while (uVar9 < GHIDRA_UINT((this->_sprite)._layerCount)); uVar8 = *GHIDRA_CAST((iVar4 + 0x44)); } if ((((uVar8 >> 10 & 1) != 0) && ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) == 0)) && (g_game->_stageType == 0)) { layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x3)); layer->_visible = 1; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(&DAT_00000004); layer->_visible = 1; } } } sprite = &this->_sprite; if (iVar5 == 2) { (GHIDRA_CAST((GHIDRA_CAST(local_c8))))->Color::Color(0.9,0.7,1.0,1.0); color = extraout_EAX; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x0)); (GHIDRA_CAST((GHIDRA_CAST(&layer->_color))))->Color::operator_assign(color); } if (g_game->_stageType == 1) { (GHIDRA_CAST((GHIDRA_CAST(local_c8))))->Color::Color(); color = extraout_EAX_00; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x0)); (GHIDRA_CAST((GHIDRA_CAST(&layer->_color))))->Color::__mul(color); } iVar4 = this->_direction; (this->_sprite)._flipX = iVar4 == 3; (this->_sprite)._flipY = iVar4 == 2; (GHIDRA_CAST((sprite)))->ANM2::LoadGraphics((byte)iVar4); goto LAB_0070eb83; } (GHIDRA_CAST((local_c8 + 0x14)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_01_NormalDoor.anm2")); ehState = 0x23; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),0); ehState = 0xffffffff; (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); game = g_game; if ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x44)) >> 10 & 1) == 0) { roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); game = extraout_ECX; if ((GHIDRA_UINT(roomDesc->Flags) >> 10 & 1) != 0) goto LAB_0070e564; bVar3 = IsRoomType(this,2); if (bVar3 != 0) { local_190 = GHIDRA_CAST(0xb68c48); bVar3 = extraout_CL; goto LAB_0070e56f; } bVar3 = IsRoomType(this,0x14); if (bVar3 != 0) { local_190 = GHIDRA_CAST(0xb68c68); bVar3 = extraout_CL_00; goto LAB_0070e56f; } bVar3 = IsRoomType(this,0xc); if (bVar3 != 0) { local_190 = GHIDRA_CAST(0xb68c8c); bVar3 = extraout_CL_01; goto LAB_0070e56f; } bVar3 = IsRoomType(this,0x15); if (bVar3 != 0) { local_190 = GHIDRA_CAST(0xb68cb0); bVar3 = extraout_CL_02; goto LAB_0070e56f; } bVar3 = IsRoomType(this,0xd); if (bVar3 != 0) { local_190 = GHIDRA_CAST(0xb68da4); bVar3 = extraout_CL_03; goto LAB_0070e56f; } local_190 = (GHIDRA_CAST((GHIDRA_CAST((GHIDRA_INT(g_game->_room) + *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0x1d18)) * 0x13c + 0x1e0c)))))->std::string::c_str(); bVar3 = extraout_CL_04; if (local_190 != GHIDRA_CAST(0x0)) goto LAB_0070e56f; } else { LAB_0070e564: bVar3 = (byte)game; local_190 = GHIDRA_CAST(0xb68d30); LAB_0070e56f: uVar8 = 0; if ((this->_sprite)._layerCount != 0) { do { tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = GHIDRA_CAST(0x0); pathEnd = local_190; do { bVar3 = *pathEnd; pathEnd = pathEnd + 1; } while (bVar3 != 0); (GHIDRA_CAST((tmpString._buf)))->std::string::assign(local_190,GHIDRA_INT(pathEnd) - GHIDRA_INT((local_190 + 1))); ehState = 0x24; (GHIDRA_CAST((GHIDRA_CAST(&this->_sprite))))->Sprite::ReplaceSpritesheet(uVar8,&tmpString); ehState = 0xffffffff; bVar3 = extraout_CL_05; if (0xf < tmpString._capacity) { uVar9 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar9) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar9 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) goto LAB_0070d535; } operator_delete(pcVar7,uVar9); bVar3 = extraout_CL_06; } uVar8 = uVar8 + 1; } while (uVar8 < GHIDRA_UINT((this->_sprite)._layerCount)); } } (GHIDRA_CAST((&this->_sprite)))->ANM2::LoadGraphics(bVar3); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyClosed"),9); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyOpen"),7); goto LAB_0070eb83; } (GHIDRA_CAST((doorAnmPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_10_BossRoomDoor.anm2")); ehState = 0x1a; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); ehState = 0xffffffff; (GHIDRA_CAST((doorAnmPath._buf)))->std::string::_Tidy_deallocate(); layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(&DAT_00b1ce2c); if (this->_targetRoomType == 5) { layer->_visible = 1; goto LAB_0070eb83; } goto LAB_0070db6f; } (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(s_Open,4); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyOpen"),7); (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("KeyClosed"),9); iVar4 = get_secret_exit_kind(this); switch(iVar4) { case 1: 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))) = std::_Allocate(0x20); anmPath._size = 0x1b; anmPath._capacity = 0x1f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))),"gfx/grid/Door_Downpour.anm2",0x1c); ehState = 6; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&anmPath,1); ehState = 0xffffffff; if (0xf < anmPath._capacity) { uVar8 = anmPath._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(anmPath._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) + -4)); uVar8 = 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,uVar8); } anmPath._size = 0; anmPath._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) = (*GHIDRA_CAST((GHIDRA_CAST(&(anmPath._buf)) + 0x0))) & 0xffffff00; break; case 2: tmpString._size = 0; tmpString._capacity = 0xf; tmpString._buf[0] = '\0'; tmpString._buf[1] = '\0'; tmpString._buf[2] = '\0'; tmpString._buf[3] = '\0'; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = std::_Allocate(0x20); tmpString._size = 0x18; tmpString._capacity = 0x1f; builtin_strncpy((*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))),"gfx/grid/Door_Mines.anm2",0x19); ehState = 7; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&tmpString,1); ehState = 0xffffffff; if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; pcVar7 = (*GHIDRA_CAST((GHIDRA_CAST(&(GHIDRA_CAST(tmpString._buf))) + 0x0))); if (0xfff < uVar8) { pcVar7 = *GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4)); uVar8 = tmpString._capacity + 0x24; if (GHIDRA_CAST(0x1f) < GHIDRA_CAST(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pcVar7))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pcVar7,uVar8); } (GHIDRA_CAST((secretExitPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_Mines_Planks.anm2")); ehState = 8; (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Load(&secretExitPath,1); pathString = &secretExitPath; goto LAB_0070db14; case 3: bVar3 = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::HasPhotoDoor(); if (bVar3 == 0) { (GHIDRA_CAST((mausoleumDoorPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_Mausoleum.anm2")); ehState = 10; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&mausoleumDoorPath,1); pathString = &mausoleumDoorPath; goto LAB_0070db14; } (GHIDRA_CAST((secretExitPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_Mausoleum_Alt.anm2")); ehState = 9; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&secretExitPath,1); ehState = 0xffffffff; (GHIDRA_CAST((secretExitPath._buf)))->std::string::_Tidy_deallocate(); layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x1)); layer->_visible = 1; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x2)); layer->_visible = 0; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(&DAT_00000004); layer->_visible = 0; this->_doorFlags = this->_doorFlags | 0x40; (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(s_Open,4); break; case 4: (GHIDRA_CAST((momsHeartDoorPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_MomsHeart.anm2")); ehState = 0xb; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&momsHeartDoorPath,1); ehState = 0xffffffff; (GHIDRA_CAST((momsHeartDoorPath._buf)))->std::string::_Tidy_deallocate(); bVar1 = false; if (g_game->_currentRoomIdx == -10) { (GHIDRA_CAST(((this->_closeAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Disappear"),9); } break; default: (GHIDRA_CAST((doorAnmPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/Door_01_NormalDoor.anm2")); ehState = 0xc; (GHIDRA_CAST((&this->_sprite)))->ANM2::Load(&doorAnmPath,1); pathString = &doorAnmPath; LAB_0070db14: ehState = 0xffffffff; (GHIDRA_CAST((pathString->_buf)))->std::string::_Tidy_deallocate(); } if (this->_targetRoomType != 0x1b) { layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST("Background")); if (layer != GHIDRA_CAST(0x0)) { (layer->_color)._colorize[0] = 0.5; (layer->_color)._colorize[1] = 0.5; (layer->_color)._colorize[2] = 0.5; (layer->_color)._colorize[3] = 0.6; } layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST("Light")); if (layer != GHIDRA_CAST(0x0)) { LAB_0070db6f: layer->_visible = 0; } } LAB_0070eb83: payToPlayOwner = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x17c,GHIDRA_CAST(&g_game->_playerManager),1); if ((((payToPlayOwner != GHIDRA_CAST(0x0)) || (g_game->_challenge == 0x18)) && ((iVar4 = (this->_desc)._variant, iVar4 == 1 || (iVar4 == 2)))) && ((this->_currentRoomType != 9 && (this->_targetRoomType != 9)))) { pathString = &this->_openLockedAnimation; if (0xf < (this->_openLockedAnimation)._capacity) { pathString = *GHIDRA_CAST((this->_openLockedAnimation)._buf); } bVar3 = str_eq(GHIDRA_CAST(pathString),(this->_openLockedAnimation)._size,GHIDRA_CAST("KeyOpen"),7); if ((bVar3 != 0) || (g_game->_challenge == 0x18)) { pvVar6 = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetAnimationData(GHIDRA_CAST("CoinClosed")); if (pvVar6 != (void *)0x0) { (GHIDRA_CAST(((this->_lockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("CoinClosed"),10); (GHIDRA_CAST(((this->_openLockedAnimation)._buf)))->std::string::assign(GHIDRA_CAST("CoinOpen"),8); } this->_doorFlags = this->_doorFlags | 1; } } colorizeB = ((this->_sprite)._rotation + 90.0) * 0.017453292; tintR = sin(colorizeB); colorizeB = cos(colorizeB); (this->_sprite)._offset.x = colorizeB * offsetLength; (this->_sprite)._offset.y = tintR * offsetLength; bVar3 = (this->_extraSprite)._loaded; (this->_extraSprite)._offset.x = colorizeB * offsetLength; (this->_extraSprite)._offset.y = (this->_sprite)._offset.y; if ((bVar3 == 0) && (bVar1)) { iVar4 = (this->_desc)._variant; if (iVar4 == 2) { tmpString._size = 0; tmpString._capacity = 0xf; (*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) = (void *)0x0; (GHIDRA_CAST((tmpString._buf)))->std::string::assign(GHIDRA_CAST("gfx/grid/door_16_doublelock.anm2"),0x20); ehState = 0x25; (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Load(&tmpString,1); if (0xf < tmpString._capacity) { uVar8 = tmpString._capacity + 1; pvVar6 = (*GHIDRA_CAST((GHIDRA_CAST(&((void *)tmpString._buf)) + 0x0))); if (0xfff < uVar8) { pvVar6 = *(void **)((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + -4); uVar8 = tmpString._capacity + 0x24; if (0x1f < GHIDRA_UINT(((*GHIDRA_CAST((GHIDRA_CAST(&(tmpString._buf)) + 0x0))) + (-4 - GHIDRA_INT(pvVar6))))) { /* WARNING: Subroutine does not return */ _invalid_parameter_noinfo_noreturn(); } } operator_delete(pvVar6,uVar8); } } else if (iVar4 == 3) { (GHIDRA_CAST((local_c8 + 0x14)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/door_18_crackeddoor.anm2")); ehState = 0x26; (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Load(GHIDRA_CAST((local_c8 + 0x14)),1); (GHIDRA_CAST((local_c8 + 0x14)))->std::string::_Tidy_deallocate(); } else if ((iVar4 == 4) || (iVar4 == 6)) { (GHIDRA_CAST((barDoorPath._buf)))->std::string::string_from_cstr(GHIDRA_CAST("gfx/grid/door_17_bardoor.anm2")); ehState = 0x27; (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Load(&barDoorPath,1); ehState = 0xffffffff; (GHIDRA_CAST((barDoorPath._buf)))->std::string::_Tidy_deallocate(); (GHIDRA_CAST(((this->_closeAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Closed"),6); } } this->_isExtraVisible = 0; ExceptionList = savedExceptionList; return; } // 0070ee40 void GridEntity_Door::UpdateAnimation() { int iVar1; byte bVar2; LayerState *layer; Entity_Player *player; byte *animNameCursor; uint uVar3; int iVar4; char *pcVar5; std_string *expectedName; int *variantPtr; std_string *animName; GridEntity_Door *variantRef; Sprite *sprite; bool bVar6; EntityList_EL familiars; int roomAge; int spawnAge; GridEntity_Door *local_18; GridEntity_Door *local_14; void *local_10; undefined1 *puStack_c; undefined4 local_8; byte *animData; Game *game; int variant; game = g_game; local_8 = 0xffffffff; puStack_c = &LAB_00afc96d; local_10 = ExceptionList; if ((this->_sprite)._loaded == 0) { return; } ExceptionList = &local_10; this->_isExtraVisible = 0; roomAge = game->_frameCount; pcVar5 = game->_room; spawnAge = roomAge - this->_spawnFrame; if (*pcVar5 == '\0') { roomAge = -1; } else { roomAge = roomAge - *GHIDRA_CAST((pcVar5 + 0x11f0)); } sprite = GHIDRA_CAST(&this->_sprite); local_18 = this; layer = (GHIDRA_CAST((GHIDRA_CAST(sprite))))->ANM2::GetLayer(GHIDRA_CAST(0x0)); layer->_visible = 1; iVar4 = this->_targetRoomType; if (iVar4 == 0) { ExceptionList = local_10; return; } iVar1 = (this->_desc)._state; if ((((iVar1 == 1) || (iVar1 == 4)) || (iVar1 == 3)) || (iVar1 == 5)) { iVar1 = this->_currentRoomType; if (((((iVar1 == 7) || (iVar4 == 7)) || ((iVar1 == 8 || ((iVar4 == 8 || (iVar1 == 0x1d)))))) || (iVar4 == 0x1d)) && ((this->_desc)._variant == 7)) { (GHIDRA_CAST((GHIDRA_CAST(sprite))))->ANM2::Play(GHIDRA_CAST("Hidden"),0); variantRef = GHIDRA_CAST(&(this->_desc)._variant); } else { variantPtr = &(this->_desc)._variant; variant = *variantPtr; local_18 = GHIDRA_CAST(variantPtr); if (variant == 1) { if ((((iVar1 == 0x1b) || (iVar4 == 0x1b)) && (iVar4 = get_secret_exit_kind(this), iVar4 == 3)) && ((this->_desc)._state == 3)) { bVar2 = (GHIDRA_CAST((GHIDRA_CAST(sprite))))->ANM2::SetAnimation(&DAT_00b68d9c,1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; } this->_previousState = (this->_desc)._state; this->_previousVariant = *variantPtr; ExceptionList = local_10; return; } animName = &this->_lockedAnimation; if (0xf < (this->_lockedAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } animData = (this->_sprite)._animState._animData; if (animData == GHIDRA_CAST(0x0)) { LAB_0070f2ee: bVar2 = (GHIDRA_CAST((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST(animName),1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; } } else { animNameCursor = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { animNameCursor = *GHIDRA_CAST(animData); } expectedName = animName; do { bVar2 = *animNameCursor; bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f2d0: uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f2d5; } if (bVar2 == 0) break; bVar2 = animNameCursor[1]; bVar6 = bVar2 < (byte)expectedName->_buf[1]; if (bVar2 != expectedName->_buf[1]) goto LAB_0070f2d0; animNameCursor = animNameCursor + 2; expectedName = GHIDRA_CAST((expectedName->_buf + 2)); } while (bVar2 != 0); uVar3 = 0; LAB_0070f2d5: if ((uVar3 != 0) || ((animData[0x34] != 0 && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0070f2ee; } variantRef = local_18; LAB_0070f30b: local_14 = variantRef; } else if ((((variant == 4) || (variant == 3)) || (variant == 2)) || (variant == 6)) { animName = &this->_closeAnimation; if (0xf < (this->_closeAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } animData = (this->_sprite)._animState._animData; if (animData == GHIDRA_CAST(0x0)) { LAB_0070f4b6: bVar2 = (GHIDRA_CAST((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST(animName),1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; } } else { animNameCursor = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { animNameCursor = *GHIDRA_CAST(animData); } expectedName = animName; do { bVar2 = *animNameCursor; bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f4a0: uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f4a5; } if (bVar2 == 0) break; bVar2 = animNameCursor[1]; bVar6 = bVar2 < (byte)expectedName->_buf[1]; if (bVar2 != expectedName->_buf[1]) goto LAB_0070f4a0; animNameCursor = animNameCursor + 2; expectedName = GHIDRA_CAST((expectedName->_buf + 2)); } while (bVar2 != 0); uVar3 = 0; LAB_0070f4a5: if ((uVar3 != 0) || ((animData[0x34] != 0 && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0070f4b6; } if ((this->_doorFlags & 0x20) == 0) { (GHIDRA_CAST((GHIDRA_CAST(&this->_sprite))))->Sprite::SetLastFrame(); } variantRef = local_18; local_14 = local_18; if ((this->_extraSprite)._loaded != 0) { iVar4 = *GHIDRA_CAST(local_18); iVar1 = (this->_desc)._state; this->_isExtraVisible = 1; if (iVar4 == 2) { if (iVar1 != 3) { (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Play(GHIDRA_CAST("TwoChains"),0); goto LAB_0070f311; } if (this->_previousState == 3) { pcVar5 = "OneChain"; } else { player = (GHIDRA_CAST((g_game)))->Game::GetPlayer(0); pcVar5 = "GoldenKeyOpenChain1"; if (player->_hasGoldenKey == 0) { pcVar5 = "KeyOpenChain1"; } } (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Play(GHIDRA_CAST(pcVar5),0); local_14 = variantRef; } else { if (iVar1 == 4) { pcVar5 = "Damaged"; } else if (((iVar4 != 4) && (iVar4 != 6)) || (pcVar5 = "Appear", spawnAge < 0xb)) { pcVar5 = GHIDRA_CAST(s_Idle); } (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Play(GHIDRA_CAST(pcVar5),0); if (((this->_currentRoomType == 0x1b) || (this->_targetRoomType == 0x1b)) && (iVar4 = get_secret_exit_kind(this), iVar4 == 2)) { iVar4 = (this->_desc)._state; layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x2)); layer->_visible = iVar4 != 4; variantRef = local_18; } local_14 = variantRef; } } } else { local_14 = GHIDRA_CAST(variantPtr); if ((this->_closeAnimation)._size != 0) { animName = &this->_closeAnimation; if (0xf < (this->_closeAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } animData = (this->_sprite)._animState._animData; if (animData == GHIDRA_CAST(0x0)) { LAB_0070f3fe: bVar2 = (GHIDRA_CAST((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST(animName),1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; } } else { animNameCursor = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { animNameCursor = *GHIDRA_CAST(animData); } expectedName = animName; do { bVar2 = *animNameCursor; bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f3e0: uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f3e5; } if (bVar2 == 0) break; bVar2 = animNameCursor[1]; bVar6 = bVar2 < (byte)expectedName->_buf[1]; if (bVar2 != expectedName->_buf[1]) goto LAB_0070f3e0; animNameCursor = animNameCursor + 2; expectedName = GHIDRA_CAST((expectedName->_buf + 2)); } while (bVar2 != 0); uVar3 = 0; LAB_0070f3e5: if ((uVar3 != 0) || ((animData[0x34] != 0 && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0070f3fe; } variantRef = local_18; local_14 = local_18; if (((this->_extraSprite)._loaded == 0) || (local_14 = local_18, *GHIDRA_CAST(local_18) == 8)) goto LAB_0070f30e; this->_isExtraVisible = 1; (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Play(GHIDRA_CAST("Appear"),0); goto LAB_0070f30b; } } LAB_0070f30e: variantRef = local_14; } LAB_0070f311: if (((spawnAge < roomAge) || ((((this->_doorFlags & 8) != 0 && (this->_slot != g_game->_enterDoor)) && (spawnAge == 0)))) && ((this->_sprite)._animState._animData != (void *)0x0)) { AnimationState::AdvancePosition (&(this->_sprite)._animState, *GHIDRA_CAST((GHIDRA_INT((this->_sprite)._animState._animData) + 0x30)) + -1); } goto LAB_0070f174; } if (((iVar4 == 5) && (-1 < this->_targetRoomIdx)) && (g_game->_stage == 9)) { bVar6 = true; } else { bVar6 = false; } iVar4 = (this->_desc)._variant; if (iVar4 == 1) { player = (GHIDRA_CAST((g_game)))->Game::GetPlayer(0); if (((player->_hasGoldenKey == 0) || (bVar2 = IsRoomType(this,9), bVar2 != 0)) || ((bVar2 = IsRoomType(this,0xb), bVar2 != 0 || ((player = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x17c,GHIDRA_CAST(&g_game->_playerManager),1), player != GHIDRA_CAST(0x0) || (bVar6)))))) { animName = &this->_openLockedAnimation; if (0xf < (this->_openLockedAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } animData = (this->_sprite)._animState._animData; if (animData != GHIDRA_CAST(0x0)) { animNameCursor = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { animNameCursor = *GHIDRA_CAST(animData); } expectedName = animName; do { bVar2 = *animNameCursor; bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070efc2: uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070efc7; } if (bVar2 == 0) break; bVar2 = animNameCursor[1]; bVar6 = bVar2 < (byte)expectedName->_buf[1]; if (bVar2 != expectedName->_buf[1]) goto LAB_0070efc2; animNameCursor = animNameCursor + 2; expectedName = GHIDRA_CAST((expectedName->_buf + 2)); } while (bVar2 != 0); uVar3 = 0; LAB_0070efc7: if ((uVar3 == 0) && ((sprite = GHIDRA_CAST(&this->_sprite), animData[0x34] == 0 || ((this->_sprite)._animState._isPlaying != 0)))) goto LAB_0070f148; } sprite = GHIDRA_CAST(&this->_sprite); bVar2 = (GHIDRA_CAST((GHIDRA_CAST(sprite))))->ANM2::SetAnimation(GHIDRA_CAST(animName),1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; goto LAB_0070f145; } } else { (GHIDRA_CAST((GHIDRA_CAST(sprite))))->ANM2::Play(GHIDRA_CAST("GoldenKeyOpen"),0); } } else { if (iVar4 == 2) { bVar2 = 0; player = (GHIDRA_CAST((g_game)))->Game::GetPlayer(0); pcVar5 = "KeyOpenChain2"; if (player->_hasGoldenKey != 0) { pcVar5 = "GoldenKeyOpenChain2"; } (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Play(GHIDRA_CAST(pcVar5),bVar2); this->_isExtraVisible = 1; } animName = &this->_openAnimation; if (0xf < (this->_openAnimation)._capacity) { animName = *GHIDRA_CAST(animName->_buf); } animData = (this->_sprite)._animState._animData; if (animData == GHIDRA_CAST(0x0)) { LAB_0070f0a0: bVar2 = (GHIDRA_CAST((&this->_sprite)))->ANM2::SetAnimation(GHIDRA_CAST(animName),1); if (bVar2 != 0) { (GHIDRA_CAST((&(this->_sprite)._animState)))->AnimationState::Rewind(); (this->_sprite)._animState._isPlaying = 1; } } else { animNameCursor = animData; if (0xf < *GHIDRA_CAST((animData + 0x14))) { animNameCursor = *GHIDRA_CAST(animData); } expectedName = animName; do { bVar2 = *animNameCursor; bVar6 = bVar2 < (byte)expectedName->_buf[0]; if (bVar2 != expectedName->_buf[0]) { LAB_0070f085: uVar3 = -GHIDRA_UINT(bVar6) | 1; goto LAB_0070f08a; } if (bVar2 == 0) break; bVar2 = animNameCursor[1]; bVar6 = bVar2 < (byte)expectedName->_buf[1]; if (bVar2 != expectedName->_buf[1]) goto LAB_0070f085; animNameCursor = animNameCursor + 2; expectedName = GHIDRA_CAST((expectedName->_buf + 2)); } while (bVar2 != 0); uVar3 = 0; LAB_0070f08a: if ((uVar3 != 0) || ((animData[0x34] != 0 && ((this->_sprite)._animState._isPlaying == 0)))) goto LAB_0070f0a0; } sprite = GHIDRA_CAST(&this->_sprite); if (this->_targetRoomIdx == -7) { EntityList::QuerySublist(GHIDRA_CAST((GHIDRA_INT(g_game->_room) + 0x1218)),&familiars,3,-1,-1,0,0); local_8 = 0; uVar3 = 0; if (familiars._size != 0) { do { iVar4 = __RTDynamicCast(*GHIDRA_CAST((GHIDRA_CAST(familiars._data) + uVar3 * 4)),0, &IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Familiar::RTTI_Type_Descriptor,0); if (*GHIDRA_CAST((iVar4 + 0x2c)) == 0xec) { *GHIDRA_CAST((iVar4 + 0xd88)) = 1; } uVar3 = uVar3 + 1; } while (uVar3 < GHIDRA_UINT(familiars._size)); this = local_18; } local_8 = 0xffffffff; (GHIDRA_CAST((&familiars)))->EntityList_Query::~EntityList_Query(); LAB_0070f145: sprite = GHIDRA_CAST(&this->_sprite); } } LAB_0070f148: if ((roomAge <= spawnAge) && (((spawnAge < 10 && ((this->_doorFlags & 0x40) == 0)) || (spawnAge < 2)))) { (GHIDRA_CAST((sprite)))->Sprite::SetLastFrame(); this->_isExtraVisible = 0; } variantRef = GHIDRA_CAST(&(this->_desc)._variant); LAB_0070f174: iVar4 = *GHIDRA_CAST(variantRef); if (((iVar4 != 4) && (iVar4 != 6)) && ((this->_previousVariant == 4 || (this->_previousVariant == 6)))) { (GHIDRA_CAST((&this->_extraSprite)))->ANM2::Play(GHIDRA_CAST("Vanish"),0); iVar4 = *GHIDRA_CAST(variantRef); this->_isExtraVisible = 1; } this->_previousState = (this->_desc)._state; this->_previousVariant = iVar4; ExceptionList = local_10; return; } // 0070f670 undefined1 GridEntity_Door::CanTakeDamageFromTearEffects() { return CONCAT31((uint3)(GHIDRA_UINT(this->_doorFlags) >> 0xc),~(byte)(GHIDRA_UINT(this->_doorFlags) >> 4)) & 0xffffff01; } // 0070f680 undefined4 GridEntity_Door::CanBlowOpen() { byte isCheck; Entity_Player *padlockOwner; int doorVariant; int doorVariant; Game *game; void *room; if ((((g_game->_difficulty != 2) && (g_game->_difficulty != 3)) && ((g_game->_stage == 0xb || (g_game->_stage == 0xc)))) && ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x44)) & 1) == 0)) { return 0; } if (this->_targetRoomType == 0) { return 0; } if ((this->_desc)._state == 2) { return 0; } if (g_game->_stage == 0xd) { return 0; } isCheck = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::AnyoneHasTrinket(0x88); game = g_game; if (isCheck != 0) { doorVariant = (this->_desc)._variant; if (doorVariant == 1) { return 1; } if (doorVariant == 2) { return 1; } } doorVariant = this->_currentRoomType; if (doorVariant == 1) { if (this->_targetRoomType == 1) { doorVariant = (this->_desc)._variant; if ((((doorVariant != 1) && (doorVariant != 4)) && (doorVariant != 2)) && (doorVariant != 5)) { return 1; } LAB_0070f748: isCheck = IsRoomType(this,8); if ((isCheck == 0) && (isCheck = IsRoomType(this,0x1d), isCheck == 0)) goto LAB_0070f79f; } else { LAB_0070f73f: if (this->_targetRoomType != 7) goto LAB_0070f748; } if (doorVariant == 5) goto LAB_0070f79f; } else if (doorVariant != 7) goto LAB_0070f73f; if ((this->_targetRoomType != 5) && (((room = game->_room, *GHIDRA_CAST((GHIDRA_CAST(room) + 0x7228)) == '\0' && (doorVariant != 6)) || ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(room) + 4)) + 0x44)) & 1) != 0)))) { if (doorVariant != 0xb) { return 1; } if ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(room) + 4)) + 0x44)) >> 3 & 1) != 0) { return 1; } } LAB_0070f79f: doorVariant = (this->_desc)._variant; if (doorVariant == 3) { return 1; } if (((((this->_doorFlags & 9) != 0) || (this->_targetRoomType == 5)) || (doorVariant == 5)) && (padlockOwner = (GHIDRA_CAST((&game->_playerManager)))->PlayerManager::FirstTrinketOwner(0x88), padlockOwner != GHIDRA_CAST(0x0))) { doorVariant = (GHIDRA_CAST((padlockOwner)))->Entity_Player::GetTrinketMultiplier(0x88); if (doorVariant == 2) { if ((this->_doorFlags & 9) != 0) { return 1; } doorVariant = (this->_desc)._variant; } else { if (doorVariant < 3) { return 0; } doorVariant = this->_targetRoomType; } if (doorVariant == 5) { return 1; } } return 0; } // 0070f810 void GridEntity_Door::SpawnDust() { Vector *doorDirection; uint rngResult; uint rngValue; Entity *dustEntity; int *dust; int iVar1; float fVar2; float cosAngle; float fVar3; float negDirY; undefined1 *sideSign; int dustCount; Vector dustVelocity; Vector local_10; float dirX; int gridWidth; doorDirection = Isaac::GetAxisAlignedUnitVectorFromDir(&local_10,this->_direction); dirX = doorDirection->x; negDirY = -doorDirection->y; rngResult = Random(); dustCount = (rngResult & 3) + 3; if (dustCount != 0) { do { rngResult = Random(); rngValue = Random(); fVar2 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 5.0; rngValue = Random(); iVar1 = this->_gridIndex; fVar3 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 5.0 - 2.5; dustVelocity.y = fVar3 * dirX + fVar2 * negDirY; dustVelocity.x = fVar3 * negDirY + fVar2 * -dirX; gridWidth = *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0xc)); rngValue = Random(); fVar2 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 3.14; fVar2 = fVar2 + fVar2; rngValue = Random(); fVar3 = (float)((double)GHIDRA_INT(rngValue) + __uint_to_double_fixup[-(GHIDRA_INT(rngValue) >> 0x1f)]) * 2.3283064e-10 * 20.0; cosAngle = cos(fVar2); local_10.x = cosAngle * fVar3 + (float)(iVar1 % gridWidth) * 40.0 + 40.0; fVar2 = sin(fVar2); local_10.y = fVar2 * fVar3 + (float)(iVar1 / gridWidth) * 40.0 + 120.0; dustEntity = (GHIDRA_CAST((g_game)))->Game::SpawnEx(1000,0x3b,&local_10,&dustVelocity,GHIDRA_CAST(0x0),0,rngResult, 0); dust = GHIDRA_CAST(__RTDynamicCast(dustEntity,0,&IsaacRepentancePlus::Entity::RTTI_Type_Descriptor, &IsaacRepentancePlus::Entity_Effect::RTTI_Type_Descriptor,0)); iVar1 = *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0xc)); sideSign = GHIDRA_CAST(0x3f800000); if (((float)dust[0xcf] - ((float)(this->_gridIndex % iVar1) * 40.0 + 40.0)) * negDirY + ((float)dust[0xd0] - ((float)(this->_gridIndex / iVar1) * 40.0 + 120.0)) * dirX < 0.0) { sideSign = &DAT_bf800000; } rngResult = Random(); dust[0x11d] = GHIDRA_INT((((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 10.0 + 2.0) * (float)sideSign)); rngResult = Random(); iVar1 = rngResult % 0xf + 0xf; dust[0x117] = iVar1; dust[0x118] = iVar1; (**(code **)(*dust + 0xc))(); dustCount = dustCount + -1; } while (dustCount != 0); } return; } // 0070fb60 byte GridEntity_Door::TryBlowOpen(byte isFromExplosion, Entity *source) { uint *puVar1; qword qVar2; char cVar3; byte bVar4; ChallengeParam *challengeParams; Entity_Player *player; int iVar5; ColorMod *color; uint rngResult; ColorMod *color_00; Entity *poof; RoomDescriptor *targetRoomDesc; ColorMod *color_01; Vector *pVVar6; ColorMod *color_02; ColorMod *color_03; char *pcVar7; int soundId; Vector doorPos; Color particleColor; uint stackCookie; Game *game; Manager *manager; void *room; int variant; stackCookie = __security_cookie ^ GHIDRA_UINT(&soundId); if (((isFromExplosion == 0) && (source == GHIDRA_CAST(0x0))) && (cVar3 = FUN_00711740(), cVar3 == '\0')) { return 0; } if ((this->_doorFlags & 0x10) != 0) { if (((g_game->_challenge != 0) || ((g_game->_dailyChallenge)._id != 0)) && (challengeParams = (GHIDRA_CAST((g_game)))->Game::GetChallengeParams(), challengeParams->_pathType == 2)) { return 0; } if ((this->_desc)._state == 2) { return 0; } (this->_desc)._variant = 8; this->_isBusted = 1; (this->_desc)._state = 2; UpdateAnimation(this); manager = g_manager; soundId = 0x262; seed_fart_sound_override(&soundId); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); g_game->_levelStateFlags = g_game->_levelStateFlags | 0x800000; if (source == GHIDRA_CAST(0x0)) { return 1; } player = GHIDRA_CAST((GHIDRA_CAST((source)))->Entity)::GetPlayerAncestor(); if (player == GHIDRA_CAST(0x0)) { return 1; } (GHIDRA_CAST((player)))->Entity_Player::DonateLuck(-7); return 1; } iVar5 = get_secret_exit_kind(this); if (iVar5 == 4) { if (source == GHIDRA_CAST(0x0)) { return 0; } if (source->_type != 3) { return 0; } if (source->_variant == 0xdf) { (GHIDRA_CAST((GHIDRA_CAST(this))))->GridEntity::Position(&doorPos); (GHIDRA_CAST((&particleColor)))->Color::Color(); rngResult = Random(); Game::SpawnParticles(g_game,&doorPos,4,rngResult % 5 + 6,8.0,color,100000.0,10); (GHIDRA_CAST((&particleColor)))->Color::Color(); rngResult = Random(); Game::SpawnParticles(g_game,&doorPos,5,rngResult % 6 + 9,8.0,color_00,100000.0,0); rngResult = Random(); poof = (GHIDRA_CAST((g_game)))->Game::SpawnEx(1000,2,&doorPos,&g_vectorZero,GHIDRA_CAST(0x0),0,rngResult,0); (GHIDRA_CAST((&poof->_sprite)))->ANM2::Play(GHIDRA_CAST("Poof_Large1"),0); poof->_renderDepthOffset = 5.0; manager = g_manager; (this->_desc)._variant = 8; this->_isBusted = 1; (this->_desc)._state = 2; soundId = 0x4d; seed_fart_sound_override(&soundId); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); manager = g_manager; soundId = 0x1c; seed_fart_sound_override(&soundId); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); UpdateAnimation(this); (GHIDRA_CAST((g_game)))->Game::UpdateVisibility(); game = g_game; qVar2 = g_game->_gameStateFlags; puVar1 = GHIDRA_CAST((GHIDRA_INT(&g_game->_gameStateFlags) + 4)); *puVar1 = *puVar1 | 0x100000; *GHIDRA_CAST(&game->_gameStateFlags) = GHIDRA_INT(qVar2); return 1; } return 0; } iVar5 = this->_targetRoomType; if (((iVar5 == 7) || (iVar5 == 8)) || (iVar5 == 0x1d)) { bVar4 = 0xff; iVar5 = this->_targetRoomIdx; targetRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(iVar5,-1); if ((targetRoomDesc->VisitedCount == 0) && ((this->_desc)._variant == 7)) { (GHIDRA_CAST((GHIDRA_CAST(&g_manager->_musicManager))))->Music::PlayJingle(0x55,iVar5,bVar4); } } iVar5 = (this->_desc)._variant; if ((iVar5 == 7) || (iVar5 == 0)) { (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::UncoverHiddenDoor(g_game->_currentRoomIdx,this->_slot); } if (((((g_game->_difficulty != 2) && (g_game->_difficulty != 3)) && ((g_game->_stage == 0xb || (g_game->_stage == 0xc)))) && ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x44)) & 1) == 0)) || (((this->_targetRoomType == 0 || ((this->_desc)._state == 2)) || (g_game->_stage == 0xd)))) goto LAB_00710310; bVar4 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::AnyoneHasTrinket(0x88); if ((bVar4 == 0) || ((iVar5 = (this->_desc)._variant, iVar5 != 1 && (iVar5 != 2)))) { iVar5 = this->_currentRoomType; if (iVar5 == 1) { if (this->_targetRoomType == 1) { variant = (this->_desc)._variant; if (((variant != 1) && (variant != 4)) && ((variant != 2 && (variant != 5)))) goto LAB_00710063; LAB_0070ff8f: bVar4 = IsRoomType(this,8); if ((bVar4 != 0) || (bVar4 = IsRoomType(this,0x1d), bVar4 != 0)) goto LAB_0070ffa9; } else { LAB_0070ff86: if (this->_targetRoomType != 7) goto LAB_0070ff8f; LAB_0070ffa9: if (iVar5 != 5) goto LAB_0070ffae; } } else { if (iVar5 != 7) goto LAB_0070ff86; LAB_0070ffae: if ((this->_targetRoomType != 5) && ((((room = g_game->_room, *GHIDRA_CAST((GHIDRA_CAST(room) + 0x7228)) == '\0' && (iVar5 != 6)) || ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(room) + 4)) + 0x44)) & 1) != 0)) && ((iVar5 != 0xb || ((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(room) + 4)) + 0x44)) >> 3 & 1) != 0)))))) goto LAB_00710063; } iVar5 = (this->_desc)._variant; if (iVar5 != 3) { if (((((this->_doorFlags & 9) != 0) || (this->_targetRoomType == 5)) || (iVar5 == 5)) && (player = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::FirstTrinketOwner(0x88), player != GHIDRA_CAST(0x0))) { iVar5 = (GHIDRA_CAST((player)))->Entity_Player::GetTrinketMultiplier(0x88); if (iVar5 == 2) { if ((this->_doorFlags & 9) != 0) goto LAB_00710063; iVar5 = (this->_desc)._variant; } else { if (iVar5 < 3) goto LAB_00710310; iVar5 = this->_targetRoomType; } if (iVar5 == 5) goto LAB_00710063; } LAB_00710310: iVar5 = (this->_desc)._variant; if ((iVar5 != 7) && (iVar5 != 0)) { return 0; } if ((this->_currentRoomType == 6) || (iVar5 = 8, *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0x7228)) != '\0')) { iVar5 = 4; } (this->_desc)._variant = iVar5; if (isFromExplosion != 0) { SpawnDust(this); } goto LAB_00710353; } } LAB_00710063: iVar5 = (this->_desc)._variant; if (((iVar5 == 1) || (iVar5 == 2)) && (bVar4 = (GHIDRA_CAST((&g_game->_playerManager)))->PlayerManager::AnyoneHasTrinket(0x88), bVar4 != 0)) { (this->_desc)._variant = 8; } if (((this->_currentRoomType == 1) && (this->_targetRoomType == 1)) && (((this->_desc)._variant != 3 && ((GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Break"),5), isFromExplosion != 0)))) { (GHIDRA_CAST((&particleColor)))->Color::Color(); rngResult = Random(); pVVar6 = (GHIDRA_CAST((GHIDRA_CAST(this))))->GridEntity::Position(&doorPos); Game::SpawnParticles(g_game,pVVar6,0x1b,rngResult % 5 + 6,8.0,color_01,100000.0,0); SpawnDust(this); } if (((this->_currentRoomType == 7) || (this->_targetRoomType == 7)) || ((this->_currentRoomType == 8 || (this->_targetRoomType == 8)))) { LAB_00710147: pcVar7 = "Opened"; (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(GHIDRA_CAST("Opened"),6); if (isFromExplosion != 0) { (GHIDRA_CAST((&particleColor)))->Color::Color(); rngResult = Random(); pVVar6 = (GHIDRA_CAST((GHIDRA_CAST(this))))->GridEntity::Position(&doorPos); Game::SpawnParticles(g_game,pVVar6,4,rngResult % 5 + 6,8.0,color_02,100000.0,0); SpawnDust(this); manager = g_manager; soundId = 0x89; seed_fart_sound_override(&soundId); pcVar7 = GHIDRA_CAST(0x3f800000); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(soundId,1.0,2,0,1.0,0.0); } } else { pcVar7 = GHIDRA_CAST(0x71013f); bVar4 = IsRoomType(this,0x1d); if (bVar4 != 0) goto LAB_00710147; } if ((this->_desc)._variant == 3) { (GHIDRA_CAST((&particleColor)))->Color::Color(); rngResult = Random(); pVVar6 = (GHIDRA_CAST((GHIDRA_CAST(this))))->GridEntity::Position(&doorPos); pcVar7 = GHIDRA_CAST(0x47c35000); Game::SpawnParticles(g_game,pVVar6,0x1b,rngResult % 5 + 6,8.0,color_03,100000.0,0); if ((this->_desc)._state == 1) { (this->_desc)._state = 4; LAB_00710353: UpdateAnimation(this); return 0; } } iVar5 = (this->_desc)._variant; if (iVar5 != 1) { if (((iVar5 == 7) && (*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 8)) == 6)) || (*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0x7228)) != '\0')) { (this->_desc)._variant = 4; } else { if (iVar5 == 3) { FUN_0070bfa0(0x1e1,2,pcVar7,0x3f800000); } (this->_desc)._variant = 8; this->_isBusted = 1; (this->_desc)._state = 2; } } UpdateAnimation(this); (GHIDRA_CAST((g_game)))->Game::UpdateVisibility(); if (isFromExplosion != 0) { (GHIDRA_CAST((&g_manager->_persistentGameData)))->PersistentGameData::IncreaseEventCounter(199,1); } return 1; } // 00710480 byte GridEntity_Door::TryUnlock(Entity_Player *player, byte isForce) { byte bVar1; char isDamaged; int iVar2; Entity_Player *trinketHolder; Vector *pVVar3; uint rngResult; Entity *particle; byte *pbVar4; uint uVar5; byte *pbVar6; LayerState *layer; RoomDescriptor *targetRoomDesc; Entity_Player *trinketHolder; undefined4 extraout_ECX; char *wantedAnimNameStr; ANM2 *sprite; bool bVar7; uint in_stack_ffffff80; float local_64; uint local_60; float cosSpread; float negDirY; uint slowParticleCount; int particleCount; Vector particleVelocity; Vector particlePos; Vector VStack_3c; ColorMod local_34; float dirX; Game *game; qword gameStateFlags; uint *gameStateFlagsHigh; Manager *manager; code *takeDamage; int variant; game = g_game; if ((this->_doorFlags & 0x10) != 0) { return 0; } if (player->_isCoopGhost != 0) { return 0; } iVar2 = (this->_desc)._variant; if (isForce == 0) { if (((iVar2 == 1) && (this->_targetRoomType == 0x1b)) && (iVar2 = get_secret_exit_kind(this), iVar2 == 3)) { if ((this->_doorFlags & 0x40) != 0) { local_64 = 0.0; trinketHolder = GHIDRA_CAST(FUN_007103c0(&local_64)); if (trinketHolder == GHIDRA_CAST(0x0)) { return 0; } if (local_64 != 0.0) { (GHIDRA_CAST((trinketHolder)))->Entity_Player::TryRemoveTrinket(GHIDRA_UINT(local_64)); } manager = g_manager; local_60 = 8; seed_fart_sound_override(GHIDRA_CAST(&local_60)); bVar1 = 0; iVar2 = 0x3f800000; (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_60,1.0,2,0,1.0,0.0); (GHIDRA_CAST((GHIDRA_CAST(&g_manager->_musicManager))))->Music::PlayJingle(0x44,iVar2,bVar1); (this->_desc)._state = 2; UpdateAnimation(this); (this->_desc)._variant = 8; sprite = &this->_sprite; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x1)); layer->_visible = 0; bVar7 = local_64 == 9.66896e-44; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(GHIDRA_CAST(0x2)); layer->_visible = bVar7; layer = (GHIDRA_CAST((sprite)))->ANM2::GetLayer(&DAT_00000004); layer->_visible = 0; return 1; } if (((this->_sprite)._animState._animData != (void *)0x0) && ((this->_sprite)._animState._isPlaying != 0)) { pbVar6 = (this->_sprite)._animState._animData; if (0xf < *GHIDRA_CAST((pbVar6 + 0x14))) { pbVar6 = *GHIDRA_CAST(pbVar6); } pbVar4 = &DAT_00b68d9c; do { bVar1 = *pbVar6; bVar7 = bVar1 < *pbVar4; if (bVar1 != *pbVar4) { LAB_007106c0: uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_007106c5; } if (bVar1 == 0) break; bVar1 = pbVar6[1]; bVar7 = bVar1 < pbVar4[1]; if (bVar1 != pbVar4[1]) goto LAB_007106c0; pbVar6 = pbVar6 + 2; pbVar4 = pbVar4 + 2; } while (bVar1 != 0); uVar5 = 0; LAB_007106c5: if (uVar5 == 0) { return 0; } } iVar2 = (GHIDRA_CAST((player)))->Entity_Player::GetHealthType(); if ((iVar2 != 2) && (bVar1 = (GHIDRA_CAST((trinketHolder)))->Entity_Player::HasInstantDeathCurse(), bVar1 == 0)) { in_stack_ffffff80 = 0x7106fd; bVar1 = (GHIDRA_CAST((&g_game->_seedEffects)))->Seeds::HasSeedEffect(0x49); if (bVar1 == 0) { (GHIDRA_CAST((GHIDRA_CAST(&local_34))))->EntityRef::EntityRef(); takeDamage = *(code **)(*GHIDRA_CAST(player) + 0x20); local_34._tint[0] = 0.0; local_34._tint[1] = 1.40172e-41; player->_damageCooldown = 0; isDamaged = (*takeDamage)(0x40000000,0x12002080,0,extraout_ECX,0x1e); if (isDamaged == '\0') { return 0; } pVVar3 = Isaac::GetAxisAlignedUnitVectorFromDir(&VStack_3c,this->_direction); dirX = pVVar3->x; negDirY = -pVVar3->y; in_stack_ffffff80 = Random(); pVVar3 = (GHIDRA_CAST((GHIDRA_CAST(this))))->GridEntity::Position(&VStack_3c); (GHIDRA_CAST((g_game)))->Game::SpawnEx(1000,2,pVVar3,&g_vectorZero,GHIDRA_CAST(0x0),3,in_stack_ffffff80,0); uVar5 = Random(); slowParticleCount = (uVar5 & 1) + 2; rngResult = Random(); particleCount = (uVar5 & 1) + 8 + rngResult % 10; local_60 = 0; if (particleCount != 0) { do { uVar5 = local_60; rngResult = Random(); local_64 = ((float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 30.0 - 15.0) * 0.017453292; cosSpread = cos(local_64); local_64 = sin(local_64); rngResult = Random(); particleVelocity.y = (float)((double)GHIDRA_INT(rngResult) + __uint_to_double_fixup[-(GHIDRA_INT(rngResult) >> 0x1f)]) * 2.3283064e-10 * 15.0 + 5.0; particleVelocity.x = (-dirX * cosSpread - negDirY * local_64) * particleVelocity.y; particleVelocity.y = (negDirY * cosSpread + -dirX * local_64) * particleVelocity.y; iVar2 = *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 0xc)); particlePos.x = (float)(this->_gridIndex % iVar2) * 40.0 + 40.0 + particleVelocity.x; particlePos.y = (float)(this->_gridIndex / iVar2) * 40.0 + 120.0 + particleVelocity.y; in_stack_ffffff80 = Random(); if (uVar5 < slowParticleCount) { VStack_3c.x = particleVelocity.x * 0.2; VStack_3c.y = particleVelocity.y * 0.2; particle = (GHIDRA_CAST((g_game)))->Game::SpawnEx(1000,5,&particlePos,&VStack_3c,GHIDRA_CAST(0x0),0, in_stack_ffffff80,0); particle->Update(); local_60 = uVar5; } else { particle = (GHIDRA_CAST((g_game)))->Game::SpawnEx(1000,5,&particlePos,&particleVelocity,GHIDRA_CAST(0x0), 99,in_stack_ffffff80,0); particle->Update(); *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST(&(particle[1])) + 0x4)))) = 0xc1000000; } local_60 = local_60 + 1; } while (GHIDRA_INT(local_60) < particleCount); } goto LAB_007109b9; } } (this->_desc)._varData = 0; LAB_007109b9: (this->_desc)._state = ((this->_desc)._varData != 0) + 2; UpdateAnimation(this); iVar2 = (this->_desc)._varData; if (iVar2 < 1) { (this->_desc)._variant = 8; } else { (this->_desc)._varData = iVar2 + -1; } FUN_0070bfa0(0x48,2,in_stack_ffffff80,0x3f800000); return 1; } } else if (iVar2 == 5) { gameStateFlags = g_game->_gameStateFlags; gameStateFlagsHigh = GHIDRA_CAST((GHIDRA_INT(&g_game->_gameStateFlags) + 4)); *gameStateFlagsHigh = *gameStateFlagsHigh | 0x20000; *GHIDRA_CAST(&game->_gameStateFlags) = GHIDRA_INT(gameStateFlags); } iVar2 = (this->_desc)._variant; bVar7 = false; if ((iVar2 == 1) || (iVar2 == 2)) { in_stack_ffffff80 = 0x96; bVar1 = (GHIDRA_CAST((player)))->Entity_Player::HasTrinket(0x96,0); if (bVar1 != 0) { isForce = 1; bVar7 = true; } } if (g_game->_stage == 9) { in_stack_ffffff80 = 0x71051b; iVar2 = (GHIDRA_CAST((player)))->Entity_Player::GetTrinketMultiplier(0xaf); if (iVar2 < 2) goto LAB_00710a08; isForce = 1; } else { LAB_00710a08: if (isForce == 0) { iVar2 = (this->_desc)._state; if (iVar2 == 2) { return 0; } variant = (this->_desc)._variant; if ((variant != 1) && (variant != 2)) { return 0; } if ((this->_isExtraVisible != 0) && (iVar2 == 3)) { bVar1 = (GHIDRA_CAST((&this->_extraSprite)))->ANM2::IsPlaying(GHIDRA_CAST("GoldenKeyOpenChain1")); if (bVar1 != 0) { return 0; } in_stack_ffffff80 = 0x710a68; bVar1 = (GHIDRA_CAST((&this->_extraSprite)))->ANM2::IsPlaying(GHIDRA_CAST("KeyOpenChain1")); if (bVar1 != 0) { return 0; } } if ((this->_doorFlags & 1) == 0) { if (this->_targetRoomType == 2) { in_stack_ffffff80 = 0x53; bVar1 = (GHIDRA_CAST((player)))->Entity_Player::HasTrinket(0x53,0); if (bVar1 != 0) goto LAB_00710af5; } } else if (0 < player->_numCoins) goto LAB_00710af5; if (((this->_targetRoomType != 5) || (this->_targetRoomIdx < 0)) || (g_game->_stage != 9)) { if ((this->_doorFlags & 1) != 0) { return 0; } iVar2 = (this->_desc)._variant; if ((iVar2 == 1) || (iVar2 == 2)) { in_stack_ffffff80 = 0x710ade; iVar2 = (GHIDRA_CAST((player)))->Entity_Player::GetTrinketMultiplier(0x13); if (2 < iVar2) goto LAB_00710af5; } bVar1 = (GHIDRA_CAST((player)))->Entity_Player::TryUseKey(); if (bVar1 == 0) { return 0; } } } } LAB_00710af5: if ((this->_doorFlags & 1) == 0) { if (isForce == 0) goto LAB_00710b1b; } else if (isForce == 0) { in_stack_ffffff80 = 0x710b0b; (GHIDRA_CAST((player)))->Entity_Player::AddCoins(-1); goto LAB_00710b1b; } this->_isUnlockedByPlayer = 1; LAB_00710b1b: if ((((this->_desc)._variant == 2) && ((this->_desc)._state != 3)) && (isForce == 0)) { (this->_desc)._state = 3; UpdateAnimation(this); return 1; } (this->_desc)._state = 2; UpdateAnimation(this); iVar2 = this->_targetRoomType; (this->_desc)._variant = 8; manager = g_manager; if (((iVar2 == 5) && (-1 < this->_targetRoomIdx)) && (g_game->_stage == 9)) { FUN_0070bfa0(0xe,2,in_stack_ffffff80,0x3e99999a); } else { local_60 = 0x2d; if ((this->_doorFlags & 1) == 0) { local_60 = 0x9c; } seed_fart_sound_override(GHIDRA_CAST(&local_60)); (GHIDRA_CAST((&manager->_sfxManager)))->SoundEffects::Play(local_60,1.0,2,0,1.0,0.0); } if (bVar7) { pbVar6 = (this->_sprite)._animState._animData; if (pbVar6 != GHIDRA_CAST(0x0)) { if ((this->_sprite)._animState._isPlaying != 0) { pbVar4 = pbVar6; if (0xf < *GHIDRA_CAST((pbVar6 + 0x14))) { pbVar4 = *GHIDRA_CAST(pbVar6); } wantedAnimNameStr = "GoldenKeyOpen"; do { bVar1 = *pbVar4; bVar7 = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_00710c35: uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00710c3a; } if (bVar1 == 0) break; bVar1 = pbVar4[1]; bVar7 = bVar1 < (byte)wantedAnimNameStr[1]; if (bVar1 != wantedAnimNameStr[1]) goto LAB_00710c35; pbVar4 = pbVar4 + 2; wantedAnimNameStr = wantedAnimNameStr + 2; } while (bVar1 != 0); uVar5 = 0; LAB_00710c3a: if (uVar5 == 0) { (GHIDRA_CAST((&this->_sprite)))->ANM2::Play(GHIDRA_CAST("KeyOpen"),0); pbVar6 = (this->_sprite)._animState._animData; } } if ((pbVar6 != GHIDRA_CAST(0x0)) && ((this->_sprite)._animState._isPlaying != 0)) { pbVar6 = (this->_sprite)._animState._animData; if (pbVar6 == GHIDRA_CAST(0x0)) { pbVar6 = &s_empty; } else if (0xf < *GHIDRA_CAST((pbVar6 + 0x14))) { pbVar6 = *GHIDRA_CAST(pbVar6); } wantedAnimNameStr = "KeyOpen"; do { bVar1 = *pbVar6; bVar7 = bVar1 < (byte)*wantedAnimNameStr; if (bVar1 != *wantedAnimNameStr) { LAB_00710ca0: uVar5 = -GHIDRA_UINT(bVar7) | 1; goto LAB_00710ca5; } if (bVar1 == 0) break; bVar1 = pbVar6[1]; bVar7 = bVar1 < (byte)wantedAnimNameStr[1]; if (bVar1 != wantedAnimNameStr[1]) goto LAB_00710ca0; pbVar6 = pbVar6 + 2; wantedAnimNameStr = wantedAnimNameStr + 2; } while (bVar1 != 0); uVar5 = 0; LAB_00710ca5: if ((uVar5 == 0) && (layer = (GHIDRA_CAST((&this->_sprite)))->ANM2::GetLayer(&DAT_00b1ce2c), layer != GHIDRA_CAST(0x0))) { local_34._tint[0] = 1.0; local_34._tint[1] = 1.0; local_34._tint[2] = 1.0; local_34._tint[3] = 1.0; local_34._colorize[0] = 0.4; local_34._colorize[1] = 0.6; local_34._colorize[2] = 1.0; local_34._colorize[3] = 1.0; local_34._offset[0] = 0.0; local_34._offset[1] = 0.0; local_34._offset[2] = 0.0; (GHIDRA_CAST((GHIDRA_CAST(&layer->_color))))->Color::operator_assign(&local_34); } } } targetRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if (targetRoomDesc->Data != (void *)0x0) { targetRoomDesc->Flags = targetRoomDesc->Flags | 0x40000; } } return 1; } // 00710d30 void GridEntity_Door::Close(byte isForce) { int currentRoomType; int targetRoomType; if (((this->_desc)._state != 1) || (isForce != 0)) { (this->_desc)._state = 1; UpdateAnimation(this); currentRoomType = this->_currentRoomType; if (((currentRoomType == 7) || (((targetRoomType = this->_targetRoomType, targetRoomType == 7 || (currentRoomType == 8)) || (targetRoomType == 8)))) || ((currentRoomType == 0x1d || (targetRoomType == 0x1d)))) { (GHIDRA_CAST(((this->_openAnimation)._buf)))->std::string::assign(s_Open,4); } } return; } // 00710d90 void GridEntity_Door::Bar() { byte isSpriteLoaded; isSpriteLoaded = (this->_extraSprite)._loaded; (this->_desc)._state = 1; (this->_desc)._variant = 4; if ((isSpriteLoaded == 0) || ((this->_doorFlags & 0x20) != 0)) { LoadSprite(this); } UpdateAnimation(this); return; } // 00710dd0 void GridEntity_Door::Open() { uint *puVar1; qword qVar2; byte isFromSecretRoom; char cVar4; int variant; RoomDescriptor *targetRoom; int currentRoomType; Game *game; bool isFromSecretRoom; if (((this->_doorFlags & 0x10U) != 0) && ((this->_desc)._variant != 8)) { return; } if (((this->_doorFlags & 0x20U) != 0) && ((this->_desc)._variant == 4)) { return; } if ((this->_desc)._state == 2) { return; } variant = (this->_desc)._variant; if (variant == 7) { return; } currentRoomType = this->_currentRoomType; if (this->_targetRoomType == 0xb) { if ((currentRoomType == 7) || (currentRoomType == 8)) { isFromSecretRoom = true; } else { isFromSecretRoom = false; } isFromSecretRoom = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::CanOpenChallengeRoom(this->_targetRoomIdx); if (((isFromSecretRoom == 0) && (this->_isUnlockedByPlayer == 0)) && (!isFromSecretRoom)) { return; } goto LAB_00710e57; } if (currentRoomType == 0xb) { if (((g_game->_ambush)._isActive != 0) && (this->_isUnlockedByPlayer == 0)) { return; } } else { isFromSecretRoom = IsRoomType(this,0); if (isFromSecretRoom != 0) { return; } if (variant != 4) { if (variant == 6) { cVar4 = FUN_00710f70(g_game->_greedModeWave); if (cVar4 != '\0') { LAB_00710f2b: if ((this->_desc)._variant != 8) { return; } } } else if ((variant != 1) || (targetRoom = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1), targetRoom->VisitedCount == 0)) goto LAB_00710f2b; } } cVar4 = FUN_00711740(); if (cVar4 == '\0') { (this->_desc)._state = 5; return; } LAB_00710e57: game = g_game; variant = (this->_desc)._variant; if (variant == 5) { qVar2 = g_game->_gameStateFlags; puVar1 = GHIDRA_CAST((GHIDRA_INT(&g_game->_gameStateFlags) + 4)); *puVar1 = *puVar1 | 0x20000; *GHIDRA_CAST(&game->_gameStateFlags) = GHIDRA_INT(qVar2); variant = (this->_desc)._variant; } if (((variant == 6) && (this->_targetRoomType == 4)) && (this->_targetRoomIdx == g_game->_greedModeTreasureRoomIdx)) { (this->_desc)._variant = 1; UpdateAnimation(this); return; } (this->_desc)._state = 2; (this->_desc)._variant = 8; UpdateAnimation(this); return; } // 00710fa0 void GridEntity_Door::SetRoomTypes(int CurrentRoomType, int TargetRoomType) { byte bVar1; RoomDescriptor *currentRoomDesc; RoomDescriptor *targetRoomDesc; RoomDescriptor *roomDesc; void *roomData; undefined4 roomSubtype; Entity_Player *taintedKeeper; int iVar2; int iVar3; Game *game; bool isGreedMode; bool isMirrorWorld; int targetType; game = g_game; if ((g_game->_difficulty == 2) || (isGreedMode = false, g_game->_difficulty == 3)) { isGreedMode = true; } this->_currentRoomType = CurrentRoomType; this->_targetRoomType = TargetRoomType; bVar1 = (GHIDRA_CAST((GHIDRA_CAST(game))))->Level::HasMirrorDimension(); if ((bVar1 == 0) || (isMirrorWorld = true, g_game->_currentDimensionIdx != 1)) { isMirrorWorld = false; } currentRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(g_game->_currentRoomIdx,g_game->_currentDimensionIdx); targetRoomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if (((GHIDRA_UINT(currentRoomDesc->Flags) >> 10 & 1) != 0) || ((GHIDRA_UINT(targetRoomDesc->Flags) >> 10 & 1) != 0)) { if ((this->_currentRoomType == 7) || (this->_currentRoomType == 8)) { this->_currentRoomType = 1; } if ((this->_targetRoomType == 7) || (this->_targetRoomType == 8)) { this->_targetRoomType = 1; } } iVar2 = (this->_desc)._variant; if (iVar2 != 0) goto LAB_00711235; iVar2 = g_game->_difficulty; if ((iVar2 == 2) || (iVar2 == 3)) { iVar3 = this->_targetRoomType; if ((iVar3 == 0x17) && (g_game->_greedModeWave < GHIDRA_INT(((iVar2 == 3) + 10)))) { (this->_desc)._variant = 6; goto LAB_00711262; } } else { iVar3 = this->_targetRoomType; } iVar2 = this->_currentRoomType; if ((((iVar2 != 7) && (iVar2 != 8)) && (iVar2 != 0x1d)) && (iVar2 != 10)) { if (iVar3 == 0x1b) { roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); roomData = roomDesc->Data; if (roomData != (void *)0x0) { LAB_0071111e: if (*GHIDRA_CAST((GHIDRA_CAST(roomData) + 0x10)) != 0) { LAB_007111ae: game = g_game; if (this->_targetRoomType == 0x1b) { roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); LAB_007111e8: game = g_game; if (roomDesc->Data == (void *)0x0) { roomSubtype = 0; } else { roomSubtype = *GHIDRA_CAST((GHIDRA_CAST(roomDesc->Data) + 0x10)); } switch(roomSubtype) { case 2: case 4: (this->_desc)._variant = 3; iVar2 = 3; break; case 3: (this->_desc)._varData = 1; default: switchD_007111fc_caseD_1: iVar2 = 1; (this->_desc)._variant = 1; } } else { if (this->_currentRoomType == 0x1b) { roomDesc = *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)); goto LAB_007111e8; } if (this->_targetRoomType != 5) { if (((this->_currentRoomType == 5) && (iVar2 = *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x10)), iVar2 != 0)) && (*GHIDRA_CAST((iVar2 + 0x10)) == 0x5a)) { (this->_desc)._variant = 3; iVar2 = 3; goto LAB_00711220; } goto switchD_007111fc_caseD_1; } roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); game = g_game; if ((roomDesc->Data == (void *)0x0) || (*GHIDRA_CAST((GHIDRA_CAST(roomDesc->Data) + 0x10)) != 0x5a)) goto switchD_007111fc_caseD_1; iVar2 = 3; (this->_desc)._variant = 3; } LAB_00711220: if (game->_currentRoomIdx == -10) { (this->_desc)._variant = 8; iVar2 = 8; } goto LAB_00711235; } } } else if (iVar2 == 0x1b) { roomData = *(void **)(*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x10); if (roomData != (void *)0x0) goto LAB_0071111e; } else if (iVar3 == 5) { roomDesc = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::GetRoomByIdx(this->_targetRoomIdx,-1); if (roomDesc->Data != (void *)0x0) { iVar2 = *GHIDRA_CAST((GHIDRA_CAST(roomDesc->Data) + 0x10)); goto joined_r0x007111a8; } } else if ((iVar2 == 5) && (iVar2 = *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + 4)) + 0x10)), iVar2 != 0) ) { iVar2 = *GHIDRA_CAST((iVar2 + 0x10)); joined_r0x007111a8: if (iVar2 == 0x5a) goto LAB_007111ae; } } game = g_game; if (g_game->_currentRoomIdx != -0x10) { iVar2 = this->_targetRoomIdx; if (iVar2 != -0x65) { if (iVar2 != -100) goto LAB_0071132c; goto LAB_007113a8; } if (g_game->_currentDimensionIdx == 0) { (this->_desc)._variant = 3; LAB_00711244: if (((GHIDRA_UINT(currentRoomDesc->Flags) >> 10 & 1) == 0) || ((GHIDRA_UINT(targetRoomDesc->Flags) >> 10 & 1) != 0)) goto LAB_00711262; goto LAB_0071125b; } LAB_0071132c: iVar3 = this->_currentRoomType; if (((iVar3 == 7) || (iVar3 == 8)) || ((iVar3 == 0x1d || (iVar3 == 10)))) goto LAB_007113fb; targetType = this->_targetRoomType; if (targetType == 9) goto LAB_007113a8; if (g_game->_challenge == 0x18) { if (((targetType != 7) && (targetType != 8)) && (targetType != 0xb)) { if (targetType != 0x1d) goto LAB_007113a8; goto LAB_0071137e; } LAB_007113be: if (targetType == 2) { if (!isMirrorWorld) { if ((((g_game->_stage != 1) || (bVar1 = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::IsAltPath(), bVar1 != 0)) && (bVar1 = (GHIDRA_CAST((game)))->Game::IsGreedMode(), bVar1 == 0)) && (taintedKeeper = (GHIDRA_CAST((&game->_playerManager)))->PlayerManager::FirstPlayerByType(0x21), taintedKeeper == GHIDRA_CAST(0x0))) goto LAB_007113a8; iVar2 = this->_targetRoomIdx; } } else if (((targetType == 5) && (-1 < iVar2)) && (g_game->_stage == 9)) { LAB_007113a8: (this->_desc)._variant = 1; goto LAB_00711244; } LAB_007113fb: if (isGreedMode) goto LAB_00711401; LAB_0071143f: if ((iVar3 == 7) || (iVar3 == 8)) goto LAB_0071146d; LAB_00711449: if (iVar3 == 0x1d) goto LAB_0071146d; targetType = this->_targetRoomType; if ((targetType == 0x12) || (targetType == 0x13)) { iVar2 = 3; (this->_desc)._variant = 3; LAB_00711235: if (((iVar2 != 1) && (iVar2 != 3)) && (iVar2 != 2)) goto LAB_00711262; goto LAB_00711244; } if ((targetType == 0x15) || (targetType == 0x14)) { iVar2 = 2; (this->_desc)._variant = 2; goto LAB_00711235; } if (iVar3 != 6) goto LAB_0071146d; LAB_0071147c: if ((((*GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(game->_room) + 4)) + 0x44)) & 1) == 0) && (targetType = this->_targetRoomType, targetType != 7)) && ((targetType != 8 && (targetType != 0x1d)))) { (this->_desc)._variant = 4; goto LAB_00711262; } } else { LAB_0071137e: if (targetType != 4) { if ((targetType == 0x18) || (targetType == 0xc)) goto LAB_007113a8; goto LAB_007113be; } if (isMirrorWorld) goto LAB_007113fb; if (g_game->_stage == 1) { bVar1 = (GHIDRA_CAST((GHIDRA_CAST(g_game))))->Level::IsAltPath(); iVar2 = this->_targetRoomIdx; if (bVar1 == 0) goto LAB_007113fb; } if (!isGreedMode) goto LAB_007113a8; LAB_00711401: if (this->_targetRoomType != 4) goto LAB_0071143f; if ((iVar3 != 7) && (iVar3 != 8)) { if (iVar2 == game->_greedModeTreasureRoomIdx) { (this->_desc)._variant = 1; goto LAB_00711244; } goto LAB_00711449; } LAB_0071146d: if (*GHIDRA_CAST((GHIDRA_CAST(game->_room) + 0x7228)) != '\0') goto LAB_0071147c; } if (iVar2 == -7) { (this->_desc)._variant = 5; goto LAB_00711262; } if (((((iVar3 == 7) || (iVar2 = this->_targetRoomType, iVar2 == 7)) || (iVar3 == 8)) || ((iVar2 == 8 || (iVar3 == 0x1d)))) || (iVar2 == 0x1d)) { (this->_desc)._variant = 7; goto LAB_00711262; } } LAB_0071125b: (this->_desc)._variant = 8; LAB_00711262: LoadSprite(this); UpdateAnimation(this); if (this->_targetRoomType == 0x1d) { TryBlowOpen(this,0,GHIDRA_CAST(0x0)); } if (((this->_doorFlags & 0x20) != 0) && ((this->_sprite)._animState._animData != (void *)0x0)) { AnimationState::AdvancePosition (&(this->_sprite)._animState, *GHIDRA_CAST((GHIDRA_INT((this->_sprite)._animState._animData) + 0x30)) + -1); } return; } // 00711590 void GridEntity_Door::BeginBatches() { int doorState; doorState = (this->_desc)._state; if ((doorState == 0) || (doorState == 2)) { (this->_desc)._state = 1; doorState = 1; } this->_previousState = doorState; this->_previousVariant = (this->_desc)._variant; if (GHIDRA_UINT(this->_gridIndex) < 0x1c0) { *GHIDRA_CAST((GHIDRA_CAST(g_game->_room) + this->_gridIndex * 4 + 0x76c)) = 1000; } this->_updateCount = 0; this->_targetRoomType = 0; this->_currentRoomType = 0; this->_targetRoomIdx = -1; this->_isExtraVisible = 0; this->_isBusted = 0; this->_isUnlockedByPlayer = 0; this->_doorFlags = 0; this->_direction = -1; return; } // 00711630 void GridEntity_Door::SetLocked(byte isLocked) { int doorVariant; Game *game; qword stateFlags; uint *stateFlagsHigh; game = g_game; doorVariant = (this->_desc)._variant; if (doorVariant == 4) { if (isLocked == 0) { return; } } else if ((isLocked == 0) && (doorVariant == 5)) { stateFlags = g_game->_gameStateFlags; stateFlagsHigh = GHIDRA_CAST((GHIDRA_INT(&g_game->_gameStateFlags) + 4)); *stateFlagsHigh = *stateFlagsHigh | 0x20000; *GHIDRA_CAST(&game->_gameStateFlags) = GHIDRA_INT(stateFlags); } doorVariant = 8; if (isLocked != 0) { doorVariant = 1; } (this->_desc)._variant = doorVariant; UpdateAnimation(this); return; } // 00711690 undefined4 GridEntity_Door::IsTargetRoomArcade() { int iVar1; Entity_Player *owner; iVar1 = this->_targetRoomType; if (iVar1 == 9) { return 1; } if ((((((iVar1 == 2) || (iVar1 == 4)) || (iVar1 == 0x18)) || ((iVar1 == 0x14 || (iVar1 == 0x15)))) || ((iVar1 = get_secret_exit_kind(this), iVar1 == 1 || (this->_targetRoomType == 0xc)))) && (owner = PlayerManager::FirstCollectibleOwner (&g_game->_playerManager,0x17c,GHIDRA_CAST(&g_game->_playerManager),1), owner != GHIDRA_CAST(0x0))) { return 1; } if (((g_game->_challenge == 0x18) && (iVar1 = this->_targetRoomType, iVar1 != 7)) && ((iVar1 != 8 && ((iVar1 != 0xb && (iVar1 != 0x1d)))))) { return 1; } return 0; } // 00738170 byte GridEntity_Door::IsBusted() { return this->_isBusted; } // 00833290 int GridEntity_Door::Slot() { return this->_slot; } // 0085e0b0 Vector * GridEntity_Door::GetSpriteOffset() { return &(this->_sprite)._offset; }