summaryrefslogtreecommitdiff
path: root/src/map/script.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.hpp')
-rw-r--r--src/map/script.hpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/map/script.hpp b/src/map/script.hpp
index 9ae893d..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,26 +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 "../sanity.hpp"
+#include "fwd.hpp"
-# include <cstdint>
-# include <cstring> // for inlined get_str - TODO remove
+#include <cstdint>
-# include <vector>
+#include <vector>
-# include "../range/slice.hpp"
+#include "../range/slice.hpp"
-# include "../strings/rstring.hpp"
-# include "../strings/astring.hpp"
-# include "../strings/zstring.hpp"
+#include "../strings/zstring.hpp"
-# include "../generic/db.hpp"
+#include "../generic/db.hpp"
+#include "../generic/dumb_ptr.hpp"
-# include "../mmo/dumb_ptr.hpp"
-# include "../mmo/utils.hpp"
+#include "../mmo/ids.hpp"
-# include "map.t.hpp"
+#include "clif.t.hpp"
+#include "map.t.hpp"
+
+namespace tmwa
+{
enum class ByteCode : uint8_t;
struct str_data_t;
@@ -155,7 +155,7 @@ public:
struct script_stack *stack;
int start, end;
ScriptEndState state;
- int rid, oid;
+ BlockId rid, oid;
ScriptPointer scriptp, new_scriptp;
int defsp, new_defsp;
};
@@ -177,10 +177,9 @@ struct argrec_t
argrec_t(ZString n, int i) : name(n), v(i) {}
argrec_t(ZString n, ZString z) : name(n), v(z) {}
};
-int run_script_l(ScriptPointer, int, int, Slice<argrec_t> args);
-int run_script(ScriptPointer, int, int);
+int run_script_l(ScriptPointer, BlockId, BlockId, Slice<argrec_t> args);
+int run_script(ScriptPointer, BlockId, BlockId);
-struct ScriptLabel;
extern
Map<ScriptLabel, int> scriptlabel_db;
extern
@@ -200,5 +199,4 @@ 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);
-
-#endif // TMWA_MAP_SCRIPT_HPP
+} // namespace tmwa