The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
countdown_clock.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "events.hpp"
3 #include <SDL_timer.h>
4 
5 class team;
6 struct mp_game_settings;
8 {
9 public:
12  /// @returns ticks passed since last update
13  /// @param new_timestamp latest result of SDL_GetTicks()
14  int update_timestamp(int new_timestamp);
15  /// @param new_timestamp latest result of SDL_GetTicks()
16  void update_team(int new_timestamp);
18  /// @return whether there is time left
19  /// @param new_timestamp latest result of SDL_GetTicks()
20  bool update(int new_timestamp = SDL_GetTicks());
21  void maybe_play_sound();
22 private:
23  team& team_;
26 };
27 
countdown_clock(team &team)
int update_timestamp(int new_timestamp)
logger & info()
Definition: log.cpp:91
This class stores all the data for a single 'side' (in game nomenclature).
Definition: team.hpp:50
void process(events::pump_info &info)
void update_team(int new_timestamp)
bool update(int new_timestamp=SDL_GetTicks())