//
// LevelPage::addSecretDoor from 0x100424010 to 0x100424174 (356 bytes)
//
// 1 xrefs:
// > LevelPage::updateDynamicPage @ 0x100421891
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:30:16 +0000
//
__int64 __fastcall LevelPage::addSecretDoor(_QWORD *a1, double a2)
{
__int64 v2; // rax
__int64 v4; // rax
__int64 result; // rax
__int64 v6; // rdi
char UGV; // r14
__int64 v8; // rax
const char *v9; // rdi
__int64 v10; // rdi
__int64 v11; // r14
_WORD *v12; // r15
__int64 v13; // [rsp+0h] [rbp-20h] BYREF
v13 = v2;
v4 = GameManager::sharedState();
result = GameManager::getUGV(v4, "6");
if ( (_BYTE)result )
{
v6 = GameManager::sharedState();
UGV = GameManager::getUGV(v6, "8");
v8 = cocos2d::CCDirector::sharedDirector(v6, "8");
cocos2d::CCDirector::getWinSize(&v13, v8);
v9 = "secretDoorBtn2_closed_001.png";
if ( UGV )
v9 = "secretDoorBtn2_open_001.png";
a1[71] = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v9, a2);
v10 = GameManager::sharedState();
if ( !(unsigned __int8)GameManager::getUGV(v10, "7") )
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)a1[71] + 912LL))(a1[71], 0);
v11 = cocos2d::CCMenu::create();
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v11);
v12 = CCMenuItemSpriteExtra::create(a1[71], 0, (__int64)a1, (__int64)LevelPage::onSecretDoor, 0);
v12[204] = 256;
(*(void (__fastcall **)(__int64, _WORD *))(*(_QWORD *)v11 + 456LL))(v11, v12);
(*(void (__fastcall **)(__int64, float, float))(*(_QWORD *)v11 + 200LL))(
v11,
*(float *)&v13 * 0.5,
fminf(128.0, (float)(0.5 * *((float *)&v13 + 1)) + -110.0) + 30.0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v12, 2.0);
sub_1007FEBF0(a1[67], v12);
return sub_1007FEBF0(a1[67], a1[71]);
}
return result;
}