From c812c92d1a1835f0bda783e709481188c8d92225 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 15 Mar 2014 19:34:59 -0700 Subject: Clean up header organization --- src/map/GNUmakefile | 7 ------- src/map/atcommand.cpp | 24 +++++++++++++----------- src/map/atcommand.hpp | 8 ++++---- src/map/battle.cpp | 9 ++++++--- src/map/battle.hpp | 8 ++++---- src/map/battle.t.hpp | 8 ++++---- src/map/chrif.cpp | 10 ++++++---- src/map/chrif.hpp | 12 ++++++------ src/map/clif.cpp | 17 +++++++++++------ src/map/clif.hpp | 13 +++++++------ src/map/clif.t.hpp | 6 +++--- src/map/grfio.cpp | 2 +- src/map/grfio.hpp | 8 ++++---- src/map/intif.cpp | 5 +++-- src/map/intif.hpp | 8 ++++---- src/map/itemdb.cpp | 14 ++++++++------ src/map/itemdb.hpp | 8 ++++---- src/map/magic-expr-eval.hpp | 8 +++----- src/map/magic-expr.cpp | 6 ++++-- src/map/magic-expr.hpp | 6 +++--- src/map/magic-interpreter-aux.hpp | 6 +++--- src/map/magic-interpreter-base.cpp | 2 +- src/map/magic-interpreter-parser.ypp | 4 ++-- src/map/magic-interpreter.hpp | 6 +++--- src/map/magic-interpreter.t.hpp | 8 ++++---- src/map/magic-stmt.cpp | 8 ++++++-- src/map/magic.hpp | 8 ++++---- src/map/main.cpp | 2 ++ src/map/map.cpp | 21 ++++++++++++--------- src/map/map.hpp | 15 ++++++++------- src/map/map.t.hpp | 9 ++++----- src/map/mapflag.hpp | 2 +- src/map/mob.cpp | 15 +++++++++------ src/map/mob.hpp | 13 +++++++------ src/map/mob.t.hpp | 6 +++--- src/map/npc.cpp | 15 +++++++++------ src/map/npc.hpp | 8 ++++---- src/map/party.cpp | 10 ++++++---- src/map/party.hpp | 6 +++--- src/map/path.cpp | 7 ++++--- src/map/path.hpp | 6 +++--- src/map/pc.cpp | 12 ++++++++---- src/map/pc.hpp | 6 +++--- src/map/pc.t.hpp | 6 +++--- src/map/script.cpp | 21 ++++++++++++--------- src/map/script.hpp | 13 +++++++------ src/map/script.py | 3 +++ src/map/skill.cpp | 14 +++++++++----- src/map/skill.hpp | 6 +++--- src/map/skill.t.hpp | 8 ++++---- src/map/storage.cpp | 8 ++++---- src/map/storage.hpp | 8 ++++---- src/map/tmw.cpp | 4 ++-- src/map/tmw.hpp | 11 ++++++----- src/map/trade.cpp | 4 ++-- src/map/trade.hpp | 6 +++--- 56 files changed, 269 insertions(+), 225 deletions(-) delete mode 100644 src/map/GNUmakefile (limited to 'src/map') diff --git a/src/map/GNUmakefile b/src/map/GNUmakefile deleted file mode 100644 index 22f6daa..0000000 --- a/src/map/GNUmakefile +++ /dev/null @@ -1,7 +0,0 @@ -.SUFFIXES: -bin/tmwa-map: - ${MAKE} -C ../.. bin/tmwa-map -clean: - rm -r ../../obj/map/ -%:: - ${MAKE} -C ../.. obj/map/$@ diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index 39e81a9..29bf0b1 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -4,27 +4,29 @@ #include #include +#include "../compat/nullpo.hpp" +#include "../compat/fun.hpp" + #include "../strings/mstring.hpp" #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" #include "../strings/vstring.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" #include "../io/write.hpp" -#include "../common/config_parse.hpp" -#include "../common/core.hpp" -#include "../common/extract.hpp" -#include "../common/human_time_diff.hpp" -#include "../common/mmo.hpp" -#include "../common/nullpo.hpp" -#include "../common/random.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" -#include "../common/utils2.hpp" -#include "../common/version.hpp" +#include "../mmo/config_parse.hpp" +#include "../mmo/core.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/human_time_diff.hpp" +#include "../mmo/mmo.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" +#include "../mmo/version.hpp" #include "battle.hpp" #include "chrif.hpp" diff --git a/src/map/atcommand.hpp b/src/map/atcommand.hpp index c825976..16d1efc 100644 --- a/src/map/atcommand.hpp +++ b/src/map/atcommand.hpp @@ -1,9 +1,9 @@ -#ifndef ATCOMMAND_HPP -#define ATCOMMAND_HPP +#ifndef TMWA_MAP_ATCOMMAND_HPP +#define TMWA_MAP_ATCOMMAND_HPP # include "../strings/fwd.hpp" -# include "../common/const_array.hpp" +# include "../generic/const_array.hpp" # include "map.hpp" @@ -19,4 +19,4 @@ extern AString gm_log; void atcommand_config_write(ZString cfgName); -#endif // ATCOMMAND_HPP +#endif // TMWA_MAP_ATCOMMAND_HPP diff --git a/src/map/battle.cpp b/src/map/battle.cpp index 59e798d..7e563b8 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -2,15 +2,18 @@ #include +#include "../compat/alg.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/config_parse.hpp" -#include "../common/nullpo.hpp" -#include "../common/random.hpp" +#include "../mmo/config_parse.hpp" #include "clif.hpp" #include "itemdb.hpp" diff --git a/src/map/battle.hpp b/src/map/battle.hpp index 243d7fb..fd452e8 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -1,11 +1,11 @@ -#ifndef BATTLE_HPP -#define BATTLE_HPP +#ifndef TMWA_MAP_BATTLE_HPP +#define TMWA_MAP_BATTLE_HPP # include "battle.t.hpp" # include "../strings/fwd.hpp" -# include "../common/timer.t.hpp" +# include "../mmo/timer.t.hpp" # include "magic-interpreter.t.hpp" # include "map.t.hpp" @@ -204,4 +204,4 @@ extern struct Battle_Config bool battle_config_read(ZString cfgName); void battle_config_check(); -#endif // BATTLE_HPP +#endif // TMWA_MAP_BATTLE_HPP diff --git a/src/map/battle.t.hpp b/src/map/battle.t.hpp index 1242c85..76ff571 100644 --- a/src/map/battle.t.hpp +++ b/src/map/battle.t.hpp @@ -1,7 +1,7 @@ -#ifndef BATTLE_T_HPP -#define BATTLE_T_HPP +#ifndef TMWA_MAP_BATTLE_T_HPP +#define TMWA_MAP_BATTLE_T_HPP -# include "../common/utils2.hpp" +# include "../generic/enum.hpp" namespace e { @@ -226,4 +226,4 @@ enum class DamageType : uint8_t FLEE2 = 0x0b, }; -#endif // BATTLE_T_HPP +#endif // TMWA_MAP_BATTLE_T_HPP diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp index 48cff81..ea74ca4 100644 --- a/src/map/chrif.cpp +++ b/src/map/chrif.cpp @@ -4,15 +4,17 @@ #include +#include "../compat/fun.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../io/cxxstdio.hpp" -#include "../common/nullpo.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" -#include "../common/utils.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" +#include "../mmo/utils.hpp" #include "battle.hpp" #include "clif.hpp" diff --git a/src/map/chrif.hpp b/src/map/chrif.hpp index 734f1ac..2dfda43 100644 --- a/src/map/chrif.hpp +++ b/src/map/chrif.hpp @@ -1,11 +1,11 @@ -#ifndef CHRIF_HPP -#define CHRIF_HPP +#ifndef TMWA_MAP_CHRIF_HPP +#define TMWA_MAP_CHRIF_HPP # include "../strings/fwd.hpp" -# include "../common/dumb_ptr.hpp" -# include "../common/human_time_diff.hpp" -# include "../common/ip.hpp" +# include "../mmo/dumb_ptr.hpp" +# include "../mmo/human_time_diff.hpp" +# include "../mmo/ip.hpp" # include "map.hpp" @@ -39,4 +39,4 @@ void do_init_chrif(void); // only used by intif.cpp extern Session *char_session; -#endif // CHRIF_HPP +#endif // TMWA_MAP_CHRIF_HPP diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 37646bf..3ec41ae 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -6,19 +6,24 @@ #include #include +#include "../compat/alg.hpp" +#include "../compat/attr.hpp" +#include "../compat/fun.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/write.hpp" -#include "../common/md5calc.hpp" -#include "../common/random.hpp" -#include "../common/nullpo.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" -#include "../common/version.hpp" +#include "../mmo/md5more.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" +#include "../mmo/version.hpp" #include "atcommand.hpp" #include "battle.hpp" diff --git a/src/map/clif.hpp b/src/map/clif.hpp index e84adf3..c346f7d 100644 --- a/src/map/clif.hpp +++ b/src/map/clif.hpp @@ -1,5 +1,5 @@ -#ifndef CLIF_HPP -#define CLIF_HPP +#ifndef TMWA_MAP_CLIF_HPP +#define TMWA_MAP_CLIF_HPP # include "clif.t.hpp" @@ -7,9 +7,10 @@ # include "../strings/fwd.hpp" -# include "../common/const_array.hpp" -# include "../common/ip.hpp" -# include "../common/timer.t.hpp" +# include "../generic/const_array.hpp" + +# include "../mmo/ip.hpp" +# include "../mmo/timer.t.hpp" # include "battle.t.hpp" # include "map.hpp" @@ -163,4 +164,4 @@ int clif_foreachclient(std::function)>); void do_init_clif(void); -#endif // CLIF_HPP +#endif // TMWA_MAP_CLIF_HPP diff --git a/src/map/clif.t.hpp b/src/map/clif.t.hpp index 96b8a9c..a52b33a 100644 --- a/src/map/clif.t.hpp +++ b/src/map/clif.t.hpp @@ -1,5 +1,5 @@ -#ifndef CLIF_T_HPP -#define CLIF_T_HPP +#ifndef TMWA_MAP_CLIF_T_HPP +#define TMWA_MAP_CLIF_T_HPP # include @@ -18,4 +18,4 @@ enum class BeingRemoveWhy : uint8_t NEGATIVE1 = 0xff, }; -#endif // CLIF_T_HPP +#endif // TMWA_MAP_CLIF_T_HPP diff --git a/src/map/grfio.cpp b/src/map/grfio.cpp index d89fe21..bf55cf7 100644 --- a/src/map/grfio.cpp +++ b/src/map/grfio.cpp @@ -19,7 +19,7 @@ #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/extract.hpp" +#include "../mmo/extract.hpp" #include "../poison.hpp" diff --git a/src/map/grfio.hpp b/src/map/grfio.hpp index 3fde76a..e0758fe 100644 --- a/src/map/grfio.hpp +++ b/src/map/grfio.hpp @@ -1,11 +1,11 @@ -#ifndef GRFIO_HPP -#define GRFIO_HPP +#ifndef TMWA_MAP_GRFIO_HPP +#define TMWA_MAP_GRFIO_HPP # include # include -# include "../common/mmo.hpp" +# include "../mmo/mmo.hpp" bool load_resnametable(ZString filename); @@ -14,4 +14,4 @@ bool load_resnametable(ZString filename); /// Currently there is exactly one .wlk per .gat, but multiples are fine. std::vector grfio_reads(MapName resourcename); -#endif // GRFIO_HPP +#endif // TMWA_MAP_GRFIO_HPP diff --git a/src/map/intif.cpp b/src/map/intif.cpp index 5c6c46a..7f7be73 100644 --- a/src/map/intif.cpp +++ b/src/map/intif.cpp @@ -3,14 +3,15 @@ #include #include +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" #include "../io/cxxstdio.hpp" -#include "../common/nullpo.hpp" -#include "../common/socket.hpp" +#include "../mmo/socket.hpp" #include "battle.hpp" #include "chrif.hpp" diff --git a/src/map/intif.hpp b/src/map/intif.hpp index 0fe7182..ac2740c 100644 --- a/src/map/intif.hpp +++ b/src/map/intif.hpp @@ -1,9 +1,9 @@ -#ifndef INTIF_HPP -#define INTIF_HPP +#ifndef TMWA_MAP_INTIF_HPP +#define TMWA_MAP_INTIF_HPP # include "../strings/fwd.hpp" -# include "../common/const_array.hpp" +# include "../generic/const_array.hpp" # include "map.hpp" @@ -30,4 +30,4 @@ void intif_party_changemap(dumb_ptr sd, int online); void intif_party_message(int party_id, int account_id, XString mes); void intif_party_checkconflict(int party_id, int account_id, CharName nick); -#endif // INTIF_HPP +#endif // TMWA_MAP_INTIF_HPP diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp index 330bd8b..528c81f 100644 --- a/src/map/itemdb.cpp +++ b/src/map/itemdb.cpp @@ -3,19 +3,21 @@ #include #include +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" +#include "../generic/db.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/config_parse.hpp" -#include "../common/db.hpp" -#include "../common/extract.hpp" -#include "../common/nullpo.hpp" -#include "../common/random.hpp" -#include "../common/socket.hpp" +#include "../mmo/config_parse.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/socket.hpp" #include "../poison.hpp" diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index f026f95..4c07303 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -1,7 +1,7 @@ -#ifndef ITEMDB_HPP -#define ITEMDB_HPP +#ifndef TMWA_MAP_ITEMDB_HPP +#define TMWA_MAP_ITEMDB_HPP -# include "../common/mmo.hpp" +# include "../mmo/mmo.hpp" # include "map.t.hpp" # include "script.hpp" @@ -77,4 +77,4 @@ void itemdb_reload(void); void do_final_itemdb(void); bool itemdb_readdb(ZString filename); -#endif // ITEMDB_HPP +#endif // TMWA_MAP_ITEMDB_HPP diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp index 1569be8..0783dc8 100644 --- a/src/map/magic-expr-eval.hpp +++ b/src/map/magic-expr-eval.hpp @@ -1,10 +1,8 @@ -#ifndef MAGIC_EXPR_EVAL_HPP -#define MAGIC_EXPR_EVAL_HPP +#ifndef TMWA_MAP_MAGIC_EXPR_EVAL_HPP +#define TMWA_MAP_MAGIC_EXPR_EVAL_HPP # include "../strings/zstring.hpp" -# include "../common/utils2.hpp" - # include "magic-interpreter.hpp" /* Helper definitions for dealing with functions and operations */ @@ -42,4 +40,4 @@ void magic_area_rect(map_local **m, int *x, int *y, int *width, int *height, # define ARG_MAY_BE_AREA(x) (ARG_TYPE(x) == TYPE::AREA || ARG_TYPE(x) == TYPE::LOCATION) -#endif // MAGIC_EXPR_EVAL_HPP +#endif // TMWA_MAP_MAGIC_EXPR_EVAL_HPP diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp index 1f9ef82..279ba56 100644 --- a/src/map/magic-expr.cpp +++ b/src/map/magic-expr.cpp @@ -5,14 +5,16 @@ #include #include +#include "../compat/alg.hpp" + #include "../strings/mstring.hpp" #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/vstring.hpp" -#include "../io/cxxstdio.hpp" +#include "../generic/random.hpp" -#include "../common/random.hpp" +#include "../io/cxxstdio.hpp" #include "battle.hpp" #include "npc.hpp" diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp index 0fdc435..79fdc3f 100644 --- a/src/map/magic-expr.hpp +++ b/src/map/magic-expr.hpp @@ -1,5 +1,5 @@ -#ifndef MAGIC_EXPR_HPP -#define MAGIC_EXPR_HPP +#ifndef TMWA_MAP_MAGIC_EXPR_HPP +#define TMWA_MAP_MAGIC_EXPR_HPP # include "magic-interpreter.hpp" @@ -84,4 +84,4 @@ int magic_find_item(const_array args, int index, struct item *item, int * int magic_location_in_area(map_local *m, int x, int y, dumb_ptr area); -#endif // MAGIC_EXPR_HPP +#endif // TMWA_MAP_MAGIC_EXPR_HPP diff --git a/src/map/magic-interpreter-aux.hpp b/src/map/magic-interpreter-aux.hpp index 070c771..6f5ad79 100644 --- a/src/map/magic-interpreter-aux.hpp +++ b/src/map/magic-interpreter-aux.hpp @@ -1,5 +1,5 @@ -#ifndef MAGIC_INTERPRETER_AUX_HPP -#define MAGIC_INTERPRETER_AUX_HPP +#ifndef TMWA_MAP_MAGIC_INTERPRETER_AUX_HPP +#define TMWA_MAP_MAGIC_INTERPRETER_AUX_HPP # include "magic-interpreter.t.hpp" @@ -9,4 +9,4 @@ bool CHECK_TYPE(T *v, TYPE t) return v->ty == t; } -#endif // MAGIC_INTERPRETER_AUX_HPP +#endif // TMWA_MAP_MAGIC_INTERPRETER_AUX_HPP diff --git a/src/map/magic-interpreter-base.cpp b/src/map/magic-interpreter-base.cpp index f1878a0..40f186b 100644 --- a/src/map/magic-interpreter-base.cpp +++ b/src/map/magic-interpreter-base.cpp @@ -8,7 +8,7 @@ #include "../io/cxxstdio.hpp" -#include "../common/timer.hpp" +#include "../mmo/timer.hpp" #include "magic-expr.hpp" diff --git a/src/map/magic-interpreter-parser.ypp b/src/map/magic-interpreter-parser.ypp index 3ec1bdd..ef8b159 100644 --- a/src/map/magic-interpreter-parser.ypp +++ b/src/map/magic-interpreter-parser.ypp @@ -17,9 +17,9 @@ AString current_magic_filename; #include "../strings/astring.hpp" #include "../strings/zstring.hpp" -#include "../io/cxxstdio.hpp" +#include "../generic/const_array.hpp" -#include "../common/const_array.hpp" +#include "../io/cxxstdio.hpp" #include "itemdb.hpp" #include "magic-expr.hpp" diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp index 7e42499..6864844 100644 --- a/src/map/magic-interpreter.hpp +++ b/src/map/magic-interpreter.hpp @@ -1,5 +1,5 @@ -#ifndef MAGIC_INTERPRETER_HPP -#define MAGIC_INTERPRETER_HPP +#ifndef TMWA_MAP_MAGIC_INTERPRETER_HPP +#define TMWA_MAP_MAGIC_INTERPRETER_HPP # include "magic-interpreter.t.hpp" @@ -450,4 +450,4 @@ bool magic_init0(); bool magic_init1(ZString filename); void spell_update_location(dumb_ptr invocation); -#endif // MAGIC_INTERPRETER_HPP +#endif // TMWA_MAP_MAGIC_INTERPRETER_HPP diff --git a/src/map/magic-interpreter.t.hpp b/src/map/magic-interpreter.t.hpp index fb7bb6d..e8d7e06 100644 --- a/src/map/magic-interpreter.t.hpp +++ b/src/map/magic-interpreter.t.hpp @@ -1,7 +1,7 @@ -#ifndef MAGIC_INTERPRETER_T_HPP -#define MAGIC_INTERPRETER_T_HPP +#ifndef TMWA_MAP_MAGIC_INTERPRETER_T_HPP +#define TMWA_MAP_MAGIC_INTERPRETER_T_HPP -# include "../common/utils2.hpp" +# include "../generic/enum.hpp" enum class SPELLARG : uint8_t { @@ -156,4 +156,4 @@ ENUM_BITWISE_OPERATORS(INVOCATION_FLAG) } using e::INVOCATION_FLAG; -#endif // MAGIC_INTERPRETER_T_HPP +#endif // TMWA_MAP_MAGIC_INTERPRETER_T_HPP diff --git a/src/map/magic-stmt.cpp b/src/map/magic-stmt.cpp index a71f43c..4063a68 100644 --- a/src/map/magic-stmt.cpp +++ b/src/map/magic-stmt.cpp @@ -2,12 +2,16 @@ #include +#include "../compat/attr.hpp" +#include "../compat/fun.hpp" + #include "../strings/zstring.hpp" +#include "../generic/random2.hpp" + #include "../io/cxxstdio.hpp" -#include "../common/random2.hpp" -#include "../common/timer.hpp" +#include "../mmo/timer.hpp" #include "magic-expr.hpp" #include "magic-expr-eval.hpp" diff --git a/src/map/magic.hpp b/src/map/magic.hpp index 1fabd6f..1562469 100644 --- a/src/map/magic.hpp +++ b/src/map/magic.hpp @@ -1,9 +1,9 @@ -#ifndef MAGIC_HPP -#define MAGIC_HPP +#ifndef TMWA_MAP_MAGIC_HPP +#define TMWA_MAP_MAGIC_HPP # include "../strings/fwd.hpp" -# include "../common/dumb_ptr.hpp" +# include "../mmo/dumb_ptr.hpp" # include "map.hpp" # include "skill.t.hpp" @@ -80,4 +80,4 @@ int spell_attack(int caster, int target); void spell_free_invocation(dumb_ptr invocation); -#endif // MAGIC_HPP +#endif // TMWA_MAP_MAGIC_HPP diff --git a/src/map/main.cpp b/src/map/main.cpp index c930630..f0e3517 100644 --- a/src/map/main.cpp +++ b/src/map/main.cpp @@ -1,2 +1,4 @@ // dummy file to make Make dependencies work #include "map.hpp" + +#include "../poison.hpp" diff --git a/src/map/map.cpp b/src/map/map.cpp index 132afac..d9dd9cc 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -10,25 +10,28 @@ #include #include +#include "../compat/nullpo.hpp" +#include "../compat/fun.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" #include "../strings/vstring.hpp" +#include "../generic/db.hpp" +#include "../generic/random2.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" #include "../io/tty.hpp" #include "../io/write.hpp" -#include "../common/config_parse.hpp" -#include "../common/core.hpp" -#include "../common/db.hpp" -#include "../common/extract.hpp" -#include "../common/random2.hpp" -#include "../common/nullpo.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" -#include "../common/version.hpp" +#include "../mmo/config_parse.hpp" +#include "../mmo/core.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" +#include "../mmo/version.hpp" #include "atcommand.hpp" #include "battle.hpp" diff --git a/src/map/map.hpp b/src/map/map.hpp index 1964a3c..d476dbc 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -1,5 +1,5 @@ -#ifndef MAP_HPP -#define MAP_HPP +#ifndef TMWA_MAP_MAP_HPP +#define TMWA_MAP_MAP_HPP # include "map.t.hpp" @@ -13,12 +13,13 @@ # include "../strings/astring.hpp" # include "../strings/vstring.hpp" +# include "../generic/db.hpp" +# include "../generic/matrix.hpp" + # include "../io/cxxstdio.hpp" -# include "../common/db.hpp" -# include "../common/matrix.hpp" -# include "../common/socket.hpp" -# include "../common/timer.t.hpp" +# include "../mmo/socket.hpp" +# include "../mmo/timer.t.hpp" # include "battle.t.hpp" # include "magic-interpreter.t.hpp" @@ -714,4 +715,4 @@ inline dumb_ptr npc_data::is_shop() { return npc_subtype == NpcSu inline dumb_ptr npc_data::is_warp() { return npc_subtype == NpcSubtype::WARP ? as_warp() : nullptr ; } inline dumb_ptr npc_data::is_message() { return npc_subtype == NpcSubtype::MESSAGE ? as_message() : nullptr ; } -#endif // MAP_HPP +#endif // TMWA_MAP_MAP_HPP diff --git a/src/map/map.t.hpp b/src/map/map.t.hpp index f4d916a..4a41ea8 100644 --- a/src/map/map.t.hpp +++ b/src/map/map.t.hpp @@ -1,10 +1,9 @@ -#ifndef MAP_T_HPP -#define MAP_T_HPP +#ifndef TMWA_MAP_MAP_T_HPP +#define TMWA_MAP_MAP_T_HPP # include "../strings/vstring.hpp" -# include "../common/mmo.hpp" -# include "../common/utils2.hpp" +# include "../mmo/mmo.hpp" namespace e { @@ -562,4 +561,4 @@ struct NpcName : VString<23> {}; struct ScriptLabel : VString<23> {}; struct ItemName : VString<23> {}; -#endif // MAP_T_HPP +#endif // TMWA_MAP_MAP_T_HPP diff --git a/src/map/mapflag.hpp b/src/map/mapflag.hpp index bf8229f..f3819ff 100644 --- a/src/map/mapflag.hpp +++ b/src/map/mapflag.hpp @@ -21,7 +21,7 @@ # include "../sanity.hpp" -# include "../common/extract.hpp" // TODO remove this (requires specializing the *other* half) +# include "../mmo/extract.hpp" // TODO remove this (requires specializing the *other* half) # include "../strings/xstring.hpp" diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 5a414be..61dcfb6 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -8,18 +8,21 @@ #include +#include "../compat/fun.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/xstring.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/config_parse.hpp" -#include "../common/extract.hpp" -#include "../common/nullpo.hpp" -#include "../common/random.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" +#include "../mmo/config_parse.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" #include "battle.hpp" #include "clif.hpp" diff --git a/src/map/mob.hpp b/src/map/mob.hpp index bc8350a..305cd16 100644 --- a/src/map/mob.hpp +++ b/src/map/mob.hpp @@ -1,11 +1,12 @@ -#ifndef MOB_HPP -#define MOB_HPP +#ifndef TMWA_MAP_MOB_HPP +#define TMWA_MAP_MOB_HPP # include "mob.t.hpp" -# include "../common/mmo.hpp" -# include "../common/timer.t.hpp" -# include "../common/random.t.hpp" +# include "../generic/random.t.hpp" + +# include "../mmo/mmo.hpp" +# include "../mmo/timer.t.hpp" # include "clif.t.hpp" # include "map.hpp" @@ -108,4 +109,4 @@ int mob_summonslave(dumb_ptr md2, int *value, int amount, int flag); void mob_reload(void); -#endif // MOB_HPP +#endif // TMWA_MAP_MOB_HPP diff --git a/src/map/mob.t.hpp b/src/map/mob.t.hpp index 54c326d..c8b1e7a 100644 --- a/src/map/mob.t.hpp +++ b/src/map/mob.t.hpp @@ -1,5 +1,5 @@ -#ifndef MOB_T_HPP -#define MOB_T_HPP +#ifndef TMWA_MAP_MOB_T_HPP +#define TMWA_MAP_MOB_T_HPP # include @@ -38,4 +38,4 @@ enum class MobSkillState : uint8_t MSS_CHASE, }; -#endif // MOB_T_HPP +#endif // TMWA_MAP_MOB_T_HPP diff --git a/src/map/npc.cpp b/src/map/npc.cpp index 8ecd7a3..1e164a5 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -7,20 +7,23 @@ #include +#include "../compat/fun.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/mstring.hpp" #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" +#include "../generic/db.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/config_parse.hpp" -#include "../common/db.hpp" -#include "../common/extract.hpp" -#include "../common/nullpo.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" +#include "../mmo/config_parse.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" #include "battle.hpp" #include "clif.hpp" diff --git a/src/map/npc.hpp b/src/map/npc.hpp index 4d4cef1..93f2030 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -1,12 +1,12 @@ -#ifndef NPC_HPP -#define NPC_HPP +#ifndef TMWA_MAP_NPC_HPP +#define TMWA_MAP_NPC_HPP # include # include # include "../strings/fwd.hpp" -# include "../common/timer.t.hpp" +# include "../mmo/timer.t.hpp" # include "map.hpp" @@ -70,4 +70,4 @@ interval_t npc_gettimerevent_tick(dumb_ptr nd); void npc_settimerevent_tick(dumb_ptr nd, interval_t newtimer); int npc_delete(dumb_ptr nd); -#endif // NPC_HPP +#endif // TMWA_MAP_NPC_HPP diff --git a/src/map/party.cpp b/src/map/party.cpp index f7b8396..eadf392 100644 --- a/src/map/party.cpp +++ b/src/map/party.cpp @@ -2,14 +2,16 @@ #include +#include "../compat/nullpo.hpp" + #include "../strings/xstring.hpp" +#include "../generic/db.hpp" + #include "../io/cxxstdio.hpp" -#include "../common/db.hpp" -#include "../common/nullpo.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" #include "battle.hpp" #include "clif.hpp" diff --git a/src/map/party.hpp b/src/map/party.hpp index 91dab1b..c2d4e9d 100644 --- a/src/map/party.hpp +++ b/src/map/party.hpp @@ -1,5 +1,5 @@ -#ifndef PARTY_HPP -#define PARTY_HPP +#ifndef TMWA_MAP_PARTY_HPP +#define TMWA_MAP_PARTY_HPP # include @@ -48,4 +48,4 @@ int party_exp_share(struct party *p, map_local *map, int base_exp, int job_exp); void party_foreachsamemap(std::function)> func, dumb_ptr sd, int type); -#endif // PARTY_HPP +#endif // TMWA_MAP_PARTY_HPP diff --git a/src/map/path.cpp b/src/map/path.cpp index d66640e..a237fa8 100644 --- a/src/map/path.cpp +++ b/src/map/path.cpp @@ -2,10 +2,11 @@ #include -#include "../io/cxxstdio.hpp" +#include "../compat/nullpo.hpp" + +#include "../generic/random.hpp" -#include "../common/random.hpp" -#include "../common/nullpo.hpp" +#include "../io/cxxstdio.hpp" #include "battle.hpp" diff --git a/src/map/path.hpp b/src/map/path.hpp index 4b5b3d8..69316e9 100644 --- a/src/map/path.hpp +++ b/src/map/path.hpp @@ -1,8 +1,8 @@ -#ifndef PATH_HPP -#define PATH_HPP +#ifndef TMWA_MAP_PATH_HPP +#define TMWA_MAP_PATH_HPP # include "map.hpp" int path_search(struct walkpath_data *, map_local *, int, int, int, int, int); -#endif // PATH_HPP +#endif // TMWA_MAP_PATH_HPP diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 86280ed..e3dd67a 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -4,17 +4,21 @@ #include #include +#include "../compat/alg.hpp" +#include "../compat/fun.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/rstring.hpp" #include "../strings/astring.hpp" #include "../strings/zstring.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/nullpo.hpp" -#include "../common/random.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" #include "atcommand.hpp" #include "battle.hpp" diff --git a/src/map/pc.hpp b/src/map/pc.hpp index df612d8..0226019 100644 --- a/src/map/pc.hpp +++ b/src/map/pc.hpp @@ -1,5 +1,5 @@ -#ifndef PC_HPP -#define PC_HPP +#ifndef TMWA_MAP_PC_HPP +#define TMWA_MAP_PC_HPP # include "pc.t.hpp" @@ -155,4 +155,4 @@ void pc_show_motd(dumb_ptr sd); void do_init_pc(void); -#endif // PC_HPP +#endif // TMWA_MAP_PC_HPP diff --git a/src/map/pc.t.hpp b/src/map/pc.t.hpp index 95a76a7..29c3515 100644 --- a/src/map/pc.t.hpp +++ b/src/map/pc.t.hpp @@ -1,5 +1,5 @@ -#ifndef PC_T_HPP -#define PC_T_HPP +#ifndef TMWA_MAP_PC_T_HPP +#define TMWA_MAP_PC_T_HPP # include @@ -41,4 +41,4 @@ enum class PickupFail : uint8_t DROP_STEAL = 6, }; -#endif // PC_T_HPP +#endif // TMWA_MAP_PC_T_HPP diff --git a/src/map/script.cpp b/src/map/script.cpp index e3db7c7..fe42e44 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -7,25 +7,28 @@ #include #include +#include "../compat/fun.hpp" + #include "../strings/mstring.hpp" #include "../strings/rstring.hpp" #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" +#include "../generic/db.hpp" +#include "../generic/intern-pool.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/lock.hpp" #include "../io/read.hpp" -#include "../common/config_parse.hpp" -#include "../common/core.hpp" -#include "../common/db.hpp" -#include "../common/extract.hpp" -#include "../common/intern-pool.hpp" -#include "../common/random.hpp" -#include "../common/socket.hpp" -#include "../common/utils.hpp" -#include "../common/timer.hpp" +#include "../mmo/config_parse.hpp" +#include "../mmo/core.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/utils.hpp" +#include "../mmo/timer.hpp" #include "atcommand.hpp" #include "battle.hpp" diff --git a/src/map/script.hpp b/src/map/script.hpp index 91ee6a5..6cf40b0 100644 --- a/src/map/script.hpp +++ b/src/map/script.hpp @@ -1,5 +1,5 @@ -#ifndef SCRIPT_HPP -#define SCRIPT_HPP +#ifndef TMWA_MAP_SCRIPT_HPP +#define TMWA_MAP_SCRIPT_HPP # include # include // for inlined get_str - TODO remove @@ -10,9 +10,10 @@ # include "../strings/astring.hpp" # include "../strings/zstring.hpp" -# include "../common/db.hpp" -# include "../common/dumb_ptr.hpp" -# include "../common/utils.hpp" +# include "../generic/db.hpp" + +# include "../mmo/dumb_ptr.hpp" +# include "../mmo/utils.hpp" # include "map.t.hpp" @@ -175,4 +176,4 @@ void set_script_var_s(dumb_ptr sd, VarName var, int e, XString int get_script_var_i(dumb_ptr sd, VarName var, int e); ZString get_script_var_s(dumb_ptr sd, VarName var, int e); -#endif // SCRIPT_HPP +#endif // TMWA_MAP_SCRIPT_HPP diff --git a/src/map/script.py b/src/map/script.py index ba0198c..068307a 100644 --- a/src/map/script.py +++ b/src/map/script.py @@ -54,3 +54,6 @@ class script_data(object): yield 'str', v['str'] else: yield 'numi', v['numi'] + + def to_string(self): + return None diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 077bf66..72d7f7a 100644 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -5,18 +5,22 @@ #include #include +#include "../compat/attr.hpp" +#include "../compat/fun.hpp" +#include "../compat/nullpo.hpp" + #include "../strings/mstring.hpp" #include "../strings/rstring.hpp" #include "../strings/xstring.hpp" +#include "../generic/random.hpp" + #include "../io/cxxstdio.hpp" #include "../io/read.hpp" -#include "../common/extract.hpp" -#include "../common/nullpo.hpp" -#include "../common/random.hpp" -#include "../common/socket.hpp" -#include "../common/timer.hpp" +#include "../mmo/extract.hpp" +#include "../mmo/socket.hpp" +#include "../mmo/timer.hpp" #include "battle.hpp" #include "clif.hpp" diff --git a/src/map/skill.hpp b/src/map/skill.hpp index e8f36ab..b612268 100644 --- a/src/map/skill.hpp +++ b/src/map/skill.hpp @@ -1,5 +1,5 @@ -#ifndef SKILL_HPP -#define SKILL_HPP +#ifndef TMWA_MAP_SKILL_HPP +#define TMWA_MAP_SKILL_HPP # include "skill.t.hpp" # include "skill-pools.hpp" @@ -143,4 +143,4 @@ int skill_power_bl(dumb_ptr bl, SkillID skill); // [Fate] Remember that a certain skill ID belongs to a pool skill void skill_pool_register(SkillID id); -#endif // SKILL_HPP +#endif // TMWA_MAP_SKILL_HPP diff --git a/src/map/skill.t.hpp b/src/map/skill.t.hpp index 1470d61..aedbb11 100644 --- a/src/map/skill.t.hpp +++ b/src/map/skill.t.hpp @@ -1,9 +1,9 @@ -#ifndef SKILL_T_HPP -#define SKILL_T_HPP +#ifndef TMWA_MAP_SKILL_T_HPP +#define TMWA_MAP_SKILL_T_HPP # include -# include "../common/utils2.hpp" +# include "../generic/enum.hpp" // TODO remove most of these as their corresponding SkillIDs get deleted. enum class StatusChange : uint16_t @@ -110,4 +110,4 @@ ENUM_BITWISE_OPERATORS(SkillFlags) } using e::SkillFlags; -#endif // SKILL_T_HPP +#endif // TMWA_MAP_SKILL_T_HPP diff --git a/src/map/storage.cpp b/src/map/storage.cpp index b753c0d..89357b9 100644 --- a/src/map/storage.cpp +++ b/src/map/storage.cpp @@ -1,13 +1,13 @@ +#include "storage.hpp" // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see COPYING in the main folder -#include "storage.hpp" - #include #include -#include "../common/db.hpp" -#include "../common/nullpo.hpp" +#include "../compat/nullpo.hpp" + +#include "../generic/db.hpp" #include "chrif.hpp" #include "clif.hpp" diff --git a/src/map/storage.hpp b/src/map/storage.hpp index 76be7d6..0e6d111 100644 --- a/src/map/storage.hpp +++ b/src/map/storage.hpp @@ -1,9 +1,9 @@ +#ifndef TMWA_MAP_STORAGE_HPP +#define TMWA_MAP_STORAGE_HPP + // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see COPYING in the main folder -#ifndef STORAGE_HPP -#define STORAGE_HPP - # include "map.hpp" int storage_storageopen(dumb_ptr sd); @@ -17,4 +17,4 @@ int storage_storage_quit(dumb_ptr sd); int storage_storage_save(int account_id, int final); int storage_storage_saved(int account_id); -#endif // STORAGE_HPP +#endif // TMWA_MAP_STORAGE_HPP diff --git a/src/map/tmw.cpp b/src/map/tmw.cpp index 16276fa..1c18bd5 100644 --- a/src/map/tmw.cpp +++ b/src/map/tmw.cpp @@ -3,14 +3,14 @@ #include #include +#include "../compat/nullpo.hpp" + #include "../strings/astring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" #include "../io/cxxstdio.hpp" -#include "../common/nullpo.hpp" - #include "atcommand.hpp" #include "battle.hpp" #include "chrif.hpp" diff --git a/src/map/tmw.hpp b/src/map/tmw.hpp index e90143d..65e71fb 100644 --- a/src/map/tmw.hpp +++ b/src/map/tmw.hpp @@ -1,14 +1,15 @@ -#ifndef TMW_HPP -#define TMW_HPP +#ifndef TMWA_MAP_TMW_HPP +#define TMWA_MAP_TMW_HPP # include "../strings/fwd.hpp" -# include "../common/const_array.hpp" -# include "../common/dumb_ptr.hpp" +# include "../generic/const_array.hpp" + +# include "../mmo/dumb_ptr.hpp" # include "map.hpp" int tmw_CheckChatSpam(dumb_ptr sd, XString message); void tmw_GmHackMsg(ZString line); -#endif // TMW_HPP +#endif // TMWA_MAP_TMW_HPP diff --git a/src/map/trade.cpp b/src/map/trade.cpp index 9626191..e9c5fd4 100644 --- a/src/map/trade.cpp +++ b/src/map/trade.cpp @@ -1,8 +1,8 @@ #include "trade.hpp" -#include "../io/cxxstdio.hpp" +#include "../compat/nullpo.hpp" -#include "../common/nullpo.hpp" +#include "../io/cxxstdio.hpp" #include "battle.hpp" #include "clif.hpp" diff --git a/src/map/trade.hpp b/src/map/trade.hpp index e50d608..1fb30f4 100644 --- a/src/map/trade.hpp +++ b/src/map/trade.hpp @@ -1,5 +1,5 @@ -#ifndef TRADE_HPP -#define TRADE_HPP +#ifndef TMWA_MAP_TRADE_HPP +#define TMWA_MAP_TRADE_HPP # include "map.hpp" @@ -11,4 +11,4 @@ void trade_tradecancel(dumb_ptr sd); void trade_tradecommit(dumb_ptr sd); void trade_verifyzeny(dumb_ptr sd); -#endif // TRADE_HPP +#endif // TMWA_MAP_TRADE_HPP -- cgit v1.2.3-60-g2f50