ScummVM API documentation
tavern.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_TAVERN_H
23 #define ULTIMA_ULTIMA1_U1DIALOGS_TAVERN_H
24 
25 #include "ultima/ultima1/u1dialogs/buy_sell_dialog.h"
26 
27 namespace Ultima {
28 namespace Ultima1 {
29 namespace Maps {
30  class MapCityCastle;
31 }
32 
33 namespace U1Dialogs {
34 
38 class Tavern : public BuySellDialog {
39  DECLARE_MESSAGE_MAP;
40  bool FrameMsg(CFrameMsg *msg);
41 private:
42  Maps::MapCityCastle *_map;
43  //uint _tavernNum;
44  uint _tipNumber;
45  uint _countdown;
46  enum { INITIAL, TIP0, TIP_PAGE1, TIP_PAGE2 } _buyDisplay;
47 private:
51  void delay(uint amount = 4 * DIALOG_CLOSE_DELAY) {
52  _countdown = amount;
53  setDirty();
54  }
55 
59  void close();
60 
64  void drawBuy();
65 
69  void drawSell();
70 protected:
74  void setMode(BuySell mode) override;
75 public:
76  CLASSDEF;
77 
81  Tavern(Ultima1Game *game, Maps::MapCityCastle *map, int tavernNum);
82 
86  void draw() override;
87 };
88 
89 } // End of namespace U1Dialogs
90 } // End of namespace Ultima1
91 } // End of namespace Ultima
92 
93 #endif
Definition: messages.h:225
Definition: detection.h:27
Definition: game.h:42
Definition: buy_sell_dialog.h:43
Definition: map_city_castle.h:44
Definition: tavern.h:38