22 #ifndef NUVIE_CORE_TIMED_EVENT_H 23 #define NUVIE_CORE_TIMED_EVENT_H 25 #include "ultima/shared/std/string.h" 26 #include "ultima/nuvie/misc/call_back.h" 27 #include "ultima/nuvie/core/obj_manager.h" 40 class TimedCallbackTarget;
62 bool call_timer(uint32 now);
63 void call_timers(uint32 now);
67 #define TIMER_IMMEDIATE true 68 #define TIMER_DELAYED false 69 #define TIMER_REALTIME true 70 #define TIMER_GAMETIME false 89 TimedEvent(uint32 reltime,
bool immediate = TIMER_DELAYED,
bool realtime = TIMER_REALTIME);
91 virtual void timed(uint32 evtime) {
92 DEBUG(0, LEVEL_ERROR,
"TimedEvent: undefined timer method\n");
100 if (!tq_can_delete) dequeue();
103 void repeat(uint32 count = 1) {
104 repeat_count = count;
124 TimedMessage(uint32 reltime,
const char *m,
bool repeating =
false)
126 repeat_count = repeating ? -1 : 0;
128 void timed(uint32 evtime)
override {
129 DEBUG(0, LEVEL_NOTIFICATION,
"Activate! evtime=%d msg=\"%s\"\n", evtime, msg.c_str());
145 uint8 wait_for_effect;
146 Actor *actor_to_hide;
155 void timed(uint32 evtime)
override;
157 uint16 callback(uint16 msg,
CallBack *caller,
void *data =
nullptr)
override;
162 void hide_actor(
Actor *person);
163 void change_location();
173 void timed(uint32 evtime)
override;
183 void timed(uint32 evtime) {
201 void timed(uint32 evtime)
override;
212 bool repeat =
false);
214 void timed(uint32 evtime)
override;
215 void clear_target() {
234 uint8 minutes_this_hour;
245 void init(uint16 min, uint16 r);
247 void timed(uint32 evtime)
override;
248 bool time_passed()
const;
249 void get_time_from_string(uint8 &hour, uint8 &minute,
Std::string timestring);
260 void timed(uint32 evtime)
override;
264 void check_campfire();
277 uint8 number_that_had_food;
282 void timed(uint32 evtime)
override;
283 void eat(
Actor *actor);
Definition: map_window.h:73
Definition: usecode.h:151
Definition: timed_event.h:137
Definition: timed_event.h:256
Definition: game_clock.h:49
Definition: timed_event.h:221
Definition: timed_event.h:209
Definition: detection.h:27
Definition: timed_event.h:45
Definition: timed_event.h:270
Definition: call_back.h:50
Definition: timed_event.h:76
Definition: timed_event.h:169
Definition: containers.h:200
Definition: obj_manager.h:75
Definition: timed_event.h:231
Definition: timed_event.h:193
Definition: timed_event.h:121
bool empty() const
Definition: list.h:219