ScummVM API documentation
location_logic.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 ULTIMA3_LOGIC_LOCATION_LOGIC_H
23#define ULTIMA3_LOGIC_LOCATION_LOGIC_H
24
25#include "common/rect.h"
26#include "ultima/ultima3/logic/logic.h"
27
28namespace Ultima {
29namespace Ultima3 {
30
31struct Entrance;
32
33constexpr byte TRANSPORT_HORSE = 0x0A;
34constexpr byte TRANSPORT_SHIP = 0x0B;
35constexpr byte TRANSPORT_ON_FOOT = 0x3F;
36
40class LocationLogic : public Logic {
41private:
45 const char *go(const Entrance &entrance, byte tile);
46
51 bool isShipBlockedByWind(Direction dir) const;
52
57 bool isTerrainBlocked(byte tile);
58
59public:
60 enum ExitResult {
61 EXIT_NOT_RIDING,
62 EXIT_NOT_HERE,
63 EXIT_DONE
64 };
65
70 bool move(Direction dir);
71
76
81
85 void setMoonPhases(byte left, byte right);
86
87 bool isOnMoonGate() const;
88
92 bool isInExodusCastle() const;
93
98
99 bool isOnWhirlpool() const;
100
106
112
117 const char *board();
118
122 ExitResult exitVehicle();
123
129 const char *enter();
130
136 const char *enterLocation(int index);
137
141 static int entranceCount();
142 static const char *entranceFilename(int index);
143 static Common::Point entrancePosition(int index);
144
149 bool isAtExit() const;
150
155};
156
157} // namespace Ultima3
158} // namespace Ultima
159
160#endif
Definition: location_logic.h:40
bool move(Direction dir)
const char * enterLocation(int index)
void setMoonPhases(byte left, byte right)
Definition: logic.h:43
Definition: rect.h:144