{"type": "func", "start": 4594946, "end": 4595140, "name": "CustomizeObjectLayer::updateSelected", "pseudocode": "// \n// CustomizeObjectLayer::updateSelected from 0x461d02 to 0x461dc4 (194 bytes)\n// \n// 5 xrefs:\n// > CustomizeObjectLayer::textChanged @ 0x461e24\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x461ee6\n// > CustomizeObjectLayer::onSelectColor @ 0x461fdc\n// > CustomizeObjectLayer::colorSetupClosed @ 0x462012\n// > CustomizeObjectLayer::onNextColorChannel @ 0x4620a8\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 CustomizeObjectLayer::updateSelected(CustomizeObjectLayer *a1, int a2)\n{\n  GameObject *m_targetObject; // r0\n  _BOOL4 v5; // r7\n  GJSpriteColor *RelativeSpriteColor; // r0\n  int v7; // r6\n  int m_defaultColorID; // r3\n  int v9; // r3\n  int v10; // r6\n  unsigned int i; // r4\n  GameObject *v12; // r11\n  GJSpriteColor *v13; // r0\n  int v14; // r3\n  int v15; // r3\n\n  m_targetObject = a1->m_targetObject;\n  v5 = a2 == 0;\n  if ( m_targetObject )\n  {\n    RelativeSpriteColor = GameObject::getRelativeSpriteColor(m_targetObject, a1->m_selectedMode);\n    if ( RelativeSpriteColor )\n    {\n      if ( v5 )\n      {\n        m_defaultColorID = RelativeSpriteColor->m_defaultColorID;\n        if ( m_defaultColorID > 1100 )\n          v9 = 1101;\n        else\n          v9 = m_defaultColorID & ~(m_defaultColorID >> 31);\n        RelativeSpriteColor->m_defaultColorID = v9;\n        RelativeSpriteColor->m_colorID = 0;\n      }\n      else\n      {\n        if ( a2 > 1100 )\n          v7 = 1101;\n        else\n          v7 = a2 & ~(a2 >> 31);\n        RelativeSpriteColor->m_colorID = v7;\n      }\n      a1->m_targetObject->m_updateParents = 1;\n    }\n  }\n  else if ( a1->m_targetObjects )\n  {\n    if ( a2 > 1100 )\n      v10 = 1101;\n    else\n      v10 = a2 & ~(a2 >> 31);\n    for ( i = 0; i < cocos2d::CCArray::count(a1->m_targetObjects); ++i )\n    {\n      v12 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, i);\n      v13 = GameObject::getRelativeSpriteColor(v12, a1->m_selectedMode);\n      if ( v13 )\n      {\n        if ( v5 )\n        {\n          v14 = v13->m_defaultColorID;\n          v13->m_colorID = 0;\n          if ( v14 > 1100 )\n            v15 = 1101;\n          else\n            v15 = v14 & ~(v14 >> 31);\n          v13->m_defaultColorID = v15;\n        }\n        else\n        {\n          v13->m_colorID = v10;\n        }\n        v12->m_updateParents = 1;\n      }\n    }\n  }\n}", "assembly": "; \n; CustomizeObjectLayer::updateSelected from 0x461d02 to 0x461dc4 (194 bytes)\n; \n; 5 xrefs:\n; > CustomizeObjectLayer::textChanged @ 0x461e24\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x461ee6\n; > CustomizeObjectLayer::onSelectColor @ 0x461fdc\n; > CustomizeObjectLayer::colorSetupClosed @ 0x462012\n; > CustomizeObjectLayer::onNextColorChannel @ 0x4620a8\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-R11,LR}                                            ; +0x0, 0x461d02\nMOV             R5, R0                                                 ; +0x4, 0x461d06\nLDR.W           R0, [R0,#0x200]; this                                  ; +0x6, 0x461d08\nCLZ.W           R7, R1                                                 ; +0xa, 0x461d0c\nMOV             R6, R1                                                 ; +0xe, 0x461d10\nLSRS            R7, R7, #5                                             ; +0x10, 0x461d12\nCBZ             R0, loc_461D5A                                         ; +0x12, 0x461d14\nLDR.W           R1, [R5,#0x21C]; int                                   ; +0x14, 0x461d16\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x18, 0x461d1a\nCMP             R0, #0                                                 ; +0x1c, 0x461d1e\nBEQ             locret_461DC0                                          ; +0x1e, 0x461d20\nMOVW            R2, #0x44C                                             ; +0x20, 0x461d22\nCBNZ            R7, loc_461D38                                         ; +0x24, 0x461d26\nCMP             R6, R2                                                 ; +0x26, 0x461d28\nITE LE                                                                 ; +0x28, 0x461d2a\nBICLE.W         R6, R6, R6,ASR#31                                      ; +0x2a, 0x461d2c\nMOVWGT          R6, #0x44D                                             ; +0x2e, 0x461d30\nSTR             R6, [R0]                                               ; +0x32, 0x461d34\nB               loc_461D4C                                             ; +0x34, 0x461d36\nLDR             R3, [R0,#4]                                            ; +0x36, 0x461d38\nCMP             R3, R2                                                 ; +0x38, 0x461d3a\nITE LE                                                                 ; +0x3a, 0x461d3c\nBICLE.W         R3, R3, R3,ASR#31                                      ; +0x3c, 0x461d3e\nMOVWGT          R3, #0x44D                                             ; +0x40, 0x461d42\nSTR             R3, [R0,#4]                                            ; +0x44, 0x461d46\nMOVS            R3, #0                                                 ; +0x46, 0x461d48\nSTR             R3, [R0]                                               ; +0x48, 0x461d4a\nLDR.W           R3, [R5,#0x200]                                        ; +0x4a, 0x461d4c\nMOVS            R2, #1                                                 ; +0x4e, 0x461d50\nSTRB.W          R2, [R3,#0x3E4]                                        ; +0x50, 0x461d52\nPOP.W           {R3-R11,PC}                                            ; +0x54, 0x461d56\nLDR.W           R3, [R5,#0x204]                                        ; +0x58, 0x461d5a\nCBZ             R3, locret_461DC0                                      ; +0x5c, 0x461d5e\nBIC.W           R2, R1, R1,ASR#31                                      ; +0x5e, 0x461d60\nMOVW            R8, #0x44C                                             ; +0x62, 0x461d64\nMOVW            R3, #0x44D                                             ; +0x66, 0x461d68\nCMP             R1, R8                                                 ; +0x6a, 0x461d6c\nITE LE                                                                 ; +0x6c, 0x461d6e\nMOVLE           R6, R2                                                 ; +0x6e, 0x461d70\nMOVGT           R6, R3                                                 ; +0x70, 0x461d72\nMOV             R4, R0                                                 ; +0x72, 0x461d74\nMOV.W           R9, #1                                                 ; +0x74, 0x461d76\nMOV             R10, R0                                                ; +0x78, 0x461d7a\nLDR.W           R0, [R5,#0x204]; this                                  ; +0x7a, 0x461d7c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x7e, 0x461d80\nCMP             R4, R0                                                 ; +0x82, 0x461d84\nBCS             locret_461DC0                                          ; +0x84, 0x461d86\nMOV             R1, R4; unsigned int                                   ; +0x86, 0x461d88\nLDR.W           R0, [R5,#0x204]; this                                  ; +0x88, 0x461d8a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x8c, 0x461d8e\nLDR.W           R1, [R5,#0x21C]; int                                   ; +0x90, 0x461d92\nMOV             R11, R0                                                ; +0x94, 0x461d96\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x96, 0x461d98\nCBZ             R0, loc_461DBC                                         ; +0x9a, 0x461d9c\nCBNZ            R7, loc_461DA4                                         ; +0x9c, 0x461d9e\nSTR             R6, [R0]                                               ; +0x9e, 0x461da0\nB               loc_461DB8                                             ; +0xa0, 0x461da2\nLDR             R3, [R0,#4]                                            ; +0xa2, 0x461da4\nSTR.W           R10, [R0]                                              ; +0xa4, 0x461da6\nCMP             R3, R8                                                 ; +0xa8, 0x461daa\nITE LE                                                                 ; +0xaa, 0x461dac\nBICLE.W         R3, R3, R3,ASR#31                                      ; +0xac, 0x461dae\nMOVWGT          R3, #0x44D                                             ; +0xb0, 0x461db2\nSTR             R3, [R0,#4]                                            ; +0xb4, 0x461db6\nSTRB.W          R9, [R11,#0x3E4]                                       ; +0xb6, 0x461db8\nADDS            R4, #1                                                 ; +0xba, 0x461dbc\nB               loc_461D7C                                             ; +0xbc, 0x461dbe\nPOP.W           {R3-R11,PC}                                            ; +0xbe, 0x461dc0", "xrefs": ["CustomizeObjectLayer::textChanged @ 0x461e24", "CustomizeObjectLayer::onUpdateCustomColor @ 0x461ee6", "CustomizeObjectLayer::onSelectColor @ 0x461fdc", "CustomizeObjectLayer::colorSetupClosed @ 0x462012", "CustomizeObjectLayer::onNextColorChannel @ 0x4620a8"], "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"}