DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
scriptinterpreter.hpp
1#pragma once
2
3#include "common.h"
4
5#include "sysmes.hpp"
6
8enum SCRIPT_ARGUMENT_TYPE {
9 SCRIPT_ARGUMENT_STRING = 0,
10 SCRIPT_ARGUMENT_INTEGER = 1,
11 SCRIPT_ARGUMENT_FLOAT = 2,
12};
13
15typedef int (*SPI_FUNCTION)(void **arguments);
16
23 char *name;
25 SPI_FUNCTION function;
26};
27
28STATIC_ASSERT(sizeof(SPI_FUNC_PARAM) == 0x68);
29
35struct TAG_PARAM {
36 char *name;
38};
39
40STATIC_ASSERT(sizeof(TAG_PARAM) == 0x64);
41
48public:
56 void *arguments[24];
57 char argument_text[0x40C];
66 int GetNextTAG();
67
75 void SetTAG(TAG_PARAM *tags, int count);
76
84 void SetFunction(SPI_FUNC_PARAM *functions, int count);
85
93 void SetScript(char *script, int script_size);
94
103
111 int ControlCode();
112
120 int CallFunction(int *result);
121
129 int GetArg(int *argument_types);
130
138 int SearchCommand(int *tag_index);
139};
140
141STATIC_ASSERT(sizeof(CScriptInterpreter) == 0x890);
int CallFunction(int *result)
SPI_FUNC_PARAM * function_table
int GetArg(int *argument_types)
void SetFunction(SPI_FUNC_PARAM *functions, int count)
void SetScript(char *script, int script_size)
void SetTAG(TAG_PARAM *tags, int count)
int SearchCommand(int *tag_index)
SPI_FUNCTION function
int argument_types[24]