diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-02-07 19:38:32 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-02-07 22:41:23 -0800 |
commit | 83b2e0b3ceda907b7186acfcc56c214fc04d9c13 (patch) | |
tree | f4dcc8d8b59fd9a633bc2604cc92f0523cc76ee4 /src/map/npc.hpp | |
parent | c67c2b7435a13d7ce17b2075e22dc5c6036f702a (diff) | |
download | tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.gz tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.bz2 tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.xz tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.zip |
Remove some macros
Diffstat (limited to 'src/map/npc.hpp')
-rw-r--r-- | src/map/npc.hpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/map/npc.hpp b/src/map/npc.hpp index 09fb1dc..50cfaa5 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -1,13 +1,14 @@ #ifndef NPC_HPP #define NPC_HPP +#include <cstddef> #include <cstdint> -#define START_NPC_NUM 110000000 +constexpr int START_NPC_NUM = 110000000; -#define WARP_CLASS 45 -#define WARP_DEBUG_CLASS 722 -#define INVISIBLE_CLASS 32767 +constexpr int WARP_CLASS = 45; +constexpr int WARP_DEBUG_CLASS = 722; +constexpr int INVISIBLE_CLASS = 32767; int npc_event_dequeue(struct map_session_data *sd); int npc_event(struct map_session_data *sd, const char *npcname, int); @@ -49,8 +50,16 @@ int npc_event_doall_l(const char *name, int rid, int argc, struct argrec *argv); int npc_event_do_l(const char *name, int rid, int argc, struct argrec *argv); -#define npc_event_doall(name) npc_event_doall_l(name, 0, 0, NULL) -#define npc_event_do(name) npc_event_do_l(name, 0, 0, NULL) +inline +int npc_event_doall(const char *name) +{ + return npc_event_doall_l(name, 0, 0, NULL); +} +inline +int npc_event_do(const char *name) +{ + return npc_event_do_l(name, 0, 0, NULL); +} int npc_timerevent_start(struct npc_data *nd); int npc_timerevent_stop(struct npc_data *nd); |