//
// GJGarageLayer::showUnlockPopup from 0x10030659c to 0x1003068c4 (808 bytes)
//
// 2 xrefs:
// > sub_1003069D8 @ 0x1003069dc
// > ??> @ 0x1007ec040
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GJGarageLayer::showUnlockPopup(GJGarageLayer *a1, int a2, UnlockType a3)
{
cocos2d::CCArray *v4; // x20
DialogLayer *v5; // x20
ItemInfoPopup *v6; // x0
void *v7[2]; // [xsp+0h] [xbp-140h] BYREF
char v8; // [xsp+17h] [xbp-129h]
void *v9[2]; // [xsp+18h] [xbp-128h] BYREF
char v10; // [xsp+2Fh] [xbp-111h]
void *v11[2]; // [xsp+30h] [xbp-110h] BYREF
char v12; // [xsp+47h] [xbp-F9h]
void *v13[2]; // [xsp+48h] [xbp-F8h] BYREF
char v14; // [xsp+5Fh] [xbp-E1h]
void *v15[2]; // [xsp+60h] [xbp-E0h] BYREF
char v16; // [xsp+77h] [xbp-C9h]
void *v17[2]; // [xsp+78h] [xbp-C8h] BYREF
char v18; // [xsp+8Fh] [xbp-B1h]
void *__p[2]; // [xsp+90h] [xbp-B0h] BYREF
char v20; // [xsp+A7h] [xbp-99h]
void *v21[2]; // [xsp+A8h] [xbp-98h] BYREF
char v22; // [xsp+BFh] [xbp-81h]
void *v23[2]; // [xsp+C0h] [xbp-80h] BYREF
char v24; // [xsp+D7h] [xbp-69h]
void *v25[2]; // [xsp+D8h] [xbp-68h] BYREF
char v26; // [xsp+EFh] [xbp-51h]
void *v27[2]; // [xsp+F0h] [xbp-50h] BYREF
char v28; // [xsp+107h] [xbp-39h]
void *v29[2]; // [xsp+108h] [xbp-38h] BYREF
char v30; // [xsp+11Fh] [xbp-21h]
if ( a2 == 13 && a3 == 1 )
{
v4 = (cocos2d::CCArray *)sub_10024A15C();
sub_100009900(v29, "Scratch");
sub_100009900(v27, "Hey, over here...");
DialogObject::create((__int64)v29, (__int64)v27, 10, 0, 0xFFFFFF, 0.8);
sub_10024A2D0((__int64)v4);
if ( v28 < 0 )
operator delete(v27[0]);
if ( v30 < 0 )
operator delete(v29[0]);
sub_100009900(v25, "Scratch");
sub_100009900(v23, "I've been watching you, and you got some skills.");
DialogObject::create((__int64)v25, (__int64)v23, 13, 0, 0xFFFFFF, 1.0);
sub_10024A2D0((__int64)v4);
if ( v24 < 0 )
operator delete(v23[0]);
if ( v26 < 0 )
operator delete(v25[0]);
sub_100009900(v21, "Scratch");
sub_100009900(__p, "Whatever you need, Scratch's got it.");
DialogObject::create((__int64)v21, (__int64)__p, 10, 0, 0xFFFFFF, 1.0);
sub_10024A2D0((__int64)v4);
if ( v20 < 0 )
operator delete(__p[0]);
if ( v22 < 0 )
operator delete(v21[0]);
sub_100009900(v17, "Scratch");
sub_100009900(v15, "Here's a free sample. Come find me when you can.");
DialogObject::create((__int64)v17, (__int64)v15, 8, 0, 0xFFFFFF, 1.0);
sub_10024A2D0((__int64)v4);
if ( v16 < 0 )
operator delete(v15[0]);
if ( v18 < 0 )
operator delete(v17[0]);
sub_100009900(v13, "Scratch");
sub_100009900(v11, "Did you hear something?");
DialogObject::create((__int64)v13, (__int64)v11, 9, 0, 0xFFFFFF, 1.0);
sub_10024A2D0((__int64)v4);
if ( v12 < 0 )
operator delete(v11[0]);
if ( v14 < 0 )
operator delete(v13[0]);
sub_100009900(v9, "Scratch");
sub_100009900(v7, "...");
DialogObject::create((__int64)v9, (__int64)v7, 8, 0, 0xFFFFFF, 1.0);
sub_10024A2D0((__int64)v4);
if ( v8 < 0 )
operator delete(v7[0]);
if ( v10 < 0 )
operator delete(v9[0]);
v5 = DialogLayer::createWithObjects(v4, 2);
((void (__fastcall *)(GJGarageLayer *, DialogLayer *, __int64))a1->addChild_0)(a1, v5, 100);
v5->m_delegate = &a1->DialogDelegate;
DialogLayer::updateChatPlacement(v5, Center);
DialogLayer::animateIn(v5, FromLeft);
}
else
{
v6 = ItemInfoPopup::create(a2, a3);
((void (__fastcall *)(ItemInfoPopup *))v6->show)(v6);
}
}