//
// GameObject::playShineEffect from 0x3551c0 to 0x3557ac (1516 bytes)
//
// 13 xrefs:
// > EffectGameObject::triggerObject @ 0x3ee55a
// > GJBaseGameLayer::teleportPlayer @ 0x491372
// > GJBaseGameLayer::teleportPlayer @ 0x49142a
// > GJBaseGameLayer::collisionCheckObjects @ 0x492642
// > GJBaseGameLayer::collisionCheckObjects @ 0x4926b6
// > GJBaseGameLayer::collisionCheckObjects @ 0x49273a
// > GJBaseGameLayer::collisionCheckObjects @ 0x4928f6
// > GJBaseGameLayer::collisionCheckObjects @ 0x49294c
// > GJBaseGameLayer::collisionCheckObjects @ 0x4929e8
// > GJBaseGameLayer::collisionCheckObjects @ 0x492a54
// > GJBaseGameLayer::collisionCheckObjects @ 0x492c62
// > GJBaseGameLayer::collisionCheckObjects @ 0x492ca6
// > GJBaseGameLayer::collisionCheckObjects @ 0x492cee
//
// 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 GameObject::playShineEffect(GameObject *a1)
{
int m_objectID; // r3
char **v3; // r5
int v4; // r3
int v5; // r2
char *v6; // r1
int v7; // r2
char v8; // r11
char v9; // r10
char v10; // r2
void **v11; // r1
int v12; // r3
int v13; // r6
CCSpritePlus *i; // r7
CCSpritePlus *v15; // r5
cocos2d::CCNode *v16; // r0
int v17; // r8
GameManager *v18; // r0
void (__fastcall *setPosition)(CCSpritePlus *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *setRotation)(CCSpritePlus *__hidden, float); // r8
int v21; // r0
void (__fastcall *setFlipX)(CCSpritePlus *__hidden, bool); // r8
_BOOL4 isFlipX; // r0
void (__fastcall *setFlipY)(CCSpritePlus *__hidden, bool); // r8
_BOOL4 isFlipY; // r0
void (__fastcall *setScaleX)(CCSpritePlus *__hidden, float); // r8
int v27; // r0
void (__fastcall *setScaleY)(CCSpritePlus *__hidden, float); // r8
int v29; // r0
cocos2d::CCNode *v30; // r6
CCSpritePlus *v31; // r8
void (__fastcall *v32)(CCSpritePlus *__hidden, const cocos2d::CCPoint *); // r9
float width; // s17
int v34; // r0
CCSpritePlus *v35; // r6
int v36; // r7
void (__fastcall *setBlendFunc)(cocos2d::CCSprite *__hidden, cocos2d::ccBlendFunc); // r12
int v38; // r9
int v39; // r0
cocos2d::CCAction *v40; // r0
CCSpritePlus *v41; // r3
int v42; // r3
float v43; // r1
CCCircleWave *v44; // r5
void (__fastcall *v45)(CCCircleWave *__hidden, const cocos2d::CCPoint *); // r6
const cocos2d::CCPoint *v46; // r0
cocos2d::CCLayer *m_objectLayer; // r6
void (__fastcall *addChild_0)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // r7
cocos2d::CCNode *v49; // r0
int v50; // r0
PlayLayer *m_playLayer; // r3
GameManager *v52; // r0
bool v53; // zf
int v54; // [sp+Ch] [bp-60h]
char v55; // [sp+10h] [bp-5Ch]
CCSpritePlus *v56; // [sp+14h] [bp-58h]
int v57; // [sp+18h] [bp-54h]
cocos2d::CCSequence *v58; // [sp+1Ch] [bp-50h]
cocos2d::CCFadeOut *v59; // [sp+20h] [bp-4Ch]
void *v60; // [sp+34h] [bp-38h] BYREF
void *v61; // [sp+38h] [bp-34h] BYREF
char *v62; // [sp+3Ch] [bp-30h] BYREF
char *v63; // [sp+40h] [bp-2Ch] BYREF
char *v64; // [sp+44h] [bp-28h] BYREF
char *v65; // [sp+48h] [bp-24h] BYREF
char *v66[2]; // [sp+4Ch] [bp-20h] BYREF
CCSpritePlus *v67[2]; // [sp+54h] [bp-18h] BYREF
__int64 v68; // [sp+5Ch] [bp-10h] BYREF
if ( !((int (__fastcall *)(GameObject *))a1->hasBeenActivated)(a1)
&& ((int (__fastcall *)(GameObject *))a1->getOpacity)(a1)
&& !a1->m_hasNoEffects
&& !a1->m_editorEnabled
&& a1->getParent(a1) )
{
v60 = &unk_ACDDA8;
v61 = &unk_ACDDA8;
m_objectID = a1->m_objectID;
if ( m_objectID == 202 )
{
v3 = &v64;
sub_352E70((int)&v64, "boost_03_001.png", "_001.png", "_shine_001.png");
sub_7753D4((int)&v60, v64);
LABEL_14:
sub_774008(v3);
v4 = 0;
v5 = 1;
goto LABEL_20;
}
if ( m_objectID <= 202 )
{
if ( m_objectID > 46 )
{
if ( m_objectID == 101 )
goto LABEL_83;
if ( m_objectID > 101 )
{
if ( m_objectID == 200 )
{
v3 = &v62;
sub_352E70((int)&v62, "boost_01_001.png", "_001.png", "_shine_001.png");
sub_7753D4((int)&v60, v62);
goto LABEL_14;
}
if ( m_objectID > 200 )
{
v3 = &v63;
sub_352E70((int)&v63, "boost_02_001.png", "_001.png", "_shine_001.png");
sub_7753D4((int)&v60, v63);
goto LABEL_14;
}
v53 = m_objectID == 111;
LABEL_98:
if ( !v53 )
goto LABEL_77;
goto LABEL_81;
}
if ( m_objectID == 47 )
{
LABEL_81:
sub_7753D4((int)&v60, "portalshine_02_front_001.png");
v6 = "portalshine_02_back_001.png";
goto LABEL_19;
}
if ( m_objectID == 99 )
{
LABEL_83:
sub_7753D4((int)&v60, "portalshine_04_front_001.png");
v6 = "portalshine_04_back_001.png";
goto LABEL_19;
}
LABEL_77:
sub_774008(&v61);
goto LABEL_78;
}
if ( m_objectID >= 45 )
{
sub_7753D4((int)&v60, "portalshine_03_front_001.png");
v6 = "portalshine_03_back_001.png";
goto LABEL_19;
}
if ( m_objectID < 10 )
goto LABEL_77;
if ( m_objectID > 11 )
{
if ( m_objectID <= 13 )
goto LABEL_81;
goto LABEL_77;
}
LABEL_18:
sub_7753D4((int)&v60, "portalshine_01_front_001.png");
v6 = "portalshine_01_back_001.png";
LABEL_19:
sub_7753D4((int)&v61, v6);
v4 = 1;
v5 = 0;
LABEL_20:
v54 = v5;
v7 = a1->m_objectID;
if ( v7 == 202 )
{
v8 = -106;
v9 = -1;
}
else
{
if ( v7 > 202 )
{
if ( v7 == 203 )
{
v8 = -1;
v9 = 0;
v55 = -1;
goto LABEL_33;
}
if ( v7 == 1334 )
{
v8 = 50;
v10 = -1;
v9 = 50;
goto LABEL_29;
}
}
else if ( v7 == 200 )
{
v8 = 0;
v9 = -1;
v55 = -1;
goto LABEL_33;
}
v8 = -1;
v9 = -106;
}
v10 = 0;
LABEL_29:
v55 = v10;
LABEL_33:
v11 = &v60;
if ( v4 )
v12 = 2;
else
v12 = 1;
v57 = v12;
v13 = 0;
v56 = nullptr;
for ( i = nullptr; ; i = v15 )
{
sub_775C20(v67, v11);
v15 = CCSpritePlus::createWithSpriteFrameName((const char *)v67[0]);
if ( v13 )
{
v17 = 5;
}
else
{
v16 = a1->getParent(a1);
v17 = v16->getZOrder(v16) + 1;
}
v18 = GameManager::sharedState();
v18->m_playLayer->m_objectLayer->addChild_0(v18->m_playLayer->m_objectLayer, v15, v17);
setPosition = v15->setPosition;
a1->getRealPosition((cocos2d::CCPoint *)&v68, a1);
setPosition(v15, (const cocos2d::CCPoint *)&v68);
setRotation = v15->setRotation;
v21 = ((int (__fastcall *)(GameObject *))a1->getRotation)(a1);
((void (__fastcall *)(CCSpritePlus *, int))setRotation)(v15, v21);
setFlipX = v15->setFlipX;
isFlipX = cocos2d::CCSprite::isFlipX(a1);
setFlipX(v15, isFlipX);
setFlipY = v15->setFlipY;
isFlipY = cocos2d::CCSprite::isFlipY(a1);
setFlipY(v15, isFlipY);
setScaleX = v15->setScaleX;
v27 = ((int (__fastcall *)(GameObject *))a1->getScaleX)(a1);
((void (__fastcall *)(CCSpritePlus *, int))setScaleX)(v15, v27);
setScaleY = v15->setScaleY;
v29 = ((int (__fastcall *)(GameObject *))a1->getScaleY)(a1);
((void (__fastcall *)(CCSpritePlus *, int))setScaleY)(v15, v29);
if ( v13 )
{
v56 = v15;
v15 = i;
}
++v13;
sub_774008(v67);
if ( v13 == v57 )
break;
if ( v13 )
v11 = &v61;
else
v11 = &v60;
}
v30 = a1->getChildByTag(a1, 91);
if ( v30 )
{
v31 = CCSpritePlus::createWithSpriteFrameName("portal_extra_shine_001.png");
v32 = v31->setPosition;
width = v30->getContentSize(v30)->width;
v34 = (int)v30->getContentSize(v30);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v68, width * 0.5, *(float *)(v34 + 4) * 0.5);
v32(v31, (const cocos2d::CCPoint *)&v68);
v30->addChild_0(v30, v31, 1);
++v57;
}
else
{
v31 = nullptr;
}
v35 = v15;
v36 = 0;
while ( 1 )
{
v35->setOpacity(v35, 0);
if ( v36 != 2 )
CCSpritePlus::followSprite(v35);
setBlendFunc = v35->setBlendFunc;
v66[0] = (_BYTE *)(&stru_2FC + 6);
v66[1] = (_BYTE *)(&dword_0 + 1);
((void (__fastcall *)(CCSpritePlus *, int, int))setBlendFunc)(v35, 770, 1);
v58 = (cocos2d::CCSequence *)cocos2d::CCFadeIn::create(0.05);
v59 = cocos2d::CCFadeOut::create(0.4);
v67[0] = (CCSpritePlus *)CCSpritePlus::stopFollow;
v67[1] = nullptr;
v38 = cocos2d::CCCallFunc::create(v35, CCSpritePlus::stopFollow, 0);
v68 = 0x100000104LL;
v39 = cocos2d::CCCallFunc::create(v35, 260, 1);
v40 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v58, v59, v38, v39, 0);
cocos2d::CCNode::runAction(v35, v40);
if ( ++v36 == v57 )
break;
if ( v36 )
{
v41 = v56;
if ( v36 != 1 )
v41 = v31;
v35 = v41;
}
else
{
v35 = v15;
}
}
if ( !v54 )
goto LABEL_60;
v42 = a1->m_objectID;
if ( v42 == 201 )
{
v43 = 65.0;
goto LABEL_71;
}
if ( v42 > 201 )
{
if ( v42 == 203 )
{
v43 = 80.0;
goto LABEL_71;
}
if ( v42 == 1334 )
{
v43 = 90.0;
goto LABEL_71;
}
}
else if ( v42 == 200 )
{
v43 = 60.0;
LABEL_71:
v44 = CCCircleWave::create(5.0, v43, 0.3, 0);
v44->m_color.g = v9;
v44->m_color.b = v8;
v44->m_color.r = v55;
v45 = v44->setPosition;
v46 = a1->getPosition(a1);
v45(v44, v46);
if ( a1->getParent(a1) )
{
m_objectLayer = GameManager::sharedState()->m_playLayer->m_objectLayer;
addChild_0 = m_objectLayer->addChild_0;
v49 = a1->getParent(a1);
v50 = v49->getZOrder(v49);
addChild_0(m_objectLayer, v44, v50 - 1);
}
v44->m_circleMode = Outline;
v44->m_lineWidth = 6;
CCCircleWave::followObject(v44, a1, 1);
m_playLayer = GameManager::sharedState()->m_playLayer;
if ( m_playLayer )
m_playLayer = (PlayLayer *)((char *)m_playLayer + 11756);
v44->m_delegate = (CCCircleWaveDelegate *)m_playLayer;
v52 = GameManager::sharedState();
PlayLayer::addCircle(v52->m_playLayer, v44);
LABEL_60:
sub_774008(&v61);
LABEL_78:
sub_774008(&v60);
return;
}
v43 = 70.0;
goto LABEL_71;
}
if ( m_objectID != 749 )
{
if ( m_objectID > 749 )
{
if ( m_objectID == 1933 )
goto LABEL_81;
if ( m_objectID <= 1933 )
{
if ( m_objectID == 1331 )
goto LABEL_81;
if ( m_objectID == 1334 )
{
v3 = v66;
sub_352E70((int)v66, "boost_05_001.png", "_001.png", "_shine_001.png");
sub_7753D4((int)&v60, v66[0]);
goto LABEL_14;
}
goto LABEL_77;
}
if ( m_objectID != 2902 )
{
if ( m_objectID == 2926 )
goto LABEL_18;
if ( m_objectID != 2064 )
goto LABEL_77;
}
}
else
{
if ( m_objectID < 288 )
{
if ( m_objectID >= 286 )
{
sub_7753D4((int)&v60, "portalshine_05_front_001.png");
v6 = "portalshine_05_back_001.png";
goto LABEL_19;
}
if ( m_objectID == 203 )
{
v3 = &v65;
sub_352E70((int)&v65, "boost_04_001.png", "_001.png", "_shine_001.png");
sub_7753D4((int)&v60, v65);
goto LABEL_14;
}
goto LABEL_77;
}
if ( m_objectID == 745 )
goto LABEL_81;
if ( m_objectID != 747 )
{
v53 = m_objectID == 660;
goto LABEL_98;
}
}
}
sub_7753D4((int)&v60, "portalshine_06_front_001.png");
v6 = "portalshine_06_back_001.png";
goto LABEL_19;
}
}