forked from naclander/openmugen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StateParser.h
33 lines (26 loc) · 1.17 KB
/
StateParser.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
#ifndef ___STATEPARSER__H
#define ___STATEPARSER__H
class CStateParser
{
CAllocater *m_pAlloc;
void ParseStateDef(CTokenizer &tok,CStateManager &StateManager);
void PareseState(CTokenizer &tok,CStateManager &StateManager);
void ParseTrigger(CTokenizer &tok,CStateManager &StateManager);
//Expression parser
void EvaluateExpression(CTokenizer &tok,CStateManager &StateManager);
void Term(CTokenizer &tok,CStateManager &StateManager);
void Primary(CTokenizer &tok,CStateManager &StateManager);
//helper functions
int GetControllerType(const char * strType,CTokenizer &tok);
int GetTriggerType(const char * strTrigger,CTokenizer &tok);
void Error(const char * strErrorMsg,CTokenizer &tok);
int nController;
//controller parser
void ParserController(CTokenizer &tok,CStateManager &StateManager,u16 nControllerType);
void ParseChangeState(CTokenizer &tok,CStateManager &StateManager);
public:
CStateParser();
~CStateParser();
void ParseStateFile(const char * strFileName,CStateManager &StateManager,CAllocater *a);
};
#endif