{"type": "func", "start": 6443229216, "end": 6443229383, "name": "cocos2d::CCDirector::calculateDeltaTime", "pseudocode": "// \n// cocos2d::CCDirector::calculateDeltaTime from 0x1800be020 to 0x1800be0c7 (167 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9150\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 cocos2d::CCDirector::calculateDeltaTime(\n        cocos2d::CCDirector *this,\n        __int64 a2,\n        struct cocos2d::timezone *a3)\n{\n  cocos2d::cc_timeval v4; // rbx\n  float v5; // xmm0_4\n  struct cocos2d::cc_timeval v6; // [rsp+38h] [rbp+10h] BYREF\n\n  if ( (unsigned int)cocos2d::CCTime::gettimeofdayCocos2d(&v6, nullptr, a3) )\n  {\n    *(_QWORD *)&this->m_fDeltaTime = 0;\n  }\n  else\n  {\n    v4 = v6;\n    if ( this->m_bNextDeltaTimeZero )\n    {\n      this->m_bNextDeltaTimeZero = 0;\n      v5 = 0.0;\n    }\n    else\n    {\n      v5 = fmaxf(\n             0.0,\n             (float)((float)(v6.tv_usec - this->m_pLastUpdate->tv_usec) / 1000000.0)\n           + (float)(v6.tv_sec - this->m_pLastUpdate->tv_sec));\n    }\n    this->m_fDeltaTime = v5;\n    this->m_fActualDeltaTime = v5;\n    cocos2d::CCDirector::applySmoothFix(this);\n    *this->m_pLastUpdate = v4;\n  }\n}", "assembly": "; \n; cocos2d::CCDirector::calculateDeltaTime from 0x1800be020 to 0x1800be0c7 (167 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9150\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    rdi                                                            ; +0x0, 0x1800be020\nsub     rsp, 20h                                                       ; +0x2, 0x1800be022\nmov     rdi, rcx                                                       ; +0x6, 0x1800be026\nxor     edx, edx; void *                                               ; +0x9, 0x1800be029\nlea     rcx, [rsp+28h+arg_8]; struct cocos2d::cc_timeval *             ; +0xb, 0x1800be02b\ncall    ?gettimeofdayCocos2d@CCTime@cocos2d@@SAHPEAUcc_timeval@2@PEAX@Z; cocos2d::CCTime::gettimeofdayCocos2d(cocos2d::cc_timeval *,void *) ; +0x10, 0x1800be030\ntest    eax, eax                                                       ; +0x15, 0x1800be035\njz      short loc_1800BE048                                            ; +0x17, 0x1800be037\nxor     eax, eax                                                       ; +0x19, 0x1800be039\nmov     [rdi+0A0h], rax                                                ; +0x1b, 0x1800be03b\nadd     rsp, 20h                                                       ; +0x22, 0x1800be042\npop     rdi                                                            ; +0x26, 0x1800be046\nretn                                                                   ; +0x27, 0x1800be047\ncmp     byte ptr [rdi+130h], 0                                         ; +0x28, 0x1800be048\nmov     [rsp+28h+arg_0], rbx                                           ; +0x2f, 0x1800be04f\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x34, 0x1800be054\njz      short loc_1800BE067                                            ; +0x39, 0x1800be059\nmov     byte ptr [rdi+130h], 0                                         ; +0x3b, 0x1800be05b\nxorps   xmm0, xmm0                                                     ; +0x42, 0x1800be062\njmp     short loc_1800BE09A                                            ; +0x45, 0x1800be065\nmov     rcx, [rdi+128h]                                                ; +0x47, 0x1800be067\nmov     eax, dword ptr [rsp+28h+arg_8+4]                               ; +0x4e, 0x1800be06e\nsub     eax, [rcx+4]                                                   ; +0x52, 0x1800be072\nmovd    xmm1, eax                                                      ; +0x55, 0x1800be075\nmov     eax, ebx                                                       ; +0x59, 0x1800be079\nsub     eax, [rcx]                                                     ; +0x5b, 0x1800be07b\ncvtdq2ps xmm1, xmm1                                                    ; +0x5d, 0x1800be07d\nmovd    xmm0, eax                                                      ; +0x60, 0x1800be080\ndivss   xmm1, cs:dword_1801075A4                                       ; +0x64, 0x1800be084\ncvtdq2ps xmm0, xmm0                                                    ; +0x6c, 0x1800be08c\naddss   xmm1, xmm0                                                     ; +0x6f, 0x1800be08f\nxorps   xmm0, xmm0                                                     ; +0x73, 0x1800be093\nmaxss   xmm0, xmm1                                                     ; +0x76, 0x1800be096\nmovss   dword ptr [rdi+0A0h], xmm0                                     ; +0x7a, 0x1800be09a\nmov     rcx, rdi; this                                                 ; +0x82, 0x1800be0a2\nmovss   dword ptr [rdi+0A4h], xmm0                                     ; +0x85, 0x1800be0a5\ncall    ?applySmoothFix@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::applySmoothFix(void) ; +0x8d, 0x1800be0ad\nmov     rax, [rdi+128h]                                                ; +0x92, 0x1800be0b2\nmov     [rax], rbx                                                     ; +0x99, 0x1800be0b9\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x9c, 0x1800be0bc\nadd     rsp, 20h                                                       ; +0xa1, 0x1800be0c1\npop     rdi                                                            ; +0xa5, 0x1800be0c5\nretn                                                                   ; +0xa6, 0x1800be0c6", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b9150"], "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"}