From 124aebaaa25bd4925380bddba60d836da808ff39 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sun, 3 May 2020 22:07:18 +0100 Subject: [PATCH] This is likely more accurate to the original code --- src/Main.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index c26048cb..5b64cecf 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -23,7 +23,6 @@ #include "Triangle.h" LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); -static unsigned long CountFramePerSecound(void); char gModulePath[MAX_PATH]; char gDataPath[MAX_PATH]; @@ -61,16 +60,6 @@ void SetWindowName(HWND hWnd) SetWindowTextA(hWnd, window_name); } -// Framerate stuff -void PutFramePerSecound(void) -{ - if (bFPS) - { - const unsigned long fps = CountFramePerSecound(); - PutNumber4(WINDOW_WIDTH - 40, 8, fps, FALSE); - } -} - static unsigned long CountFramePerSecound(void) { unsigned long current_tick; // The original name for this variable is unknown @@ -98,6 +87,16 @@ static unsigned long CountFramePerSecound(void) return max_count; } +// Framerate stuff +void PutFramePerSecound(void) +{ + if (bFPS) + { + const unsigned long fps = CountFramePerSecound(); + PutNumber4(WINDOW_WIDTH - 40, 8, fps, FALSE); + } +} + // TODO - Inaccurate stack frame int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {