From e1418f378c66343a35db3791cbf0d54a4be3fbd3 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 15 Nov 2014 12:29:33 -0800 Subject: Generate most config parsers --- src/char/char.cpp | 4 ---- src/char/char.hpp | 3 +++ src/io/fwd.hpp | 5 +++++ src/map/map.cpp | 4 ---- src/map/map.hpp | 5 ++++- src/monitor/fwd.hpp | 36 ++++++++++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 src/monitor/fwd.hpp (limited to 'src') diff --git a/src/char/char.cpp b/src/char/char.cpp index 0bee093..a82a692 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -97,10 +97,6 @@ int anti_freeze_enable = 0; static std::chrono::seconds anti_freeze_interval = 6_s; -constexpr -std::chrono::milliseconds DEFAULT_AUTOSAVE_INTERVAL = - 5_min; - static Session *login_session, *char_session; static diff --git a/src/char/char.hpp b/src/char/char.hpp index 47d94d8..bcbdeb3 100644 --- a/src/char/char.hpp +++ b/src/char/char.hpp @@ -32,6 +32,9 @@ namespace tmwa { constexpr int MAX_MAP_SERVERS = 30; +constexpr +std::chrono::seconds DEFAULT_AUTOSAVE_INTERVAL = 5_min; + struct mmo_map_server { diff --git a/src/io/fwd.hpp b/src/io/fwd.hpp index 5334fbd..3b9452b 100644 --- a/src/io/fwd.hpp +++ b/src/io/fwd.hpp @@ -36,5 +36,10 @@ namespace io class AppendFile; class LineReader; class LineCharReader; + class Line; + class LineChar; + class LineSpan; + template + class Spanned; } // namespace io } // namespace tmwa diff --git a/src/map/map.cpp b/src/map/map.cpp index e5705aa..527d3c3 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -116,9 +116,6 @@ const CharName WISP_SERVER_NAME = stringish("Server"_s); map_local undefined_gat = [](){ map_local rv {}; rv.name_ = stringish("undefined.gat"_s); return rv; }(); -static -void map_delmap(MapName mapname); - void SessionDeleter::operator()(SessionData *sd) { really_delete1 static_cast(sd); @@ -1367,7 +1364,6 @@ bool map_readallmap(void) * 読み込むmapを追加する *------------------------------------------ */ -static void map_addmap(MapName mapname) { if (mapname == "clear"_s) diff --git a/src/map/map.hpp b/src/map/map.hpp index ac16fe9..48bd997 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -64,7 +64,7 @@ constexpr int MAX_LEVEL = 255; constexpr int MAX_WALKPATH = 48; constexpr int MAX_DROP_PER_MAP = 48; -constexpr interval_t DEFAULT_AUTOSAVE_INTERVAL = 1_min; +constexpr std::chrono::seconds DEFAULT_AUTOSAVE_INTERVAL = 1_min; extern map_local undefined_gat; @@ -698,4 +698,7 @@ inline dumb_ptr npc_data::is_script() { return npc_subtype == N inline dumb_ptr npc_data::is_shop() { return npc_subtype == NpcSubtype::SHOP ? as_shop() : nullptr ; } 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 ; } + +void map_addmap(MapName mapname); +void map_delmap(MapName mapname); } // namespace tmwa diff --git a/src/monitor/fwd.hpp b/src/monitor/fwd.hpp new file mode 100644 index 0000000..425e5e9 --- /dev/null +++ b/src/monitor/fwd.hpp @@ -0,0 +1,36 @@ +#pragma once +// monitor/fwd.hpp - list of type names for monitor nonserver +// +// Copyright © 2014 Ben Longbons +// +// This file is part of The Mana World (Athena server) +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include "../sanity.hpp" + +#include "../strings/fwd.hpp" // rank 1 +#include "../io/fwd.hpp" // rank 4 +#include "../net/fwd.hpp" // rank 5 +#include "../mmo/fwd.hpp" // rank 6 +#include "../high/fwd.hpp" // rank 9 +// monitor/fwd.hpp is rank ∞ because it is an executable + + +namespace tmwa +{ +namespace monitor +{ +} // namespace monitor +} // namespace tmwa -- cgit v1.2.3-60-g2f50