6 by Bill Kendrick & Tobias Glaesser <tobi.web@gmx.de>
7 bill@newbreedsoftware.com
8 http://www.newbreedsoftware.com/supertux/
10 April 11, 2000 - March 15, 2004
13 #ifndef SUPERTUX_GAMELOOP_H
14 #define SUPERTUX_GAMELOOP_H
25 #define ST_GL_LOAD_GAME 2
26 #define ST_GL_LOAD_LEVEL_FILE 3
28 extern int game_started;
32 /** The GameSession class controlls the controll flow of a World, ie.
33 present the menu on specifc keypresses, render and update it while
34 keeping the speed and framerate sane, etc. */
45 unsigned int last_update_time;
46 unsigned int update_time;
51 // FIXME: Hack for restarting the level
59 GameSession(const std::string& filename);
60 GameSession(const std::string& subset, int levelnb, int mode);
63 /** Enter the busy loop */
67 int action(double frame_ratio);
69 Level* get_level() { return world->get_level(); }
70 World* get_world() { return world; }
72 void savegame(int slot);
73 void loadgame(int slot);
75 static GameSession* current() { return current_; }
77 static GameSession* current_;
82 void process_events();
87 void drawresultscreen(void);
90 std::string slotinfo(int slot);
92 bool rectcollision(base_type* one, base_type* two);
93 void bumpbrick(float x, float y);
95 #endif /*SUPERTUX_GAMELOOP_H*/