ScummVM API documentation
portal.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_GAME_PORTAL_H
23#define ULTIMA4_GAME_PORTAL_H
24
25#include "ultima/ultima4/game/context.h"
26#include "ultima/ultima4/map/map.h"
27
28namespace Ultima {
29namespace Ultima4 {
30
31class Map;
32class Location;
33struct Portal;
34
35typedef enum {
36 ACTION_NONE = 0x0,
37 ACTION_ENTER = 0x1,
38 ACTION_KLIMB = 0x2,
39 ACTION_DESCEND = 0x4,
40 ACTION_EXIT_NORTH = 0x8,
41 ACTION_EXIT_EAST = 0x10,
42 ACTION_EXIT_SOUTH = 0x20,
43 ACTION_EXIT_WEST = 0x40
44} PortalTriggerAction;
45
46typedef bool (*PortalConditionsMet)(const Portal *p);
47
49 MapCoords _coords;
50 MapId _mapid;
51};
52
53struct Portal {
54 MapCoords _coords;
55 MapId _destid;
56 MapCoords _start;
57 PortalTriggerAction _triggerAction;
58 PortalConditionsMet _portalConditionsMet;
59 PortalDestination *_retroActiveDest;
60 bool _saveLocation;
61 Common::String _message;
62 TransportContext _portalTransportRequisites;
63 bool _exitPortal;
64 int _tile;
65};
66
70void createDngLadder(Location *location, PortalTriggerAction action, Portal *p);
71
77int usePortalAt(Location *location, MapCoords coords, PortalTriggerAction action);
78
79} // End of namespace Ultima4
80} // End of namespace Ultima
81
82#endif
Definition: str.h:59
Definition: location.h:49
Definition: map.h:64
Definition: portal.h:48
Definition: portal.h:53