{"type": "func", "start": 4594630, "end": 4594770, "name": "CustomizeObjectLayer::updateColorSprite", "pseudocode": "// \n// CustomizeObjectLayer::updateColorSprite from 0x461bc6 to 0x461c52 (140 bytes)\n// \n// 8 xrefs:\n// > CustomizeObjectLayer::colorSelectClosed @ 0x461c52\n// > CustomizeObjectLayer::textChanged @ 0x461e2a\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x461ef2\n// > CustomizeObjectLayer::onSelectColor @ 0x461ff4\n// > CustomizeObjectLayer::colorSetupClosed @ 0x462050\n// > CustomizeObjectLayer::onNextColorChannel @ 0x4620be\n// > CustomizeObjectLayer::onPaste @ 0x462132\n// > CustomizeObjectLayer::onSelectMode @ 0x462356\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::updateColorSprite(CustomizeObjectLayer *a1)\n{\n  int ActiveMode; // r4\n  GameManager *v3; // r0\n  GameManager *v4; // r0\n  ColorAction *ColorAction; // r1\n  ColorChannelSprite *m_colorSprite; // r0\n  bool v7; // cc\n  unsigned int v8; // r4\n  int v9; // r1\n\n  if ( a1->m_selectedMode == 3 )\n  {\n    ActiveMode = 0;\n  }\n  else\n  {\n    ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);\n    if ( ActiveMode > 0\n      && (v3 = GameManager::sharedState(),\n          GJEffectManager::colorExists(v3->m_levelEditorLayer->m_levelSettings->m_effectManager, ActiveMode)) )\n    {\n      v4 = GameManager::sharedState();\n      ColorAction = GJEffectManager::getColorAction(\n                      v4->m_levelEditorLayer->m_levelSettings->m_effectManager,\n                      ActiveMode);\n      m_colorSprite = a1->m_colorSprite;\n    }\n    else\n    {\n      m_colorSprite = a1->m_colorSprite;\n      ColorAction = nullptr;\n    }\n    ColorChannelSprite::updateValues(m_colorSprite, ColorAction);\n  }\n  v7 = ActiveMode <= 0;\n  v8 = ActiveMode - 1005;\n  v9 = v7;\n  if ( v8 <= 7 && ((1 << v8) & 0xE7) != 0 )\n    v9 = 1;\n  a1->m_colorSpriteButton->setVisible(a1->m_colorSpriteButton, v9 != 1);\n}", "assembly": "; \n; CustomizeObjectLayer::updateColorSprite from 0x461bc6 to 0x461c52 (140 bytes)\n; \n; 8 xrefs:\n; > CustomizeObjectLayer::colorSelectClosed @ 0x461c52\n; > CustomizeObjectLayer::textChanged @ 0x461e2a\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x461ef2\n; > CustomizeObjectLayer::onSelectColor @ 0x461ff4\n; > CustomizeObjectLayer::colorSetupClosed @ 0x462050\n; > CustomizeObjectLayer::onNextColorChannel @ 0x4620be\n; > CustomizeObjectLayer::onPaste @ 0x462132\n; > CustomizeObjectLayer::onSelectMode @ 0x462356\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\nLDR.W           R3, [R0,#0x21C]                                        ; +0x0, 0x461bc6\nPUSH            {R4-R6,LR}                                             ; +0x4, 0x461bca\nCMP             R3, #3                                                 ; +0x6, 0x461bcc\nMOV             R5, R0                                                 ; +0x8, 0x461bce\nBEQ             loc_461C12                                             ; +0xa, 0x461bd0\nMOVS            R1, #1; bool                                           ; +0xc, 0x461bd2\nBL              _ZN20CustomizeObjectLayer13getActiveModeEb; CustomizeObjectLayer::getActiveMode(bool) ; +0xe, 0x461bd4\nSUBS            R4, R0, #0                                             ; +0x12, 0x461bd8\nBLE             loc_461C46                                             ; +0x14, 0x461bda\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x16, 0x461bdc\nMOV             R1, R4; int                                            ; +0x1a, 0x461be0\nLDR.W           R3, [R0,#0x170]                                        ; +0x1c, 0x461be2\nLDR.W           R3, [R3,#0x8C0]                                        ; +0x20, 0x461be6\nLDR.W           R0, [R3,#0x108]; this                                  ; +0x24, 0x461bea\nBL              _ZN15GJEffectManager11colorExistsEi; GJEffectManager::colorExists(int) ; +0x28, 0x461bee\nCBZ             R0, loc_461C46                                         ; +0x2c, 0x461bf2\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2e, 0x461bf4\nMOV             R1, R4; int                                            ; +0x32, 0x461bf8\nLDR.W           R3, [R0,#0x170]                                        ; +0x34, 0x461bfa\nLDR.W           R3, [R3,#0x8C0]                                        ; +0x38, 0x461bfe\nLDR.W           R0, [R3,#0x108]; this                                  ; +0x3c, 0x461c02\nBL              _ZN15GJEffectManager14getColorActionEi; GJEffectManager::getColorAction(int) ; +0x40, 0x461c06\nMOV             R1, R0                                                 ; +0x44, 0x461c0a\nLDR.W           R0, [R5,#0x26C]                                        ; +0x46, 0x461c0c\nB               loc_461C4C                                             ; +0x4a, 0x461c10\nMOVS            R4, #0                                                 ; +0x4c, 0x461c12\nCMP             R4, #0                                                 ; +0x4e, 0x461c14\nMOV             R3, #0xFFFFFC13                                        ; +0x50, 0x461c16\nADD             R4, R3                                                 ; +0x54, 0x461c1a\nITE GT                                                                 ; +0x56, 0x461c1c\nMOVGT           R1, #0                                                 ; +0x58, 0x461c1e\nMOVLE           R1, #1                                                 ; +0x5a, 0x461c20\nCMP             R4, #7                                                 ; +0x5c, 0x461c22\nBHI             loc_461C32                                             ; +0x5e, 0x461c24\nMOVS            R3, #1                                                 ; +0x60, 0x461c26\nLSLS            R3, R4                                                 ; +0x62, 0x461c28\nTST.W           R3, #0xE7                                              ; +0x64, 0x461c2a\nIT NE                                                                  ; +0x68, 0x461c2e\nMOVNE           R1, #1                                                 ; +0x6a, 0x461c30\nLDR.W           R0, [R5,#0x270]                                        ; +0x6c, 0x461c32\nEOR.W           R1, R1, #1                                             ; +0x70, 0x461c36\nPOP.W           {R4-R6,LR}                                             ; +0x74, 0x461c3a\nLDR             R3, [R0]                                               ; +0x78, 0x461c3e\nLDR.W           R3, [R3,#0xA4]                                         ; +0x7a, 0x461c40\nBX              R3                                                     ; +0x7e, 0x461c44\nLDR.W           R0, [R5,#0x26C]; this                                  ; +0x80, 0x461c46\nMOVS            R1, #0; ColorAction *                                  ; +0x84, 0x461c4a\nBL              _ZN18ColorChannelSprite12updateValuesEP11ColorAction; ColorChannelSprite::updateValues(ColorAction *) ; +0x86, 0x461c4c\nB               loc_461C14                                             ; +0x8a, 0x461c50", "xrefs": ["CustomizeObjectLayer::colorSelectClosed @ 0x461c52", "CustomizeObjectLayer::textChanged @ 0x461e2a", "CustomizeObjectLayer::onUpdateCustomColor @ 0x461ef2", "CustomizeObjectLayer::onSelectColor @ 0x461ff4", "CustomizeObjectLayer::colorSetupClosed @ 0x462050", "CustomizeObjectLayer::onNextColorChannel @ 0x4620be", "CustomizeObjectLayer::onPaste @ 0x462132", "CustomizeObjectLayer::onSelectMode @ 0x462356"], "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"}