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" 32 #define GAMECLOCK_TICKS_PER_MINUTE 4 34 #define GAMECLOCK_NUM_TIMERS 16 36 #define GAMECLOCK_TIMER_U6_LIGHT 0 37 #define GAMECLOCK_TIMER_U6_INFRAVISION 1 38 #define GAMECLOCK_TIMER_U6_STORM 13 39 #define GAMECLOCK_TIMER_U6_TIME_STOP 14 40 #define GAMECLOCK_TIMER_U6_ECLIPSE 15 42 #define GAMECLOCK_TIMER_MD_BLUE_BERRY 16*3 48 nuvie_game_t game_type;
82 void inc_move_counter();
83 void inc_move_counter_by_a_minute();
85 void advance_to_next_hour();
87 void inc_minute(uint16 amount = 1);
93 uint32 get_move_count()
const;
95 const char *get_time_of_day_string();
97 uint8 get_hour()
const;
98 uint8 get_minute()
const;
100 uint8 get_day()
const;
101 uint8 get_month()
const;
102 uint16 get_year()
const;
103 uint8 get_day_of_week()
const;
105 const char *get_date_string();
106 const char *get_time_string();
108 uint8 get_rest_counter()
const;
109 void set_rest_counter(uint8 value) {
110 rest_counter = value;
113 uint32 get_ticks()
const {
114 return SDL_GetTicks();
120 uint32 get_turn()
const {
124 void set_timer(uint8 timer_num, uint8 val);
125 uint8 get_timer(uint8 timer_num)
const;
126 void update_timers(uint8 amount);
129 uint8 get_purple_berry_counter(uint8 actor_num)
const {
130 return get_timer(actor_num * 3);
132 uint8 get_green_berry_counter(uint8 actor_num)
const {
133 return get_timer(actor_num * 3 + 1);
135 uint8 get_brown_berry_counter(uint8 actor_num)
const {
136 return get_timer(actor_num * 3 + 2);
142 inline void update_day_of_week();
145 void load_U6_timers(
NuvieIO *objlist);
146 void load_MD_timers(
NuvieIO *objlist);
147 void save_U6_timers(
NuvieIO *objlist);
148 void save_MD_timers(
NuvieIO *objlist);
Definition: game_clock.h:47
uint32 get_game_ticks() const
Definition: game_clock.h:116
Definition: detection.h:27
Definition: nuvie_io.h:32