ScummVM API documentation
transport.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 ULTIMA_ULTIMA1_WIDGETS_TRANSPORT_H
23#define ULTIMA_ULTIMA1_WIDGETS_TRANSPORT_H
24
25#include "ultima/ultima1/widgets/overworld_widget.h"
26#include "ultima/shared/maps/map_base.h"
27
28namespace Ultima {
29namespace Ultima1 {
30namespace Widgets {
31
36public:
37 DECLARE_WIDGET(TransportOnFoot)
38
39
42 TransportOnFoot(Ultima1Game *game, Maps::MapBase *map);
43
47 uint getTileNum() const override;
48};
49
53class Transport : public OverworldWidget {
54protected:
55 uint _transportId;
56public:
60 Transport(Ultima1Game *game, Maps::MapBase *map, uint transportId);
61
65 bool isBlocking() const override { return false; }
66
70 virtual void board();
71
75 virtual void disembark();
76
80 virtual Common::String getWeaponsName() { return ""; }
81
85 uint transportId() const { return _transportId; }
86};
87
91class Horse : public Transport {
92 DECLARE_MESSAGE_MAP;
93public:
94 DECLARE_WIDGET(Horse);
95 CLASSDEF;
96
101
105 uint getTileNum() const override { return 9; }
106};
107
111class Cart : public Transport {
112 DECLARE_MESSAGE_MAP;
113public:
114 DECLARE_WIDGET(Cart);
115 CLASSDEF;
116
121
125 uint getTileNum() const override { return 10; }
126};
127
131class Raft : public Transport {
132 DECLARE_MESSAGE_MAP;
133public:
134 DECLARE_WIDGET(Raft);
135 CLASSDEF;
136
141
145 uint getTileNum() const override { return 11; }
146};
147
151class Frigate : public Transport {
152 DECLARE_MESSAGE_MAP;
153public:
154 DECLARE_WIDGET(Frigate);
155 CLASSDEF;
156
161
166
170 uint getTileNum() const override { return 12; }
171};
172
176class Aircar : public Transport {
177 DECLARE_MESSAGE_MAP;
178public:
179 DECLARE_WIDGET(Aircar);
180 CLASSDEF;
181
186
191
195 uint getTileNum() const override { return 14; }
196};
197
201class Shuttle : public Transport {
202 DECLARE_MESSAGE_MAP;
203public:
204 uint _space1, _space2;
205public:
206 DECLARE_WIDGET(Shuttle);
207 CLASSDEF;
208
213
218
222 uint getTileNum() const override { return 15; }
223};
224
228class TimeMachine : public Transport {
229 DECLARE_MESSAGE_MAP;
230public:
231 DECLARE_WIDGET(TimeMachine);
232 CLASSDEF;
233
238
242 uint getTileNum() const override { return 16; }
243
247 void board() override;
248};
249
250} // End of namespace Widgets
251} // End of namespace Ultima1
252} // End of namespace Ultima
253
254#endif
Definition: serializer.h:80
Definition: str.h:59
Definition: map_base.h:39
Definition: game.h:42
Definition: transport.h:176
Aircar(Ultima1Game *game, Maps::MapBase *map)
uint getTileNum() const override
Definition: transport.h:195
Common::String getWeaponsName() override
Definition: transport.h:111
Cart(Ultima1Game *game, Maps::MapBase *map)
uint getTileNum() const override
Definition: transport.h:125
Definition: transport.h:151
Frigate(Ultima1Game *game, Maps::MapBase *map)
uint getTileNum() const override
Definition: transport.h:170
Common::String getWeaponsName() override
Definition: transport.h:91
Horse(Ultima1Game *game, Maps::MapBase *map)
uint getTileNum() const override
Definition: transport.h:105
Definition: overworld_widget.h:42
Definition: transport.h:131
Raft(Ultima1Game *game, Maps::MapBase *map)
uint getTileNum() const override
Definition: transport.h:145
Definition: transport.h:201
uint getTileNum() const override
Definition: transport.h:222
Shuttle(Ultima1Game *game, Maps::MapBase *map)
void synchronize(Common::Serializer &s) override
Definition: transport.h:228
TimeMachine(Ultima1Game *game, Maps::MapBase *map)
uint getTileNum() const override
Definition: transport.h:242
Definition: transport.h:53
virtual Common::String getWeaponsName()
Definition: transport.h:80
bool isBlocking() const override
Definition: transport.h:65
uint transportId() const
Definition: transport.h:85
Transport(Ultima1Game *game, Maps::MapBase *map, uint transportId)