src/botstuff.h

changeset 75
bf8c57437231
child 85
264a61e9eba0
equal deleted inserted replaced
74:007fbadfa7f9 75:bf8c57437231
1 // Macros and enums from zandronum bots.h
2
3 #ifndef BOTC_BOTSTUFF_H
4 #define BOTC_BOTSTUFF_H
5
6 static const int g_max_states = 256;
7 static const int g_max_events = 32;
8 static const int g_max_global_events = 32;
9 static const int g_max_global_vars = 128;
10 static const int g_max_global_arrays = 16;
11 static const int g_max_array_size = 65536;
12 static const int g_max_state_vars = 16;
13 static const int g_max_stringlist_size = 128;
14 static const int g_max_string_length = 256;
15 static const int g_max_reaction_time = 52;
16 static const int g_max_stored_events = 64;
17
18 enum e_data_header
19 {
20 dh_command,
21 dh_state_index,
22 dh_state_name,
23 dh_on_enter,
24 dh_main_loop,
25 dh_on_exit,
26 dh_event,
27 dh_end_on_enter,
28 dh_end_main_loop,
29 dh_end_on_exit,
30 dh_end_event,
31 dh_if_goto,
32 dh_if_not_goto,
33 dh_goto,
34 dh_or_logical,
35 dh_and_logical,
36 dh_or_bitwise,
37 dh_eor_bitwise,
38 dh_and_bitwise,
39 dh_equals,
40 dh_not_equals,
41 dh_less_than,
42 dh_at_most,
43 dh_greater_than,
44 dh_at_least,
45 dh_negate_logical,
46 dh_left_shift,
47 dh_right_shift,
48 dh_add,
49 dh_subtract,
50 dh_unary_minus,
51 dh_multiply,
52 dh_divide,
53 dh_modulus,
54 dh_push_number,
55 dh_push_string_index,
56 dh_push_global_var,
57 dh_push_local_var,
58 dh_drop_stack_position,
59 dh_script_var_list,
60 dh_string_list,
61 dh_increase_global_var,
62 dh_decrease_global_var,
63 dh_assign_global_var,
64 dh_add_global_var,
65 dh_subtract_global_var,
66 dh_multiply_global_var,
67 dh_divide_global_var,
68 dh_mod_global_var,
69 dh_increase_local_var,
70 dh_decrease_local_var,
71 dh_assign_local_var,
72 dh_add_local_var,
73 dh_subtract_local_var,
74 dh_multiply_local_var,
75 dh_divide_local_var,
76 dh_mod_local_var,
77 dh_case_goto,
78 dh_drop,
79 dh_increase_global_array,
80 dh_decrease_global_array,
81 dh_assign_global_array,
82 dh_add_global_array,
83 dh_subtract_global_array,
84 dh_multiply_global_array,
85 dh_divide_global_array,
86 dh_mod_global_array,
87 dh_push_global_array,
88 dh_swap,
89 dh_dup,
90 dh_array_set,
91 num_data_headers
92 };
93
94 //*****************************************************************************
95 // These are the different bot events that can be posted to a bot's state.
96 enum e_event
97 {
98 ev_killed_by_enemy,
99 ev_killed_by_player,
100 ev_killed_by_self,
101 ev_killed_by_environment,
102 ev_reached_goal,
103 ev_goal_removed,
104 ev_damaged_by_player,
105 ev_player_say,
106 ev_enemy_killed,
107 ev_respawned,
108 ev_intermission,
109 ev_new_maps,
110 ev_enemy_used_fist,
111 ev_enemy_used_chainsaw,
112 ev_enemy_fired_pistol,
113 ev_enemy_fired_shotgun,
114 ev_enemy_fired_ssg,
115 ev_enemy_fired_chaingun,
116 ev_enemy_fired_minigun,
117 ev_enemy_fired_rocket,
118 ev_enemy_fired_grenade,
119 ev_enemy_fired_railgun,
120 ev_enemy_fired_plasma,
121 ev_enemy_fired_bfg,
122 ev_enemy_fired_bfg10k,
123 ev_player_used_fist,
124 ev_player_used_chainsaw,
125 ev_player_fired_pistol,
126 ev_player_fired_shotgun,
127 ev_player_fired_ssg,
128 ev_player_fired_chaingun,
129 ev_player_fired_minigun,
130 ev_player_fired_rocket,
131 ev_player_fired_grenade,
132 ev_player_fired_railgun,
133 ev_player_fired_plasma,
134 ev_player_fired_bfg,
135 ev_player_fired_bfg10k,
136 ev_used_fist,
137 ev_used_chainsaw,
138 ev_fired_pistol,
139 ev_fired_shotgun,
140 ev_fired_ssg,
141 ev_fired_chaingun,
142 ev_fired_minigun,
143 ev_fired_rocket,
144 ev_fired_grenade,
145 ev_fired_railgun,
146 ev_fired_plasma,
147 ev_fired_bfg,
148 ev_fired_bfg10k,
149 ev_player_joined_game,
150 ev_joined_game,
151 ev_duel_starting_countdown,
152 ev_duel_fight,
153 ev_duel_win_sequence,
154 ev_spectating,
155 ev_lms_starting_countdown,
156 ev_lms_fight,
157 ev_lms_win_sequence,
158 ev_weapon_change,
159 ev_enemy_bfg_explode,
160 ev_player_bfg_explode,
161 ev_bfg_explode,
162 ev_recieved_medal,
163
164 num_bot_events
165 };
166
167 #endif // BOTC_BOTSTUFF_H

mercurial