{"type": "func", "start": 5760766, "end": 5760906, "name": "CustomizeObjectLayer::updateColorSprite", "pseudocode": "// \n// CustomizeObjectLayer::updateColorSprite from 0x57e6fe to 0x57e78a (140 bytes)\n// \n// 8 xrefs:\n// > CustomizeObjectLayer::colorSelectClosed @ 0x57e78a\n// > CustomizeObjectLayer::onSelectColor @ 0x57e980\n// > CustomizeObjectLayer::colorSetupClosed @ 0x57eaf4\n// > CustomizeObjectLayer::onNextColorChannel @ 0x57eb62\n// > CustomizeObjectLayer::onPaste @ 0x57ebd6\n// > CustomizeObjectLayer::onSelectMode @ 0x57edfa\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x57ee86\n// > CustomizeObjectLayer::textChanged @ 0x57f314\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:52:51 +0000\n// \n\nint __fastcall CustomizeObjectLayer::updateColorSprite(ColorChannelSprite **this)\n{\n  GameManager *ActiveMode; // r0\n  int v3; // r4\n  int v4; // r0\n  GameManager *v5; // r0\n  int v6; // r0\n  ColorAction *ColorAction; // r1\n  ColorChannelSprite *v8; // r0\n  bool v9; // cc\n  unsigned int v10; // r4\n  int v11; // r1\n\n  if ( *(this + 140) == (ColorChannelSprite *)((char *)&dword_0 + 3) )\n  {\n    v3 = 0;\n  }\n  else\n  {\n    ActiveMode = (GameManager *)CustomizeObjectLayer::getActiveMode((CustomizeObjectLayer *)this, 1);\n    v3 = (int)ActiveMode;\n    if ( (int)ActiveMode > 0\n      && (v4 = GameManager::sharedState(ActiveMode),\n          (v5 = (GameManager *)GJEffectManager::colorExists(\n                                 *(GJEffectManager **)(*(_DWORD *)(*(_DWORD *)(v4 + 408) + 2084) + 264),\n                                 v3)) != nullptr) )\n    {\n      v6 = GameManager::sharedState(v5);\n      ColorAction = (ColorAction *)GJEffectManager::getColorAction(\n                                     *(GJEffectManager **)(*(_DWORD *)(*(_DWORD *)(v6 + 408) + 2084) + 264),\n                                     v3);\n      v8 = *(this + 160);\n    }\n    else\n    {\n      v8 = *(this + 160);\n      ColorAction = nullptr;\n    }\n    ColorChannelSprite::updateValues(v8, ColorAction);\n  }\n  v9 = v3 <= 0;\n  v10 = v3 - 1005;\n  v11 = v9;\n  if ( v10 <= 7 && ((1 << v10) & 0xE7) != 0 )\n    v11 = 1;\n  return (*(int (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 161) + 172))(*(this + 161), v11 ^ 1);\n}", "assembly": "; \n; CustomizeObjectLayer::updateColorSprite from 0x57e6fe to 0x57e78a (140 bytes)\n; \n; 8 xrefs:\n; > CustomizeObjectLayer::colorSelectClosed @ 0x57e78a\n; > CustomizeObjectLayer::onSelectColor @ 0x57e980\n; > CustomizeObjectLayer::colorSetupClosed @ 0x57eaf4\n; > CustomizeObjectLayer::onNextColorChannel @ 0x57eb62\n; > CustomizeObjectLayer::onPaste @ 0x57ebd6\n; > CustomizeObjectLayer::onSelectMode @ 0x57edfa\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x57ee86\n; > CustomizeObjectLayer::textChanged @ 0x57f314\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:52:51 +0000\n; \nPUSH            {R4-R6,LR}                                             ; +0x0, 0x57e6fe\nMOV             R5, R0                                                 ; +0x2, 0x57e700\nLDR.W           R3, [R0,#0x230]                                        ; +0x4, 0x57e702\nCMP             R3, #3                                                 ; +0x8, 0x57e706\nBEQ             loc_57E74A                                             ; +0xa, 0x57e708\nMOVS            R1, #1; bool                                           ; +0xc, 0x57e70a\nBL              _ZN20CustomizeObjectLayer13getActiveModeEb; CustomizeObjectLayer::getActiveMode(bool) ; +0xe, 0x57e70c\nSUBS            R4, R0, #0                                             ; +0x12, 0x57e710\nBLE             loc_57E77E                                             ; +0x14, 0x57e712\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x16, 0x57e714\nMOV             R1, R4; int                                            ; +0x1a, 0x57e718\nLDR.W           R3, [R0,#0x198]                                        ; +0x1c, 0x57e71a\nLDR.W           R3, [R3,#0x824]                                        ; +0x20, 0x57e71e\nLDR.W           R0, [R3,#0x108]; this                                  ; +0x24, 0x57e722\nBL              _ZN15GJEffectManager11colorExistsEi; GJEffectManager::colorExists(int) ; +0x28, 0x57e726\nCBZ             R0, loc_57E77E                                         ; +0x2c, 0x57e72a\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2e, 0x57e72c\nMOV             R1, R4; int                                            ; +0x32, 0x57e730\nLDR.W           R3, [R0,#0x198]                                        ; +0x34, 0x57e732\nLDR.W           R3, [R3,#0x824]                                        ; +0x38, 0x57e736\nLDR.W           R0, [R3,#0x108]; this                                  ; +0x3c, 0x57e73a\nBL              _ZN15GJEffectManager14getColorActionEi; GJEffectManager::getColorAction(int) ; +0x40, 0x57e73e\nMOV             R1, R0                                                 ; +0x44, 0x57e742\nLDR.W           R0, [R5,#0x280]                                        ; +0x46, 0x57e744\nB               loc_57E784                                             ; +0x4a, 0x57e748\nMOVS            R4, #0                                                 ; +0x4c, 0x57e74a\nCMP             R4, #0                                                 ; +0x4e, 0x57e74c\nMOV             R3, #0xFFFFFC13                                        ; +0x50, 0x57e74e\nADD             R4, R3                                                 ; +0x54, 0x57e752\nITE GT                                                                 ; +0x56, 0x57e754\nMOVGT           R1, #0                                                 ; +0x58, 0x57e756\nMOVLE           R1, #1                                                 ; +0x5a, 0x57e758\nCMP             R4, #7                                                 ; +0x5c, 0x57e75a\nBHI             loc_57E76A                                             ; +0x5e, 0x57e75c\nMOVS            R3, #1                                                 ; +0x60, 0x57e75e\nLSLS            R3, R4                                                 ; +0x62, 0x57e760\nTST.W           R3, #0xE7                                              ; +0x64, 0x57e762\nIT NE                                                                  ; +0x68, 0x57e766\nMOVNE           R1, #1                                                 ; +0x6a, 0x57e768\nLDR.W           R0, [R5,#0x284]                                        ; +0x6c, 0x57e76a\nEOR.W           R1, R1, #1                                             ; +0x70, 0x57e76e\nPOP.W           {R4-R6,LR}                                             ; +0x74, 0x57e772\nLDR             R3, [R0]                                               ; +0x78, 0x57e776\nLDR.W           R3, [R3,#0xAC]                                         ; +0x7a, 0x57e778\nBX              R3                                                     ; +0x7e, 0x57e77c\nLDR.W           R0, [R5,#0x280]; this                                  ; +0x80, 0x57e77e\nMOVS            R1, #0; ColorAction *                                  ; +0x84, 0x57e782\nBL              _ZN18ColorChannelSprite12updateValuesEP11ColorAction; ColorChannelSprite::updateValues(ColorAction *) ; +0x86, 0x57e784\nB               loc_57E74C                                             ; +0x8a, 0x57e788", "xrefs": ["CustomizeObjectLayer::colorSelectClosed @ 0x57e78a", "CustomizeObjectLayer::onSelectColor @ 0x57e980", "CustomizeObjectLayer::colorSetupClosed @ 0x57eaf4", "CustomizeObjectLayer::onNextColorChannel @ 0x57eb62", "CustomizeObjectLayer::onPaste @ 0x57ebd6", "CustomizeObjectLayer::onSelectMode @ 0x57edfa", "CustomizeObjectLayer::onUpdateCustomColor @ 0x57ee86", "CustomizeObjectLayer::textChanged @ 0x57f314"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}