-
Notifications
You must be signed in to change notification settings - Fork 59
/
StateParser.h
40 lines (31 loc) · 1.5 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
34
35
36
37
38
39
40
#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);
// action È磺ChangeState¡¢ChangeAnim
int nController;
//controller parser
void ParserController(CTokenizer &tok,CStateManager &StateManager,u16 nControllerType);
bool ParseStateBaseParm(CTokenizer &tok,CStateManager &StateManager);
void ParseNormalAction(CTokenizer &tok,CStateManager &StateManager);
void ParseChangeState(CTokenizer &tok,CStateManager &StateManager);
void ParseChangeAnim(CTokenizer &tok,CStateManager &StateManager);
void ParseHitDef(CTokenizer &tok,CStateManager &StateManager);
public:
CStateParser();
~CStateParser();
void ParseStateFile(const char * strFileName,CStateManager &StateManager,CAllocater *a);
};
#endif