ScummVM API documentation
transports.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_U1DIALOGS_TRANSPORTS_H
23 #define ULTIMA_ULTIMA1_U1DIALOGS_TRANSPORTS_H
24 
25 #include "ultima/ultima1/u1dialogs/buy_sell_dialog.h"
26 
27 namespace Ultima {
28 namespace Ultima1 {
29 namespace U1Dialogs {
30 
31 using Shared::CCharacterInputMsg;
32 
36 class Transports : public BuySellDialog {
37  DECLARE_MESSAGE_MAP;
38  bool CharacterInputMsg(CCharacterInputMsg *msg) override;
39 private:
40  uint _water, _woods, _grass;
41  bool _hasFreeTiles, _hasShuttle, _isClosed;
42  uint _transportCount;
43  bool _transports[6];
44 private:
48  void loadOverworldFreeTiles();
49 
53  void drawBuy();
54 
58  void drawSell();
59 
63  uint getBuyCost(int transportIndex) const;
64 
68  void addTransport(int transportIndex);
69 protected:
73  void setMode(BuySell mode) override;
74 public:
75  CLASSDEF;
76 
80  Transports(Ultima1Game *game, int transportNum);
81 
85  void draw() override;
86 };
87 
88 } // End of namespace U1Dialogs
89 } // End of namespace Ultima1
90 } // End of namespace Ultima
91 
92 #endif
Transports(Ultima1Game *game, int transportNum)
Definition: messages.h:290
Definition: transports.h:36
Definition: detection.h:27
Definition: game.h:42
void setMode(BuySell mode) override
Definition: buy_sell_dialog.h:43