-
Notifications
You must be signed in to change notification settings - Fork 0
/
mugendefreader.h
69 lines (51 loc) · 2.02 KB
/
mugendefreader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include <tari/datastructures.h>
#include <tari/geometry.h>
typedef enum {
MUGEN_DEF_SCRIPT_GROUP_STRING_ELEMENT,
MUGEN_DEF_SCRIPT_GROUP_NUMBER_ELEMENT,
MUGEN_DEF_SCRIPT_GROUP_FLOAT_ELEMENT,
MUGEN_DEF_SCRIPT_GROUP_VECTOR_ELEMENT,
} MugenDefScriptGroupElementType;
typedef struct {
char mElement[6][100];
} MugenStringVector;
typedef struct {
MugenStringVector mVector;
} MugenDefScriptVectorElement;
typedef struct {
char mString[100];
} MugenDefScriptStringElement;
typedef struct {
int mValue;
} MugenDefScriptNumberElement;
typedef struct {
double mValue;
} MugenDefScriptFloatElement;
typedef struct {
char mName[100];
MugenDefScriptGroupElementType mType;
void* mData;
} MugenDefScriptGroupElement;
typedef struct MugenDefScriptGroup_t{
char mName[100];
StringMap mElements;
List mOrderedElementList;
struct MugenDefScriptGroup_t* mNext;
} MugenDefScriptGroup;
typedef struct {
MugenDefScriptGroup* mFirstGroup;
StringMap mGroups;
} MugenDefScript;
MugenDefScript loadMugenDefScript(char* tPath);
void unloadMugenDefScript(MugenDefScript tScript);
int isMugenDefStringVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
char* getAllocatedMugenDefStringVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
int isMugenDefFloatVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
double getMugenDefFloatVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
int isMugenDefNumberVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
int getMugenDefNumberVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
int isMugenDefVectorVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
Vector3D getMugenDefVectorVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
int isMugenDefVectorIVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);
Vector3DI getMugenDefVectorIVariable(MugenDefScript* tScript, char* tGroupName, char* tVariableName);