ScummVM API documentation
base_enhancements.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 HOPKINS_BASE_ENHANCEMENTS_H
23#define HOPKINS_BASE_ENHANCEMENTS_H
24
25#include "common/scummsys.h"
26#include "common/str.h"
27
28namespace Hopkins {
29
30class BaseData;
31class BaseEngine;
32
33static const char *const kWBASEEnhancementsConfigKey = "wbase_enhancements";
34static const char *const kWBASEForcedAutoplayConfigKey = "wbase_forced_autoplay";
35static const char *const kWBASEEnhancementsKeymapId = "hopkins-wbase-enhancements";
36
37enum WBASEEnhancementPanel {
38 kWBASEEnhancementPanelNone,
39 kWBASEEnhancementPanelNavigationMap,
40 kWBASEEnhancementPanelAutoplay
41};
42
43enum WBASEEnhancementControl {
44 kWBASEEnhancementControlNone,
45 kWBASEEnhancementControlNavigationMap,
46 kWBASEEnhancementControlAutoplay,
47 kWBASEEnhancementControlForward,
48 kWBASEEnhancementControlBackward,
49 kWBASEEnhancementControlTurnLeft,
50 kWBASEEnhancementControlTurnRight,
51 kWBASEEnhancementControlFire,
52 kWBASEEnhancementControlExit,
53 kWBASEEnhancementControlEscape
54};
55
57public:
58 explicit WBASEEnhancements(const Common::String &targetName);
59
60 bool enabled() const { return _enabled; }
61 bool forcedAutoplayEnabled() const { return _forcedAutoplay; }
62 bool controlsEnabled() const { return _enabled || _forcedAutoplay; }
63 bool navigationMapEnabled() const { return controlsEnabled(); }
64 void renderNavigationMap(const BaseData &data, const BaseEngine &engine, byte *framebuffer) const;
65 WBASEEnhancementControl controlAtPoint(int x, int y) const;
66 bool controlEnabled(WBASEEnhancementControl control, WBASEEnhancementPanel panel) const;
67 void renderControls(const BaseData &data, WBASEEnhancementPanel panel,
68 WBASEEnhancementControl hoveredControl, uint32 pressedControls,
69 bool autoplayActive, byte *framebuffer) const;
70
71private:
72 bool _enabled;
73 bool _forcedAutoplay;
74};
75
76} // End of namespace Hopkins
77
78#endif // HOPKINS_BASE_ENHANCEMENTS_H
Definition: str.h:59
Definition: base_data.h:35
Definition: base_engine.h:57
Definition: base_enhancements.h:56
Definition: anim.h:30