diff options
author | Demki <mordbz@gmail.com> | 2020-04-23 14:19:34 +0300 |
---|---|---|
committer | Demki <mordbz@gmail.com> | 2020-04-23 14:19:34 +0300 |
commit | 869c65f52eba393e96faa01df00317ac8f722d00 (patch) | |
tree | 6354d9f40823f1b7ce89174dd09380e745735bdc /include/script.h | |
parent | 1750bfd8497b314cf7ac24d8221ac936a9cfa9c6 (diff) | |
parent | 5ee605688aaea7fe6b4573dc2ce5ce24cd671855 (diff) |
merge
Diffstat (limited to 'include/script.h')
-rw-r--r-- | include/script.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/script.h b/include/script.h new file mode 100644 index 00000000..2ecc8e28 --- /dev/null +++ b/include/script.h @@ -0,0 +1,27 @@ +#ifndef _SCRIPT_H_
+#define _SCRIPT_H_
+
+struct ScriptContext;
+
+typedef u8 (*ScrCmdFunc)(struct ScriptContext *);
+typedef u8 Script[];
+
+struct ScriptContext
+{
+ u8 stackDepth;
+ u8 mode;
+ u8 comparisonResult;
+ u8 (*nativePtr)(struct ScriptContext *);
+ const u8 *scriptPtr;
+ const u8 *stack[20];
+ ScrCmdFunc *cmdTable;
+ ScrCmdFunc *cmdTableEnd;
+ u32 data[4];
+ u32 unk74;
+};
+
+#define ScriptReadByte(ctx) (*(ctx->scriptPtr++))
+
+u16 ScriptReadHalfword(struct ScriptContext *ctx);
+
+#endif // _SCRIPT_H_
|