ScummVM API documentation
movement.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef ULTIMA4_MAP_MOVEMENT_H
23#define ULTIMA4_MAP_MOVEMENT_H
24
25#include "ultima/ultima4/map/direction.h"
26#include "ultima/ultima4/map/map.h"
27
28namespace Ultima {
29namespace Ultima4 {
30
31class Object;
32class Map;
33class Tile;
34
35enum SlowedType {
36 SLOWED_BY_NOTHING,
37 SLOWED_BY_TILE,
38 SLOWED_BY_WIND
39};
40
41enum MoveResult {
42 MOVE_SUCCEEDED = 0x0001,
43 MOVE_END_TURN = 0x0002,
44 MOVE_BLOCKED = 0x0004,
45 MOVE_MAP_CHANGE = 0x0008,
46 MOVE_TURNED = 0x0010, /* dungeons and ship movement */
47 MOVE_DRIFT_ONLY = 0x0020, /* balloon -- no movement */
48 MOVE_EXIT_TO_PARENT = 0x0040,
49 MOVE_SLOWED = 0x0080,
50 MOVE_MUST_USE_SAME_EXIT = 0x0100
51};
52
53class MoveEvent {
54public:
55 MoveEvent(Direction d, bool user) : _dir(d), _userEvent(user), _result(MOVE_SUCCEEDED) {}
56
57 Direction _dir;
59 MoveResult _result;
60};
61
67void moveAvatar(MoveEvent &event);
68
72void moveAvatarInDungeon(MoveEvent &event);
73
80int moveObject(class Map *map, class Creature *obj, MapCoords avatar);
81
85int moveCombatObject(int action, class Map *map, class Creature *obj, MapCoords target);
86
90void movePartyMember(MoveEvent &event);
91
96bool slowedByTile(const Tile *tile);
97
102bool slowedByWind(int direction);
103
104} // End of namespace Ultima4
105} // End of namespace Ultima
106
107#endif
Definition: creature.h:159
Definition: map.h:64
Definition: map.h:134
Definition: movement.h:53
bool _userEvent
Definition: movement.h:58
MoveResult _result
Definition: movement.h:59
Direction _dir
Definition: movement.h:57
Definition: tile.h:64