This is likely more accurate to the original code
This commit is contained in:
parent
e1af3336aa
commit
124aebaaa2
1 changed files with 10 additions and 11 deletions
21
src/Main.cpp
21
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue