summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-27 19:16:45 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-27 19:33:42 -0700
commit7af4c5b5c561362cb1135ab504095ae667a9270a (patch)
tree49ffd3008d7634ba36f3951493a68e928407ce89 /src/map
parent8d7f1dadeeb1dc1609b72de5a4ee3a5247b0e9e6 (diff)
downloadtmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.gz
tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.bz2
tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.tar.xz
tmwa-7af4c5b5c561362cb1135ab504095ae667a9270a.zip
This is more reliable
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.hpp15
-rw-r--r--src/map/battle.hpp21
-rw-r--r--src/map/battle.t.hpp11
-rw-r--r--src/map/chrif.hpp15
-rw-r--r--src/map/clif.hpp29
-rw-r--r--src/map/clif.t.hpp199
-rw-r--r--src/map/fwd.hpp7
-rw-r--r--src/map/grfio.hpp15
-rw-r--r--src/map/intif.hpp15
-rw-r--r--src/map/itemdb.hpp15
-rw-r--r--src/map/magic-expr-eval.hpp63
-rw-r--r--src/map/magic-expr.hpp21
-rw-r--r--src/map/magic-interpreter-base.hpp13
-rw-r--r--src/map/magic-interpreter.hpp53
-rw-r--r--src/map/magic-interpreter.t.hpp9
-rw-r--r--src/map/magic-stmt.hpp15
-rw-r--r--src/map/magic-v2.hpp9
-rw-r--r--src/map/magic.hpp15
-rw-r--r--src/map/map.hpp55
-rw-r--r--src/map/map.t.hpp17
-rw-r--r--src/map/mapflag.hpp11
-rw-r--r--src/map/mob.hpp31
-rw-r--r--src/map/mob.t.hpp9
-rw-r--r--src/map/npc.hpp19
-rw-r--r--src/map/party.hpp15
-rw-r--r--src/map/path.hpp7
-rw-r--r--src/map/pc.hpp21
-rw-r--r--src/map/pc.t.hpp9
-rw-r--r--src/map/script.hpp25
-rw-r--r--src/map/skill-pools.hpp7
-rw-r--r--src/map/skill.hpp23
-rw-r--r--src/map/skill.t.hpp11
-rw-r--r--src/map/storage.hpp13
-rw-r--r--src/map/tmw.hpp11
-rw-r--r--src/map/trade.hpp11
35 files changed, 365 insertions, 470 deletions
diff --git a/src/map/atcommand.hpp b/src/map/atcommand.hpp
index 16b17a3..4bf5277 100644
--- a/src/map/atcommand.hpp
+++ b/src/map/atcommand.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_ATCOMMAND_HPP
-#define TMWA_MAP_ATCOMMAND_HPP
+#pragma once
// atcommand.hpp - GM commands.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,15 +20,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/fwd.hpp"
+#include "../net/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
namespace tmwa
@@ -46,5 +45,3 @@ extern AString gm_log;
void atcommand_config_write(ZString cfgName);
} // namespace tmwa
-
-#endif // TMWA_MAP_ATCOMMAND_HPP
diff --git a/src/map/battle.hpp b/src/map/battle.hpp
index c5e7d95..97a4a86 100644
--- a/src/map/battle.hpp
+++ b/src/map/battle.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_BATTLE_HPP
-#define TMWA_MAP_BATTLE_HPP
+#pragma once
// battle.hpp - Not so scary code.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,19 +20,19 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "battle.t.hpp"
+#include "battle.t.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/timer.t.hpp"
+#include "../net/timer.t.hpp"
-# include "clif.t.hpp"
-# include "map.t.hpp"
-# include "skill.t.hpp"
+#include "clif.t.hpp"
+#include "map.t.hpp"
+#include "skill.t.hpp"
namespace tmwa
@@ -227,5 +226,3 @@ extern struct Battle_Config
bool battle_config_read(ZString cfgName);
void battle_config_check();
} // namespace tmwa
-
-#endif // TMWA_MAP_BATTLE_HPP
diff --git a/src/map/battle.t.hpp b/src/map/battle.t.hpp
index fad357d..53c34ff 100644
--- a/src/map/battle.t.hpp
+++ b/src/map/battle.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_BATTLE_T_HPP
-#define TMWA_MAP_BATTLE_T_HPP
+#pragma once
// battle.t.hpp - Not so scary code.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,11 +20,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include "../generic/enum.hpp"
+#include "../generic/enum.hpp"
namespace tmwa
@@ -243,5 +242,3 @@ earray<Races, Race, Race::COUNT> race_shift //=
Races::other,
}};
} // namespace tmwa
-
-#endif // TMWA_MAP_BATTLE_T_HPP
diff --git a/src/map/chrif.hpp b/src/map/chrif.hpp
index 27c1b50..4711bc5 100644
--- a/src/map/chrif.hpp
+++ b/src/map/chrif.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_CHRIF_HPP
-#define TMWA_MAP_CHRIF_HPP
+#pragma once
// chrif.hpp - Network interface to the character server.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,15 +20,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/fwd.hpp"
+#include "../net/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
namespace tmwa
@@ -65,5 +64,3 @@ void do_init_chrif(void);
// and clif.cpp for the new on_delete stuff ...
extern Session *char_session;
} // namespace tmwa
-
-#endif // TMWA_MAP_CHRIF_HPP
diff --git a/src/map/clif.hpp b/src/map/clif.hpp
index bf208b8..adb4889 100644
--- a/src/map/clif.hpp
+++ b/src/map/clif.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_CLIF_HPP
-#define TMWA_MAP_CLIF_HPP
+#pragma once
// clif.hpp - Network interface to the client.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,25 +20,25 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "clif.t.hpp"
+#include "clif.t.hpp"
-# include <functional>
+#include <functional>
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/timer.t.hpp"
+#include "../net/timer.t.hpp"
-# include "../mmo/fwd.hpp"
-# include "../mmo/mmo.hpp"
+#include "../mmo/fwd.hpp"
+#include "../mmo/mmo.hpp"
-# include "battle.t.hpp"
-# include "map.t.hpp"
-# include "pc.t.hpp"
-# include "skill.t.hpp"
+#include "battle.t.hpp"
+#include "map.t.hpp"
+#include "pc.t.hpp"
+#include "skill.t.hpp"
namespace tmwa
@@ -191,5 +190,3 @@ int clif_foreachclient(std::function<void(dumb_ptr<map_session_data>)>);
void do_init_clif(void);
} // namespace tmwa
-
-#endif // TMWA_MAP_CLIF_HPP
diff --git a/src/map/clif.t.hpp b/src/map/clif.t.hpp
index 9d5df79..1789ee8 100644
--- a/src/map/clif.t.hpp
+++ b/src/map/clif.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_CLIF_T_HPP
-#define TMWA_MAP_CLIF_T_HPP
+#pragma once
// clif.t.hpp - Network interface to the client.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,18 +20,18 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include "../ints/little.hpp"
+#include "../ints/little.hpp"
-# include "../compat/iter.hpp"
+#include "../compat/iter.hpp"
-# include "../generic/enum.hpp"
+#include "../generic/enum.hpp"
-# include "../mmo/consts.hpp"
-# include "../mmo/enums.hpp"
+#include "../mmo/consts.hpp"
+#include "../mmo/enums.hpp"
namespace tmwa
@@ -221,9 +220,9 @@ enum class SP : uint16_t
BASEEXP = 1,
// sent to client
JOBEXP = 2,
-# if 0
+#if 0
KARMA = 3,
-# endif
+#endif
// sent to client
HP = 5,
@@ -308,12 +307,12 @@ enum class SP : uint16_t
// sent to client
JOBLEVEL = 55,
-# if 0
+#if 0
PARTNER = 57,
CART = 58,
FAME = 59,
UNBREAKABLE = 60,
-# endif
+#endif
DEAF = 70,
@@ -322,154 +321,154 @@ enum class SP : uint16_t
// sent to client
ATTACKRANGE = 1000,
-# if 0
+#if 0
ATKELE = 1001,
-# endif
-# if 0
+#endif
+#if 0
DEFELE = 1002,
-# endif
-# if 0
+#endif
+#if 0
CASTRATE = 1003,
-# endif
+#endif
MAXHPRATE = 1004,
-# if 0
+#if 0
MAXSPRATE = 1005,
-# endif
-# if 0
+#endif
+#if 0
SPRATE = 1006,
-# endif
+#endif
-# if 0
+#if 0
ADDEFF = 1012,
-# endif
-# if 0
+#endif
+#if 0
RESEFF = 1013,
-# endif
+#endif
BASE_ATK = 1014,
ASPD_RATE = 1015,
HP_RECOV_RATE = 1016,
-# if 0
+#if 0
SP_RECOV_RATE = 1017,
-# endif
-# if 0
+#endif
+#if 0
SPEED_RATE = 1018,
-# endif
+#endif
CRITICAL_DEF = 1019,
-# if 0
+#if 0
NEAR_ATK_DEF = 1020,
-# endif
-# if 0
+#endif
+#if 0
LONG_ATK_DEF = 1021,
-# endif
-# if 0
+#endif
+#if 0
DOUBLE_RATE = 1022,
-# endif
+#endif
DOUBLE_ADD_RATE = 1023,
-# if 0
+#if 0
MATK = 1024,
-# endif
-# if 0
+#endif
+#if 0
MATK_RATE = 1025,
-# endif
-# if 0
+#endif
+#if 0
IGNORE_DEF_ELE = 1026,
-# endif
-# if 0
+#endif
+#if 0
IGNORE_DEF_RACE = 1027,
-# endif
-# if 0
+#endif
+#if 0
ATK_RATE = 1028,
-# endif
+#endif
SPEED_ADDRATE = 1029,
-# if 0
+#if 0
ASPD_ADDRATE = 1030,
-# endif
-# if 0
+#endif
+#if 0
MAGIC_ATK_DEF = 1031,
-# endif
-# if 0
+#endif
+#if 0
MISC_ATK_DEF = 1032,
-# endif
-# if 0
+#endif
+#if 0
IGNORE_MDEF_ELE = 1033,
-# endif
-# if 0
+#endif
+#if 0
IGNORE_MDEF_RACE = 1034,
-# endif
+#endif
-# if 0
+#if 0
PERFECT_HIT_RATE = 1038,
-# endif
-# if 0
+#endif
+#if 0
PERFECT_HIT_ADD_RATE = 1039,
-# endif
-# if 0
+#endif
+#if 0
CRITICAL_RATE = 1040,
-# endif
-# if 0
+#endif
+#if 0
GET_ZENY_NUM = 1041,
-# endif
-# if 0
+#endif
+#if 0
ADD_GET_ZENY_NUM = 1042,
-# endif
+#endif
-# if 0
+#if 0
ADD_MONSTER_DROP_ITEM = 1047,
-# endif
-# if 0
+#endif
+#if 0
DEF_RATIO_ATK_ELE = 1048,
-# endif
-# if 0
+#endif
+#if 0
DEF_RATIO_ATK_RACE = 1049,
-# endif
-# if 0
+#endif
+#if 0
ADD_SPEED = 1050,
-# endif
-# if 0
+#endif
+#if 0
HIT_RATE = 1051,
-# endif
-# if 0
+#endif
+#if 0
FLEE_RATE = 1052,
-# endif
-# if 0
+#endif
+#if 0
FLEE2_RATE = 1053,
-# endif
+#endif
DEF_RATE = 1054,
DEF2_RATE = 1055,
-# if 0
+#if 0
MDEF_RATE = 1056,
-# endif
-# if 0
+#endif
+#if 0
MDEF2_RATE = 1057,
-# endif
-# if 0
+#endif
+#if 0
SPLASH_RANGE = 1058,
-# endif
-# if 0
+#endif
+#if 0
SPLASH_ADD_RANGE = 1059,
-# endif
+#endif
HP_DRAIN_RATE = 1061,
-# if 0
+#if 0
SP_DRAIN_RATE = 1062,
-# endif
-# if 0
+#endif
+#if 0
SHORT_WEAPON_DAMAGE_RETURN = 1063,
-# endif
-# if 0
+#endif
+#if 0
LONG_WEAPON_DAMAGE_RETURN = 1064,
-# endif
+#endif
-# if 0
+#if 0
ADDEFF2 = 1067,
-# endif
+#endif
BREAK_WEAPON_RATE = 1068,
BREAK_ARMOR_RATE = 1069,
ADD_STEAL_RATE = 1070,
MAGIC_DAMAGE_RETURN = 1071,
-# if 0
+#if 0
RANDOM_ATTACK_INCREASE = 1072,
-# endif
+#endif
};
constexpr
@@ -716,5 +715,3 @@ bool network_to_native(SOff1 *native, Little16 network)
return network_to_native(&native->index, network);
}
} // namespace tmwa
-
-#endif // TMWA_MAP_CLIF_T_HPP
diff --git a/src/map/fwd.hpp b/src/map/fwd.hpp
index d58637e..fe66b15 100644
--- a/src/map/fwd.hpp
+++ b/src/map/fwd.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_FWD_HPP
-#define TMWA_MAP_FWD_HPP
+#pragma once
// map/fwd.hpp - list of type names for map server
//
// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
@@ -19,7 +18,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "../sanity.hpp"
+#include "../sanity.hpp"
namespace tmwa
@@ -56,5 +55,3 @@ struct magic_conf_t;
struct component_t;
struct effect_set_t;
} // namespace tmwa
-
-#endif // TMWA_MAP_FWD_HPP
diff --git a/src/map/grfio.hpp b/src/map/grfio.hpp
index 002d475..d2ab058 100644
--- a/src/map/grfio.hpp
+++ b/src/map/grfio.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_GRFIO_HPP
-#define TMWA_MAP_GRFIO_HPP
+#pragma once
// grfio.hpp - Don't read GRF files, just name-map .wlk files.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,15 +20,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include <vector>
+#include <vector>
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
namespace tmwa
@@ -41,5 +40,3 @@ bool load_resnametable(ZString filename);
/// Currently there is exactly one .wlk per .gat, but multiples are fine.
std::vector<uint8_t> grfio_reads(MapName resourcename);
} // namespace tmwa
-
-#endif // TMWA_MAP_GRFIO_HPP
diff --git a/src/map/intif.hpp b/src/map/intif.hpp
index 0e23a94..5be61a9 100644
--- a/src/map/intif.hpp
+++ b/src/map/intif.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_INTIF_HPP
-#define TMWA_MAP_INTIF_HPP
+#pragma once
// intif.hpp - Network interface to the internal server.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,15 +20,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/fwd.hpp"
+#include "../net/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
namespace tmwa
@@ -57,5 +56,3 @@ void intif_party_changemap(dumb_ptr<map_session_data> sd, int online);
void intif_party_message(PartyId party_id, AccountId account_id, XString mes);
void intif_party_checkconflict(PartyId party_id, AccountId account_id, CharName nick);
} // namespace tmwa
-
-#endif // TMWA_MAP_INTIF_HPP
diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp
index a6d4104..25b4dad 100644
--- a/src/map/itemdb.hpp
+++ b/src/map/itemdb.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_ITEMDB_HPP
-#define TMWA_MAP_ITEMDB_HPP
+#pragma once
// itemdb.hpp - Item definitions.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,13 +20,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../mmo/ids.hpp"
-# include "../mmo/mmo.hpp"
+#include "../mmo/ids.hpp"
+#include "../mmo/mmo.hpp"
-# include "map.t.hpp"
-# include "script.hpp"
+#include "map.t.hpp"
+#include "script.hpp"
namespace tmwa
@@ -106,5 +105,3 @@ void itemdb_reload(void);
void do_final_itemdb(void);
bool itemdb_readdb(ZString filename);
} // namespace tmwa
-
-#endif // TMWA_MAP_ITEMDB_HPP
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp
index 82cde5c..a291fcd 100644
--- a/src/map/magic-expr-eval.hpp
+++ b/src/map/magic-expr-eval.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_EXPR_EVAL_HPP
-#define TMWA_MAP_MAGIC_EXPR_EVAL_HPP
+#pragma once
// magic-expr-eval.hpp - Utilities for evaluating magic.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,42 +19,40 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/zstring.hpp"
+#include "../strings/zstring.hpp"
-# include "magic-interpreter.t.hpp"
+#include "magic-interpreter.t.hpp"
namespace tmwa
{
// TODO kill this like I killed VAR
-# define ARGINT(x) args[x].v.v_int
-# define ARGDIR(x) args[x].v.v_dir
-# define ARGSTR(x) ZString(args[x].v.v_string)
-# define ARGENTITY(x) args[x].v.v_entity
-# define ARGLOCATION(x) args[x].v.v_location
-# define ARGAREA(x) args[x].v.v_area
-# define ARGSPELL(x) args[x].v.v_spell
-# define ARGINVOCATION(x) args[x].v.v_invocation
-
-# define RESULTINT result->v.v_int
-# define RESULTDIR result->v.v_dir
-# define RESULTSTR result->v.v_string
-# define RESULTENTITY result->v.v_entity
-# define RESULTLOCATION result->v.v_location
-# define RESULTAREA result->v.v_area
-# define RESULTSPELL result->v.v_spell
-# define RESULTINVOCATION result->v.v_invocation
-
-# define ARG_TYPE(x) args[x].ty
-# define ENTITY_TYPE(x) ARGENTITY(x)->bl_type
-
-# define ARGPC(x) (ARGENTITY(x)->is_player())
-# define ARGNPC(x) (ARGENTITY(x)->is_npc())
-# define ARGMOB(x) (ARGENTITY(x)->is_mob())
-
-# define ARG_MAY_BE_AREA(x) (ARG_TYPE(x) == TYPE::AREA || ARG_TYPE(x) == TYPE::LOCATION)
+#define ARGINT(x) args[x].v.v_int
+#define ARGDIR(x) args[x].v.v_dir
+#define ARGSTR(x) ZString(args[x].v.v_string)
+#define ARGENTITY(x) args[x].v.v_entity
+#define ARGLOCATION(x) args[x].v.v_location
+#define ARGAREA(x) args[x].v.v_area
+#define ARGSPELL(x) args[x].v.v_spell
+#define ARGINVOCATION(x) args[x].v.v_invocation
+
+#define RESULTINT result->v.v_int
+#define RESULTDIR result->v.v_dir
+#define RESULTSTR result->v.v_string
+#define RESULTENTITY result->v.v_entity
+#define RESULTLOCATION result->v.v_location
+#define RESULTAREA result->v.v_area
+#define RESULTSPELL result->v.v_spell
+#define RESULTINVOCATION result->v.v_invocation
+
+#define ARG_TYPE(x) args[x].ty
+#define ENTITY_TYPE(x) ARGENTITY(x)->bl_type
+
+#define ARGPC(x) (ARGENTITY(x)->is_player())
+#define ARGNPC(x) (ARGENTITY(x)->is_npc())
+#define ARGMOB(x) (ARGENTITY(x)->is_mob())
+
+#define ARG_MAY_BE_AREA(x) (ARG_TYPE(x) == TYPE::AREA || ARG_TYPE(x) == TYPE::LOCATION)
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_EXPR_EVAL_HPP
diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp
index 4bf43e8..e582a66 100644
--- a/src/map/magic-expr.hpp
+++ b/src/map/magic-expr.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_EXPR_HPP
-#define TMWA_MAP_MAGIC_EXPR_HPP
+#pragma once
// magic-expr.hpp - Pure functions for the old magic backend.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,18 +19,18 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../range/fwd.hpp"
+#include "../range/fwd.hpp"
-# include "../strings/zstring.hpp"
-# include "../strings/literal.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/literal.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
-# include "magic-interpreter.t.hpp"
+#include "magic-interpreter.t.hpp"
namespace tmwa
@@ -90,7 +89,7 @@ void magic_random_location(location_t *dest, dumb_ptr<area_t> area);
// ret -1: not a string, ret 1: no such item, ret 0: OK
int magic_find_item(Slice<val_t> args, int index, Item *item, int *stackable);
-# define GET_ARG_ITEM(index, dest, stackable) \
+#define GET_ARG_ITEM(index, dest, stackable) \
switch (magic_find_item(args, index, &dest, &stackable)) \
{ \
case -1: return 1; \
@@ -108,5 +107,3 @@ int magic_signature_check(ZString opname, ZString funname, ZString signature,
void magic_area_rect(map_local **m, int *x, int *y, int *width, int *height,
area_t& area);
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_EXPR_HPP
diff --git a/src/map/magic-interpreter-base.hpp b/src/map/magic-interpreter-base.hpp
index 2f10e72..57dde85 100644
--- a/src/map/magic-interpreter-base.hpp
+++ b/src/map/magic-interpreter-base.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
-#define TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
+#pragma once
// magic-interpreter-base.hpp - Core of the old magic system.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,13 +19,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
namespace tmwa
@@ -86,5 +85,3 @@ dumb_ptr<spell_t> magic_find_spell(XString invocation);
void spell_update_location(dumb_ptr<invocation> invocation);
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp
index 9b6025c..c9b6c97 100644
--- a/src/map/magic-interpreter.hpp
+++ b/src/map/magic-interpreter.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_INTERPRETER_HPP
-#define TMWA_MAP_MAGIC_INTERPRETER_HPP
+#pragma once
// magic-interpreter.hpp - Old magic.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,27 +19,27 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "magic-interpreter.t.hpp"
+#include "magic-interpreter.t.hpp"
-# include <cassert>
+#include <cassert>
-# include <memory>
+#include <memory>
-# include "../strings/fwd.hpp"
-# include "../strings/rstring.hpp"
+#include "../strings/fwd.hpp"
+#include "../strings/rstring.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/timer.t.hpp"
+#include "../net/timer.t.hpp"
-# include "../mmo/ids.hpp"
-# include "../mmo/utils.hpp"
+#include "../mmo/ids.hpp"
+#include "../mmo/utils.hpp"
-# include "map.hpp"
-# include "script.hpp"
-# include "skill.t.hpp"
+#include "map.hpp"
+#include "script.hpp"
+#include "skill.t.hpp"
namespace tmwa
@@ -105,7 +104,7 @@ struct val_t
/* Expressions */
/* ----------- */
-# define MAX_ARGS 7 /* Max. # of args used in builtin primitive functions */
+#define MAX_ARGS 7 /* Max. # of args used in builtin primitive functions */
struct e_location_t
{
@@ -311,15 +310,15 @@ struct magic_conf_t
/* Execution environment */
// these are not an enum they're a nasty intern hack
-# define VAR_MIN_CASTTIME 0
-# define VAR_OBSCURE_CHANCE 1
-# define VAR_CASTER 2
-# define VAR_SPELLPOWER 3
-# define VAR_SPELL 4
-# define VAR_INVOCATION 5
-# define VAR_TARGET 6
-# define VAR_SCRIPTTARGET 7
-# define VAR_LOCATION 8
+#define VAR_MIN_CASTTIME 0
+#define VAR_OBSCURE_CHANCE 1
+#define VAR_CASTER 2
+#define VAR_SPELLPOWER 3
+#define VAR_SPELL 4
+#define VAR_INVOCATION 5
+#define VAR_TARGET 6
+#define VAR_SCRIPTTARGET 7
+#define VAR_LOCATION 8
struct env_t
{
@@ -337,7 +336,7 @@ struct env_t
};
-# define MAX_STACK_SIZE 32
+#define MAX_STACK_SIZE 32
struct cont_activation_record_t
{
@@ -428,5 +427,3 @@ struct proc_t
{}
};
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_INTERPRETER_HPP
diff --git a/src/map/magic-interpreter.t.hpp b/src/map/magic-interpreter.t.hpp
index addaf18..6c7ff81 100644
--- a/src/map/magic-interpreter.t.hpp
+++ b/src/map/magic-interpreter.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_INTERPRETER_T_HPP
-#define TMWA_MAP_MAGIC_INTERPRETER_T_HPP
+#pragma once
// magic-interpreter.t.hpp - Old magic.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,9 +19,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../generic/enum.hpp"
+#include "../generic/enum.hpp"
namespace tmwa
@@ -148,5 +147,3 @@ ENUM_BITWISE_OPERATORS(INVOCATION_FLAG)
}
using e::INVOCATION_FLAG;
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_INTERPRETER_T_HPP
diff --git a/src/map/magic-stmt.hpp b/src/map/magic-stmt.hpp
index 3050350..729562e 100644
--- a/src/map/magic-stmt.hpp
+++ b/src/map/magic-stmt.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_STMT_HPP
-#define TMWA_MAP_MAGIC_STMT_HPP
+#pragma once
// magic-stmt.hpp - Imperative commands for the magic backend.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,15 +19,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../range/fwd.hpp"
+#include "../range/fwd.hpp"
-# include "../strings/zstring.hpp"
+#include "../strings/zstring.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "skill.t.hpp"
+#include "skill.t.hpp"
namespace tmwa
@@ -90,5 +89,3 @@ int spell_attack(BlockId caster, BlockId target);
void spell_free_invocation(dumb_ptr<invocation> invocation);
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_STMT_HPP
diff --git a/src/map/magic-v2.hpp b/src/map/magic-v2.hpp
index 9c357bc..07d467e 100644
--- a/src/map/magic-v2.hpp
+++ b/src/map/magic-v2.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_V2_HPP
-#define TMWA_MAP_MAGIC_V2_HPP
+#pragma once
// magic-v2.hpp - second generation magic parser
//
// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
@@ -19,9 +18,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/zstring.hpp"
+#include "../strings/zstring.hpp"
namespace tmwa
@@ -30,5 +29,3 @@ bool magic_init0();
// must be called after itemdb initialization
bool load_magic_file_v2(ZString filename);
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_V2_HPP
diff --git a/src/map/magic.hpp b/src/map/magic.hpp
index 4df204f..e06e913 100644
--- a/src/map/magic.hpp
+++ b/src/map/magic.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAGIC_HPP
-#define TMWA_MAP_MAGIC_HPP
+#pragma once
// magic.hpp - Entry to the magic system.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,14 +19,14 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "map.t.hpp"
-# include "skill.t.hpp"
+#include "map.t.hpp"
+#include "skill.t.hpp"
namespace tmwa
@@ -45,5 +44,3 @@ namespace tmwa
*/
int magic_message(dumb_ptr<map_session_data> caster, XString source_invocation);
} // namespace tmwa
-
-#endif // TMWA_MAP_MAGIC_HPP
diff --git a/src/map/map.hpp b/src/map/map.hpp
index af08ae4..e9a37b6 100644
--- a/src/map/map.hpp
+++ b/src/map/map.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAP_HPP
-#define TMWA_MAP_MAP_HPP
+#pragma once
// map.hpp - Core of the map server.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,43 +20,43 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "map.t.hpp"
+#include "map.t.hpp"
-# include <chrono>
-# include <functional>
-# include <list>
+#include <chrono>
+#include <functional>
+#include <list>
-# include "../ints/udl.hpp"
+#include "../ints/udl.hpp"
-# include "../strings/fwd.hpp"
-# include "../strings/rstring.hpp"
-# include "../strings/astring.hpp"
-# include "../strings/vstring.hpp"
+#include "../strings/fwd.hpp"
+#include "../strings/rstring.hpp"
+#include "../strings/astring.hpp"
+#include "../strings/vstring.hpp"
-# include "../generic/db.hpp"
-# include "../generic/dumb_ptr.hpp"
-# include "../generic/matrix.hpp"
+#include "../generic/db.hpp"
+#include "../generic/dumb_ptr.hpp"
+#include "../generic/matrix.hpp"
-# include "../net/socket.hpp"
-# include "../net/timer.t.hpp"
+#include "../net/socket.hpp"
+#include "../net/timer.t.hpp"
-# include "../mmo/utils.hpp"
+#include "../mmo/utils.hpp"
-# include "battle.t.hpp"
-# include "clif.t.hpp"
-# include "mapflag.hpp"
-# include "mob.t.hpp"
-# include "script.hpp" // change to script.t.hpp
-# include "skill.t.hpp"
+#include "battle.t.hpp"
+#include "clif.t.hpp"
+#include "mapflag.hpp"
+#include "mob.t.hpp"
+#include "script.hpp" // change to script.t.hpp
+#include "skill.t.hpp"
namespace tmwa
{
constexpr int MAX_NPC_PER_MAP = 512;
constexpr int BLOCK_SIZE = 8;
-# define AREA_SIZE battle_config.area_size
+#define AREA_SIZE battle_config.area_size
constexpr std::chrono::seconds LIFETIME_FLOORITEM = std::chrono::minutes(1);
constexpr int MAX_SKILL_LEVEL = 100;
constexpr int MAX_EVENTTIMER = 32;
@@ -608,10 +607,10 @@ void map_quit(dumb_ptr<map_session_data>);
int map_addnpc(map_local *, dumb_ptr<npc_data>);
void map_log(XString line);
-# define MAP_LOG(format, ...) \
+#define MAP_LOG(format, ...) \
map_log(STRPRINTF(format, ## __VA_ARGS__))
-# define MAP_LOG_PC(sd, fmt, ...) \
+#define MAP_LOG_PC(sd, fmt, ...) \
MAP_LOG("PC%d %s:%d,%d " fmt, \
sd->status_key.char_id, (sd->bl_m ? sd->bl_m->name_ : stringish<MapName>("undefined.gat"_s)), sd->bl_x, sd->bl_y, ## __VA_ARGS__)
@@ -724,5 +723,3 @@ inline dumb_ptr<npc_data_shop> npc_data::is_shop() { return npc_subtype == NpcSu
inline dumb_ptr<npc_data_warp> npc_data::is_warp() { return npc_subtype == NpcSubtype::WARP ? as_warp() : nullptr ; }
inline dumb_ptr<npc_data_message> npc_data::is_message() { return npc_subtype == NpcSubtype::MESSAGE ? as_message() : nullptr ; }
} // namespace tmwa
-
-#endif // TMWA_MAP_MAP_HPP
diff --git a/src/map/map.t.hpp b/src/map/map.t.hpp
index 79e9448..b475f9b 100644
--- a/src/map/map.t.hpp
+++ b/src/map/map.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAP_T_HPP
-#define TMWA_MAP_MAP_T_HPP
+#pragma once
// map.t.hpp - Core of the map server.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,16 +20,16 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include "../strings/vstring.hpp"
+#include "../strings/vstring.hpp"
-# include "../generic/enum.hpp"
+#include "../generic/enum.hpp"
-# include "../mmo/ids.hpp"
-# include "../mmo/mmo.hpp"
+#include "../mmo/ids.hpp"
+#include "../mmo/mmo.hpp"
namespace tmwa
@@ -202,5 +201,3 @@ BlockId account_to_block(AccountId a) { return wrap<BlockId>(unwrap<AccountId>(a
inline
AccountId block_to_account(BlockId b) { return wrap<AccountId>(unwrap<BlockId>(b)); }
} // namespace tmwa
-
-#endif // TMWA_MAP_MAP_T_HPP
diff --git a/src/map/mapflag.hpp b/src/map/mapflag.hpp
index 1f42bc9..197d250 100644
--- a/src/map/mapflag.hpp
+++ b/src/map/mapflag.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MAPFLAG_HPP
-#define TMWA_MAP_MAPFLAG_HPP
+#pragma once
// mapflag.hpp - booleans that apply to an entire map
//
// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
@@ -19,11 +18,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include "../mmo/extract.hpp" // TODO remove this (requires specializing the *other* half)
+#include "../mmo/extract.hpp" // TODO remove this (requires specializing the *other* half)
namespace tmwa
@@ -83,5 +82,3 @@ bool extract<MapFlag, void, void>(XString str, MapFlag *mf);
MapFlag map_flag_from_int(int shift);
} // namespace tmwa
-
-#endif // TMWA_MAP_MAPFLAG_HPP
diff --git a/src/map/mob.hpp b/src/map/mob.hpp
index 87b7d3f..d0cc07a 100644
--- a/src/map/mob.hpp
+++ b/src/map/mob.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MOB_HPP
-#define TMWA_MAP_MOB_HPP
+#pragma once
// mob.hpp - Really scary code.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,27 +20,27 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "mob.t.hpp"
+#include "mob.t.hpp"
-# include "../generic/fwd.hpp"
-# include "../generic/enum.hpp"
-# include "../generic/random.t.hpp"
+#include "../generic/fwd.hpp"
+#include "../generic/enum.hpp"
+#include "../generic/random.t.hpp"
-# include "../net/timer.t.hpp"
+#include "../net/timer.t.hpp"
-# include "battle.t.hpp"
-# include "clif.t.hpp"
-# include "map.hpp"
-# include "skill.t.hpp"
+#include "battle.t.hpp"
+#include "clif.t.hpp"
+#include "map.hpp"
+#include "skill.t.hpp"
namespace tmwa
{
-# define ENGLISH_NAME stringish<MobName>("--en--"_s)
-# define JAPANESE_NAME stringish<MobName>("--ja--"_s)
-# define MOB_THIS_MAP stringish<MapName>("this"_s)
+#define ENGLISH_NAME stringish<MobName>("--en--"_s)
+#define JAPANESE_NAME stringish<MobName>("--ja--"_s)
+#define MOB_THIS_MAP stringish<MapName>("this"_s)
struct mob_skill
{
@@ -138,5 +137,3 @@ int mob_summonslave(dumb_ptr<mob_data> md2, int *value, int amount, int flag);
void mob_reload(void);
} // namespace tmwa
-
-#endif // TMWA_MAP_MOB_HPP
diff --git a/src/map/mob.t.hpp b/src/map/mob.t.hpp
index b96fb09..160a8a3 100644
--- a/src/map/mob.t.hpp
+++ b/src/map/mob.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_MOB_T_HPP
-#define TMWA_MAP_MOB_T_HPP
+#pragma once
// mob.t.hpp - Really scary code.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,9 +20,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
namespace tmwa
@@ -63,5 +62,3 @@ enum class MobSkillState : uint8_t
MSS_CHASE,
};
} // namespace tmwa
-
-#endif // TMWA_MAP_MOB_T_HPP
diff --git a/src/map/npc.hpp b/src/map/npc.hpp
index d6d3b62..33dd378 100644
--- a/src/map/npc.hpp
+++ b/src/map/npc.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_NPC_HPP
-#define TMWA_MAP_NPC_HPP
+#pragma once
// npc.hpp - Noncombatants.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,19 +20,19 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../net/timer.t.hpp"
+#include "../net/timer.t.hpp"
-# include "../proto2/fwd.hpp"
+#include "../proto2/fwd.hpp"
-# include "map.hpp"
+#include "map.hpp"
namespace tmwa
@@ -100,5 +99,3 @@ interval_t npc_gettimerevent_tick(dumb_ptr<npc_data_script> nd);
void npc_settimerevent_tick(dumb_ptr<npc_data_script> nd, interval_t newtimer);
int npc_delete(dumb_ptr<npc_data> nd);
} // namespace tmwa
-
-#endif // TMWA_MAP_NPC_HPP
diff --git a/src/map/party.hpp b/src/map/party.hpp
index b1c1092..01a8125 100644
--- a/src/map/party.hpp
+++ b/src/map/party.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_PARTY_HPP
-#define TMWA_MAP_PARTY_HPP
+#pragma once
// party.hpp - Small groups of temporary allies.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,15 +20,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <functional>
+#include <functional>
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
namespace tmwa
@@ -71,5 +70,3 @@ int party_exp_share(PartyPair p, map_local *map, int base_exp, int job_exp);
void party_foreachsamemap(std::function<void(dumb_ptr<block_list>)> func,
dumb_ptr<map_session_data> sd, int type);
} // namespace tmwa
-
-#endif // TMWA_MAP_PARTY_HPP
diff --git a/src/map/path.hpp b/src/map/path.hpp
index 019a987..3619e2e 100644
--- a/src/map/path.hpp
+++ b/src/map/path.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_PATH_HPP
-#define TMWA_MAP_PATH_HPP
+#pragma once
// path.hpp - Pathfinding system.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,12 +20,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
namespace tmwa
{
int path_search(struct walkpath_data *, map_local *, int, int, int, int, int);
} // namespace tmwa
-
-#endif // TMWA_MAP_PATH_HPP
diff --git a/src/map/pc.hpp b/src/map/pc.hpp
index d40353b..3187cd9 100644
--- a/src/map/pc.hpp
+++ b/src/map/pc.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_PC_HPP
-#define TMWA_MAP_PC_HPP
+#pragma once
// pc.hpp - Player state changes.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,20 +20,20 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "pc.t.hpp"
+#include "pc.t.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/dumb_ptr.hpp"
+#include "../generic/dumb_ptr.hpp"
-# include "../mmo/utils.hpp"
+#include "../mmo/utils.hpp"
-# include "../proto2/fwd.hpp"
+#include "../proto2/fwd.hpp"
-# include "clif.t.hpp"
-# include "map.hpp"
+#include "clif.t.hpp"
+#include "map.hpp"
namespace tmwa
@@ -186,5 +185,3 @@ void pc_show_motd(dumb_ptr<map_session_data> sd);
void do_init_pc(void);
} // namespace tmwa
-
-#endif // TMWA_MAP_PC_HPP
diff --git a/src/map/pc.t.hpp b/src/map/pc.t.hpp
index ec882ab..427e8c3 100644
--- a/src/map/pc.t.hpp
+++ b/src/map/pc.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_PC_T_HPP
-#define TMWA_MAP_PC_T_HPP
+#pragma once
// pc.t.hpp - Player state changes.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -22,9 +21,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
namespace tmwa
@@ -56,5 +55,3 @@ enum class CalcStatus
LATER,
};
} // namespace tmwa
-
-#endif // TMWA_MAP_PC_T_HPP
diff --git a/src/map/script.hpp b/src/map/script.hpp
index 4d6e8df..ee9a5a9 100644
--- a/src/map/script.hpp
+++ b/src/map/script.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_SCRIPT_HPP
-#define TMWA_MAP_SCRIPT_HPP
+#pragma once
// script.hpp - EAthena script frontend, engine, and library.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,23 +20,23 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include <vector>
+#include <vector>
-# include "../range/slice.hpp"
+#include "../range/slice.hpp"
-# include "../strings/zstring.hpp"
+#include "../strings/zstring.hpp"
-# include "../generic/db.hpp"
-# include "../generic/dumb_ptr.hpp"
+#include "../generic/db.hpp"
+#include "../generic/dumb_ptr.hpp"
-# include "../mmo/ids.hpp"
+#include "../mmo/ids.hpp"
-# include "clif.t.hpp"
-# include "map.t.hpp"
+#include "clif.t.hpp"
+#include "map.t.hpp"
namespace tmwa
@@ -201,5 +200,3 @@ void set_script_var_s(dumb_ptr<map_session_data> sd, VarName var, int e, XString
int get_script_var_i(dumb_ptr<map_session_data> sd, VarName var, int e);
ZString get_script_var_s(dumb_ptr<map_session_data> sd, VarName var, int e);
} // namespace tmwa
-
-#endif // TMWA_MAP_SCRIPT_HPP
diff --git a/src/map/skill-pools.hpp b/src/map/skill-pools.hpp
index d75d344..c8890e8 100644
--- a/src/map/skill-pools.hpp
+++ b/src/map/skill-pools.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_SKILL_POOLS_HPP
-#define TMWA_MAP_SKILL_POOLS_HPP
+#pragma once
// skill-pools.hpp - dummy header to make Make dependencies work.
//
// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
@@ -19,11 +18,9 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
namespace tmwa
{
} // namespace tmwa
-
-#endif // TMWA_MAP_SKILL_POOLS_HPP
diff --git a/src/map/skill.hpp b/src/map/skill.hpp
index bdaf184..ec353ce 100644
--- a/src/map/skill.hpp
+++ b/src/map/skill.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_SKILL_HPP
-#define TMWA_MAP_SKILL_HPP
+#pragma once
// skill.hpp - Old-style skills.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,19 +20,19 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "skill.t.hpp"
-# include "skill-pools.hpp"
+#include "skill.t.hpp"
+#include "skill-pools.hpp"
-# include "../strings/fwd.hpp"
-# include "../strings/rstring.hpp"
-# include "../strings/literal.hpp"
+#include "../strings/fwd.hpp"
+#include "../strings/rstring.hpp"
+#include "../strings/literal.hpp"
-# include "../generic/fwd.hpp"
-# include "../generic/array.hpp"
+#include "../generic/fwd.hpp"
+#include "../generic/array.hpp"
-# include "map.hpp"
+#include "map.hpp"
namespace tmwa
@@ -168,5 +167,3 @@ int skill_power_bl(dumb_ptr<block_list> bl, SkillID skill);
// [Fate] Remember that a certain skill ID belongs to a pool skill
void skill_pool_register(SkillID id);
} // namespace tmwa
-
-#endif // TMWA_MAP_SKILL_HPP
diff --git a/src/map/skill.t.hpp b/src/map/skill.t.hpp
index 014080b..d0e3926 100644
--- a/src/map/skill.t.hpp
+++ b/src/map/skill.t.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_SKILL_T_HPP
-#define TMWA_MAP_SKILL_T_HPP
+#pragma once
// skill.t.hpp - Old-style skills.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,11 +20,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include <cstdint>
+#include <cstdint>
-# include "../generic/enum.hpp"
+#include "../generic/enum.hpp"
namespace tmwa
@@ -135,5 +134,3 @@ ENUM_BITWISE_OPERATORS(SkillFlags)
}
using e::SkillFlags;
} // namespace tmwa
-
-#endif // TMWA_MAP_SKILL_T_HPP
diff --git a/src/map/storage.hpp b/src/map/storage.hpp
index cb9cbc5..f3875c8 100644
--- a/src/map/storage.hpp
+++ b/src/map/storage.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_STORAGE_HPP
-#define TMWA_MAP_STORAGE_HPP
+#pragma once
// storage.hpp - Storage handling.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,13 +20,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "../mmo/fwd.hpp"
+#include "../mmo/fwd.hpp"
-# include "clif.t.hpp"
+#include "clif.t.hpp"
namespace tmwa
@@ -43,5 +42,3 @@ int storage_storage_quit(dumb_ptr<map_session_data> sd);
int storage_storage_save(AccountId account_id, int final);
int storage_storage_saved(AccountId account_id);
} // namespace tmwa
-
-#endif // TMWA_MAP_STORAGE_HPP
diff --git a/src/map/tmw.hpp b/src/map/tmw.hpp
index 610c80c..ffd6f7f 100644
--- a/src/map/tmw.hpp
+++ b/src/map/tmw.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_TMW_HPP
-#define TMWA_MAP_TMW_HPP
+#pragma once
// tmw.hpp - Some random functions added by TMW.
//
// Copyright © 2004-2011 The Mana World Development Team
@@ -20,11 +19,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../strings/fwd.hpp"
+#include "../strings/fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
namespace tmwa
@@ -32,5 +31,3 @@ namespace tmwa
int tmw_CheckChatSpam(dumb_ptr<map_session_data> sd, XString message);
void tmw_GmHackMsg(ZString line);
} // namespace tmwa
-
-#endif // TMWA_MAP_TMW_HPP
diff --git a/src/map/trade.hpp b/src/map/trade.hpp
index b9fce57..91ed954 100644
--- a/src/map/trade.hpp
+++ b/src/map/trade.hpp
@@ -1,5 +1,4 @@
-#ifndef TMWA_MAP_TRADE_HPP
-#define TMWA_MAP_TRADE_HPP
+#pragma once
// trade.hpp - Inter-player item and money transactions.
//
// Copyright © ????-2004 Athena Dev Teams
@@ -21,11 +20,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
-# include "fwd.hpp"
+#include "fwd.hpp"
-# include "../generic/fwd.hpp"
+#include "../generic/fwd.hpp"
-# include "clif.t.hpp"
+#include "clif.t.hpp"
namespace tmwa
@@ -38,5 +37,3 @@ void trade_tradecancel(dumb_ptr<map_session_data> sd);
void trade_tradecommit(dumb_ptr<map_session_data> sd);
void trade_verifyzeny(dumb_ptr<map_session_data> sd);
} // namespace tmwa
-
-#endif // TMWA_MAP_TRADE_HPP