22 #ifndef NUVIE_CORE_GAME_CLOCK_H 23 #define NUVIE_CORE_GAME_CLOCK_H 25 #include "ultima/nuvie/core/nuvie_defs.h" 30 #define GAMECLOCK_TICKS_PER_MINUTE 4 32 #define GAMECLOCK_NUM_TIMERS 16 34 #define GAMECLOCK_TIMER_U6_LIGHT 0 35 #define GAMECLOCK_TIMER_U6_INFRAVISION 1 36 #define GAMECLOCK_TIMER_U6_STORM 13 37 #define GAMECLOCK_TIMER_U6_TIME_STOP 14 38 #define GAMECLOCK_TIMER_U6_ECLIPSE 15 40 #define GAMECLOCK_TIMER_MD_BLUE_BERRY 16*3 46 nuvie_game_t game_type;
80 void inc_move_counter();
81 void inc_move_counter_by_a_minute();
83 void advance_to_next_hour();
85 void inc_minute(uint16 amount = 1);
91 uint32 get_move_count()
const;
93 const char *get_time_of_day_string();
95 uint8 get_hour()
const;
96 uint8 get_minute()
const;
98 uint8 get_day()
const;
99 uint8 get_month()
const;
100 uint16 get_year()
const;
101 uint8 get_day_of_week()
const;
103 const char *get_date_string();
104 const char *get_time_string();
106 uint8 get_rest_counter()
const;
107 void set_rest_counter(uint8 value) {
108 rest_counter = value;
111 uint32 get_ticks()
const {
112 return SDL_GetTicks();
118 uint32 get_turn()
const {
122 void set_timer(uint8 timer_num, uint8 val);
123 uint8 get_timer(uint8 timer_num)
const;
124 void update_timers(uint8 amount);
127 uint8 get_purple_berry_counter(uint8 actor_num)
const {
128 return get_timer(actor_num * 3);
130 uint8 get_green_berry_counter(uint8 actor_num)
const {
131 return get_timer(actor_num * 3 + 1);
133 uint8 get_brown_berry_counter(uint8 actor_num)
const {
134 return get_timer(actor_num * 3 + 2);
140 inline void update_day_of_week();
143 void load_U6_timers(
NuvieIO *objlist);
144 void load_MD_timers(
NuvieIO *objlist);
145 void save_U6_timers(
NuvieIO *objlist);
146 void save_MD_timers(
NuvieIO *objlist);
Definition: game_clock.h:45
uint32 get_game_ticks() const
Definition: game_clock.h:114
Definition: detection.h:27
Definition: nuvie_io.h:32