//
// GJBaseGameLayer::addGuideArt from 0x479060 to 0x4794c4 (1124 bytes)
//
// 2 xrefs:
// > PlayLayer::addObject @ 0x3111f6
// > PlayLayer::addObject @ 0x311530
//
// 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
//
bool GJBaseGameLayer::addGuideArt(GJBaseGameLayer *a1, GameObject *a2)
{
int m_objectID; // r5
bool v4; // zf
bool m_orbIndicators; // r7
ObjectToolbox *v6; // r0
char *v7; // r0
cocos2d::CCSprite *v8; // r8
void (__fastcall *v9)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11
cocos2d::CCSprite *v10; // r4
void (__fastcall *v11)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
int v12; // r8
ObjectToolbox *v13; // r0
char *v14; // r0
cocos2d::CCSprite *v15; // r8
void (__fastcall *v16)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r11
cocos2d::CCSprite *v17; // r4
void (__fastcall *v18)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r9
int v19; // r8
char **v20; // r0
ObjectToolbox *v21; // r0
char *v22; // r0
cocos2d::CCSprite *v23; // r10
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6
char *v27; // [sp+Ch] [bp-30h] BYREF
char *v28; // [sp+10h] [bp-2Ch] BYREF
const char *v29; // [sp+14h] [bp-28h] BYREF
char *v30; // [sp+18h] [bp-24h] BYREF
cocos2d::CCPoint v31; // [sp+1Ch] [bp-20h] BYREF
cocos2d::CCPoint v32; // [sp+24h] [bp-18h] BYREF
cocos2d::CCPoint v33; // [sp+2Ch] [bp-10h] BYREF
m_objectID = a2->m_objectID;
if ( m_objectID == 660 )
goto LABEL_24;
if ( m_objectID > 660 )
{
if ( m_objectID == 1331 )
goto LABEL_24;
if ( m_objectID > 1331 )
{
if ( m_objectID == 1933 )
goto LABEL_24;
if ( m_objectID == 2926 )
goto LABEL_22;
if ( m_objectID != 1333 )
return 0;
}
else if ( m_objectID != 1022 && m_objectID != 1330 )
{
v4 = m_objectID == 745;
LABEL_15:
if ( !v4 )
return 0;
goto LABEL_24;
}
LABEL_27:
m_orbIndicators = a1->m_orbIndicators;
if ( m_orbIndicators )
{
v21 = ObjectToolbox::sharedState();
v22 = (char *)ObjectToolbox::intKeyToFrame(v21, m_objectID);
sub_776584((int)&v30, v22);
sub_46B7B4((int)&v31, v30, "_001", "_extra_001");
sub_776584((int)&v32, (char *)LODWORD(v31.x));
cocos2d::CCPoint::CCPoint(&v33, &stru_AC68C0);
v23 = GameObject::addCustomChild(a2, (const char **)&v32, (int)&v33, 100);
sub_774008(&v32);
sub_774008(&v31);
setPosition = v23->setPosition;
cocos2d::CCPoint::CCPoint(&v33, a2->m_obRect.size.width * 0.5, a2->m_obRect.size.height * 0.5);
setPosition(v23, &v33);
cocos2d::CCArray::addObject(a1->m_indicatorSprites, v23);
v20 = &v30;
goto LABEL_29;
}
return m_orbIndicators;
}
if ( m_objectID > 13 )
{
if ( m_objectID != 84 )
{
if ( m_objectID == 111 )
goto LABEL_24;
v4 = m_objectID == 47;
goto LABEL_15;
}
goto LABEL_27;
}
if ( m_objectID < 12 )
{
if ( m_objectID < 10 )
return 0;
LABEL_22:
m_orbIndicators = a1->m_portalIndicators;
if ( m_orbIndicators )
{
cocos2d::CCPoint::CCPoint(&v31, 19.0, 0.0);
v6 = ObjectToolbox::sharedState();
v7 = (char *)ObjectToolbox::intKeyToFrame(v6, m_objectID);
sub_776584((int)&v27, v7);
sub_46B7B4((int)&v28, v27, "front", "extra");
sub_776584((int)&v29, v28);
cocos2d::CCPoint::CCPoint(&v33, &stru_AC68C0);
v8 = GameObject::addCustomChild(a2, &v29, (int)&v33, 100);
sub_774008(&v29);
sub_774008(&v28);
v9 = v8->setPosition;
cocos2d::CCPoint::CCPoint(
&v33,
v31.x + (float)(a2->m_obRect.size.width * 0.5),
v31.y + (float)(a2->m_obRect.size.height * 0.5));
v9(v8, &v33);
v8->setTag(v8, 91);
sub_46B7B4((int)&v30, v27, "front", "extra_2");
sub_776584((int)&v32, v30);
cocos2d::CCPoint::CCPoint(&v33, &stru_AC68C0);
v10 = GameObject::addCustomChild(a2, (const char **)&v32, (int)&v33, 101);
sub_774008(&v32);
sub_774008(&v30);
v11 = v10->setPosition;
v12 = (int)v8->getPosition(v8);
cocos2d::CCPoint::CCPoint(&v32, -1.5, 0.0);
cocos2d::CCPoint::operator+(&v33, v12, &v32);
v11(v10, &v33);
cocos2d::CCArray::addObject(a1->m_indicatorSprites, v10);
LABEL_26:
v20 = &v27;
LABEL_29:
sub_774008(v20);
return m_orbIndicators;
}
return m_orbIndicators;
}
LABEL_24:
m_orbIndicators = a1->m_portalIndicators;
if ( m_orbIndicators )
{
cocos2d::CCPoint::CCPoint(&v31, 17.0, 0.0);
v13 = ObjectToolbox::sharedState();
v14 = (char *)ObjectToolbox::intKeyToFrame(v13, m_objectID);
sub_776584((int)&v27, v14);
sub_46B7B4((int)&v28, v27, "front", "extra");
sub_776584((int)&v29, v28);
cocos2d::CCPoint::CCPoint(&v33, &stru_AC68C0);
v15 = GameObject::addCustomChild(a2, &v29, (int)&v33, 100);
sub_774008(&v29);
sub_774008(&v28);
v16 = v15->setPosition;
cocos2d::CCPoint::CCPoint(
&v33,
v31.x + (float)(a2->m_obRect.size.width * 0.5),
v31.y + (float)(a2->m_obRect.size.height * 0.5));
v16(v15, &v33);
v15->setTag(v15, 91);
sub_46B7B4((int)&v30, v27, "front", "extra_2");
sub_776584((int)&v32, v30);
cocos2d::CCPoint::CCPoint(&v33, &stru_AC68C0);
v17 = GameObject::addCustomChild(a2, (const char **)&v32, (int)&v33, 101);
sub_774008(&v32);
sub_774008(&v30);
v18 = v17->setPosition;
v19 = (int)v15->getPosition(v15);
cocos2d::CCPoint::CCPoint(&v32, -2.0, 0.0);
cocos2d::CCPoint::operator+(&v33, v19, &v32);
v18(v17, &v33);
cocos2d::CCArray::addObject(a1->m_indicatorSprites, v17);
goto LABEL_26;
}
return m_orbIndicators;
}