{"type": "func", "start": 4821728, "end": 4821904, "name": "ColorChannelSprite::updateValues", "pseudocode": "// \n// ColorChannelSprite::updateValues from 0x4992e0 to 0x499390 (176 bytes)\n// \n// 3 xrefs:\n// > CustomizeObjectLayer::updateColorSprite @ 0x461c4c\n// > GJColorSetupLayer::updateSpriteColor @ 0x498046\n// > LevelSettingsLayer::updateColorSprite @ 0x570558\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 ColorChannelSprite::updateValues(ColorChannelSprite *a1, ColorAction *a2)\n{\n  GLubyte r; // r1\n  GLubyte g; // r2\n  int m_copyID; // r3\n  _DWORD v7[2]; // [sp+0h] [bp-8h] BYREF\n\n  v7[0] = a1;\n  v7[1] = a2;\n  if ( a2 )\n  {\n    ColorChannelSprite::updateCopyLabel(a1, a2->m_copyID, a2->m_copyColorLoop);\n    ColorChannelSprite::updateOpacity(a1, a2->m_fromOpacity);\n    ColorChannelSprite::updateBlending(a1, a2->m_blending);\n    r = a2->m_fromColor.r;\n    g = a2->m_fromColor.g;\n    BYTE2(v7[0]) = a2->m_fromColor.b;\n    m_copyID = a2->m_copyID;\n    LOBYTE(v7[0]) = r;\n    BYTE1(v7[0]) = g;\n    if ( m_copyID )\n    {\n      if ( !a2->m_copyColorLoop )\n      {\n        LOWORD(v7[0]) = -22874;\n        BYTE2(v7[0]) = -90;\n      }\n    }\n    a1->setColor(a1, (const cocos2d::ccColor3B *)v7);\n  }\n  else\n  {\n    a1->setColor(a1, (const cocos2d::ccColor3B *)&word_9AC083);\n    ColorChannelSprite::updateCopyLabel(a1, 0, 0);\n    ColorChannelSprite::updateOpacity(a1, 1.0);\n    ColorChannelSprite::updateBlending(a1, 0);\n  }\n}", "assembly": "; \n; ColorChannelSprite::updateValues from 0x4992e0 to 0x499390 (176 bytes)\n; \n; 3 xrefs:\n; > CustomizeObjectLayer::updateColorSprite @ 0x461c4c\n; > GJColorSetupLayer::updateSpriteColor @ 0x498046\n; > LevelSettingsLayer::updateColorSprite @ 0x570558\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             R3, =(__stack_chk_guard_ptr - 0x4992E8)                ; +0x0, 0x4992e0\nPUSH            {R0,R1,R4-R6,LR}                                       ; +0x2, 0x4992e2\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x4992e4\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x4992e6\nMOV             R5, R0                                                 ; +0x8, 0x4992e8\nMOV             R4, R1                                                 ; +0xa, 0x4992ea\nLDR             R2, [R3]                                               ; +0xc, 0x4992ec\nMOV             R6, R3                                                 ; +0xe, 0x4992ee\nSTR             R2, [SP,#8+var_4]                                      ; +0x10, 0x4992f0\nCBZ             R1, loc_499340                                         ; +0x12, 0x4992f2\nLDRB.W          R2, [R4,#0x7A]; bool                                   ; +0x14, 0x4992f4\nLDR             R1, [R1,#0x74]; GJSpecialColorSelect *                 ; +0x18, 0x4992f8\nBL              _ZN18ColorChannelSprite15updateCopyLabelEib; ColorChannelSprite::updateCopyLabel(int,bool) ; +0x1a, 0x4992fa\nMOV             R0, R5; this                                           ; +0x1e, 0x4992fe\nLDR             R1, [R4,#0x5C]; float                                  ; +0x20, 0x499300\nBL              _ZN18ColorChannelSprite13updateOpacityEf; ColorChannelSprite::updateOpacity(float) ; +0x22, 0x499302\nLDRB.W          R1, [R4,#0x50]; bool                                   ; +0x26, 0x499306\nMOV             R0, R5; this                                           ; +0x2a, 0x49930a\nBL              _ZN18ColorChannelSprite14updateBlendingEb; ColorChannelSprite::updateBlending(bool) ; +0x2c, 0x49930c\nLDRB.W          R3, [R4,#0x46]                                         ; +0x30, 0x499310\nLDRB.W          R1, [R4,#0x44]                                         ; +0x34, 0x499314\nLDRB.W          R2, [R4,#0x45]                                         ; +0x38, 0x499318\nSTRB.W          R3, [SP,#8+var_6]                                      ; +0x3c, 0x49931c\nLDR             R3, [R4,#0x74]                                         ; +0x40, 0x499320\nSTRB.W          R1, [SP,#8+var_8]                                      ; +0x42, 0x499322\nMOV             R1, SP                                                 ; +0x46, 0x499326\nSTRB.W          R2, [SP,#8+var_8+1]                                    ; +0x48, 0x499328\nCBZ             R3, loc_499334                                         ; +0x4c, 0x49932c\nLDRB.W          R3, [R4,#0x7A]                                         ; +0x4e, 0x49932e\nCBZ             R3, loc_49936C                                         ; +0x52, 0x499332\nLDR             R3, [R5]                                               ; +0x54, 0x499334\nMOV             R0, R5                                                 ; +0x56, 0x499336\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x58, 0x499338\nBLX             R3                                                     ; +0x5c, 0x49933c\nB               loc_499380                                             ; +0x5e, 0x49933e\nLDR             R3, [R0]                                               ; +0x60, 0x499340\nLDR             R1, =(unk_9AC080 - 0x499348)                           ; +0x62, 0x499342\nADD             R1, PC; unk_9AC080                                     ; +0x64, 0x499344\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x66, 0x499346\nADDS            R1, #(word_9AC083 - 0x9AC080)                          ; +0x6a, 0x49934a\nBLX             R3                                                     ; +0x6c, 0x49934c\nMOV             R0, R5; this                                           ; +0x6e, 0x49934e\nMOV             R1, R4; GJSpecialColorSelect *                         ; +0x70, 0x499350\nMOV             R2, R4; bool                                           ; +0x72, 0x499352\nBL              _ZN18ColorChannelSprite15updateCopyLabelEib; ColorChannelSprite::updateCopyLabel(int,bool) ; +0x74, 0x499354\nMOV             R0, R5; this                                           ; +0x78, 0x499358\nMOV.W           R1, #0x3F800000; float                                 ; +0x7a, 0x49935a\nBL              _ZN18ColorChannelSprite13updateOpacityEf; ColorChannelSprite::updateOpacity(float) ; +0x7e, 0x49935e\nMOV             R0, R5; this                                           ; +0x82, 0x499362\nMOV             R1, R4; bool                                           ; +0x84, 0x499364\nBL              _ZN18ColorChannelSprite14updateBlendingEb; ColorChannelSprite::updateBlending(bool) ; +0x86, 0x499366\nB               loc_499380                                             ; +0x8a, 0x49936a\nLDR             R3, =(unk_9AC080 - 0x499372)                           ; +0x8c, 0x49936c\nADD             R3, PC; unk_9AC080                                     ; +0x8e, 0x49936e\nLDRH.W          R2, [R3,#(word_9AC086 - 0x9AC080)]!                    ; +0x90, 0x499370\nLDRB            R3, [R3,#(byte_9AC088 - 0x9AC086)]                     ; +0x94, 0x499374\nSTRH.W          R2, [SP,#8+var_8]                                      ; +0x96, 0x499376\nSTRB.W          R3, [SP,#8+var_6]                                      ; +0x9a, 0x49937a\nB               loc_499334                                             ; +0x9e, 0x49937e\nLDR             R2, [SP,#8+var_4]                                      ; +0xa0, 0x499380\nLDR             R3, [R6]                                               ; +0xa2, 0x499382\nCMP             R2, R3                                                 ; +0xa4, 0x499384\nBEQ             loc_49938C                                             ; +0xa6, 0x499386\nBLX             __stack_chk_fail                                       ; +0xa8, 0x499388\nADD             SP, SP, #8                                             ; +0xac, 0x49938c\nPOP             {R4-R6,PC}                                             ; +0xae, 0x49938e", "xrefs": ["CustomizeObjectLayer::updateColorSprite @ 0x461c4c", "GJColorSetupLayer::updateSpriteColor @ 0x498046", "LevelSettingsLayer::updateColorSprite @ 0x570558"], "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"}