diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-12-06 14:15:43 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-12-06 14:15:49 -0800 |
commit | 3eea219548e84efdbc3148ce378fcba865f97a01 (patch) | |
tree | 6ece594f60ddff038cf9c1d94b99d8d66a00bc20 /src/map | |
parent | 1458563f00deebbbcf3e8049dc90157fb825fae3 (diff) | |
download | tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.tar.gz tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.tar.bz2 tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.tar.xz tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.zip |
Add basic source formatting tools
Diffstat (limited to 'src/map')
34 files changed, 284 insertions, 284 deletions
diff --git a/src/map/atcommand.hpp b/src/map/atcommand.hpp index aca49e7..31f1432 100644 --- a/src/map/atcommand.hpp +++ b/src/map/atcommand.hpp @@ -1,11 +1,11 @@ #ifndef ATCOMMAND_HPP #define ATCOMMAND_HPP -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/const_array.hpp" +# include "../common/const_array.hpp" -#include "map.hpp" +# include "map.hpp" bool is_atcommand(const int fd, dumb_ptr<map_session_data> sd, ZString message, int gmlvl); diff --git a/src/map/battle.hpp b/src/map/battle.hpp index 2d9cd7f..02a32ad 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -1,15 +1,15 @@ #ifndef BATTLE_HPP #define BATTLE_HPP -#include "battle.t.hpp" +# include "battle.t.hpp" -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/timer.t.hpp" +# include "../common/timer.t.hpp" -#include "magic-interpreter.t.hpp" -#include "map.t.hpp" -#include "skill.t.hpp" +# include "magic-interpreter.t.hpp" +# include "map.t.hpp" +# include "skill.t.hpp" // ダメージ struct Damage diff --git a/src/map/battle.t.hpp b/src/map/battle.t.hpp index f730cc5..1242c85 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 -#include "../common/utils2.hpp" +# include "../common/utils2.hpp" namespace e { diff --git a/src/map/chrif.hpp b/src/map/chrif.hpp index db7ad0e..51c6d20 100644 --- a/src/map/chrif.hpp +++ b/src/map/chrif.hpp @@ -1,13 +1,13 @@ #ifndef CHRIF_HPP #define CHRIF_HPP -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/dumb_ptr.hpp" -#include "../common/human_time_diff.hpp" -#include "../common/ip.hpp" +# include "../common/dumb_ptr.hpp" +# include "../common/human_time_diff.hpp" +# include "../common/ip.hpp" -#include "map.hpp" +# include "map.hpp" void chrif_setuserid(AccountName); void chrif_setpasswd(AccountPass); diff --git a/src/map/clif.hpp b/src/map/clif.hpp index a605e73..bf7393c 100644 --- a/src/map/clif.hpp +++ b/src/map/clif.hpp @@ -1,20 +1,20 @@ #ifndef CLIF_HPP #define CLIF_HPP -#include "clif.t.hpp" +# include "clif.t.hpp" -#include <functional> +# include <functional> -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/const_array.hpp" -#include "../common/ip.hpp" -#include "../common/timer.t.hpp" +# include "../common/const_array.hpp" +# include "../common/ip.hpp" +# include "../common/timer.t.hpp" -#include "battle.t.hpp" -#include "map.hpp" -#include "pc.t.hpp" -#include "skill.t.hpp" +# include "battle.t.hpp" +# include "map.hpp" +# include "pc.t.hpp" +# include "skill.t.hpp" void clif_setip(IP4Address); void clif_setport(int); diff --git a/src/map/clif.t.hpp b/src/map/clif.t.hpp index 38394e9..96b8a9c 100644 --- a/src/map/clif.t.hpp +++ b/src/map/clif.t.hpp @@ -1,7 +1,7 @@ #ifndef CLIF_T_HPP #define CLIF_T_HPP -#include <cstdint> +# include <cstdint> enum class BeingRemoveWhy : uint8_t { diff --git a/src/map/grfio.hpp b/src/map/grfio.hpp index 599064d..17acfb6 100644 --- a/src/map/grfio.hpp +++ b/src/map/grfio.hpp @@ -1,11 +1,11 @@ #ifndef GRFIO_HPP #define GRFIO_HPP -#include <cstdint> +# include <cstdint> -#include <vector> +# include <vector> -#include "../common/mmo.hpp" +# include "../common/mmo.hpp" /// Load a resource into memory, subject to data/resnametable.txt. /// Normally, resourcename is xxx-y.gat and the file is xxx-y.wlk. diff --git a/src/map/intif.hpp b/src/map/intif.hpp index a3e1d17..244c230 100644 --- a/src/map/intif.hpp +++ b/src/map/intif.hpp @@ -1,11 +1,11 @@ #ifndef INTIF_HPP #define INTIF_HPP -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/const_array.hpp" +# include "../common/const_array.hpp" -#include "map.hpp" +# include "map.hpp" int intif_parse(int fd); diff --git a/src/map/itemdb.hpp b/src/map/itemdb.hpp index a08777e..e41be41 100644 --- a/src/map/itemdb.hpp +++ b/src/map/itemdb.hpp @@ -1,10 +1,10 @@ #ifndef ITEMDB_HPP #define ITEMDB_HPP -#include "../common/mmo.hpp" +# include "../common/mmo.hpp" -#include "map.t.hpp" -#include "script.hpp" +# include "map.t.hpp" +# include "script.hpp" struct item_data { diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp index a4a71f8..1569be8 100644 --- a/src/map/magic-expr-eval.hpp +++ b/src/map/magic-expr-eval.hpp @@ -1,11 +1,11 @@ #ifndef MAGIC_EXPR_EVAL_HPP #define MAGIC_EXPR_EVAL_HPP -#include "../strings/zstring.hpp" +# include "../strings/zstring.hpp" -#include "../common/utils2.hpp" +# include "../common/utils2.hpp" -#include "magic-interpreter.hpp" +# include "magic-interpreter.hpp" /* Helper definitions for dealing with functions and operations */ @@ -15,31 +15,31 @@ 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); -#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) #endif // MAGIC_EXPR_EVAL_HPP diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp index acdefc2..655da1b 100644 --- a/src/map/magic-expr.cpp +++ b/src/map/magic-expr.cpp @@ -613,12 +613,12 @@ int fun_his_shroud(dumb_ptr<env_t>, val_t *result, const_array<val_t> args) return 0; } -#define BATTLE_GETTER(name) \ -static \ -int fun_get_##name(dumb_ptr<env_t>, val_t *result, const_array<val_t> args) \ -{ \ - RESULTINT = battle_get_##name(ARGENTITY(0)); \ - return 0; \ +#define BATTLE_GETTER(name) \ +static \ +int fun_get_##name(dumb_ptr<env_t>, val_t *result, const_array<val_t> args) \ +{ \ + RESULTINT = battle_get_##name(ARGENTITY(0)); \ + return 0; \ } BATTLE_GETTER(str) @@ -639,15 +639,15 @@ int fun_get_dir(dumb_ptr<env_t>, val_t *result, const_array<val_t> args) return 0; } -#define MMO_GETTER(name) \ -static \ -int fun_get_##name(dumb_ptr<env_t>, val_t *result, const_array<val_t> args) \ -{ \ - if (ENTITY_TYPE(0) == BL::PC) \ - RESULTINT = ARGPC(0)->status.name; \ - else \ - RESULTINT = 0; \ - return 0; \ +#define MMO_GETTER(name) \ +static \ +int fun_get_##name(dumb_ptr<env_t>, val_t *result, const_array<val_t> args) \ +{ \ + if (ENTITY_TYPE(0) == BL::PC) \ + RESULTINT = ARGPC(0)->status.name; \ + else \ + RESULTINT = 0; \ + return 0; \ } MMO_GETTER(sp) diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp index 0d1bd4f..7601bef 100644 --- a/src/map/magic-expr.hpp +++ b/src/map/magic-expr.hpp @@ -1,10 +1,10 @@ #ifndef MAGIC_EXPR_HPP #define MAGIC_EXPR_HPP -#include "magic-interpreter.hpp" +# include "magic-interpreter.hpp" -#include "../strings/fwd.hpp" -#include "../strings/zstring.hpp" +# include "../strings/fwd.hpp" +# include "../strings/zstring.hpp" /* * Argument types: @@ -74,7 +74,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(const_array<val_t> args, int index, struct 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; \ diff --git a/src/map/magic-interpreter-aux.hpp b/src/map/magic-interpreter-aux.hpp index 2ff597f..070c771 100644 --- a/src/map/magic-interpreter-aux.hpp +++ b/src/map/magic-interpreter-aux.hpp @@ -1,7 +1,7 @@ #ifndef MAGIC_INTERPRETER_AUX_HPP #define MAGIC_INTERPRETER_AUX_HPP -#include "magic-interpreter.t.hpp" +# include "magic-interpreter.t.hpp" template<class T> bool CHECK_TYPE(T *v, TYPE t) diff --git a/src/map/magic-interpreter-lexer.lpp b/src/map/magic-interpreter-lexer.lpp index 2b68acf..3625ee3 100644 --- a/src/map/magic-interpreter-lexer.lpp +++ b/src/map/magic-interpreter-lexer.lpp @@ -1,6 +1,6 @@ %{ #include "magic-interpreter-lexer.hpp" -# + #include "magic-interpreter-parser.hpp" #include "../io/cxxstdio.hpp" diff --git a/src/map/magic-interpreter-parser.ypp b/src/map/magic-interpreter-parser.ypp index 0657ade..f067a8b 100644 --- a/src/map/magic-interpreter-parser.ypp +++ b/src/map/magic-interpreter-parser.ypp @@ -28,7 +28,7 @@ #pragma GCC diagnostic warning "-Wextra" #pragma GCC diagnostic warning "-Wformat" #ifndef __clang__ -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif static diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp index a0abe7a..8afb8af 100644 --- a/src/map/magic-interpreter.hpp +++ b/src/map/magic-interpreter.hpp @@ -1,17 +1,17 @@ #ifndef MAGIC_INTERPRETER_HPP #define MAGIC_INTERPRETER_HPP -#include "magic-interpreter.t.hpp" +# include "magic-interpreter.t.hpp" -#include <cassert> +# include <cassert> -#include "../strings/fwd.hpp" -#include "../strings/fstring.hpp" +# include "../strings/fwd.hpp" +# include "../strings/fstring.hpp" -#include "magic.hpp" -#include "map.hpp" -#include "script.hpp" -#include "skill.t.hpp" +# include "magic.hpp" +# include "map.hpp" +# include "script.hpp" +# include "skill.t.hpp" struct fun_t; struct op_t; @@ -82,7 +82,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 { @@ -288,15 +288,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 magic_config; @@ -316,7 +316,7 @@ struct env_t }; -#define MAX_STACK_SIZE 32 +# define MAX_STACK_SIZE 32 struct cont_activation_record_t { diff --git a/src/map/magic-interpreter.t.hpp b/src/map/magic-interpreter.t.hpp index d5aa5e5..fb7bb6d 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 -#include "../common/utils2.hpp" +# include "../common/utils2.hpp" enum class SPELLARG : uint8_t { diff --git a/src/map/magic.hpp b/src/map/magic.hpp index 84e3387..79e2a84 100644 --- a/src/map/magic.hpp +++ b/src/map/magic.hpp @@ -1,14 +1,14 @@ #ifndef MAGIC_HPP #define MAGIC_HPP -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/dumb_ptr.hpp" +# include "../common/dumb_ptr.hpp" -#include "map.hpp" -#include "skill.t.hpp" +# include "map.hpp" +# include "skill.t.hpp" -#define MAGIC_CONFIG_FILE "conf/magic.conf" +# define MAGIC_CONFIG_FILE "conf/magic.conf" struct invocation; /* Spell invocation */ diff --git a/src/map/map.hpp b/src/map/map.hpp index 7eeaa8c..882fde6 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -1,33 +1,33 @@ #ifndef MAP_HPP #define MAP_HPP -#include "map.t.hpp" +# include "map.t.hpp" -#include <netinet/in.h> +# include <netinet/in.h> -#include <functional> -#include <list> +# include <functional> +# include <list> -#include "../strings/fwd.hpp" -#include "../strings/fstring.hpp" -#include "../strings/vstring.hpp" +# include "../strings/fwd.hpp" +# include "../strings/fstring.hpp" +# include "../strings/vstring.hpp" -#include "../io/cxxstdio.hpp" +# include "../io/cxxstdio.hpp" -#include "../common/db.hpp" -#include "../common/matrix.hpp" -#include "../common/socket.hpp" -#include "../common/timer.t.hpp" +# include "../common/db.hpp" +# include "../common/matrix.hpp" +# include "../common/socket.hpp" +# include "../common/timer.t.hpp" -#include "battle.t.hpp" -#include "magic-interpreter.t.hpp" -#include "mob.t.hpp" -#include "script.hpp" // change to script.t.hpp -#include "skill.t.hpp" +# include "battle.t.hpp" +# include "magic-interpreter.t.hpp" +# include "mob.t.hpp" +# include "script.hpp" // change to script.t.hpp +# include "skill.t.hpp" 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; @@ -625,10 +625,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.char_id, (sd->bl_m ? sd->bl_m->name_ : stringish<MapName>("undefined.gat")), sd->bl_x, sd->bl_y, ## __VA_ARGS__) diff --git a/src/map/map.t.hpp b/src/map/map.t.hpp index 2255f60..f4d916a 100644 --- a/src/map/map.t.hpp +++ b/src/map/map.t.hpp @@ -1,10 +1,10 @@ #ifndef MAP_T_HPP #define MAP_T_HPP -#include "../strings/vstring.hpp" +# include "../strings/vstring.hpp" -#include "../common/mmo.hpp" -#include "../common/utils2.hpp" +# include "../common/mmo.hpp" +# include "../common/utils2.hpp" namespace e { @@ -137,9 +137,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, @@ -224,12 +224,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, @@ -238,154 +238,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 diff --git a/src/map/mob.hpp b/src/map/mob.hpp index 2ed4018..b0445de 100644 --- a/src/map/mob.hpp +++ b/src/map/mob.hpp @@ -1,19 +1,19 @@ #ifndef MOB_HPP #define MOB_HPP -#include "mob.t.hpp" +# include "mob.t.hpp" -#include "../common/mmo.hpp" -#include "../common/timer.t.hpp" -#include "../common/random.t.hpp" +# include "../common/mmo.hpp" +# include "../common/timer.t.hpp" +# include "../common/random.t.hpp" -#include "clif.t.hpp" -#include "map.hpp" -#include "skill.t.hpp" +# include "clif.t.hpp" +# include "map.hpp" +# include "skill.t.hpp" -#define ENGLISH_NAME stringish<MobName>("--en--") -#define JAPANESE_NAME stringish<MobName>("--ja--") -#define MOB_THIS_MAP stringish<MapName>("this") +# define ENGLISH_NAME stringish<MobName>("--en--") +# define JAPANESE_NAME stringish<MobName>("--ja--") +# define MOB_THIS_MAP stringish<MapName>("this") struct mob_skill { diff --git a/src/map/mob.t.hpp b/src/map/mob.t.hpp index b112c69..54c326d 100644 --- a/src/map/mob.t.hpp +++ b/src/map/mob.t.hpp @@ -1,7 +1,7 @@ #ifndef MOB_T_HPP #define MOB_T_HPP -#include <cstdint> +# include <cstdint> enum class MobSkillTarget { diff --git a/src/map/npc.hpp b/src/map/npc.hpp index ee9ed91..0bc00ed 100644 --- a/src/map/npc.hpp +++ b/src/map/npc.hpp @@ -1,14 +1,14 @@ #ifndef NPC_HPP #define NPC_HPP -#include <cstddef> -#include <cstdint> +# include <cstddef> +# include <cstdint> -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/timer.t.hpp" +# include "../common/timer.t.hpp" -#include "map.hpp" +# include "map.hpp" constexpr int START_NPC_NUM = 110000000; diff --git a/src/map/party.hpp b/src/map/party.hpp index 5ad6c03..91dab1b 100644 --- a/src/map/party.hpp +++ b/src/map/party.hpp @@ -1,11 +1,11 @@ #ifndef PARTY_HPP #define PARTY_HPP -#include <functional> +# include <functional> -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "map.hpp" +# include "map.hpp" struct party; struct map_session_data; diff --git a/src/map/path.hpp b/src/map/path.hpp index 8dace6f..4b5b3d8 100644 --- a/src/map/path.hpp +++ b/src/map/path.hpp @@ -1,7 +1,7 @@ #ifndef PATH_HPP #define PATH_HPP -#include "map.hpp" +# include "map.hpp" int path_search(struct walkpath_data *, map_local *, int, int, int, int, int); diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 0b648d1..4cfa107 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -46,7 +46,7 @@ constexpr std::chrono::milliseconds PVP_CALCRANK_INTERVAL = constexpr int MAGIC_SKILL_THRESHOLD = 200; #endif -#define MAP_LOG_STATS(sd, suffix) \ +#define MAP_LOG_STATS(sd, suffix) \ MAP_LOG_PC(sd, "STAT %d %d %d %d %d %d " suffix, \ sd->status.attrs[ATTR::STR], \ sd->status.attrs[ATTR::AGI], \ @@ -55,20 +55,20 @@ constexpr int MAGIC_SKILL_THRESHOLD = 200; sd->status.attrs[ATTR::DEX], \ sd->status.attrs[ATTR::LUK]) -#define MAP_LOG_XP(sd, suffix) \ - MAP_LOG_PC(sd, "XP %d %d JOB %d %d %d ZENY %d + %d " suffix, \ - sd->status.base_level, sd->status.base_exp, \ - sd->status.job_level, sd->status.job_exp, sd->status.skill_point, \ +#define MAP_LOG_XP(sd, suffix) \ + MAP_LOG_PC(sd, "XP %d %d JOB %d %d %d ZENY %d + %d " suffix, \ + sd->status.base_level, sd->status.base_exp, \ + sd->status.job_level, sd->status.job_exp, sd->status.skill_point, \ sd->status.zeny, pc_readaccountreg(sd, stringish<VarName>("BankAccount"))) -#define MAP_LOG_MAGIC(sd, suffix) \ - MAP_LOG_PC(sd, "MAGIC %d %d %d %d %d %d EXP %d %d " suffix, \ - sd->status.skill[SkillID::TMW_MAGIC].lv, \ - sd->status.skill[SkillID::TMW_MAGIC_LIFE].lv, \ - sd->status.skill[SkillID::TMW_MAGIC_WAR].lv, \ - sd->status.skill[SkillID::TMW_MAGIC_TRANSMUTE].lv, \ - sd->status.skill[SkillID::TMW_MAGIC_NATURE].lv, \ - sd->status.skill[SkillID::TMW_MAGIC_ETHER].lv, \ +#define MAP_LOG_MAGIC(sd, suffix) \ + MAP_LOG_PC(sd, "MAGIC %d %d %d %d %d %d EXP %d %d " suffix, \ + sd->status.skill[SkillID::TMW_MAGIC].lv, \ + sd->status.skill[SkillID::TMW_MAGIC_LIFE].lv, \ + sd->status.skill[SkillID::TMW_MAGIC_WAR].lv, \ + sd->status.skill[SkillID::TMW_MAGIC_TRANSMUTE].lv, \ + sd->status.skill[SkillID::TMW_MAGIC_NATURE].lv, \ + sd->status.skill[SkillID::TMW_MAGIC_ETHER].lv, \ pc_readglobalreg(sd, stringish<VarName>("MAGIC_EXPERIENCE")) & 0xffff, \ (pc_readglobalreg(sd, stringish<VarName>("MAGIC_EXPERIENCE")) >> 24) & 0xff) diff --git a/src/map/pc.hpp b/src/map/pc.hpp index fbd161e..40d0e76 100644 --- a/src/map/pc.hpp +++ b/src/map/pc.hpp @@ -1,12 +1,12 @@ #ifndef PC_HPP #define PC_HPP -#include "pc.t.hpp" +# include "pc.t.hpp" -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "clif.t.hpp" -#include "map.hpp" +# include "clif.t.hpp" +# include "map.hpp" inline void pc_setsit(dumb_ptr<map_session_data> sd) diff --git a/src/map/pc.t.hpp b/src/map/pc.t.hpp index feffd89..95a76a7 100644 --- a/src/map/pc.t.hpp +++ b/src/map/pc.t.hpp @@ -1,7 +1,7 @@ #ifndef PC_T_HPP #define PC_T_HPP -#include <cstdint> +# include <cstdint> enum class PC_GAINEXP_REASON { diff --git a/src/map/script.hpp b/src/map/script.hpp index e593cfa..da1d3ce 100644 --- a/src/map/script.hpp +++ b/src/map/script.hpp @@ -1,19 +1,19 @@ #ifndef SCRIPT_HPP #define SCRIPT_HPP -#include <cstdint> -#include <cstring> // for inlined get_str - TODO remove +# include <cstdint> +# include <cstring> // for inlined get_str - TODO remove -#include <vector> +# include <vector> -#include "../strings/fstring.hpp" -#include "../strings/zstring.hpp" +# include "../strings/fstring.hpp" +# include "../strings/zstring.hpp" -#include "../common/db.hpp" -#include "../common/dumb_ptr.hpp" -#include "../common/utils.hpp" +# include "../common/db.hpp" +# include "../common/dumb_ptr.hpp" +# include "../common/utils.hpp" -#include "map.t.hpp" +# include "map.t.hpp" enum class ByteCode : uint8_t; struct str_data_t; diff --git a/src/map/skill.hpp b/src/map/skill.hpp index d816161..14ff1b5 100644 --- a/src/map/skill.hpp +++ b/src/map/skill.hpp @@ -1,13 +1,13 @@ #ifndef SKILL_HPP #define SKILL_HPP -#include "skill.t.hpp" -#include "skill-pools.hpp" +# include "skill.t.hpp" +# include "skill-pools.hpp" -#include "../strings/fwd.hpp" -#include "../strings/fstring.hpp" +# include "../strings/fwd.hpp" +# include "../strings/fstring.hpp" -#include "map.hpp" +# include "map.hpp" constexpr int MAX_SKILL_PRODUCE_DB = 150; constexpr int MAX_SKILL_ARROW_DB = 150; diff --git a/src/map/skill.t.hpp b/src/map/skill.t.hpp index 3214062..bfa0e2f 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 -#include <cstdint> +# include <cstdint> -#include "../common/utils2.hpp" +# include "../common/utils2.hpp" // TODO remove most of these as their corresponding SkillIDs get deleted. enum class StatusChange : uint16_t diff --git a/src/map/storage.hpp b/src/map/storage.hpp index 8f31517..f923ebe 100644 --- a/src/map/storage.hpp +++ b/src/map/storage.hpp @@ -4,7 +4,7 @@ #ifndef STORAGE_HPP #define STORAGE_HPP -#include "map.hpp" +# include "map.hpp" int storage_storageopen(dumb_ptr<map_session_data> sd); int storage_storageadd(dumb_ptr<map_session_data> sd, int index, int amount); diff --git a/src/map/tmw.hpp b/src/map/tmw.hpp index d9147c9..e90143d 100644 --- a/src/map/tmw.hpp +++ b/src/map/tmw.hpp @@ -1,12 +1,12 @@ #ifndef TMW_HPP #define TMW_HPP -#include "../strings/fwd.hpp" +# include "../strings/fwd.hpp" -#include "../common/const_array.hpp" -#include "../common/dumb_ptr.hpp" +# include "../common/const_array.hpp" +# include "../common/dumb_ptr.hpp" -#include "map.hpp" +# include "map.hpp" int tmw_CheckChatSpam(dumb_ptr<map_session_data> sd, XString message); void tmw_GmHackMsg(ZString line); diff --git a/src/map/trade.hpp b/src/map/trade.hpp index 708e578..e50d608 100644 --- a/src/map/trade.hpp +++ b/src/map/trade.hpp @@ -1,7 +1,7 @@ #ifndef TRADE_HPP #define TRADE_HPP -#include "map.hpp" +# include "map.hpp" void trade_traderequest(dumb_ptr<map_session_data> sd, int target_id); void trade_tradeack(dumb_ptr<map_session_data> sd, int type); |