32 #ifndef BOTC_BOTSTUFF_H |
32 #ifndef BOTC_BOTSTUFF_H |
33 #define BOTC_BOTSTUFF_H |
33 #define BOTC_BOTSTUFF_H |
34 |
34 |
35 #include "main.h" |
35 #include "main.h" |
36 |
36 |
37 static const int gMaxStates = 256; |
37 struct Limits |
38 static const int gMaxEvents = 32; |
38 { |
39 static const int gMaxGlobalEvents = 32; |
39 static const int MaxStates = 256; |
40 static const int gMaxGlobalVars = 128; |
40 static const int MaxEvents = 32; |
41 static const int gMaxGlobalArrays = 16; |
41 static const int MaxGlobalEvents = 32; |
42 static const int gMaxArraySize = 65536; |
42 static const int MaxGlobalVars = 128; |
43 static const int gMaxStateVars = 16; |
43 static const int MaxGlobalArrays = 16; |
44 static const int gMaxStringlistSize = 128; |
44 static const int MaxArraySize = 65536; |
45 static const int gMaxStringLength = 256; |
45 static const int MaxStateVars = 16; |
46 static const int gMaxReactionTime = 52; |
46 static const int MaxStringlistSize = 128; |
47 static const int gMaxStoredEvents = 64; |
47 static const int MaxStringLength = 256; |
|
48 static const int MaxReactionTime = 52; |
|
49 static const int MaxStoredEvents = 64; |
|
50 }; |
48 |
51 |
49 named_enum DataHeader |
52 named_enum class DataHeader |
50 { |
53 { |
51 DH_Command, |
54 Command, |
52 DH_StateIndex, |
55 StateIndex, |
53 DH_StateName, |
56 StateName, |
54 DH_OnEnter, |
57 OnEnter, |
55 DH_MainLoop, |
58 MainLoop, |
56 DH_OnExit, |
59 OnExit, |
57 DH_Event, |
60 Event, |
58 DH_EndOnEnter, |
61 EndOnEnter, |
59 DH_EndMainLoop, |
62 EndMainLoop, |
60 DH_EndOnExit, |
63 EndOnExit, |
61 DH_EndEvent, |
64 EndEvent, |
62 DH_IfGoto, |
65 IfGoto, |
63 DH_IfNotGoto, |
66 IfNotGoto, |
64 DH_Goto, |
67 Goto, |
65 DH_OrLogical, |
68 OrLogical, |
66 DH_AndLogical, |
69 AndLogical, |
67 DH_OrBitwise, |
70 OrBitwise, |
68 DH_EorBitwise, |
71 EorBitwise, |
69 DH_AndBitwise, |
72 AndBitwise, |
70 DH_Equals, |
73 Equals, |
71 DH_NotEquals, |
74 NotEquals, |
72 DH_LessThan, |
75 LessThan, |
73 DH_AtMost, |
76 AtMost, |
74 DH_GreaterThan, |
77 GreaterThan, |
75 DH_AtLeast, |
78 AtLeast, |
76 DH_NegateLogical, |
79 NegateLogical, |
77 DH_LeftShift, |
80 LeftShift, |
78 DH_RightShift, |
81 RightShift, |
79 DH_Add, |
82 Add, |
80 DH_Subtract, |
83 Subtract, |
81 DH_UnaryMinus, |
84 UnaryMinus, |
82 DH_Multiply, |
85 Multiply, |
83 DH_Divide, |
86 Divide, |
84 DH_Modulus, |
87 Modulus, |
85 DH_PushNumber, |
88 PushNumber, |
86 DH_PushStringIndex, |
89 PushStringIndex, |
87 DH_PushGlobalVar, |
90 PushGlobalVar, |
88 DH_PushLocalVar, |
91 PushLocalVar, |
89 DH_DropStackPosition, |
92 DropStackPosition, |
90 DH_ScriptVarList, |
93 ScriptVarList, |
91 DH_StringList, |
94 StringList, |
92 DH_IncreaseGlobalVar, |
95 IncreaseGlobalVar, |
93 DH_DecreaseGlobalVar, |
96 DecreaseGlobalVar, |
94 DH_AssignGlobalVar, |
97 AssignGlobalVar, |
95 DH_AddGlobalVar, |
98 AddGlobalVar, |
96 DH_SubtractGlobalVar, |
99 SubtractGlobalVar, |
97 DH_MultiplyGlobalVar, |
100 MultiplyGlobalVar, |
98 DH_DivideGlobalVar, |
101 DivideGlobalVar, |
99 DH_ModGlobalVar, |
102 ModGlobalVar, |
100 DH_IncreaseLocalVar, |
103 IncreaseLocalVar, |
101 DH_DecreaseLocalVar, |
104 DecreaseLocalVar, |
102 DH_AssignLocalVar, |
105 AssignLocalVar, |
103 DH_AddLocalVar, |
106 AddLocalVar, |
104 DH_SubtractLocalVar, |
107 SubtractLocalVar, |
105 DH_MultiplyLocalVar, |
108 MultiplyLocalVar, |
106 DH_DivideLocalVar, |
109 DivideLocalVar, |
107 DH_ModLocalVar, |
110 ModLocalVar, |
108 DH_CaseGoto, |
111 CaseGoto, |
109 DH_Drop, |
112 Drop, |
110 DH_IncreaseGlobalArray, |
113 IncreaseGlobalArray, |
111 DH_DecreaseGlobalArray, |
114 DecreaseGlobalArray, |
112 DH_AssignGlobalArray, |
115 AssignGlobalArray, |
113 DH_AddGlobalArray, |
116 AddGlobalArray, |
114 DH_SubtractGlobalArray, |
117 SubtractGlobalArray, |
115 DH_MultiplyGlobalArray, |
118 MultiplyGlobalArray, |
116 DH_DivideGlobalArray, |
119 DivideGlobalArray, |
117 DH_ModGlobalArray, |
120 ModGlobalArray, |
118 DH_PushGlobalArray, |
121 PushGlobalArray, |
119 DH_Swap, |
122 Swap, |
120 DH_Dup, |
123 Dup, |
121 DH_ArraySet, |
124 ArraySet, |
122 numDataHeaders |
125 NumDataHeaders |
123 }; |
126 }; |
124 |
127 |
125 #endif // BOTC_BOTSTUFF_H |
128 #endif // BOTC_BOTSTUFF_H |