private:
bool seen;
base_type old_base;
- timer_type timer;
+ Timer timer;
Physic physic;
texture_type* texture_left;
#include "globals.h"
#include "button.h"
-timer_type Button::popup_timer;
+Timer Button::popup_timer;
Button::Button(std::string icon_file, std::string ninfo, SDLKey nshortcut, int x, int y, int mw, int mh)
{
}
private:
- static timer_type popup_timer;
+ static Timer popup_timer;
texture_type icon;
texture_type* bkgd;
std::string info;
{
private:
bool quit;
- timer_type fps_timer;
- timer_type frame_timer;
+ Timer fps_timer;
+ Timer frame_timer;
World* world;
int st_gl_mode;
int levelnb;
public:
- timer_type time_left;
+ Timer time_left;
GameSession();
GameSession(const std::string& filename);
{
public:
base_type base;
- timer_type timer;
+ Timer timer;
Tile* tile;
void init(Tile* tile, float x, float y, float xm, float ym);
{
public:
int value;
- timer_type timer;
+ Timer timer;
base_type base;
void init(float x, float y, int s);
int wait_for_event(SDL_Event& event,unsigned int min_delay, unsigned int max_delay, bool empty_events)
{
int i;
- timer_type maxdelay;
- timer_type mindelay;
+ Timer maxdelay;
+ Timer mindelay;
maxdelay.init(false);
mindelay.init(false);
SDL_Rect src, dest;
int done, i, quit, j, scene;
int * height, * height_speed;
- timer_type timer;
+ Timer timer;
/* Load sprite images: */
texture_load(&bkgd, datadir + "/images/intro/intro.png", IGNORE_ALPHA);
static Menu* subset_settings_menu;
static Menu* level_settings_menu;
static Menu* select_tilegroup_menu;
-static timer_type select_tilegroup_menu_effect;
+static Timer select_tilegroup_menu_effect;
static std::map<std::string, ButtonPanel* > tilegroups_map;
static std::string cur_tilegroup;
int height();
public:
- timer_type effect;
+ Timer effect;
int arrange_left;
int active_item;
menu_item_type *item;
int cur_state;
int cur_frame, tot_frames;
texture_type cursor;
- timer_type timer;
+ Timer timer;
};
#endif /*SUPERTUX_MOUSECURSOR_H*/
base_type base;
base_type old_base;
base_type previous_base;
- timer_type invincible_timer;
- timer_type skidding_timer;
- timer_type safe_timer;
- timer_type frame_timer;
+ Timer invincible_timer;
+ Timer skidding_timer;
+ Timer safe_timer;
+ Timer frame_timer;
Physic physic;
public:
}
void
-timer_type::init(bool st_ticks)
+Timer::init(bool st_ticks)
{
period = 0;
time = 0;
}
void
-timer_type::start(unsigned int period_)
+Timer::start(unsigned int period_)
{
time = get_ticks();
period = period_;
}
void
-timer_type::stop()
+Timer::stop()
{
if(get_ticks == st_get_ticks)
init(true);
}
int
-timer_type::check()
+Timer::check()
{
if((time != 0) && (time + period > get_ticks()))
return true;
}
int
-timer_type::started()
+Timer::started()
{
if(time != 0)
return true;
}
int
-timer_type::get_left()
+Timer::get_left()
{
return (period - (get_ticks() - time));
}
int
-timer_type::get_gone()
+Timer::get_gone()
{
return (get_ticks() - time);
}
void
-timer_type::fwrite(FILE* fi)
+Timer::fwrite(FILE* fi)
{
unsigned int diff_ticks;
int tick_mode;
}
void
-timer_type::fread(FILE* fi)
+Timer::fread(FILE* fi)
{
unsigned int diff_ticks;
int tick_mode;
void st_pause_ticks_start(void);
void st_pause_ticks_stop(void);
-class timer_type
+class Timer
{
public:
unsigned int period;
void stop();
/*======================================================================
- int timer_check(timer_type* ptimer);
-
- param : pointer to a timer which needs to be checked
return: NO = the timer is not started
or it is over
YES = otherwise
int started();
/*======================================================================
- int timer_get_left(timer_type* ptimer);
-
- param : pointer to a timer that you want to get the time left
return: the time left (in millisecond)
note : the returned value can be negative
======================================================================*/
static texture_type img_choose_subset;
static bool walking;
-static timer_type random_timer;
+static Timer random_timer;
static SDL_Event event;
static SDLKey key;
{
int done;
int scroll, speed;
- timer_type timer;
+ Timer timer;
int n,d;
int length;
FILE* fi;