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,
74 * Here are the members common to all structures. Note that it
75 * explicitly says "enum cmd_type", not "int". This allows GCC to
76 * catch and warn about unhandled command types in switch constructs
77 * (handy when adding new commands).
83 struct cmd_end_of_update
107 struct cmd_tilt_angles
139 struct cmd_jump_enter
168 struct cmd_swch_enter
174 struct cmd_swch_toggle
186 struct cmd_updates_per_second
192 struct cmd_ball_radius
198 struct cmd_clear_items
203 struct cmd_clear_balls
208 struct cmd_ball_position
214 struct cmd_ball_basis
220 struct cmd_ball_pend_basis
226 struct cmd_view_position
232 struct cmd_view_center
238 struct cmd_view_basis
244 struct cmd_current_ball
257 struct cmd_step_simulation
279 struct cmd_body_orientation
289 struct cmd_end_of_update eou;
290 struct cmd_make_ball mkball;
291 struct cmd_make_item mkitem;
292 struct cmd_pick_item pkitem;
293 struct cmd_tilt_angles tiltangles;
294 struct cmd_sound sound;
295 struct cmd_timer timer;
296 struct cmd_status status;
297 struct cmd_coins coins;
298 struct cmd_jump_enter jumpenter;
299 struct cmd_jump_exit jumpexit;
300 struct cmd_body_path bodypath;
301 struct cmd_body_time bodytime;
302 struct cmd_goal_open goalopen;
303 struct cmd_swch_enter swchenter;
304 struct cmd_swch_toggle swchtoggle;
305 struct cmd_swch_exit swchexit;
306 struct cmd_updates_per_second ups;
307 struct cmd_ball_radius ballradius;
308 struct cmd_clear_items clritems;
309 struct cmd_clear_balls clrballs;
310 struct cmd_ball_position ballpos;
311 struct cmd_ball_basis ballbasis;
312 struct cmd_ball_pend_basis ballpendbasis;
313 struct cmd_view_position viewpos;
314 struct cmd_view_center viewcenter;
315 struct cmd_view_basis viewbasis;
316 struct cmd_current_ball currball;
317 struct cmd_path_flag pathflag;
318 struct cmd_step_simulation stepsim;
320 struct cmd_tilt_axes tiltaxes;
321 struct cmd_body_orientation bodyorient;
324 /* No module should see this. */
329 int cmd_put(fs_file, const union cmd *);
330 int cmd_get(fs_file, union cmd *);