//
// GameObject::playShineEffect from 0x10025c3a8 to 0x10025cc54 (2220 bytes)
//
// 13 xrefs:
// > GJBaseGameLayer::teleportPlayer @ 0x1001e3f10
// > GJBaseGameLayer::teleportPlayer @ 0x1001e4038
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8574
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e866c
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e86fc
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8788
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8840
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e89ec
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8ac4
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8c10
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8c50
// > GJBaseGameLayer::collisionCheckObjects @ 0x1001e8c90
// > EffectGameObject::triggerObject @ 0x1003861d4
//
// 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 GameObject::playShineEffect(GameObject *a1)
{
int m_objectID; // w8
const std::string::value_type *v3; // x1
std::string *p_p; // x1
int v5; // w27
int v6; // w8
int v7; // w8
CCSpritePlus *v8; // x26
CCSpritePlus *v9; // x28
int i; // w22
std::string *v11; // x8
_BYTE *v12; // x1
std::string *v13; // x8
std::string *v14; // x0
CCSpritePlus *v15; // x20
__int64 v16; // x21
__int64 v17; // x0
GameManager *v18; // x0
_BOOL8 isFlipX; // x0
_BOOL8 isFlipY; // x0
__int64 v21; // x21
float v22; // s8
__int64 v23; // x0
__n128 v24; // q0
__n128 v25; // q1
int v26; // w20
CCSpritePlus *v27; // x22
cocos2d::CCFadeIn *v28; // x23
char v29; // w24
__int64 v30; // x1
__int64 v31; // x2
__int64 v32; // x3
__int64 v33; // x4
__int64 v34; // x5
__int64 v35; // x6
__int64 v36; // x7
cocos2d::CCSequence *v37; // x0
int v38; // w8
float v39; // s1
int v40; // w8
CCCircleWave *v41; // x20
__int64 v42; // x0
cocos2d::CCLayer *m_objectLayer; // x21
__int64 v44; // x0
int v45; // w0
PlayLayer *m_playLayer; // x8
CCCircleWaveDelegate *v47; // x8
GameManager *v48; // x0
int v49; // [xsp+28h] [xbp-C8h]
char v50; // [xsp+2Ch] [xbp-C4h]
CCSpritePlus *v51; // [xsp+30h] [xbp-C0h]
__int64 v52; // [xsp+38h] [xbp-B8h] BYREF
std::string __p; // [xsp+40h] [xbp-B0h] BYREF
std::string v54; // [xsp+58h] [xbp-98h] BYREF
std::string v55; // [xsp+70h] [xbp-80h] BYREF
cocos2d::SEL_CallFunc v56; // 0:x1.16
cocos2d::SEL_CallFunc v57; // 0:x1.16
if ( (((__int64 (__fastcall *)(GameObject *))a1->hasBeenActivated)(a1) & 1) != 0
|| !((unsigned int (__fastcall *)(GameObject *))a1->getOpacity)(a1)
|| a1->m_hasNoEffects
|| a1->m_editorEnabled
|| !((__int64 (__fastcall *)(GameObject *))a1->getParent)(a1) )
{
return;
}
memset(&v55, 0, sizeof(v55));
memset(&v54, 0, sizeof(v54));
m_objectID = a1->m_objectID;
if ( m_objectID > 202 )
{
if ( m_objectID > 1330 )
{
if ( m_objectID <= 2063 )
{
if ( m_objectID == 1331 )
goto LABEL_33;
if ( m_objectID != 1334 )
{
if ( m_objectID != 1933 )
goto LABEL_106;
goto LABEL_33;
}
sub_1002550CC(&__p, "boost_05_001.png", "_001.png", "_shine_001.png");
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
goto LABEL_123;
}
if ( m_objectID != 2064 && m_objectID != 2902 )
{
if ( m_objectID != 2926 )
goto LABEL_106;
LABEL_42:
std::string::assign(&v55, "portalshine_01_front_001.png");
v3 = "portalshine_01_back_001.png";
goto LABEL_46;
}
}
else
{
if ( m_objectID <= 744 )
{
if ( (unsigned int)(m_objectID - 286) < 2 )
{
std::string::assign(&v55, "portalshine_05_front_001.png");
v3 = "portalshine_05_back_001.png";
goto LABEL_46;
}
if ( m_objectID != 203 )
{
if ( m_objectID != 660 )
goto LABEL_106;
goto LABEL_33;
}
sub_1002550CC(&__p, "boost_04_001.png", "_001.png", "_shine_001.png");
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
goto LABEL_123;
}
if ( m_objectID == 745 )
goto LABEL_33;
if ( m_objectID != 747 && m_objectID != 749 )
goto LABEL_106;
}
std::string::assign(&v55, "portalshine_06_front_001.png");
v3 = "portalshine_06_back_001.png";
goto LABEL_46;
}
if ( m_objectID > 98 )
{
if ( m_objectID <= 199 )
{
if ( m_objectID == 99 || m_objectID == 101 )
{
std::string::assign(&v55, "portalshine_04_front_001.png");
v3 = "portalshine_04_back_001.png";
goto LABEL_46;
}
if ( m_objectID != 111 )
goto LABEL_106;
LABEL_33:
std::string::assign(&v55, "portalshine_02_front_001.png");
v3 = "portalshine_02_back_001.png";
goto LABEL_46;
}
if ( m_objectID == 200 )
{
sub_1002550CC(&__p, "boost_01_001.png", "_001.png", "_shine_001.png");
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
}
else if ( m_objectID == 201 )
{
sub_1002550CC(&__p, "boost_02_001.png", "_001.png", "_shine_001.png");
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
}
else
{
sub_1002550CC(&__p, "boost_03_001.png", "_001.png", "_shine_001.png");
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
}
LABEL_123:
std::string::assign(&v55, (const std::string::value_type *)p_p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
v5 = 1;
v50 = 1;
LABEL_47:
v6 = a1->m_objectID;
if ( v6 <= 201 )
{
if ( v6 == 200 )
{
v7 = 0xFFFF;
goto LABEL_57;
}
}
else
{
switch ( v6 )
{
case 202:
v7 = 9895680;
goto LABEL_57;
case 203:
v7 = 16711935;
goto LABEL_57;
case 1334:
v7 = 3289855;
LABEL_57:
v49 = v7;
v8 = nullptr;
v9 = nullptr;
for ( i = 0; i != v5; ++i )
{
if ( i )
v11 = &v54;
else
v11 = &v55;
if ( SHIBYTE(v11->__r_.__value_.__r.__words[2]) < 0 )
{
v12 = (_BYTE *)v11->__r_.__value_.__r.__words[0];
if ( i )
v13 = &v54;
else
v13 = &v55;
sub_1000097D0(&__p, v12, v13->__r_.__value_.__l.__size_);
}
else
{
__p = *v11;
}
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v14 = &__p;
else
v14 = (std::string *)__p.__r_.__value_.__r.__words[0];
v15 = CCSpritePlus::createWithSpriteFrameName((const char *)v14);
if ( i )
{
v16 = 5;
}
else
{
v17 = ((__int64 (__fastcall *)(GameObject *))a1->getParent)(a1);
v16 = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v17 + 104LL))(v17) + 1;
}
v18 = GameManager::sharedState();
((void (__fastcall *)(cocos2d::CCLayer *, CCSpritePlus *, __int64))v18->m_playLayer->m_objectLayer->addChild_0)(
v18->m_playLayer->m_objectLayer,
v15,
v16);
((void (__fastcall *)(__int64 *__return_ptr, GameObject *))a1->getRealPosition)(&v52, a1);
((void (__fastcall *)(CCSpritePlus *, __int64 *))v15->setPosition)(v15, &v52);
((void (__fastcall *)(GameObject *))a1->getRotation)(a1);
((void (__fastcall *)(CCSpritePlus *))v15->setRotation)(v15);
isFlipX = cocos2d::CCSprite::isFlipX(a1);
((void (__fastcall *)(CCSpritePlus *, _BOOL8))v15->setFlipX)(v15, isFlipX);
isFlipY = cocos2d::CCSprite::isFlipY(a1);
((void (__fastcall *)(CCSpritePlus *, _BOOL8))v15->setFlipY)(v15, isFlipY);
((void (__fastcall *)(GameObject *))a1->getScaleX)(a1);
((void (__fastcall *)(CCSpritePlus *))v15->setScaleX)(v15);
((void (__fastcall *)(GameObject *))a1->getScaleY)(a1);
((void (__fastcall *)(CCSpritePlus *))v15->setScaleY)(v15);
if ( i )
v9 = v15;
else
v8 = v15;
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
}
v21 = ((__int64 (__fastcall *)(GameObject *, __int64))a1->getChildByTag)(a1, 91);
if ( v21 )
{
v51 = CCSpritePlus::createWithSpriteFrameName("portal_extra_shine_001.png");
v22 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 312LL))(v21);
v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 312LL))(v21);
v24.n128_f32[0] = v22 * 0.5;
v25.n128_f32[0] = *(float *)(v23 + 4) * 0.5;
sub_100022980(v24, v25, &__p);
((void (__fastcall *)(CCSpritePlus *, std::string *))v51->setPosition)(v51, &__p);
(*(void (__fastcall **)(__int64, CCSpritePlus *, __int64))(*(_QWORD *)v21 + 448LL))(v21, v51, 1);
++v5;
}
else
{
v51 = nullptr;
}
v26 = 0;
do
{
v27 = v8;
if ( v26 )
{
v27 = v9;
if ( v26 != 1 )
v27 = v51;
}
((void (__fastcall *)(CCSpritePlus *, _QWORD))v27->setOpacity)(v27, 0);
if ( v26 != 2 )
CCSpritePlus::followSprite(v27);
((void (__fastcall *)(CCSpritePlus *, __int64))v27->setBlendFunc)(v27, 0x100000302LL);
v28 = cocos2d::CCFadeIn::create(0.05);
v29 = (unsigned __int8)cocos2d::CCFadeOut::create(0.4);
v56.ptr = (void (*)(void))CCSpritePlus::stopFollow;
v56.adj = 0;
cocos2d::CCCallFunc::create(v27, v56);
v57.ptr = (void (*)(void))520;
v57.adj = 1;
cocos2d::CCCallFunc::create(v27, v57);
v37 = sub_10018A494(v28, v30, v31, v32, v33, v34, v35, v36, v29);
cocos2d::CCNode::runAction(v27, v37);
++v26;
}
while ( v5 != v26 );
if ( (v50 & 1) == 0 )
goto LABEL_106;
v38 = a1->m_objectID;
v39 = 70.0;
if ( v38 > 202 )
{
if ( v38 == 203 )
{
v40 = 1117782016;
goto LABEL_99;
}
if ( v38 == 1334 )
{
v40 = 1119092736;
goto LABEL_99;
}
}
else
{
if ( v38 == 200 )
{
v40 = 1114636288;
goto LABEL_99;
}
if ( v38 == 201 )
{
v40 = 1115815936;
LABEL_99:
v39 = *(float *)&v40;
}
}
v41 = CCCircleWave::create_1(5.0, v39, 0.3, 0);
v41->m_color = (cocos2d::ccColor3B)v49;
v42 = ((__int64 (__fastcall *)(GameObject *))a1->getPosition)(a1);
((void (__fastcall *)(CCCircleWave *, __int64))v41->setPosition)(v41, v42);
if ( ((__int64 (__fastcall *)(GameObject *))a1->getParent)(a1) )
{
m_objectLayer = GameManager::sharedState()->m_playLayer->m_objectLayer;
v44 = ((__int64 (__fastcall *)(GameObject *))a1->getParent)(a1);
v45 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v44 + 104LL))(v44);
((void (__fastcall *)(cocos2d::CCLayer *, CCCircleWave *, _QWORD))m_objectLayer->addChild_0)(
m_objectLayer,
v41,
(unsigned int)(v45 - 1));
}
*(_QWORD *)&v41->m_circleMode = 0x600000001LL;
CCCircleWave::followObject(v41, a1, 1);
m_playLayer = GameManager::sharedState()->m_playLayer;
if ( m_playLayer )
v47 = &m_playLayer->CCCircleWaveDelegate;
else
v47 = nullptr;
v41->m_delegate = v47;
v48 = GameManager::sharedState();
PlayLayer::addCircle(v48->m_playLayer, v41);
goto LABEL_106;
}
}
v7 = 16750080;
goto LABEL_57;
}
if ( (unsigned int)m_objectID > 0x2F )
goto LABEL_106;
if ( ((1LL << m_objectID) & 0x800000003000LL) != 0 )
goto LABEL_33;
if ( ((1LL << m_objectID) & 0xC00) != 0 )
goto LABEL_42;
if ( ((1LL << m_objectID) & 0x600000000000LL) != 0 )
{
std::string::assign(&v55, "portalshine_03_front_001.png");
v3 = "portalshine_03_back_001.png";
LABEL_46:
std::string::assign(&v54, v3);
v50 = 0;
v5 = 2;
goto LABEL_47;
}
LABEL_106:
if ( SHIBYTE(v54.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v54.__r_.__value_.__l.__data_);
if ( SHIBYTE(v55.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v55.__r_.__value_.__l.__data_);
}