2 * Copyright (C) 2009 Neverball contributors
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
19 * In an attempt to improve replay compatibility, a few guidelines
20 * apply to command addition, removal, and modification:
22 * - New commands are added at the bottom of the list.
24 * - Existing commands are never modified nor removed.
26 * - The list is never reordered. (It's tempting...)
28 * However, commands can be renamed (e.g., to add a "deprecated" tag,
29 * because it's superseded by another command).
53 CMD_UPDATES_PER_SECOND,
71 * Here are the members common to all structures. Note that it
72 * explicitly says "enum cmd_type", not "int". This allows GCC to
73 * catch and warn about unhandled command types in switch constructs
74 * (handy when adding new commands).
80 struct cmd_end_of_update
137 struct cmd_jump_enter
166 struct cmd_swch_enter
172 struct cmd_swch_toggle
184 struct cmd_updates_per_second
190 struct cmd_ball_radius
196 struct cmd_clear_items
201 struct cmd_clear_balls
206 struct cmd_ball_position
212 struct cmd_ball_basis
218 struct cmd_ball_pend_basis
224 struct cmd_view_position
230 struct cmd_view_center
236 struct cmd_view_basis
242 struct cmd_current_ball
255 struct cmd_step_simulation
264 struct cmd_end_of_update eou;
265 struct cmd_make_ball mkball;
266 struct cmd_make_item mkitem;
267 struct cmd_pick_item pkitem;
268 struct cmd_rotate rotate;
269 struct cmd_sound sound;
270 struct cmd_timer timer;
271 struct cmd_status status;
272 struct cmd_coins coins;
273 struct cmd_jump_enter jumpenter;
274 struct cmd_jump_exit jumpexit;
275 struct cmd_body_path bodypath;
276 struct cmd_body_time bodytime;
277 struct cmd_goal_open goalopen;
278 struct cmd_swch_enter swchenter;
279 struct cmd_swch_toggle swchtoggle;
280 struct cmd_swch_exit swchexit;
281 struct cmd_updates_per_second ups;
282 struct cmd_ball_radius ballradius;
283 struct cmd_clear_items clritems;
284 struct cmd_clear_balls clrballs;
285 struct cmd_ball_position ballpos;
286 struct cmd_ball_basis ballbasis;
287 struct cmd_ball_pend_basis ballpendbasis;
288 struct cmd_view_position viewpos;
289 struct cmd_view_center viewcenter;
290 struct cmd_view_basis viewbasis;
291 struct cmd_current_ball currball;
292 struct cmd_path_flag pathflag;
293 struct cmd_step_simulation stepsim;
296 /* No module should see this. */
301 int cmd_put(FILE *, const union cmd *);
302 int cmd_get(FILE *, union cmd *);