3535#include " frameint.h"
3636#include " frameresource.h"
3737#include " input.h"
38- #include " SDL_framerate.h"
3938#include " physfs_ext.h"
4039
4140#include " cursors.h"
@@ -79,25 +78,6 @@ static uint64_t curFrames = 0; // Number of frames elapsed since start
7978static uint64_t lastFrames = 0 ;
8079static uint32_t curTicks = 0 ; // Number of ticks since execution started
8180static uint32_t lastTicks = 0 ;
82- static FPSmanager wzFPSmanager;
83- static bool initFPSmanager = false ;
84-
85- void setFramerateLimit (int fpsLimit)
86- {
87- if (!initFPSmanager)
88- {
89- /* Initialize framerate handler */
90- SDL_initFramerate (&wzFPSmanager);
91- initFPSmanager = true ;
92- }
93- SDL_setFramerate (&wzFPSmanager, fpsLimit);
94- }
95-
96-
97- int getFramerateLimit (void )
98- {
99- return SDL_getFramerate (&wzFPSmanager);
100- }
10181
10282/* InitFrameStuff - needs to be called once before frame loop commences */
10383static void InitFrameStuff ( void )
@@ -137,7 +117,6 @@ static void MaintainFrameStuff( void )
137117 }
138118}
139119
140-
141120UDWORD frameGetAverageRate (void )
142121{
143122 SDWORD averageFrames = 0 , i = 0 ;
@@ -148,13 +127,11 @@ UDWORD frameGetAverageRate(void)
148127 return averageFrames;
149128}
150129
151-
152130UDWORD frameGetFrameNumber (void )
153131{
154132 return curFrames;
155133}
156134
157-
158135/* * Set the current cursor from a Resource ID
159136 */
160137void frameSetCursor (CURSOR cur)
@@ -169,7 +146,6 @@ void frameSetCursor(CURSOR cur)
169146 }
170147}
171148
172-
173149static void initCursors (void )
174150{
175151 init_system_cursor (CURSOR_ARROW, cursor_type);
@@ -200,7 +176,6 @@ static void initCursors(void)
200176 init_system_cursor (CURSOR_SELECT, cursor_type);
201177}
202178
203-
204179static void freeCursors (void )
205180{
206181 // no-op
@@ -263,7 +238,6 @@ void frameUpdate(void)
263238{
264239 /* Update the frame rate stuff */
265240 MaintainFrameStuff ();
266- SDL_framerateDelay (&wzFPSmanager);
267241}
268242
269243
0 commit comments