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 
28 namespace Ultima {
29 namespace Ultima1 {
30 namespace Widgets {
31 
36 public:
37  DECLARE_WIDGET(TransportOnFoot)
38 
39 
43 
47  uint getTileNum() const override;
48 };
49 
53 class Transport : public OverworldWidget {
54 protected:
55  uint _transportId;
56 public:
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 
91 class Horse : public Transport {
92  DECLARE_MESSAGE_MAP;
93 public:
94  DECLARE_WIDGET(Horse);
95  CLASSDEF;
96 
100  Horse(Ultima1Game *game, Maps::MapBase *map);
101 
105  uint getTileNum() const override { return 9; }
106 };
107 
111 class Cart : public Transport {
112  DECLARE_MESSAGE_MAP;
113 public:
114  DECLARE_WIDGET(Cart);
115  CLASSDEF;
116 
120  Cart(Ultima1Game *game, Maps::MapBase *map);
121 
125  uint getTileNum() const override { return 10; }
126 };
127 
131 class Raft : public Transport {
132  DECLARE_MESSAGE_MAP;
133 public:
134  DECLARE_WIDGET(Raft);
135  CLASSDEF;
136 
140  Raft(Ultima1Game *game, Maps::MapBase *map);
141 
145  uint getTileNum() const override { return 11; }
146 };
147 
151 class Frigate : public Transport {
152  DECLARE_MESSAGE_MAP;
153 public:
154  DECLARE_WIDGET(Frigate);
155  CLASSDEF;
156 
160  Frigate(Ultima1Game *game, Maps::MapBase *map);
161 
165  Common::String getWeaponsName() override;
166 
170  uint getTileNum() const override { return 12; }
171 };
172 
176 class Aircar : public Transport {
177  DECLARE_MESSAGE_MAP;
178 public:
179  DECLARE_WIDGET(Aircar);
180  CLASSDEF;
181 
185  Aircar(Ultima1Game *game, Maps::MapBase *map);
186 
190  Common::String getWeaponsName() override;
191 
195  uint getTileNum() const override { return 14; }
196 };
197 
201 class Shuttle : public Transport {
202  DECLARE_MESSAGE_MAP;
203 public:
204  uint _space1, _space2;
205 public:
206  DECLARE_WIDGET(Shuttle);
207  CLASSDEF;
208 
212  Shuttle(Ultima1Game *game, Maps::MapBase *map);
213 
217  void synchronize(Common::Serializer &s) override;
218 
222  uint getTileNum() const override { return 15; }
223 };
224 
228 class TimeMachine : public Transport {
229  DECLARE_MESSAGE_MAP;
230 public:
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
uint getTileNum() const override
Definition: transport.h:145
uint getTileNum() const override
Definition: transport.h:105
Definition: overworld_widget.h:42
Definition: str.h:59
bool isBlocking() const override
Definition: transport.h:65
Definition: transport.h:53
uint transportId() const
Definition: transport.h:85
Definition: transport.h:176
TransportOnFoot(Ultima1Game *game, Maps::MapBase *map)
virtual Common::String getWeaponsName()
Definition: transport.h:80
uint getTileNum() const override
Definition: transport.h:195
Definition: transport.h:91
Definition: serializer.h:79
void synchronize(Common::Serializer &s) override
Definition: transport.h:201
Definition: map_base.h:39
Definition: detection.h:27
Definition: transport.h:131
Definition: transport.h:111
Definition: game.h:42
uint getTileNum() const override
Definition: transport.h:242
uint getTileNum() const override
Definition: transport.h:170
Definition: transport.h:151
uint getTileNum() const override
Definition: transport.h:222
uint getTileNum() const override
Definition: transport.h:125
Definition: transport.h:228