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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef HOPKINS_DIALOGS_H
24 #define HOPKINS_DIALOGS_H
25 
26 #include "common/scummsys.h"
27 #include "common/system.h"
28 #include "common/error.h"
29 #include "common/rect.h"
30 
31 namespace Hopkins {
32 
33 class HopkinsEngine;
34 
35 enum SaveLoadMode { MODE_SAVE = 1, MODE_LOAD = 2 };
36 
37 /**
38  * Class for manging game dialogs
39  */
40 class DialogsManager {
41 private:
42 	byte *_inventWin1;
43 	byte *_inventBuf2;
44 	byte *_inventoryIcons;
45 	bool _inventDisplayedFl;
46 	bool _removeInventFl;
47 	int _inventX, _inventY;
48 	int _inventWidth, _inventHeight;
49 	int _oldInventX;
50 
51 	HopkinsEngine *_vm;
52 
53 	void showSaveLoad(SaveLoadMode mode);
54 	int  searchSavegames();
55 public:
56 	bool _inventFl;
57 
58 	DialogsManager(HopkinsEngine *vm);
59 	~DialogsManager();
60 	void inventAnim();
61 	void showInventory();
62 	void showLoadGame();
63 	void showSaveGame();
64 	void showOptionsDialog();
65 	void testDialogOpening();
66 	void clearAll();
67 
68 	void drawInvent(Common::Point oldBorder, int oldBorderSpriteIndex, Common::Point newBorder, int newBorderSpriteIndex);
69 	void loadIcons();
70 
disableInvent()71 	void disableInvent() { _removeInventFl = true; }
enableInvent()72 	void enableInvent()  { _removeInventFl = false; }
73 };
74 
75 } // End of namespace Hopkins
76 
77 #endif /* HOPKINS_MENU_H */
78