diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2020-04-21 11:46:50 -0400 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2020-04-21 11:46:50 -0400 |
commit | b2059ca1ad5c95fb60b5502d84656aee0b1ce01e (patch) | |
tree | c994183d54fa9165969b7808ee6f3590325dd078 /include/script.h | |
parent | 44b2ea70eaf08599698f088d7697a93b70441f8c (diff) |
decompile script.c
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..13035fc9 --- /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)(void);
+ 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_
|