X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fmainloop.cpp;h=e5db0246a58eb0e4e3d16a0a6335d01a1fa1a374;hb=e7a12ed844f040d270e50ce25f74de5f017c1157;hp=0a2daebdecb00803ac6aafab0012e92ace0da49f;hpb=a93bdf2bb864dc6ba7f9722b151e432fcab57240;p=supertux.git diff --git a/src/mainloop.cpp b/src/mainloop.cpp index 0a2daebde..e5db0246a 100644 --- a/src/mainloop.cpp +++ b/src/mainloop.cpp @@ -109,6 +109,12 @@ MainLoop::set_speed(float speed) this->speed = speed; } +float +MainLoop::get_speed() const +{ + return speed; +} + void MainLoop::draw_fps(DrawingContext& context, float fps_fps) { @@ -222,10 +228,8 @@ MainLoop::handle_screen_switch() } void -MainLoop::run() +MainLoop::run(DrawingContext &context) { - DrawingContext context; - Uint32 last_ticks = 0; Uint32 elapsed_ticks = 0;