shithub: cstory

Download patch

ref: 124aebaaa25bd4925380bddba60d836da808ff39
parent: e1af3336aaa15b55801196a6f4a10c24d1f9b884
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sun May 3 18:07:18 EDT 2020

This is likely more accurate to the original code

--- 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 @@
 	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
@@ -96,6 +85,16 @@
 	}
 
 	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