All pastes #97971 Raw Edit

delmonico

public cpp v1 · immutable
#97971 ·published 2006-07-24 07:00 UTC
rendered paste body
Index: src/main.cpp===================================================================--- src/main.cpp        (revision 97)+++ src/main.cpp        (working copy)@@ -77,8 +77,17 @@        int running = 1;+       int old_ticks = 0;        while (running)        {+               if(gameConfig.getString("fps") == "true")+               {+                       int ticks = SDL_GetTicks();+                       int fps = 1000 / (ticks-old_ticks);+                       printf ("FPS: %i\n", fps);+                       old_ticks = ticks;+               }+                inputmgr->updateInput();                running = inputmgr->running();Index: data/config.xml===================================================================--- data/config.xml     (revision 97)+++ data/config.xml     (working copy)@@ -2,19 +2,20 @@ <userconfig> <!-- Rendersettings Options: OpenGL or SDL -->-       <var name="device" value="OpenGL"/>-       <var name="fullscreen" value="false"/>+       <var name="device" value="SDL"/>+       <var name="fullscreen" value="true"/>+       <var name="fps" value="true" /> <!-- Left blobby color configuration -->        <var name="r1" value="255"/>        <var name="g1" value="0"/>        <var name="b1" value="0"/>-       <var name="left_blobby_oscillate" value="true" />+       <var name="left_blobby_oscillate" value="false" /> <!-- Right blobby color configuration -->        <var name="r2" value="0"/>        <var name="g2" value="255"/>        <var name="b2" value="0"/>-       <var name="right_blobby_oscillate" value="true" />+       <var name="right_blobby_oscillate" value="false" /> </userconfig>