// // GameObject::addColorSpriteToParent from 0x3562a0 to 0x3563e6 (326 bytes) // // 3 xrefs: // > PlayLayer::updateVisibility @ 0x315b1e // > GameObject::activateObject @ 0x35644e // > LevelEditorLayer::updateVisibility @ 0x36981e // // 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::addColorSpriteToParent(GameObject *a1, bool a2) { _BOOL4 v3; // r8 _BOOL4 m_colorSpriteLocked; // r7 ZLayer ObjectZLayer; // r0 int v6; // r5 cocos2d::CCSprite *m_colorSprite; // r6 void (__fastcall *setScaleX)(cocos2d::CCSprite *__hidden, float); // r9 int v9; // r0 cocos2d::CCSprite *v10; // r6 void (__fastcall *setScaleY)(cocos2d::CCSprite *__hidden, float); // r9 int v12; // r0 cocos2d::CCSprite *v13; // r6 void (__fastcall *setRotationX)(cocos2d::CCSprite *__hidden, float); // r9 int v15; // r0 cocos2d::CCSprite *v16; // r6 void (__fastcall *setRotationY)(cocos2d::CCSprite *__hidden, float); // r9 int v18; // r0 int ParentMode; // r0 cocos2d::CCNode *v20; // r6 cocos2d::CCNode *v21; // r0 cocos2d::CCNode *v22; // r5 cocos2d::CCSprite *v23; // r8 void (__fastcall *addChild_0)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // r5 int v25; // r0 cocos2d::CCSprite *v26; // r5 void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r6 const cocos2d::CCPoint *v28; // r0 cocos2d::CCSprite *v29; // r7 void (__fastcall *reorderChild)(cocos2d::CCNode *__hidden, cocos2d::CCNode *, int); // r6 int ObjectZOrder; // r0 v3 = a2; if ( a1->m_colorSprite && !a1->m_unk28c ) { if ( a1->m_shouldBlendBase == a1->m_shouldBlendDetail ) { GameObject::addColorSpriteToSelf(a1); } else { m_colorSpriteLocked = a1->m_colorSpriteLocked; a1->m_colorSpriteLocked = 0; ObjectZLayer = GameObject::getObjectZLayer(a1); v6 = ObjectZLayer; if ( a1->m_shouldBlendDetail && a1->m_colorZLayerRelated ) v6 = ObjectZLayer + 1; m_colorSprite = a1->m_colorSprite; setScaleX = m_colorSprite->setScaleX; v9 = ((int (__fastcall *)(GameObject *))a1->getScaleX)(a1); ((void (__fastcall *)(cocos2d::CCSprite *, int))setScaleX)(m_colorSprite, v9); v10 = a1->m_colorSprite; setScaleY = v10->setScaleY; v12 = ((int (__fastcall *)(GameObject *))a1->getScaleY)(a1); ((void (__fastcall *)(cocos2d::CCSprite *, int))setScaleY)(v10, v12); v13 = a1->m_colorSprite; setRotationX = v13->setRotationX; v15 = ((int (__fastcall *)(GameObject *))a1->getRotationX)(a1); ((void (__fastcall *)(cocos2d::CCSprite *, int))setRotationX)(v13, v15); v16 = a1->m_colorSprite; setRotationY = v16->setRotationY; v18 = ((int (__fastcall *)(GameObject *))a1->getRotationY)(a1); ((void (__fastcall *)(cocos2d::CCSprite *, int))setRotationY)(v16, v18); LOBYTE(v16) = a1->m_shouldBlendDetail; ParentMode = GameObject::getParentMode(a1); v20 = GameObject::parentForZLayer(a1, v6, (bool)v16, ParentMode); v21 = a1->m_colorSprite->getParent(a1->m_colorSprite); v22 = v21; if ( v21 == v20 ) { if ( v3 ) { v29 = a1->m_colorSprite; reorderChild = v21->reorderChild; ObjectZOrder = GameObject::getObjectZOrder(a1); reorderChild(v22, v29, ObjectZOrder); } } else { a1->m_colorSprite->removeFromParentAndCleanup(a1->m_colorSprite, 0); v23 = a1->m_colorSprite; addChild_0 = v20->addChild_0; v25 = GameObject::getObjectZOrder(a1); addChild_0(v20, v23, v25); if ( m_colorSpriteLocked ) { v26 = a1->m_colorSprite; setPosition = v26->setPosition; v28 = a1->getPosition(a1); setPosition(v26, v28); } } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source