summaryrefslogtreecommitdiff
path: root/src/map/script.hpp
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/script.hpp
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/script.hpp')
-rw-r--r--src/map/script.hpp15
1 files changed, 10 insertions, 5 deletions
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