From d73783f22b2bb881aab74524d153d89a5932a199 Mon Sep 17 00:00:00 2001 From: Susu Date: Fri, 7 Jun 2013 20:03:32 +0200 Subject: Hercules Renewal Phase One : pc, party, map, timer Added iPc, iParty, iMap, iTimer to HPM exported interfaces --- src/common/timer.h | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'src/common/timer.h') diff --git a/src/common/timer.h b/src/common/timer.h index 902679f51..d68b5ed0f 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -34,27 +34,36 @@ struct TimerData { intptr_t data; }; -// Function prototype declaration +/* Hercules Renewal Phase One */ +/*===================================== +* Interface : timer.h +* Generated by HerculesInterfaceMaker +* created by Susu +*-------------------------------------*/ +struct timer_interface { -int do_timer(unsigned int tick); -void timer_init(void); -void timer_final(void); + /* funcs */ + unsigned int (*gettick) (void); + unsigned int (*gettick_nocache) (void); -/* Hercules Renewal Phase One */ -unsigned int (*gettick) (void); -unsigned int (*gettick_nocache) (void); + int (*add_timer) (unsigned int tick, TimerFunc func, int id, intptr_t data); + int (*add_timer_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval); + const struct TimerData *(*get_timer) (int tid); + int (*delete_timer) (int tid, TimerFunc func); + + int (*addtick_timer) (int tid, unsigned int tick); + int (*settick_timer) (int tid, unsigned int tick); -int (*add_timer) (unsigned int tick, TimerFunc func, int id, intptr_t data); -int (*add_timer_interval) (unsigned int tick, TimerFunc func, int id, intptr_t data, int interval); -const struct TimerData *(*get_timer) (int tid); -int (*delete_timer) (int tid, TimerFunc func); + int (*add_timer_func_list) (TimerFunc func, char* name); -int (*addtick_timer) (int tid, unsigned int tick); -int (*settick_timer) (int tid, unsigned int tick); + unsigned long (*get_uptime) (void); -int (*add_timer_func_list) (TimerFunc func, char* name); + int (*do_timer) (unsigned int tick); + void (*init) (void); + void (*final) (void); +} iTimer_s; -unsigned long (*get_uptime) (void); +struct timer_interface *iTimer; void timer_defaults(void); -- cgit v1.2.3-60-g2f50