1 /*
2 * XPilot NG, a multiplayer space war game.
3 *
4 * Copyright (C) 1991-2001 by
5 *
6 * Bj�rn Stabell <bjoern@xpilot.org>
7 * Ken Ronny Schouten <ken@xpilot.org>
8 * Bert Gijsbers <bert@xpilot.org>
9 * Dick Balaska <dick@xpilot.org>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26 #ifndef OBJPOS_H
27 #define OBJPOS_H
28
29 void Object_position_set_clpos(object_t *obj, clpos_t pos);
30 void Object_position_init_clpos(object_t *obj, clpos_t pos);
31 void Object_position_restore(object_t *obj);
32 void Object_position_limit(object_t *obj);
33 void Player_position_debug(player_t *pl, const char *msg);
34
Object_position_remember(object_t * obj)35 static inline void Object_position_remember(object_t *obj)
36 {
37 obj->prevpos = obj->pos;
38 }
39
Object_position_set_clvec(object_t * obj,clvec_t vec)40 static inline void Object_position_set_clvec(object_t *obj, clvec_t vec)
41 {
42 clpos_t pos;
43
44 pos.cx = vec.cx;
45 pos.cy = vec.cy;
46
47 Object_position_set_clpos(obj, pos);
48 }
49
50 #endif
51