2 * Copyright (C) 2009 Neverball authors
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,
73 * Here are the members common to all structures. Note that it
74 * explicitly says "enum cmd_type", not "int". This allows GCC to
75 * catch and warn about unhandled command types in switch constructs
76 * (handy when adding new commands).
82 struct cmd_end_of_update
106 struct cmd_tilt_angles
138 struct cmd_jump_enter
167 struct cmd_swch_enter
173 struct cmd_swch_toggle
185 struct cmd_updates_per_second
191 struct cmd_ball_radius
197 struct cmd_clear_items
202 struct cmd_clear_balls
207 struct cmd_ball_position
213 struct cmd_ball_basis
219 struct cmd_ball_pend_basis
225 struct cmd_view_position
231 struct cmd_view_center
237 struct cmd_view_basis
243 struct cmd_current_ball
256 struct cmd_step_simulation
281 struct cmd_end_of_update eou;
282 struct cmd_make_ball mkball;
283 struct cmd_make_item mkitem;
284 struct cmd_pick_item pkitem;
285 struct cmd_tilt_angles tiltangles;
286 struct cmd_sound sound;
287 struct cmd_timer timer;
288 struct cmd_status status;
289 struct cmd_coins coins;
290 struct cmd_jump_enter jumpenter;
291 struct cmd_jump_exit jumpexit;
292 struct cmd_body_path bodypath;
293 struct cmd_body_time bodytime;
294 struct cmd_goal_open goalopen;
295 struct cmd_swch_enter swchenter;
296 struct cmd_swch_toggle swchtoggle;
297 struct cmd_swch_exit swchexit;
298 struct cmd_updates_per_second ups;
299 struct cmd_ball_radius ballradius;
300 struct cmd_clear_items clritems;
301 struct cmd_clear_balls clrballs;
302 struct cmd_ball_position ballpos;
303 struct cmd_ball_basis ballbasis;
304 struct cmd_ball_pend_basis ballpendbasis;
305 struct cmd_view_position viewpos;
306 struct cmd_view_center viewcenter;
307 struct cmd_view_basis viewbasis;
308 struct cmd_current_ball currball;
309 struct cmd_path_flag pathflag;
310 struct cmd_step_simulation stepsim;
312 struct cmd_tilt_axes tiltaxes;
319 int cmd_put(fs_file, const union cmd *);
320 int cmd_get(fs_file, union cmd *);
322 void cmd_free(union cmd *);