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. */
39 timer_type fps_timer, frame_timer;
44 GameSession(const std::string& filename);
45 GameSession(const std::string& subset, int levelnb, int mode);
50 void process_events();
52 Level* get_level() { return world->get_level(); }
53 World* get_world() { return world; }
55 void savegame(int slot);
56 void loadgame(int slot);
58 static GameSession* current() { return current_; }
60 static GameSession* current_;
66 std::string slotinfo(int slot);
68 bool rectcollision(base_type* one, base_type* two);
69 void drawshape(float x, float y, unsigned int c, Uint8 alpha = 255);
70 void bumpbrick(float x, float y);
72 #endif /*SUPERTUX_GAMELOOP_H*/