src/BotStuff.h

changeset 119
bdf8d46c145f
parent 118
e3361cf7cbf4
child 120
5ea0faefa82a
equal deleted inserted replaced
118:e3361cf7cbf4 119:bdf8d46c145f
1 /*
2 Copyright 2000-2010 Brad Carney
3 Copyright 2012-2014 Santeri Piippo
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
9
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3. The name of the author may not be used to endorse or promote products
16 derived from this software without specific prior written permission.
17
18 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 // Numeric values and stuff from zandronum bots.h
31
32 #ifndef BOTC_BOTSTUFF_H
33 #define BOTC_BOTSTUFF_H
34
35 #include "Main.h"
36
37 static const int gMaxStates = 256;
38 static const int gMaxEvents = 32;
39 static const int gMaxGlobalEvents = 32;
40 static const int gMaxGlobalVars = 128;
41 static const int gMaxGlobalArrays = 16;
42 static const int gMaxArraySize = 65536;
43 static const int gMaxStateVars = 16;
44 static const int gMaxStringlistSize = 128;
45 static const int gMaxStringLength = 256;
46 static const int gMaxReactionTime = 52;
47 static const int gMaxStoredEvents = 64;
48
49 named_enum DataHeader
50 {
51 DH_Command,
52 DH_StateIndex,
53 DH_StateName,
54 DH_OnEnter,
55 DH_MainLoop,
56 DH_OnExit,
57 DH_Event,
58 DH_EndOnEnter,
59 DH_EndMainLoop,
60 DH_EndOnExit,
61 DH_EndEvent,
62 DH_IfGoto,
63 DH_IfNotGoto,
64 DH_Goto,
65 DH_OrLogical,
66 DH_AndLogical,
67 DH_OrBitwise,
68 DH_EorBitwise,
69 DH_AndBitwise,
70 DH_Equals,
71 DH_NotEquals,
72 DH_LessThan,
73 DH_AtMost,
74 DH_GreaterThan,
75 DH_AtLeast,
76 DH_NegateLogical,
77 DH_LeftShift,
78 DH_RightShift,
79 DH_Add,
80 DH_Subtract,
81 DH_UnaryMinus,
82 DH_Multiply,
83 DH_Divide,
84 DH_Modulus,
85 DH_PushNumber,
86 DH_PushStringIndex,
87 DH_PushGlobalVar,
88 DH_PushLocalVar,
89 DH_DropStackPosition,
90 DH_ScriptVarList,
91 DH_StringList,
92 DH_IncreaseGlobalVar,
93 DH_DecreaseGlobalVar,
94 DH_AssignGlobalVar,
95 DH_AddGlobalVar,
96 DH_SubtractGlobalVar,
97 DH_MultiplyGlobalVar,
98 DH_DivideGlobalVar,
99 DH_ModGlobalVar,
100 DH_IncreaseLocalVar,
101 DH_DecreaseLocalVar,
102 DH_AssignLocalVar,
103 DH_AddLocalVar,
104 DH_SubtractLocalVar,
105 DH_MultiplyLocalVar,
106 DH_DivideLocalVar,
107 DH_ModLocalVar,
108 DH_CaseGoto,
109 DH_Drop,
110 DH_IncreaseGlobalArray,
111 DH_DecreaseGlobalArray,
112 DH_AssignGlobalArray,
113 DH_AddGlobalArray,
114 DH_SubtractGlobalArray,
115 DH_MultiplyGlobalArray,
116 DH_DivideGlobalArray,
117 DH_ModGlobalArray,
118 DH_PushGlobalArray,
119 DH_Swap,
120 DH_Dup,
121 DH_ArraySet,
122 numDataHeaders
123 };
124
125 #endif // BOTC_BOTSTUFF_H

mercurial