22 #ifndef NUVIE_CORE_GAME_CLOCK_H 23 #define NUVIE_CORE_GAME_CLOCK_H 25 #include "ultima/shared/std/containers.h" 27 #include "ultima/nuvie/core/nuvie_defs.h" 34 #define GAMECLOCK_TICKS_PER_MINUTE 4 36 #define GAMECLOCK_NUM_TIMERS 16 38 #define GAMECLOCK_TIMER_U6_LIGHT 0 39 #define GAMECLOCK_TIMER_U6_INFRAVISION 1 40 #define GAMECLOCK_TIMER_U6_STORM 13 41 #define GAMECLOCK_TIMER_U6_TIME_STOP 14 42 #define GAMECLOCK_TIMER_U6_ECLIPSE 15 44 #define GAMECLOCK_TIMER_MD_BLUE_BERRY 16*3 50 nuvie_game_t game_type;
84 void inc_move_counter();
85 void inc_move_counter_by_a_minute();
87 void advance_to_next_hour();
89 void inc_minute(uint16 amount = 1);
95 uint32 get_move_count()
const;
97 const char *get_time_of_day_string();
99 uint8 get_hour()
const;
100 uint8 get_minute()
const;
102 uint8 get_day()
const;
103 uint8 get_month()
const;
104 uint16 get_year()
const;
105 uint8 get_day_of_week()
const;
107 const char *get_date_string();
108 const char *get_time_string();
110 uint8 get_rest_counter()
const;
111 void set_rest_counter(uint8 value) {
112 rest_counter = value;
115 uint32 get_ticks()
const {
116 return SDL_GetTicks();
122 uint32 get_turn()
const {
126 void set_timer(uint8 timer_num, uint8 val);
127 uint8 get_timer(uint8 timer_num)
const;
128 void update_timers(uint8 amount);
131 uint8 get_purple_berry_counter(uint8 actor_num)
const {
132 return get_timer(actor_num * 3);
134 uint8 get_green_berry_counter(uint8 actor_num)
const {
135 return get_timer(actor_num * 3 + 1);
137 uint8 get_brown_berry_counter(uint8 actor_num)
const {
138 return get_timer(actor_num * 3 + 2);
144 inline void update_day_of_week();
147 void load_U6_timers(
NuvieIO *objlist);
148 void load_MD_timers(
NuvieIO *objlist);
149 void save_U6_timers(
NuvieIO *objlist);
150 void save_MD_timers(
NuvieIO *objlist);
Definition: game_clock.h:49
uint32 get_game_ticks() const
Definition: game_clock.h:118
Definition: detection.h:27
Definition: nuvie_io.h:32