#include <countdown_clock.hpp>
Public Member Functions | |
countdown_clock (team &team) | |
~countdown_clock () | |
int | update_timestamp (int new_timestamp) |
void | update_team (int new_timestamp) |
void | process (events::pump_info &info) |
bool | update (int new_timestamp=SDL_GetTicks()) |
void | maybe_play_sound () |
Public Member Functions inherited from events::pump_monitor | |
pump_monitor () | |
virtual | ~pump_monitor () |
Private Attributes | |
team & | team_ |
int | last_timestamp_ |
bool | playing_sound_ |
Definition at line 20 of file countdown_clock.hpp.
countdown_clock::countdown_clock | ( | team & | team | ) |
Definition at line 28 of file countdown_clock.cpp.
countdown_clock::~countdown_clock | ( | ) |
Definition at line 36 of file countdown_clock.cpp.
References playing_sound_, and sound::stop_bell().
void countdown_clock::maybe_play_sound | ( | ) |
Definition at line 72 of file countdown_clock.cpp.
References team::countdown_time(), prefs::get(), sound::play_timer(), playing_sound_, gui2::dialogs::sound(), team_, game_config::sounds::timer_bell, game_config::sounds::turn_bell, and gui2::dialogs::ui_sound_on().
Referenced by update().
|
virtual |
Implements events::pump_monitor.
Definition at line 58 of file countdown_clock.cpp.
References lg::info(), and update().
bool countdown_clock::update | ( | int | new_timestamp = SDL_GetTicks() | ) |
new_timestamp | latest result of SDL_GetTicks() |
Definition at line 65 of file countdown_clock.cpp.
References team::countdown_time(), maybe_play_sound(), team_, and update_team().
Referenced by process().
void countdown_clock::update_team | ( | int | new_timestamp | ) |
new_timestamp | latest result of SDL_GetTicks() |
Definition at line 51 of file countdown_clock.cpp.
References team::countdown_time(), team::set_countdown_time(), team_, and update_timestamp().
Referenced by update().
int countdown_clock::update_timestamp | ( | int | new_timestamp | ) |
new_timestamp | latest result of SDL_GetTicks() |
Definition at line 44 of file countdown_clock.cpp.
References last_timestamp_.
Referenced by update_team().
|
private |
Definition at line 41 of file countdown_clock.hpp.
Referenced by update_timestamp().
|
private |
Definition at line 42 of file countdown_clock.hpp.
Referenced by maybe_play_sound(), and ~countdown_clock().
|
private |
Definition at line 40 of file countdown_clock.hpp.
Referenced by maybe_play_sound(), update(), and update_team().