Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __int16 __cdecl renderTimerResume()
- {
- long double diff; // fst7@2
- long double v1; // fst6@5
- float v2; // ST0C_4@8
- int v3; // eax@9
- long double v4; // fst6@9
- __int16 v5; // fps@13
- char v6; // c0@13
- char v7; // c2@13
- char v8; // c3@13
- __int16 result; // ax@13
- long double v10; // fst6@20
- LARGE_INTEGER PerformanceCount; // [sp+10h] [bp-Ch]@2
- renderTimerPaused = currentTime;
- if ( (long double)(unsigned int)performanceFrequency == dbl_691020 )
- {
- QueryPerformanceCounter(&PerformanceCount);
- diff = (long double)((PerformanceCount.s.LowPart - previousMicrosecondCount.s.LowPart) & 0x7FFFFFFF);
- if ( !PauseRender && !cd_not_in_drive )
- diff = diff * fGameSpeed;
- previousMicrosecondCount = PerformanceCount;
- v1 = diff / (long double)(unsigned int)performanceFrequency;
- TimesAfrequencyHasPassed = (signed __int64)((long double)(unsigned int)TimesAfrequencyHasPassed + v1);
- if ( PauseRender || cd_not_in_drive )
- {
- LODWORD(fProcessingTimer) = 0;
- }
- else
- {
- currentTime = (signed __int64)((long double)currentTime + v1);
- dword_A0D894 = (signed __int64)((long double)(unsigned int)dword_A0D894 + v1);
- v2 = diff / (long double)(unsigned int)performanceFrequency * dbl_691028;
- fProcessingTimer = v2;
- }
- }
- else
- {
- v3 = sub_6030F0();
- v4 = (long double)(unsigned int)(v3 - dword_A10680) * fGameSpeed;
- dword_A10680 = v3;
- TimesAfrequencyHasPassed = (signed __int64)((long double)(unsigned int)TimesAfrequencyHasPassed + v4);
- if ( PauseRender || cd_not_in_drive )
- {
- LODWORD(fProcessingTimer) = 0;
- }
- else
- {
- currentTime = (signed __int64)((long double)currentTime + v4);
- dword_A0D894 = (signed __int64)((long double)(unsigned int)dword_A0D894 + v4);
- fProcessingTimer = v4 * flt_691030 * flt_691034;
- }
- }
- UNDEF(v5);
- v6 = fProcessingTimer < (long double)flt_691038;
- v7 = 0;
- v8 = fProcessingTimer == flt_691038;
- result = __PAIR__(HIBYTE(v5), (unsigned __int8)v5) & 0x5FF;
- if ( fProcessingTimer >= (long double)flt_691038 && !PauseRender && !cd_not_in_drive && !byte_A10ADD )
- LODWORD(fProcessingTimer) = 1008981770;
- flt_9753A8 = fProcessingTimer;
- if ( word_A10936 != 2 )
- {
- v10 = fProcessingTimer < (long double)flt_69103C ? flt_69103C : fProcessingTimer;
- result = currentTime - renderTimerPaused;
- fProcessingTimer = v10;
- if ( currentTime - renderTimerPaused > 0x3C )
- {
- result = renderTimerPaused + 60;
- currentTime = renderTimerPaused + 60;
- }
- }
- if ( slowMotion == 1 )
- {
- LODWORD(fProcessingTimer) = 0x3F800000u;
- result = renderTimerPaused + 16;
- currentTime = renderTimerPaused + 16;
- }
- ++unk_Timer;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement