diff options
author | Martmists <martmists@gmail.com> | 2020-04-22 13:57:09 +0200 |
---|---|---|
committer | Martmists <martmists@gmail.com> | 2020-04-22 13:57:09 +0200 |
commit | 9b3107c478c9f39c17ef4171c9c5330adcb1385a (patch) | |
tree | e63d60215b5ba9405d7aeb3322873d26c5f03cc1 /include/script.h | |
parent | dcdf58739922de3b3bbc828f46e36b83f53c52a0 (diff) | |
parent | 5ee605688aaea7fe6b4573dc2ce5ce24cd671855 (diff) |
Merge branch 'master' into os_lib
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_
|