{"type": "func", "start": 4816976, "end": 4817140, "name": "GJColorSetupLayer::updateSpriteColors", "pseudocode": "// \n// GJColorSetupLayer::updateSpriteColors from 0x498050 to 0x4980f4 (164 bytes)\n// \n// 3 xrefs:\n// > GJColorSetupLayer::colorSelectClosed @ 0x4980f4\n// > GJColorSetupLayer::showPage @ 0x49813e\n// > GJColorSetupLayer::init @ 0x498496\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\nvoid GJColorSetupLayer::updateSpriteColors(GJColorSetupLayer *a1)\n{\n  int v2; // r8\n  int v3; // r4\n  ColorChannelSprite *v4; // r5\n  cocos2d::CCLabelBMFont *v5; // r7\n  bool v6; // cc\n  void (*setScale)(void); // r3\n\n  v2 = a1->m_colorsPerPage * a1->m_page;\n  v3 = v2;\n  while ( (unsigned int)(v3 - v2) < cocos2d::CCArray::count(a1->m_colorSprites) )\n  {\n    v4 = (ColorChannelSprite *)cocos2d::CCArray::objectAtIndex(a1->m_colorSprites, v3 - v2);\n    v5 = (cocos2d::CCLabelBMFont *)cocos2d::CCArray::objectAtIndex(a1->m_colorLabels, v3 - v2);\n    v6 = v3++ <= 998;\n    setScale = (void (*)(void))v4->getParent(v4)->__vftable[1].setScale;\n    setScale();\n    if ( v6 )\n    {\n      v4->setVisible(v4, 1);\n      v5->setVisible(v5, 1);\n      GJColorSetupLayer::updateSpriteColor(a1, v4, v5, v3);\n    }\n    else\n    {\n      v4->setVisible(v4, 0);\n      v5->setVisible(v5, 0);\n    }\n  }\n}", "assembly": "; \n; GJColorSetupLayer::updateSpriteColors from 0x498050 to 0x4980f4 (164 bytes)\n; \n; 3 xrefs:\n; > GJColorSetupLayer::colorSelectClosed @ 0x4980f4\n; > GJColorSetupLayer::showPage @ 0x49813e\n; > GJColorSetupLayer::init @ 0x498496\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\nPUSH.W          {R3-R9,LR}                                             ; +0x0, 0x498050\nMOV             R6, R0                                                 ; +0x4, 0x498054\nLDR.W           R3, [R0,#0x20C]                                        ; +0x6, 0x498056\nMOVW            R9, #0x3E6                                             ; +0xa, 0x49805a\nLDR.W           R2, [R0,#0x210]                                        ; +0xe, 0x49805e\nMUL             R8, R2, R3                                             ; +0x12, 0x498062\nMOV             R4, R8                                                 ; +0x16, 0x498066\nLDR.W           R0, [R6,#0x208]; this                                  ; +0x18, 0x498068\nRSB.W           R7, R8, R4                                             ; +0x1c, 0x49806c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x20, 0x498070\nCMP             R7, R0                                                 ; +0x24, 0x498074\nBCS             locret_4980F0                                          ; +0x26, 0x498076\nMOV             R1, R7; unsigned int                                   ; +0x28, 0x498078\nLDR.W           R0, [R6,#0x208]; this                                  ; +0x2a, 0x49807a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x2e, 0x49807e\nMOV             R1, R7; unsigned int                                   ; +0x32, 0x498082\nMOV             R5, R0                                                 ; +0x34, 0x498084\nLDR.W           R0, [R6,#0x204]; this                                  ; +0x36, 0x498086\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x3a, 0x49808a\nLDR             R3, [R5]                                               ; +0x3e, 0x49808e\nLDR.W           R3, [R3,#0xF8]                                         ; +0x40, 0x498090\nMOV             R7, R0                                                 ; +0x44, 0x498094\nMOV             R0, R5                                                 ; +0x46, 0x498096\nBLX             R3                                                     ; +0x48, 0x498098\nCMP             R4, R9                                                 ; +0x4a, 0x49809a\nADD.W           R4, R4, #1                                             ; +0x4c, 0x49809c\nLDR             R3, [R0]                                               ; +0x50, 0x4980a0\nLDR.W           R3, [R3,#0x208]                                        ; +0x52, 0x4980a2\nBGT             loc_4980D2                                             ; +0x56, 0x4980a6\nMOVS            R1, #1                                                 ; +0x58, 0x4980a8\nBLX             R3                                                     ; +0x5a, 0x4980aa\nLDR             R3, [R5]                                               ; +0x5c, 0x4980ac\nMOV             R0, R5                                                 ; +0x5e, 0x4980ae\nMOVS            R1, #1                                                 ; +0x60, 0x4980b0\nLDR.W           R3, [R3,#0xA4]                                         ; +0x62, 0x4980b2\nBLX             R3                                                     ; +0x66, 0x4980b6\nLDR             R3, [R7]                                               ; +0x68, 0x4980b8\nMOV             R0, R7                                                 ; +0x6a, 0x4980ba\nMOVS            R1, #1                                                 ; +0x6c, 0x4980bc\nLDR.W           R3, [R3,#0xA4]                                         ; +0x6e, 0x4980be\nBLX             R3                                                     ; +0x72, 0x4980c2\nMOV             R0, R6; this                                           ; +0x74, 0x4980c4\nMOV             R1, R5; ColorChannelSprite *                           ; +0x76, 0x4980c6\nMOV             R2, R7; cocos2d::CCLabelBMFont *                       ; +0x78, 0x4980c8\nMOV             R3, R4; int                                            ; +0x7a, 0x4980ca\nBL              _ZN17GJColorSetupLayer17updateSpriteColorEP18ColorChannelSpritePN7cocos2d13CCLabelBMFontEi; GJColorSetupLayer::updateSpriteColor(ColorChannelSprite *,cocos2d::CCLabelBMFont *,int) ; +0x7c, 0x4980cc\nB               loc_498068                                             ; +0x80, 0x4980d0\nMOVS            R1, #0                                                 ; +0x82, 0x4980d2\nBLX             R3                                                     ; +0x84, 0x4980d4\nLDR             R3, [R5]                                               ; +0x86, 0x4980d6\nMOV             R0, R5                                                 ; +0x88, 0x4980d8\nMOVS            R1, #0                                                 ; +0x8a, 0x4980da\nLDR.W           R3, [R3,#0xA4]                                         ; +0x8c, 0x4980dc\nBLX             R3                                                     ; +0x90, 0x4980e0\nLDR             R3, [R7]                                               ; +0x92, 0x4980e2\nMOV             R0, R7                                                 ; +0x94, 0x4980e4\nMOVS            R1, #0                                                 ; +0x96, 0x4980e6\nLDR.W           R3, [R3,#0xA4]                                         ; +0x98, 0x4980e8\nBLX             R3                                                     ; +0x9c, 0x4980ec\nB               loc_498068                                             ; +0x9e, 0x4980ee\nPOP.W           {R3-R9,PC}                                             ; +0xa0, 0x4980f0", "xrefs": ["GJColorSetupLayer::colorSelectClosed @ 0x4980f4", "GJColorSetupLayer::showPage @ 0x49813e", "GJColorSetupLayer::init @ 0x498496"], "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"}