1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
*
* movable.cpp
*
* 15th January 2010: Created movable.cpp
*
* Part of the OpenJazz project
*
*
* Copyright (c) 2005-2010 Alister Thomson
*
* OpenJazz is distributed under the terms of
* the GNU General Public License, version 2.0
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/*
* Contains the base class for all movable objects.
*
*/
#include "movable.h"
fixed Movable::getDrawX (int change) {
return x + ((dx * change) >> 10);
}
fixed Movable::getDrawY (int change) {
return y + ((dy * change) >> 10);
}
fixed Movable::getX () {
return x;
}
fixed Movable::getY () {
return y;
}