{"type": "func", "start": 5370419888, "end": 5370419994, "name": "GameObject::getRelativeSpriteColor", "pseudocode": "// \n// GameObject::getRelativeSpriteColor from 0x1401a1ab0 to 0x1401a1b1a (106 bytes)\n// \n// 7 xrefs:\n// > ConfigureHSVWidget::getHSV @ 0x140098244\n// > CustomizeObjectLayer::hsvPopupClosed @ 0x1400a8de9\n// > CustomizeObjectLayer::getActiveMode @ 0x1400a93eb\n// > CustomizeObjectLayer::updateSelected @ 0x1400a9d9b\n// > CustomizeObjectLayer::updateSelected @ 0x1400a9e5c\n// > GameObject::setupCustomSprites @ 0x1401c2222\n// > HSVLiveOverlay::hsvChanged @ 0x1402ba366\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\nGJSpriteColor *GameObject::getRelativeSpriteColor(GameObject *a1, int a2)\n{\n  __int16 m_customColorType; // ax\n  bool m_maybeNotColorable; // al\n  int m_defaultColorID; // edx\n  bool v6; // al\n\n  m_customColorType = a1->m_customColorType;\n  if ( m_customColorType )\n    m_maybeNotColorable = m_customColorType == 1;\n  else\n    m_maybeNotColorable = a1->m_maybeNotColorable;\n  v6 = false;\n  if ( !m_maybeNotColorable && !a1->m_colorSprite )\n  {\n    m_defaultColorID = a1->m_baseColor->m_defaultColorID;\n    if ( m_defaultColorID != 1004 )\n    {\n      if ( m_defaultColorID )\n        v6 = true;\n    }\n  }\n  if ( a2 == 2 )\n  {\n    if ( !v6 )\n      return a1->m_detailColor;\n  }\n  else if ( v6 )\n  {\n    return nullptr;\n  }\n  return a1->m_baseColor;\n}", "assembly": "; \n; GameObject::getRelativeSpriteColor from 0x1401a1ab0 to 0x1401a1b1a (106 bytes)\n; \n; 7 xrefs:\n; > ConfigureHSVWidget::getHSV @ 0x140098244\n; > CustomizeObjectLayer::hsvPopupClosed @ 0x1400a8de9\n; > CustomizeObjectLayer::getActiveMode @ 0x1400a93eb\n; > CustomizeObjectLayer::updateSelected @ 0x1400a9d9b\n; > CustomizeObjectLayer::updateSelected @ 0x1400a9e5c\n; > GameObject::setupCustomSprites @ 0x1401c2222\n; > HSVLiveOverlay::hsvChanged @ 0x1402ba366\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\nmovzx   eax, word ptr [rcx+418h]                                       ; +0x0, 0x1401a1ab0\nmov     r8d, edx                                                       ; +0x7, 0x1401a1ab7\ntest    ax, ax                                                         ; +0xa, 0x1401a1aba\njnz     short loc_1401A1AC8                                            ; +0xd, 0x1401a1abd\nmovzx   eax, byte ptr [rcx+514h]                                       ; +0xf, 0x1401a1abf\njmp     short loc_1401A1ACF                                            ; +0x16, 0x1401a1ac6\ncmp     ax, 1                                                          ; +0x18, 0x1401a1ac8\nsetz    al                                                             ; +0x1c, 0x1401a1acc\ntest    al, al                                                         ; +0x1f, 0x1401a1acf\njnz     short loc_1401A1AF7                                            ; +0x21, 0x1401a1ad1\ncmp     qword ptr [rcx+380h], 0                                        ; +0x23, 0x1401a1ad3\njnz     short loc_1401A1AF7                                            ; +0x2b, 0x1401a1adb\nmov     rax, [rcx+450h]                                                ; +0x2d, 0x1401a1add\nmov     edx, [rax+4]                                                   ; +0x34, 0x1401a1ae4\ncmp     edx, 3ECh                                                      ; +0x37, 0x1401a1ae7\njz      short loc_1401A1AF7                                            ; +0x3d, 0x1401a1aed\ntest    edx, edx                                                       ; +0x3f, 0x1401a1aef\njz      short loc_1401A1AF7                                            ; +0x41, 0x1401a1af1\nmov     al, 1                                                          ; +0x43, 0x1401a1af3\njmp     short loc_1401A1AF9                                            ; +0x45, 0x1401a1af5\nxor     al, al                                                         ; +0x47, 0x1401a1af7\ncmp     r8d, 2                                                         ; +0x49, 0x1401a1af9\njnz     short loc_1401A1B0B                                            ; +0x4d, 0x1401a1afd\ntest    al, al                                                         ; +0x4f, 0x1401a1aff\njnz     short loc_1401A1B12                                            ; +0x51, 0x1401a1b01\nmov     rax, [rcx+458h]                                                ; +0x53, 0x1401a1b03\nretn                                                                   ; +0x5a, 0x1401a1b0a\ntest    al, al                                                         ; +0x5b, 0x1401a1b0b\njz      short loc_1401A1B12                                            ; +0x5d, 0x1401a1b0d\nxor     eax, eax                                                       ; +0x5f, 0x1401a1b0f\nretn                                                                   ; +0x61, 0x1401a1b11\nmov     rax, [rcx+450h]                                                ; +0x62, 0x1401a1b12\nretn                                                                   ; +0x69, 0x1401a1b19", "xrefs": ["ConfigureHSVWidget::getHSV @ 0x140098244", "CustomizeObjectLayer::hsvPopupClosed @ 0x1400a8de9", "CustomizeObjectLayer::getActiveMode @ 0x1400a93eb", "CustomizeObjectLayer::updateSelected @ 0x1400a9d9b", "CustomizeObjectLayer::updateSelected @ 0x1400a9e5c", "GameObject::setupCustomSprites @ 0x1401c2222", "HSVLiveOverlay::hsvChanged @ 0x1402ba366"], "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"}