- static float sps=200;
- static int count;
- static float oldmult;
-
- DoFrameRate(1);
- if(multiplier>.6)multiplier=.6;
-
- fps=1/multiplier;
-
- count = multiplier*sps;
- if(count<2)count=2;
-
- realmultiplier=multiplier;
- multiplier*=gamespeed;
- if(difficulty==1)multiplier*=.9;
- if(difficulty==0)multiplier*=.8;
-
- if(loading==4)multiplier*=.00001;
- if(slomo&&!mainmenu)multiplier*=slomospeed;
- oldmult=multiplier;
- multiplier/=(float)count;
-
- DoMouse();
-
- TickOnce();
-
- for(int i=0;i<count;i++)
- {
- Tick();
- }
- multiplier=oldmult;
-
- TickOnceAfter();
-/* - Debug code to test how many channels were active on average per frame
- static long frames = 0;
-
- static AbsoluteTime start = {0,0};
- AbsoluteTime currTime = UpTime ();
- static int num_channels = 0;
-
- num_channels += OPENAL_GetChannelsPlaying();
- double deltaTime = (float) AbsoluteDeltaToDuration (currTime, start);
-
- if (0 > deltaTime) // if negative microseconds
- deltaTime /= -1000000.0;
- else // else milliseconds
- deltaTime /= 1000.0;
-
- ++frames;
-
- if (deltaTime >= 1)
- {
- start = currTime;
- float avg_channels = (float)num_channels / (float)frames;
-
- ofstream opstream("log.txt",ios::app);
- opstream << "Average frame count: ";
- opstream << frames;
- opstream << " frames - ";
- opstream << avg_channels;
- opstream << " per frame.\n";
- opstream.close();
-
- frames = 0;
- num_channels = 0;
- }
-*/
- if ( stereomode == stereoNone ) {
- DrawGLScene(stereoCenter);
- } else {
- DrawGLScene(stereoLeft);
- DrawGLScene(stereoRight);
- }
+ static float sps = 200;
+ static int count;
+ static float oldmult;
+
+ DoFrameRate(1);
+ if (multiplier > .6)multiplier = .6;
+
+ fps = 1 / multiplier;
+
+ count = multiplier * sps;
+ if (count < 2)count = 2;
+
+ realmultiplier = multiplier;
+ multiplier *= gamespeed;
+ if (difficulty == 1)multiplier *= .9;
+ if (difficulty == 0)multiplier *= .8;
+
+ if (loading == 4)multiplier *= .00001;
+ if (slomo && !mainmenu)multiplier *= slomospeed;
+ oldmult = multiplier;
+ multiplier /= (float)count;
+
+ DoMouse();
+
+ TickOnce();
+
+ for (int i = 0; i < count; i++) {
+ Tick();
+ }
+ multiplier = oldmult;
+
+ TickOnceAfter();
+ /* - Debug code to test how many channels were active on average per frame
+ static long frames = 0;
+
+ static AbsoluteTime start = {0,0};
+ AbsoluteTime currTime = UpTime ();
+ static int num_channels = 0;
+
+ num_channels += OPENAL_GetChannelsPlaying();
+ double deltaTime = (float) AbsoluteDeltaToDuration (currTime, start);
+
+ if (0 > deltaTime) // if negative microseconds
+ deltaTime /= -1000000.0;
+ else // else milliseconds
+ deltaTime /= 1000.0;
+
+ ++frames;
+
+ if (deltaTime >= 1)
+ {
+ start = currTime;
+ float avg_channels = (float)num_channels / (float)frames;
+
+ ofstream opstream("log.txt",ios::app);
+ opstream << "Average frame count: ";
+ opstream << frames;
+ opstream << " frames - ";
+ opstream << avg_channels;
+ opstream << " per frame.\n";
+ opstream.close();
+
+ frames = 0;
+ num_channels = 0;
+ }
+ */
+ if ( stereomode == stereoNone ) {
+ DrawGLScene(stereoCenter);
+ } else {
+ DrawGLScene(stereoLeft);
+ DrawGLScene(stereoRight);
+ }