projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No more count-to-infinity for the coins display
[supertux.git]
/
src
/
mainloop.hpp
diff --git
a/src/mainloop.hpp
b/src/mainloop.hpp
index
8be8b11
..
a69baaf
100644
(file)
--- a/
src/mainloop.hpp
+++ b/
src/mainloop.hpp
@@
-21,35
+21,45
@@
#include <memory>
#include <vector>
#include <memory>
#include <vector>
+#include "scripting/thread_queue.hpp"
class Screen;
class Console;
class Screen;
class Console;
+class ScreenFade;
+class DrawingContext;
class MainLoop
{
public:
MainLoop();
~MainLoop();
class MainLoop
{
public:
MainLoop();
~MainLoop();
-
+
void run();
void run();
- void exit_screen();
- void quit();
+ void exit_screen(
ScreenFade* fade = NULL
);
+ void quit(
ScreenFade* fade = NULL
);
void set_speed(float speed);
// push new screen on screen_stack
void set_speed(float speed);
// push new screen on screen_stack
- void push_screen(Screen* screen);
+ void push_screen(Screen* screen, ScreenFade* fade = NULL);
+ void set_screen_fade(ScreenFade* fade);
+
+ /// threads that wait for a screenswitch
+ Scripting::ThreadQueue waiting_threads;
private:
private:
+ void draw_fps(DrawingContext& context, float fps);
+
bool running;
float speed;
bool running;
float speed;
+ bool nextpop;
bool nextpush;
std::auto_ptr<Screen> next_screen;
std::auto_ptr<Screen> current_screen;
std::auto_ptr<Console> console;
bool nextpush;
std::auto_ptr<Screen> next_screen;
std::auto_ptr<Screen> current_screen;
std::auto_ptr<Console> console;
+ std::auto_ptr<ScreenFade> screen_fade;
std::vector<Screen*> screen_stack;
};
extern MainLoop* main_loop;
#endif
std::vector<Screen*> screen_stack;
};
extern MainLoop* main_loop;
#endif
-