{"type": "func", "start": 4297461100, "end": 4297461444, "name": "GameObject::saveActiveColors", "pseudocode": "// \n// GameObject::saveActiveColors from 0x100260d6c to 0x100260ec4 (344 bytes)\n// \n// 6 xrefs:\n// > EnhancedGameObject::saveActiveColors @ 0x1002631b8\n// > <???> @ 0x1007c41f8\n// > <???> @ 0x1007cfec8\n// > <???> @ 0x1007d0ec0\n// > <???> @ 0x1007f8f38\n// > <???> @ 0x100816568\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 __fastcall GameObject::saveActiveColors(GameObject *a1)\n{\n  GJSpriteColor *m_baseColor; // x8\n  int m_colorID; // w10\n  GJSpriteColor *m_detailColor; // x9\n  int m_defaultColorID; // w11\n  bool m_usesHSV; // w8\n  GameObjectType m_objectType; // w8\n  bool v8; // w9\n  bool v9; // w8\n\n  a1->m_savedObjectType = a1->m_objectType;\n  m_baseColor = a1->m_baseColor;\n  if ( m_baseColor )\n  {\n    m_colorID = m_baseColor->m_colorID;\n    if ( !m_baseColor->m_colorID )\n      m_colorID = m_baseColor->m_defaultColorID;\n  }\n  else\n  {\n    m_colorID = 0;\n  }\n  m_detailColor = a1->m_detailColor;\n  if ( m_detailColor )\n  {\n    m_defaultColorID = m_detailColor->m_defaultColorID;\n    if ( m_detailColor->m_colorID )\n      m_defaultColorID = m_detailColor->m_colorID;\n  }\n  else\n  {\n    m_defaultColorID = 0;\n  }\n  *(int32x2_t *)&a1->m_activeMainColorID = vmin_s32(\n                                             vmax_s32((int32x2_t)__PAIR64__(m_defaultColorID, m_colorID), 0),\n                                             vdup_n_s32(0x44Du));\n  a1->m_baseUsesHSV = m_baseColor->m_usesHSV;\n  if ( m_detailColor )\n    m_usesHSV = m_detailColor->m_usesHSV;\n  else\n    m_usesHSV = 0;\n  a1->m_detailUsesHSV = m_usesHSV;\n  if ( !GameManager::sharedState()->m_editorEnabled )\n  {\n    a1->m_mainActionSprite = GJEffectManager::getColorSprite(a1->m_goEffectManager, a1->m_activeMainColorID);\n    a1->m_detailActionSprite = GJEffectManager::getColorSprite(a1->m_goEffectManager, a1->m_activeDetailColorID);\n  }\n  if ( a1->m_isDontEnter )\n    a1->m_ignoreEnter = 1;\n  if ( a1->m_isDontFade )\n    a1->m_ignoreFade = 1;\n  if ( a1->m_isNoTouch )\n  {\n    m_objectType = Decoration;\n    a1->m_objectType = Decoration;\n    v8 = 1;\n  }\n  else\n  {\n    m_objectType = a1->m_objectType;\n    v8 = (unsigned int)m_objectType > Slope || ((1 << m_objectType) & 0x2200001) == 0;\n  }\n  a1->m_canRotateFree = v8;\n  v9 = m_objectType == Decoration;\n  a1->m_isDecoration = v9;\n  a1->m_isDecoration2 = v9;\n  if ( a1->m_isHide && !a1->m_editorEnabled )\n    a1->m_isInvisible = 1;\n}", "assembly": "; \n; GameObject::saveActiveColors from 0x100260d6c to 0x100260ec4 (344 bytes)\n; \n; 6 xrefs:\n; > EnhancedGameObject::saveActiveColors @ 0x1002631b8\n; > <???> @ 0x1007c41f8\n; > <???> @ 0x1007cfec8\n; > <???> @ 0x1007d0ec0\n; > <???> @ 0x1007f8f38\n; > <???> @ 0x100816568\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, 0x100260d6c\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100260d70\nADD             X29, SP, #0x10                                         ; +0x8, 0x100260d74\nMOV             X19, X0                                                ; +0xc, 0x100260d78\nLDR             W8, [X0,#0x398]                                        ; +0x10, 0x100260d7c\nSTR             W8, [X0,#0x39C]                                        ; +0x14, 0x100260d80\nLDR             X8, [X0,#0x448]                                        ; +0x18, 0x100260d84\nCBZ             X8, loc_100260D9C                                      ; +0x1c, 0x100260d88\nLDP             W10, W9, [X8]                                          ; +0x20, 0x100260d8c\nCMP             W10, #0                                                ; +0x24, 0x100260d90\nCSEL            W10, W9, W10, EQ                                       ; +0x28, 0x100260d94\nB               loc_100260DA0                                          ; +0x2c, 0x100260d98\nMOV             W10, #0                                                ; +0x30, 0x100260d9c\nLDR             X9, [X19,#0x450]                                       ; +0x34, 0x100260da0\nCBZ             X9, loc_100260DB8                                      ; +0x38, 0x100260da4\nLDP             W12, W11, [X9]                                         ; +0x3c, 0x100260da8\nCMP             W12, #0                                                ; +0x40, 0x100260dac\nCSEL            W11, W11, W12, EQ                                      ; +0x44, 0x100260db0\nB               loc_100260DBC                                          ; +0x48, 0x100260db4\nMOV             W11, #0                                                ; +0x4c, 0x100260db8\nFMOV            S0, W10                                                ; +0x50, 0x100260dbc\nINS             V0.S[1], W11                                           ; +0x54, 0x100260dc0\nMOVI            V1.16B, #0                                             ; +0x58, 0x100260dc4\nSMAX            V0.2S, V0.2S, V1.2S                                    ; +0x5c, 0x100260dc8\nMOV             W10, #0x44D                                            ; +0x60, 0x100260dcc\nDUP             V1.2S, W10                                             ; +0x64, 0x100260dd0\nSMIN            V0.2S, V0.2S, V1.2S                                    ; +0x68, 0x100260dd4\nSTR             D0, [X19,#0x290]                                       ; +0x6c, 0x100260dd8\nLDRB            W8, [X8,#0x20]                                         ; +0x70, 0x100260ddc\nSTRB            W8, [X19,#0x298]                                       ; +0x74, 0x100260de0\nCBZ             X9, loc_100260DF0                                      ; +0x78, 0x100260de4\nLDRB            W8, [X9,#0x20]                                         ; +0x7c, 0x100260de8\nB               loc_100260DF4                                          ; +0x80, 0x100260dec\nMOV             W8, #0                                                 ; +0x84, 0x100260df0\nAND             W8, W8, #1                                             ; +0x88, 0x100260df4\nSTRB            W8, [X19,#0x299]                                       ; +0x8c, 0x100260df8\nBL              GameManager__sharedState                               ; +0x90, 0x100260dfc\nLDRB            W8, [X0,#0x29A]                                        ; +0x94, 0x100260e00\nTBNZ            W8, #0, loc_100260E28                                  ; +0x98, 0x100260e04\nLDR             W1, [X19,#0x290]                                       ; +0x9c, 0x100260e08\nLDR             X0, [X19,#0x500]                                       ; +0xa0, 0x100260e0c\nBL              GJEffectManager__getColorSprite                        ; +0xa4, 0x100260e10\nSTR             X0, [X19,#0x4F0]                                       ; +0xa8, 0x100260e14\nLDR             W1, [X19,#0x294]                                       ; +0xac, 0x100260e18\nLDR             X0, [X19,#0x500]                                       ; +0xb0, 0x100260e1c\nBL              GJEffectManager__getColorSprite                        ; +0xb4, 0x100260e20\nSTR             X0, [X19,#0x4F8]                                       ; +0xb8, 0x100260e24\nLDRB            W8, [X19,#0x412]                                       ; +0xbc, 0x100260e28\nCMP             W8, #1                                                 ; +0xc0, 0x100260e2c\nB.NE            loc_100260E38                                          ; +0xc4, 0x100260e30\nSTRB            W8, [X19,#0x40A]                                       ; +0xc8, 0x100260e34\nLDRB            W8, [X19,#0x413]                                       ; +0xcc, 0x100260e38\nCMP             W8, #1                                                 ; +0xd0, 0x100260e3c\nB.NE            loc_100260E48                                          ; +0xd4, 0x100260e40\nSTRB            W8, [X19,#0x40B]                                       ; +0xd8, 0x100260e44\nLDRB            W8, [X19,#0x4BE]                                       ; +0xdc, 0x100260e48\nCMP             W8, #1                                                 ; +0xe0, 0x100260e4c\nB.NE            loc_100260E64                                          ; +0xe4, 0x100260e50\nMOV             W8, #7                                                 ; +0xe8, 0x100260e54\nSTR             W8, [X19,#0x398]                                       ; +0xec, 0x100260e58\nMOV             W9, #1                                                 ; +0xf0, 0x100260e5c\nB               loc_100260E88                                          ; +0xf4, 0x100260e60\nLDR             W8, [X19,#0x398]                                       ; +0xf8, 0x100260e64\nMOV             W9, #1                                                 ; +0xfc, 0x100260e68\nLSL             W10, W9, W8                                            ; +0x100, 0x100260e6c\nMOV             W11, #0x2200001                                        ; +0x104, 0x100260e70\nTST             W10, W11                                               ; +0x10c, 0x100260e78\nCSEL            W10, WZR, W9, NE                                       ; +0x110, 0x100260e7c\nCMP             W8, #0x19                                              ; +0x114, 0x100260e80\nCSEL            W9, W9, W10, HI                                        ; +0x118, 0x100260e84\nSTRB            W9, [X19,#0x364]                                       ; +0x11c, 0x100260e88\nCMP             W8, #7                                                 ; +0x120, 0x100260e8c\nCSET            W8, EQ                                                 ; +0x124, 0x100260e90\nSTRB            W8, [X19,#0x509]                                       ; +0x128, 0x100260e94\nSTRB            W8, [X19,#0x50A]                                       ; +0x12c, 0x100260e98\nLDRB            W8, [X19,#0x50E]                                       ; +0x130, 0x100260e9c\nCMP             W8, #1                                                 ; +0x134, 0x100260ea0\nB.NE            loc_100260EB8                                          ; +0x138, 0x100260ea4\nLDRB            W8, [X19,#0x289]                                       ; +0x13c, 0x100260ea8\nTBNZ            W8, #0, loc_100260EB8                                  ; +0x140, 0x100260eac\nMOV             W8, #1                                                 ; +0x144, 0x100260eb0\nSTRB            W8, [X19,#0x3E7]                                       ; +0x148, 0x100260eb4\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x14c, 0x100260eb8\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x150, 0x100260ebc\nRET                                                                    ; +0x154, 0x100260ec0", "xrefs": ["EnhancedGameObject::saveActiveColors @ 0x1002631b8", "<???> @ 0x1007c41f8", "<???> @ 0x1007cfec8", "<???> @ 0x1007d0ec0", "<???> @ 0x1007f8f38", "<???> @ 0x100816568"], "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"}