{"type": "func", "start": 4824146, "end": 4824222, "name": "GJEffectManager::getColorSprite", "pseudocode": "// \n// GJEffectManager::getColorSprite from 0x499c52 to 0x499c9e (76 bytes)\n// \n// 14 xrefs:\n// > GameObject::setupColorSprite @ 0x358cf8\n// > GameObject::setupColorSprite @ 0x358d02\n// > LevelEditorLayer::transferDefaultColors @ 0x367bf0\n// > LevelEditorLayer::transferDefaultColors @ 0x367c16\n// > LevelEditorLayer::transferDefaultColors @ 0x367c3c\n// > LevelEditorLayer::transferDefaultColors @ 0x367c62\n// > GJBaseGameLayer::updateColor @ 0x46c0a8\n// > GJEffectManager::activeColorForIndex @ 0x499cd0\n// > GJEffectManager::activeOpacityForIndex @ 0x499d1e\n// > GJEffectManager::setColorAction @ 0x499d6e\n// > GJEffectManager::calculateInheritedColor @ 0x49a4a8\n// > GJEffectManager::calculateLightBGColor @ 0x49aae6\n// > GJEffectManager::calculateLightBGColor @ 0x49aafe\n// > GJEffectManager::processCopyColorPulseActions @ 0x49c824\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nColorActionSprite *GJEffectManager::getColorSprite(GJEffectManager *a1, int a2)\n{\n  intptr_t v2; // r4\n  ColorActionSprite *v4; // r5\n  ColorActionSprite *v5; // r0\n  void (__fastcall *addChild)(cocos2d::CCNode *__hidden, cocos2d::CCNode *); // r3\n\n  if ( a2 > 1100 )\n    v2 = 1101;\n  else\n    v2 = a2 & ~(a2 >> 31);\n  v4 = a1->m_colorActionSpriteVector.m_start[v2];\n  if ( !v4 )\n  {\n    v5 = ColorActionSprite::create();\n    addChild = a1->addChild;\n    v4 = v5;\n    v5->m_colorID = v2;\n    addChild(a1, v5);\n    a1->m_colorActionSpriteVector.m_start[v2] = v4;\n    cocos2d::CCDictionary::setObject(a1->m_unkDict150, v4, v2);\n  }\n  return v4;\n}", "assembly": "; \n; GJEffectManager::getColorSprite from 0x499c52 to 0x499c9e (76 bytes)\n; \n; 14 xrefs:\n; > GameObject::setupColorSprite @ 0x358cf8\n; > GameObject::setupColorSprite @ 0x358d02\n; > LevelEditorLayer::transferDefaultColors @ 0x367bf0\n; > LevelEditorLayer::transferDefaultColors @ 0x367c16\n; > LevelEditorLayer::transferDefaultColors @ 0x367c3c\n; > LevelEditorLayer::transferDefaultColors @ 0x367c62\n; > GJBaseGameLayer::updateColor @ 0x46c0a8\n; > GJEffectManager::activeColorForIndex @ 0x499cd0\n; > GJEffectManager::activeOpacityForIndex @ 0x499d1e\n; > GJEffectManager::setColorAction @ 0x499d6e\n; > GJEffectManager::calculateInheritedColor @ 0x49a4a8\n; > GJEffectManager::calculateLightBGColor @ 0x49aae6\n; > GJEffectManager::calculateLightBGColor @ 0x49aafe\n; > GJEffectManager::processCopyColorPulseActions @ 0x49c824\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nMOVW            R3, #0x44C                                             ; +0x0, 0x499c52\nCMP             R1, R3                                                 ; +0x4, 0x499c56\nLDR.W           R3, [R0,#0x1D4]                                        ; +0x6, 0x499c58\nPUSH            {R4-R6,LR}                                             ; +0xa, 0x499c5c\nITE LE                                                                 ; +0xc, 0x499c5e\nBICLE.W         R4, R1, R1,ASR#31                                      ; +0xe, 0x499c60\nMOVWGT          R4, #0x44D                                             ; +0x12, 0x499c64\nMOV             R6, R0                                                 ; +0x16, 0x499c68\nLDR.W           R5, [R3,R4,LSL#2]                                      ; +0x18, 0x499c6a\nCBNZ            R5, loc_499C9A                                         ; +0x1c, 0x499c6e\nBL              _ZN17ColorActionSprite6createEv; ColorActionSprite::create(void) ; +0x1e, 0x499c70\nLDR             R3, [R6]                                               ; +0x22, 0x499c74\nLDR.W           R3, [R3,#0xDC]                                         ; +0x24, 0x499c76\nMOV             R5, R0                                                 ; +0x28, 0x499c7a\nSTR.W           R4, [R0,#0x114]                                        ; +0x2a, 0x499c7c\nMOV             R1, R5                                                 ; +0x2e, 0x499c80\nMOV             R0, R6                                                 ; +0x30, 0x499c82\nBLX             R3                                                     ; +0x32, 0x499c84\nLDR.W           R3, [R6,#0x1D4]                                        ; +0x34, 0x499c86\nMOV             R1, R5; cocos2d::CCObject *                            ; +0x38, 0x499c8a\nMOV             R2, R4; int                                            ; +0x3a, 0x499c8c\nSTR.W           R5, [R3,R4,LSL#2]                                      ; +0x3c, 0x499c8e\nLDR.W           R0, [R6,#0x110]; this                                  ; +0x40, 0x499c92\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0x44, 0x499c96\nMOV             R0, R5                                                 ; +0x48, 0x499c9a\nPOP             {R4-R6,PC}                                             ; +0x4a, 0x499c9c", "xrefs": ["GameObject::setupColorSprite @ 0x358cf8", "GameObject::setupColorSprite @ 0x358d02", "LevelEditorLayer::transferDefaultColors @ 0x367bf0", "LevelEditorLayer::transferDefaultColors @ 0x367c16", "LevelEditorLayer::transferDefaultColors @ 0x367c3c", "LevelEditorLayer::transferDefaultColors @ 0x367c62", "GJBaseGameLayer::updateColor @ 0x46c0a8", "GJEffectManager::activeColorForIndex @ 0x499cd0", "GJEffectManager::activeOpacityForIndex @ 0x499d1e", "GJEffectManager::setColorAction @ 0x499d6e", "GJEffectManager::calculateInheritedColor @ 0x49a4a8", "GJEffectManager::calculateLightBGColor @ 0x49aae6", "GJEffectManager::calculateLightBGColor @ 0x49aafe", "GJEffectManager::processCopyColorPulseActions @ 0x49c824"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}