Batch #13186 by ragnarok-clanker: forced by an admin (40 lower score(s), 206 changed function(s)); checked with 620 compiled unit(s), including every includer of Source/Archive/GPak.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Session.h, Source/Client/Stove/StoveMgr.h, Source/Client/Stove/StovePCSDK.h, Source/Client/Timer.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/RenderObject.h, Source/Contents/CashEmotionMgr.h, Source/Contents/Configuration/ServiceOptions.h, Source/Contents/Skills/SkillTreeScript.h, Source/Render/DX9/D3DX9Runtime.h, Source/Resource/GifResource.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Cooldowns/CooldownOwner.h, Source/UI/Edit/UIEditBoxEx.h, Source/UI/Lists/UIListBoxTemplate.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Text/UITextViewerControl.h, Source/UI/UIBroadcastBalloon.h, Source/UI/UICaptchaRegisterWnd.h, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIReputeWnd.h, Source/UI/Window/UIRegisterMgr.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISelCharForUServerWnd.h, Source/UI/Window/UIWindow.h, Source/UI/Window/UIWindowMgr.h, Source/Utility/EncryptedName.h.
45 lines
770 B
C++
45 lines
770 B
C++
#include "Client/Timer.h"
|
|
|
|
#include <windows.h>
|
|
#include <mmsystem.h>
|
|
|
|
// GLOBAL: gl_24746
|
|
int g_frameskip = 1;
|
|
|
|
// GLOBAL: gl_24744
|
|
static unsigned long frameTime;
|
|
|
|
// GLOBAL: gl_24745
|
|
static unsigned long frameFreq;
|
|
|
|
// OFFSET: 0x00C7F530
|
|
// FUNCTION: fn_20431
|
|
int GetSkipFrameCount() {
|
|
int skipCount = (timeGetTime() - frameTime) / frameFreq;
|
|
frameTime += frameFreq * skipCount;
|
|
|
|
if (g_frameskip) {
|
|
return skipCount;
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|
|
// OFFSET: 0x00C7F570
|
|
// FUNCTION: fn_20432
|
|
void InitTimer(unsigned long freq) {
|
|
frameTime = timeGetTime();
|
|
frameFreq = 1000 / freq;
|
|
}
|
|
|
|
// OFFSET: 0x00C7F590
|
|
// FUNCTION: fn_20433
|
|
void ResetTimer() {
|
|
frameTime = timeGetTime();
|
|
}
|
|
|
|
// OFFSET: 0x00C7F5A0
|
|
// FUNCTION: fn_20434
|
|
int ShouldRenderFrame() {
|
|
return 1;
|
|
}
|