{"type": "func", "start": 4297418344, "end": 4297418512, "name": "GameObject::shouldBlendColor", "pseudocode": "// \n// GameObject::shouldBlendColor from 0x100256668 to 0x100256710 (168 bytes)\n// \n// 2 xrefs:\n// > GameObject::updateBlendMode @ 0x10025cd0c\n// > GameObject::updateBlendMode @ 0x10025cd3c\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\nbool __fastcall GameObject::shouldBlendColor(GameObject *a1, GJSpriteColor *a2, bool a3)\n{\n  int m_defaultColorID; // w10\n  int v4; // w19\n  GameManager *v5; // x0\n  int m_colorID; // w9\n  GameManager *v8; // x0\n\n  m_defaultColorID = a2->m_defaultColorID;\n  if ( a2->m_colorID )\n    m_defaultColorID = a2->m_colorID;\n  if ( a1->m_unk353 )\n    v4 = 0;\n  else\n    v4 = m_defaultColorID;\n  if ( a1->m_editorEnabled )\n  {\n    v5 = GameManager::sharedState();\n    return LevelEditorLayer::shouldBlend(v5->m_levelEditorLayer, v4);\n  }\n  else\n  {\n    while ( v4 == 1012 )\n    {\n      m_colorID = a1->m_baseColor->m_colorID;\n      if ( !m_colorID )\n        m_colorID = a1->m_baseColor->m_defaultColorID;\n      if ( a1->m_unk353 )\n        v4 = 0;\n      else\n        v4 = m_colorID;\n    }\n    if ( (unsigned int)(v4 - 1005) >= 3 )\n    {\n      if ( v4 )\n      {\n        v8 = GameManager::sharedState();\n        return PlayLayer::shouldBlend(v8->m_playLayer, v4);\n      }\n      else\n      {\n        return 0;\n      }\n    }\n    else\n    {\n      return 1;\n    }\n  }\n}", "assembly": "; \n; GameObject::shouldBlendColor from 0x100256668 to 0x100256710 (168 bytes)\n; \n; 2 xrefs:\n; > GameObject::updateBlendMode @ 0x10025cd0c\n; > GameObject::updateBlendMode @ 0x10025cd3c\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\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x100256668\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x10025666c\nADD             X29, SP, #0x10                                         ; +0x8, 0x100256670\nLDRB            W8, [X0,#0x363]                                        ; +0xc, 0x100256674\nLDRB            W9, [X0,#0x289]                                        ; +0x10, 0x100256678\nLDP             W11, W10, [X1]                                         ; +0x14, 0x10025667c\nCMP             W11, #0                                                ; +0x18, 0x100256680\nCSEL            W10, W10, W11, EQ                                      ; +0x1c, 0x100256684\nCMP             W8, #0                                                 ; +0x20, 0x100256688\nCSEL            W19, WZR, W10, NE                                      ; +0x24, 0x10025668c\nTBZ             W9, #0, loc_1002566AC                                  ; +0x28, 0x100256690\nBL              GameManager__sharedState                               ; +0x2c, 0x100256694\nLDR             X0, [X0,#0x200]                                        ; +0x30, 0x100256698\nMOV             X1, X19                                                ; +0x34, 0x10025669c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x38, 0x1002566a0\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x3c, 0x1002566a4\nB               LevelEditorLayer__shouldBlend                          ; +0x40, 0x1002566a8\nCMP             W19, #0x3F4                                            ; +0x44, 0x1002566ac\nB.NE            loc_1002566D0                                          ; +0x48, 0x1002566b0\nLDR             X9, [X0,#0x448]                                        ; +0x4c, 0x1002566b4\nLDP             W9, W10, [X9]                                          ; +0x50, 0x1002566b8\nCMP             W9, #0                                                 ; +0x54, 0x1002566bc\nCSEL            W9, W10, W9, EQ                                        ; +0x58, 0x1002566c0\nCMP             W8, #0                                                 ; +0x5c, 0x1002566c4\nCSEL            W19, WZR, W9, NE                                       ; +0x60, 0x1002566c8\nB               loc_1002566AC                                          ; +0x64, 0x1002566cc\nSUB             W8, W19, #0x3ED                                        ; +0x68, 0x1002566d0\nCMP             W8, #3                                                 ; +0x6c, 0x1002566d4\nB.CS            loc_1002566E4                                          ; +0x70, 0x1002566d8\nMOV             W0, #1                                                 ; +0x74, 0x1002566dc\nB               loc_1002566EC                                          ; +0x78, 0x1002566e0\nCBNZ            W19, loc_1002566F8                                     ; +0x7c, 0x1002566e4\nMOV             W0, #0                                                 ; +0x80, 0x1002566e8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x84, 0x1002566ec\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x88, 0x1002566f0\nRET                                                                    ; +0x8c, 0x1002566f4\nBL              GameManager__sharedState                               ; +0x90, 0x1002566f8\nLDR             X0, [X0,#0x1F8]                                        ; +0x94, 0x1002566fc\nMOV             X1, X19                                                ; +0x98, 0x100256700\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x9c, 0x100256704\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xa0, 0x100256708\nB               PlayLayer__shouldBlend                                 ; +0xa4, 0x10025670c", "xrefs": ["GameObject::updateBlendMode @ 0x10025cd0c", "GameObject::updateBlendMode @ 0x10025cd3c"], "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"}