projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
snv ignore version.h, add includes for gcc 4.3.3.
[supertux.git]
/
src
/
mainloop.cpp
diff --git
a/src/mainloop.cpp
b/src/mainloop.cpp
index
08525fa
..
f291e28
100644
(file)
--- a/
src/mainloop.cpp
+++ b/
src/mainloop.cpp
@@
-29,6
+29,7
@@
#include "scripting/time_scheduler.hpp"
#include "scripting/squirrel_util.hpp"
#include "gameconfig.hpp"
#include "scripting/time_scheduler.hpp"
#include "scripting/squirrel_util.hpp"
#include "gameconfig.hpp"
+#include "constants.hpp"
#include "main.hpp"
#include "resources.hpp"
#include "screen.hpp"
#include "main.hpp"
#include "resources.hpp"
#include "screen.hpp"
@@
-38,10
+39,6
@@
#include "video/renderer.hpp"
#include "random_generator.hpp"
#include "video/renderer.hpp"
#include "random_generator.hpp"
-// the engine will be run with a logical framerate of 64fps.
-// We chose 64fps here because it is a power of 2, so 1/64 gives an "even"
-// binary fraction...
-static const float LOGICAL_FPS = 64.0;
/** ticks (as returned from SDL_GetTicks) per frame */
static const Uint32 TICKS_PER_FRAME = (Uint32) (1000.0 / LOGICAL_FPS);
/** don't skip more than every 2nd frame */
/** ticks (as returned from SDL_GetTicks) per frame */
static const Uint32 TICKS_PER_FRAME = (Uint32) (1000.0 / LOGICAL_FPS);
/** don't skip more than every 2nd frame */
@@
-77,7
+74,7
@@
MainLoop::push_screen(Screen* screen, ScreenFade* screen_fade)
this->screen_fade.reset(screen_fade);
nextpush = !nextpop;
nextpop = false;
this->screen_fade.reset(screen_fade);
nextpush = !nextpop;
nextpop = false;
- speed = 1.0;
+ speed = 1.0
f
;
}
void
}
void
@@
-171,6
+168,8
@@
MainLoop::update_gamelogic(float elapsed_time)
Scripting::update_debugger();
Scripting::TimeScheduler::instance->update(game_time);
current_screen->update(elapsed_time);
Scripting::update_debugger();
Scripting::TimeScheduler::instance->update(game_time);
current_screen->update(elapsed_time);
+ if (Menu::current() != NULL)
+ Menu::current()->update();
if(screen_fade.get() != NULL)
screen_fade->update(elapsed_time);
Console::instance->update(elapsed_time);
if(screen_fade.get() != NULL)
screen_fade->update(elapsed_time);
Console::instance->update(elapsed_time);