{"type": "func", "start": 4298508712, "end": 4298508856, "name": "DrawGridLayer::timeForPos", "pseudocode": "// \n// DrawGridLayer::timeForPos from 0x1003609a8 to 0x100360a38 (144 bytes)\n// \n// 7 xrefs:\n// > LevelEditorLayer::updateGameObjects @ 0x10035891c\n// > LevelEditorLayer::updateGameObjects @ 0x1003589d0\n// > LevelEditorLayer::timeForPos @ 0x100361ac8\n// > EditorPauseLayer::init @ 0x10039be8c\n// > EditorPauseLayer::saveLevel @ 0x10039e434\n// > EditorUI::onPlayback @ 0x1003c77c0\n// > EditorUI::onPlayback @ 0x1003c77fc\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\n// local variable allocation has failed, the output may be wrong!\nfloat __fastcall DrawGridLayer::timeForPos(\n        DrawGridLayer *a1,\n        cocos2d::CCPoint a2,\n        int a3,\n        int a4,\n        bool a5,\n        bool a6,\n        bool a7,\n        int a8)\n{\n  char v8; // w20\n  int v15; // [xsp+0h] [xbp-50h]\n  cocos2d::CCArray v16; // [xsp+8h] [xbp-48h] BYREF\n  cocos2d::CCPoint v17; // 0:s0.4,4:s1.4\n\n  v8 = a8;\n  v17.x = sub_1000229B8((__int64 *)&v16, *(__int64 **)&a3);\n  LOBYTE(v15) = v8;\n  return LevelTools::timeForPos(\n           v17,\n           &v16,\n           (int)a1->m_speedObjects,\n           a1->m_editorLayer->m_levelSettings->m_startSpeed,\n           a4,\n           a5,\n           a6,\n           a1->m_editorLayer->m_levelSettings->m_platformerMode,\n           a7,\n           v15);\n}", "assembly": "; \n; DrawGridLayer::timeForPos from 0x1003609a8 to 0x100360a38 (144 bytes)\n; \n; 7 xrefs:\n; > LevelEditorLayer::updateGameObjects @ 0x10035891c\n; > LevelEditorLayer::updateGameObjects @ 0x1003589d0\n; > LevelEditorLayer::timeForPos @ 0x100361ac8\n; > EditorPauseLayer::init @ 0x10039be8c\n; > EditorPauseLayer::saveLevel @ 0x10039e434\n; > EditorUI::onPlayback @ 0x1003c77c0\n; > EditorUI::onPlayback @ 0x1003c77fc\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\nSUB             SP, SP, #0x60                                          ; +0x0, 0x1003609a8\nSTP             X26, X25, [SP,#0x50+var_40]                            ; +0x4, 0x1003609ac\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x8, 0x1003609b0\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0xc, 0x1003609b4\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0x10, 0x1003609b8\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x14, 0x1003609bc\nADD             X29, SP, #0x50                                         ; +0x18, 0x1003609c0\nMOV             X19, X7                                                ; +0x1c, 0x1003609c4\nMOV             X20, X6                                                ; +0x20, 0x1003609c8\nMOV             X21, X5                                                ; +0x24, 0x1003609cc\nMOV             X22, X4                                                ; +0x28, 0x1003609d0\nMOV             X23, X3                                                ; +0x2c, 0x1003609d4\nMOV             X24, X2                                                ; +0x30, 0x1003609d8\nMOV             X25, X0                                                ; +0x34, 0x1003609dc\nADD             X0, SP, #0x50+var_48                                   ; +0x38, 0x1003609e0\nBL              sub_1000229B8                                          ; +0x3c, 0x1003609e4\nLDR             X1, [X25,#0x230]                                       ; +0x40, 0x1003609e8\nLDR             X8, [X25,#0x1F0]                                       ; +0x44, 0x1003609ec\nLDR             X8, [X8,#0xCD8]                                        ; +0x48, 0x1003609f0\nLDR             W2, [X8,#0x14C]                                        ; +0x4c, 0x1003609f4\nLDRB            W6, [X8,#0x155]                                        ; +0x50, 0x1003609f8\nSTR             W19, [SP,#0x50+var_4C]                                 ; +0x54, 0x1003609fc\nSTRB            W20, [SP,#0x50+var_50]                                 ; +0x58, 0x100360a00\nADD             X0, SP, #0x50+var_48                                   ; +0x5c, 0x100360a04\nMOV             X3, X24                                                ; +0x60, 0x100360a08\nMOV             X4, X23                                                ; +0x64, 0x100360a0c\nMOV             X5, X22                                                ; +0x68, 0x100360a10\nMOV             X7, X21                                                ; +0x6c, 0x100360a14\nBL              LevelTools__timeForPos                                 ; +0x70, 0x100360a18\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x74, 0x100360a1c\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x78, 0x100360a20\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x7c, 0x100360a24\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x80, 0x100360a28\nLDP             X26, X25, [SP,#0x50+var_40]                            ; +0x84, 0x100360a2c\nADD             SP, SP, #0x60 ; '`'                                    ; +0x88, 0x100360a30\nRET                                                                    ; +0x8c, 0x100360a34", "xrefs": ["LevelEditorLayer::updateGameObjects @ 0x10035891c", "LevelEditorLayer::updateGameObjects @ 0x1003589d0", "LevelEditorLayer::timeForPos @ 0x100361ac8", "EditorPauseLayer::init @ 0x10039be8c", "EditorPauseLayer::saveLevel @ 0x10039e434", "EditorUI::onPlayback @ 0x1003c77c0", "EditorUI::onPlayback @ 0x1003c77fc"], "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"}