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,
72 * Here are the members common to all structures. Note that it
73 * explicitly says "enum cmd_type", not "int". This allows GCC to
74 * catch and warn about unhandled command types in switch constructs
75 * (handy when adding new commands).
81 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
274 struct cmd_end_of_update eou;
275 struct cmd_make_ball mkball;
276 struct cmd_make_item mkitem;
277 struct cmd_pick_item pkitem;
278 struct cmd_rotate rotate;
279 struct cmd_sound sound;
280 struct cmd_timer timer;
281 struct cmd_status status;
282 struct cmd_coins coins;
283 struct cmd_jump_enter jumpenter;
284 struct cmd_jump_exit jumpexit;
285 struct cmd_body_path bodypath;
286 struct cmd_body_time bodytime;
287 struct cmd_goal_open goalopen;
288 struct cmd_swch_enter swchenter;
289 struct cmd_swch_toggle swchtoggle;
290 struct cmd_swch_exit swchexit;
291 struct cmd_updates_per_second ups;
292 struct cmd_ball_radius ballradius;
293 struct cmd_clear_items clritems;
294 struct cmd_clear_balls clrballs;
295 struct cmd_ball_position ballpos;
296 struct cmd_ball_basis ballbasis;
297 struct cmd_ball_pend_basis ballpendbasis;
298 struct cmd_view_position viewpos;
299 struct cmd_view_center viewcenter;
300 struct cmd_view_basis viewbasis;
301 struct cmd_current_ball currball;
302 struct cmd_path_flag pathflag;
303 struct cmd_step_simulation stepsim;
307 /* No module should see this. */
312 int cmd_put(fs_file, const union cmd *);
313 int cmd_get(fs_file, union cmd *);