{"type": "func", "start": 3588376, "end": 3588480, "name": "DrawGridLayer::timeForPos", "pseudocode": "// \n// DrawGridLayer::timeForPos from 0x36c118 to 0x36c180 (104 bytes)\n// \n// 7 xrefs:\n// > LevelEditorLayer::timeForPos @ 0x36c1c0\n// > LevelEditorLayer::updateGameObjects @ 0x375c74\n// > LevelEditorLayer::updateGameObjects @ 0x375cf8\n// > EditorUI::onPlayback @ 0x37dae2\n// > EditorUI::onPlayback @ 0x37db0e\n// > EditorPauseLayer::init @ 0x3ff8b6\n// > EditorPauseLayer::saveLevel @ 0x4013a8\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\nfloat 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  int y_low; // r7\n  cocos2d::CCPoint v11; // r0\n  int v13; // [sp+18h] [bp-10h]\n  cocos2d::CCPoint v14; // [sp+1Ch] [bp-Ch] BYREF\n\n  y_low = LODWORD(a2.y);\n  cocos2d::CCPoint::CCPoint(&v14, (const cocos2d::CCPoint *)LODWORD(a2.x));\n  LODWORD(v11.x) = &v14;\n  LODWORD(v11.y) = a1->m_speedObjects;\n  return LevelTools::timeForPos(\n           v11,\n           (cocos2d::CCArray *)a1->m_editorLayer->m_levelSettings->m_startSpeed,\n           y_low,\n           a3,\n           (unsigned __int8)a4,\n           a1->m_editorLayer->m_levelSettings->m_platformerMode,\n           a5,\n           a6,\n           a7,\n           v13);\n}", "assembly": "; \n; DrawGridLayer::timeForPos from 0x36c118 to 0x36c180 (104 bytes)\n; \n; 7 xrefs:\n; > LevelEditorLayer::timeForPos @ 0x36c1c0\n; > LevelEditorLayer::updateGameObjects @ 0x375c74\n; > LevelEditorLayer::updateGameObjects @ 0x375cf8\n; > EditorUI::onPlayback @ 0x37dae2\n; > EditorUI::onPlayback @ 0x37db0e\n; > EditorPauseLayer::init @ 0x3ff8b6\n; > EditorPauseLayer::saveLevel @ 0x4013a8\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\nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x36c118\nSUB             SP, SP, #0x28                                          ; +0x4, 0x36c11c\nLDR             R4, =(__stack_chk_guard_ptr - 0x36C12A)                ; +0x6, 0x36c11e\nMOV             R8, R3                                                 ; +0x8, 0x36c120\nADD             R6, SP, #0x28+var_C                                    ; +0xa, 0x36c122\nMOV             R5, R0                                                 ; +0xc, 0x36c124\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xe, 0x36c126\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x10, 0x36c128\nMOV             R7, R2                                                 ; +0x12, 0x36c12a\nMOV             R0, R6; this                                           ; +0x14, 0x36c12c\nLDR             R3, [R4]                                               ; +0x16, 0x36c12e\nSTR             R3, [SP,#0x28+var_4]                                   ; +0x18, 0x36c130\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x1a, 0x36c132\nLDR.W           R3, [R5,#0x17C]                                        ; +0x1e, 0x36c136\nMOV             R0, R6                                                 ; +0x22, 0x36c13a\nLDR.W           R1, [R5,#0x194]                                        ; +0x24, 0x36c13c\nLDR.W           R2, [R3,#0x8C0]                                        ; +0x28, 0x36c140\nLDRB.W          R3, [SP,#0x28+arg_0]                                   ; +0x2c, 0x36c144\nSTR.W           R8, [SP,#0x28+var_28]                                  ; +0x30, 0x36c148\nSTR             R3, [SP,#0x28+var_24]                                  ; +0x34, 0x36c14c\nLDRB.W          R3, [R2,#0x119]                                        ; +0x36, 0x36c14e\nSTR             R3, [SP,#0x28+var_20]                                  ; +0x3a, 0x36c152\nLDRB.W          R3, [SP,#0x28+arg_4]                                   ; +0x3c, 0x36c154\nSTR             R3, [SP,#0x28+var_1C]                                  ; +0x40, 0x36c158\nLDRB.W          R3, [SP,#0x28+arg_8]                                   ; +0x42, 0x36c15a\nSTR             R3, [SP,#0x28+var_18]                                  ; +0x46, 0x36c15e\nLDR             R3, [SP,#0x28+arg_C]                                   ; +0x48, 0x36c160\nSTR             R3, [SP,#0x28+var_14]                                  ; +0x4a, 0x36c162\nMOV             R3, R7                                                 ; +0x4c, 0x36c164\nLDR.W           R2, [R2,#0x110]                                        ; +0x4e, 0x36c166\nBL              _ZN10LevelTools10timeForPosEN7cocos2d7CCPointEPNS0_7CCArrayEiiibbbbi; LevelTools::timeForPos(cocos2d::CCPoint,cocos2d::CCArray *,int,int,int,bool,bool,bool,bool,int) ; +0x52, 0x36c16a\nLDR             R2, [SP,#0x28+var_4]                                   ; +0x56, 0x36c16e\nLDR             R3, [R4]                                               ; +0x58, 0x36c170\nCMP             R2, R3                                                 ; +0x5a, 0x36c172\nBEQ             loc_36C17A                                             ; +0x5c, 0x36c174\nBLX             __stack_chk_fail                                       ; +0x5e, 0x36c176\nADD             SP, SP, #0x28 ; '('                                    ; +0x62, 0x36c17a\nPOP.W           {R4-R8,PC}                                             ; +0x64, 0x36c17c", "xrefs": ["LevelEditorLayer::timeForPos @ 0x36c1c0", "LevelEditorLayer::updateGameObjects @ 0x375c74", "LevelEditorLayer::updateGameObjects @ 0x375cf8", "EditorUI::onPlayback @ 0x37dae2", "EditorUI::onPlayback @ 0x37db0e", "EditorPauseLayer::init @ 0x3ff8b6", "EditorPauseLayer::saveLevel @ 0x4013a8"], "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"}