summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-09-26 23:55:29 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-10-05 13:42:45 -0700
commitcaae1e38d0d239f4f7088a64526fe1d2f6587999 (patch)
tree42ba875885f7593c070da93f828b7ae38ea2dc7c /src/map
parent06c411ef291e1f608487989b0da63aefbbdfefc1 (diff)
downloadtmwa-caae1e38d0d239f4f7088a64526fe1d2f6587999.tar.gz
tmwa-caae1e38d0d239f4f7088a64526fe1d2f6587999.tar.bz2
tmwa-caae1e38d0d239f4f7088a64526fe1d2f6587999.tar.xz
tmwa-caae1e38d0d239f4f7088a64526fe1d2f6587999.zip
Split string header into pieces
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.cpp8
-rw-r--r--src/map/atcommand.hpp2
-rw-r--r--src/map/battle.cpp5
-rw-r--r--src/map/battle.hpp2
-rw-r--r--src/map/chrif.cpp3
-rw-r--r--src/map/chrif.hpp2
-rw-r--r--src/map/clif.cpp4
-rw-r--r--src/map/clif.hpp3
-rw-r--r--src/map/grfio.cpp3
-rw-r--r--src/map/grfio.hpp1
-rw-r--r--src/map/intif.cpp4
-rw-r--r--src/map/intif.hpp2
-rw-r--r--src/map/itemdb.cpp4
-rw-r--r--src/map/magic-expr-eval.hpp2
-rw-r--r--src/map/magic-expr.cpp5
-rw-r--r--src/map/magic-expr.hpp3
-rw-r--r--src/map/magic-interpreter-base.cpp3
-rw-r--r--src/map/magic-interpreter-parser.ypp3
-rw-r--r--src/map/magic-interpreter.hpp3
-rw-r--r--src/map/magic-stmt.cpp2
-rw-r--r--src/map/magic.cpp2
-rw-r--r--src/map/magic.hpp2
-rw-r--r--src/map/map.cpp7
-rw-r--r--src/map/map.hpp5
-rw-r--r--src/map/map.t.hpp2
-rw-r--r--src/map/mob.cpp3
-rw-r--r--src/map/npc.cpp11
-rw-r--r--src/map/npc.hpp2
-rw-r--r--src/map/party.cpp2
-rw-r--r--src/map/party.hpp2
-rw-r--r--src/map/pc.cpp3
-rw-r--r--src/map/pc.hpp2
-rw-r--r--src/map/script.cpp5
-rw-r--r--src/map/script.hpp15
-rw-r--r--src/map/skill.cpp4
-rw-r--r--src/map/skill.hpp3
-rw-r--r--src/map/tmw.cpp4
-rw-r--r--src/map/tmw.hpp2
38 files changed, 128 insertions, 12 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index 4b41c7b..b7a0caa 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -6,6 +6,14 @@
#include <fstream>
+#include "../strings/mstring.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/tstring.hpp"
+#include "../strings/sstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+#include "../strings/vstring.hpp"
+
#include "../common/core.hpp"
#include "../common/cxxstdio.hpp"
#include "../common/extract.hpp"
diff --git a/src/map/atcommand.hpp b/src/map/atcommand.hpp
index 280372e..aff09b7 100644
--- a/src/map/atcommand.hpp
+++ b/src/map/atcommand.hpp
@@ -1,6 +1,8 @@
#ifndef ATCOMMAND_HPP
#define ATCOMMAND_HPP
+#include "../strings/fwd.hpp"
+
#include "../common/const_array.hpp"
#include "map.hpp"
diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index 02ea370..c5cb8e3 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -4,6 +4,11 @@
#include <fstream>
+#include "../strings/fstring.hpp"
+#include "../strings/tstring.hpp"
+#include "../strings/sstring.hpp"
+#include "../strings/zstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/io.hpp"
#include "../common/nullpo.hpp"
diff --git a/src/map/battle.hpp b/src/map/battle.hpp
index c933e28..2d9cd7f 100644
--- a/src/map/battle.hpp
+++ b/src/map/battle.hpp
@@ -3,6 +3,8 @@
#include "battle.t.hpp"
+#include "../strings/fwd.hpp"
+
#include "../common/timer.t.hpp"
#include "magic-interpreter.t.hpp"
diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp
index c9020a3..1f7d1cc 100644
--- a/src/map/chrif.cpp
+++ b/src/map/chrif.cpp
@@ -4,6 +4,9 @@
#include <cstring>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/nullpo.hpp"
#include "../common/socket.hpp"
diff --git a/src/map/chrif.hpp b/src/map/chrif.hpp
index dfcc12b..db7ad0e 100644
--- a/src/map/chrif.hpp
+++ b/src/map/chrif.hpp
@@ -1,6 +1,8 @@
#ifndef CHRIF_HPP
#define CHRIF_HPP
+#include "../strings/fwd.hpp"
+
#include "../common/dumb_ptr.hpp"
#include "../common/human_time_diff.hpp"
#include "../common/ip.hpp"
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index 26c7f0c..90c9f4d 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -6,6 +6,10 @@
#include <cstring>
#include <ctime>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/md5calc.hpp"
#include "../common/random.hpp"
diff --git a/src/map/clif.hpp b/src/map/clif.hpp
index fa68e23..a605e73 100644
--- a/src/map/clif.hpp
+++ b/src/map/clif.hpp
@@ -5,9 +5,10 @@
#include <functional>
+#include "../strings/fwd.hpp"
+
#include "../common/const_array.hpp"
#include "../common/ip.hpp"
-#include "../common/strings.hpp"
#include "../common/timer.t.hpp"
#include "battle.t.hpp"
diff --git a/src/map/grfio.cpp b/src/map/grfio.cpp
index cbb5a86..41a285f 100644
--- a/src/map/grfio.cpp
+++ b/src/map/grfio.cpp
@@ -13,6 +13,9 @@
#include <fstream>
#include <map>
+#include "../strings/mstring.hpp"
+#include "../strings/fstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/extract.hpp"
#include "../common/io.hpp"
diff --git a/src/map/grfio.hpp b/src/map/grfio.hpp
index aa222c6..599064d 100644
--- a/src/map/grfio.hpp
+++ b/src/map/grfio.hpp
@@ -6,7 +6,6 @@
#include <vector>
#include "../common/mmo.hpp"
-#include "../common/strings.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.cpp b/src/map/intif.cpp
index a3865b2..18415d0 100644
--- a/src/map/intif.cpp
+++ b/src/map/intif.cpp
@@ -3,6 +3,10 @@
#include <cstdlib>
#include <cstring>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/nullpo.hpp"
#include "../common/socket.hpp"
diff --git a/src/map/intif.hpp b/src/map/intif.hpp
index 08added..a3e1d17 100644
--- a/src/map/intif.hpp
+++ b/src/map/intif.hpp
@@ -1,6 +1,8 @@
#ifndef INTIF_HPP
#define INTIF_HPP
+#include "../strings/fwd.hpp"
+
#include "../common/const_array.hpp"
#include "map.hpp"
diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp
index cb47b21..588acd9 100644
--- a/src/map/itemdb.cpp
+++ b/src/map/itemdb.cpp
@@ -5,6 +5,10 @@
#include <fstream>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/db.hpp"
#include "../common/extract.hpp"
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp
index 76b86f8..29fdab6 100644
--- a/src/map/magic-expr-eval.hpp
+++ b/src/map/magic-expr-eval.hpp
@@ -1,6 +1,8 @@
#ifndef MAGIC_EXPR_EVAL_HPP
#define MAGIC_EXPR_EVAL_HPP
+#include "../strings/zstring.hpp"
+
#include "../common/utils2.hpp"
#include "magic-interpreter.hpp"
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp
index 872ba6f..8f4a5eb 100644
--- a/src/map/magic-expr.cpp
+++ b/src/map/magic-expr.cpp
@@ -5,6 +5,11 @@
#include <cassert>
#include <cmath>
+#include "../strings/mstring.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/vstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/random.hpp"
diff --git a/src/map/magic-expr.hpp b/src/map/magic-expr.hpp
index 2bffcbc..0d1bd4f 100644
--- a/src/map/magic-expr.hpp
+++ b/src/map/magic-expr.hpp
@@ -3,6 +3,9 @@
#include "magic-interpreter.hpp"
+#include "../strings/fwd.hpp"
+#include "../strings/zstring.hpp"
+
/*
* Argument types:
* i : int
diff --git a/src/map/magic-interpreter-base.cpp b/src/map/magic-interpreter-base.cpp
index 3167efb..09656c6 100644
--- a/src/map/magic-interpreter-base.cpp
+++ b/src/map/magic-interpreter-base.cpp
@@ -3,6 +3,9 @@
#include "magic-interpreter-aux.hpp"
#include "magic-interpreter.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/timer.hpp"
diff --git a/src/map/magic-interpreter-parser.ypp b/src/map/magic-interpreter-parser.ypp
index e6d69b4..8a654cd 100644
--- a/src/map/magic-interpreter-parser.ypp
+++ b/src/map/magic-interpreter-parser.ypp
@@ -10,6 +10,9 @@
#include <cassert>
#include <cstdarg> // exception to "no va_list" rule, even after cxxstdio
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+
#include "../common/const_array.hpp"
#include "../common/cxxstdio.hpp"
diff --git a/src/map/magic-interpreter.hpp b/src/map/magic-interpreter.hpp
index 13c91e9..a0abe7a 100644
--- a/src/map/magic-interpreter.hpp
+++ b/src/map/magic-interpreter.hpp
@@ -5,6 +5,9 @@
#include <cassert>
+#include "../strings/fwd.hpp"
+#include "../strings/fstring.hpp"
+
#include "magic.hpp"
#include "map.hpp"
#include "script.hpp"
diff --git a/src/map/magic-stmt.cpp b/src/map/magic-stmt.cpp
index ebf75c5..2d246de 100644
--- a/src/map/magic-stmt.cpp
+++ b/src/map/magic-stmt.cpp
@@ -2,6 +2,8 @@
#include <cassert>
+#include "../strings/zstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/random2.hpp"
#include "../common/timer.hpp"
diff --git a/src/map/magic.cpp b/src/map/magic.cpp
index 84d133a..75a76ae 100644
--- a/src/map/magic.cpp
+++ b/src/map/magic.cpp
@@ -1,5 +1,7 @@
#include <cstring>
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "magic-interpreter.hpp"
diff --git a/src/map/magic.hpp b/src/map/magic.hpp
index 5b10367..84e3387 100644
--- a/src/map/magic.hpp
+++ b/src/map/magic.hpp
@@ -1,6 +1,8 @@
#ifndef MAGIC_HPP
#define MAGIC_HPP
+#include "../strings/fwd.hpp"
+
#include "../common/dumb_ptr.hpp"
#include "map.hpp"
diff --git a/src/map/map.cpp b/src/map/map.cpp
index cff97e2..9c5f074 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -12,6 +12,13 @@
#include <fstream>
+#include "../strings/fstring.hpp"
+#include "../strings/tstring.hpp"
+#include "../strings/sstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+#include "../strings/vstring.hpp"
+
#include "../common/core.hpp"
#include "../common/cxxstdio.hpp"
#include "../common/db.hpp"
diff --git a/src/map/map.hpp b/src/map/map.hpp
index 4d5ac9d..b0e6f18 100644
--- a/src/map/map.hpp
+++ b/src/map/map.hpp
@@ -8,11 +8,14 @@
#include <functional>
#include <list>
+#include "../strings/fwd.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/vstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/db.hpp"
#include "../common/matrix.hpp"
#include "../common/socket.hpp"
-#include "../common/strings.hpp"
#include "../common/timer.t.hpp"
#include "battle.t.hpp"
diff --git a/src/map/map.t.hpp b/src/map/map.t.hpp
index 19f80c3..2255f60 100644
--- a/src/map/map.t.hpp
+++ b/src/map/map.t.hpp
@@ -1,6 +1,8 @@
#ifndef MAP_T_HPP
#define MAP_T_HPP
+#include "../strings/vstring.hpp"
+
#include "../common/mmo.hpp"
#include "../common/utils2.hpp"
diff --git a/src/map/mob.cpp b/src/map/mob.cpp
index f8edff9..ee74b08 100644
--- a/src/map/mob.cpp
+++ b/src/map/mob.cpp
@@ -9,6 +9,9 @@
#include <algorithm>
#include <fstream>
+#include "../strings/fstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/extract.hpp"
#include "../common/io.hpp"
diff --git a/src/map/npc.cpp b/src/map/npc.cpp
index bca4eab..28f348e 100644
--- a/src/map/npc.cpp
+++ b/src/map/npc.cpp
@@ -7,6 +7,11 @@
#include <list>
+#include "../strings/mstring.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/db.hpp"
#include "../common/extract.hpp"
@@ -1208,7 +1213,7 @@ int npc_parse_script(XString w1, XString w2, NpcName w3, ZString w4,
(*lines)++;
if (feof(fp))
break;
- ZString line(ZString::really_construct_from_a_pointer, line_, nullptr);
+ ZString line(strings::really_construct_from_a_pointer, line_, nullptr);
if (!srcbuf)
{
// may be a no-op
@@ -1403,7 +1408,7 @@ int npc_parse_function(XString, XString, XString w3, ZString,
(*lines)++;
if (feof(fp))
break;
- ZString line(ZString::really_construct_from_a_pointer, line_, nullptr);
+ ZString line(strings::really_construct_from_a_pointer, line_, nullptr);
if (!srcbuf)
{
srcbuf += line.xislice_t(std::find(line.begin(), line.end(), '{'));
@@ -1731,7 +1736,7 @@ int do_init_npc(void)
{
// because it's still fgets
line_[strlen(line_) - 1] = '\0';
- ZString zline(ZString::really_construct_from_a_pointer, line_, nullptr);
+ ZString zline(strings::really_construct_from_a_pointer, line_, nullptr);
XString w1, w2, w3, w4x;
ZString w4z;
lines++;
diff --git a/src/map/npc.hpp b/src/map/npc.hpp
index 36f4e4d..ee9ed91 100644
--- a/src/map/npc.hpp
+++ b/src/map/npc.hpp
@@ -4,6 +4,8 @@
#include <cstddef>
#include <cstdint>
+#include "../strings/fwd.hpp"
+
#include "../common/timer.t.hpp"
#include "map.hpp"
diff --git a/src/map/party.cpp b/src/map/party.cpp
index c6b0bcc..d0039de 100644
--- a/src/map/party.cpp
+++ b/src/map/party.cpp
@@ -2,6 +2,8 @@
#include <cstring>
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/db.hpp"
#include "../common/nullpo.hpp"
diff --git a/src/map/party.hpp b/src/map/party.hpp
index 80679ad..5ad6c03 100644
--- a/src/map/party.hpp
+++ b/src/map/party.hpp
@@ -3,6 +3,8 @@
#include <functional>
+#include "../strings/fwd.hpp"
+
#include "map.hpp"
struct party;
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 0068ab3..b622cc0 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -6,6 +6,9 @@
#include <fstream>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/io.hpp"
#include "../common/nullpo.hpp"
diff --git a/src/map/pc.hpp b/src/map/pc.hpp
index 4796011..77d1288 100644
--- a/src/map/pc.hpp
+++ b/src/map/pc.hpp
@@ -3,6 +3,8 @@
#include "pc.t.hpp"
+#include "../strings/fwd.hpp"
+
#include "clif.t.hpp"
#include "map.hpp"
diff --git a/src/map/script.cpp b/src/map/script.cpp
index f705909..2f4d1cb 100644
--- a/src/map/script.cpp
+++ b/src/map/script.cpp
@@ -9,6 +9,11 @@
#include <fstream>
+#include "../strings/mstring.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/db.hpp"
#include "../common/extract.hpp"
diff --git a/src/map/script.hpp b/src/map/script.hpp
index 4e8f9ac..e593cfa 100644
--- a/src/map/script.hpp
+++ b/src/map/script.hpp
@@ -6,6 +6,9 @@
#include <vector>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+
#include "../common/db.hpp"
#include "../common/dumb_ptr.hpp"
#include "../common/utils.hpp"
@@ -17,6 +20,8 @@ struct str_data_t;
class ScriptBuffer
{
+ typedef ZString::iterator ZSit;
+
std::vector<ByteCode> script_buf;
public:
// construction methods used only by script.cpp
@@ -25,17 +30,17 @@ public:
void add_scripti(uint32_t a);
void add_scriptl(str_data_t *a);
void set_label(str_data_t *ld, int pos_);
- ZString::iterator parse_simpleexpr(ZString::iterator p);
- ZString::iterator parse_subexpr(ZString::iterator p, int limit);
- ZString::iterator parse_expr(ZString::iterator p);
- ZString::iterator parse_line(ZString::iterator p);
+ ZSit parse_simpleexpr(ZSit p);
+ ZSit parse_subexpr(ZSit p, int limit);
+ ZSit parse_expr(ZSit p);
+ ZSit parse_line(ZSit p);
void parse_script(ZString src, int line);
// consumption methods used only by script.cpp
ByteCode operator[](size_t i) const { return script_buf[i]; }
ZString get_str(size_t i) const
{
- return ZString(ZString::really_construct_from_a_pointer, reinterpret_cast<const char *>(&script_buf[i]), nullptr);
+ return ZString(strings::really_construct_from_a_pointer, reinterpret_cast<const char *>(&script_buf[i]), nullptr);
}
// method used elsewhere
diff --git a/src/map/skill.cpp b/src/map/skill.cpp
index f868b41..46b8dda 100644
--- a/src/map/skill.cpp
+++ b/src/map/skill.cpp
@@ -7,6 +7,10 @@
#include <fstream>
+#include "../strings/mstring.hpp"
+#include "../strings/fstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/extract.hpp"
#include "../common/io.hpp"
diff --git a/src/map/skill.hpp b/src/map/skill.hpp
index a233ed4..d816161 100644
--- a/src/map/skill.hpp
+++ b/src/map/skill.hpp
@@ -4,7 +4,8 @@
#include "skill.t.hpp"
#include "skill-pools.hpp"
-#include "../common/strings.hpp"
+#include "../strings/fwd.hpp"
+#include "../strings/fstring.hpp"
#include "map.hpp"
diff --git a/src/map/tmw.cpp b/src/map/tmw.cpp
index ed00110..d4beef4 100644
--- a/src/map/tmw.cpp
+++ b/src/map/tmw.cpp
@@ -3,6 +3,10 @@
#include <cctype>
#include <cstring>
+#include "../strings/fstring.hpp"
+#include "../strings/zstring.hpp"
+#include "../strings/xstring.hpp"
+
#include "../common/cxxstdio.hpp"
#include "../common/nullpo.hpp"
diff --git a/src/map/tmw.hpp b/src/map/tmw.hpp
index 5f1d215..d9147c9 100644
--- a/src/map/tmw.hpp
+++ b/src/map/tmw.hpp
@@ -1,6 +1,8 @@
#ifndef TMW_HPP
#define TMW_HPP
+#include "../strings/fwd.hpp"
+
#include "../common/const_array.hpp"
#include "../common/dumb_ptr.hpp"