2 // C Implementation: globals
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
9 // Copyright: See COPYING file that comes with this distribution
15 /** The datadir prefix prepended when loading game data file */
19 text_type black_text, gold_text, blue_text, red_text, yellow_nums, white_text, white_small_text, white_big_text;
21 MouseCursor * mouse_cursor;
30 char* level_startup_file = 0;
31 bool launch_worldmap_mode = false;
33 /* SuperTux directory ($HOME/.supertux) and save directory($HOME/.supertux/save) */
34 char *st_dir, *st_save_dir;
38 /* Returns 1 for every button event, 2 for a quit event and 0 for no event. */
39 int wait_for_event(SDL_Event& event,unsigned int min_delay, unsigned int max_delay, bool empty_events)
48 if(max_delay < min_delay)
49 max_delay = min_delay;
51 maxdelay.start(max_delay);
52 mindelay.start(min_delay);
55 while (SDL_PollEvent(&event))
60 for(i = 0; maxdelay.check() || !i; ++i)
62 while (SDL_PollEvent(&event))
66 if (event.type == SDL_QUIT)
68 /* Quit event - quit: */
71 else if (event.type == SDL_KEYDOWN)
73 /* Keypress - skip intro: */
77 else if (event.type == SDL_JOYBUTTONDOWN)
79 /* Fire button - skip intro: */
83 else if (event.type == SDL_MOUSEBUTTONDOWN)
85 /* Mouse button - skip intro: */