ScummVM API documentation
macgui_v6.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 SCUMM_MACGUI_MACGUI_V6_H
23#define SCUMM_MACGUI_MACGUI_V6_H
24
25#include "common/events.h"
26#include "common/rect.h"
27#include "common/str.h"
28
29namespace Scumm {
30
31class MacGuiImpl;
32
33class MacV6Gui : public MacGuiImpl {
34private:
35 Common::String _gameName;
36
37 Graphics::Surface *_backupScreen;
38 byte *_backupPalette;
39
40 int _screenSaveLevel = 0;
41 bool _skipScene = false;
42
43#if ENABLE_SCUMM_7_8
44 // V7 games don't honor the music_mute and sfx_mute settings, so we
45 // have to set the volume directly.
46
47 int _oldMusicVolume = -1;
48 int _oldSfxVolume = -1;
49#endif
50
51public:
52 MacV6Gui(ScummEngine *vm, const Common::Path &resourceFile);
53 ~MacV6Gui();
54
55 bool initialize() override;
56 bool readStrings() override;
57
58 const Common::String name() const override { return _gameName; }
59 int getNumColors() const override { return 256; }
60
61 // See setMacGuiColors()
62 uint32 getBlack() const override { return 255; }
63 uint32 getWhite() const override { return 254; }
64
65 void updateWindowManager() override;
66
67 const Graphics::Font *getFontByScummId(int32 id) override;
68
69 void setupCursor(int &width, int &height, int &hotspotX, int &hotspotY, int &animate) override;
70
71 void resetAfterLoad() override;
72 void update(int delta) override {}
73
74 void updateThumbnail(MacDialogWindow *window, Common::Rect drawArea, int saveSlot);
75
76protected:
77 bool getFontParams(FontId fontId, int &id, int &size, int &slant) const override;
78
79 void updateMenus() override;
80 bool handleMenu(int id, Common::String &name) override;
81
82 void saveScreen() override;
83 void restoreScreen() override;
84
85 void onMenuOpen() override;
86 void onMenuClose() override;
87
88 void drawDottedFrame(MacDialogWindow *window, Common::Rect bounds, int x1, int x2);
89
90 MacGuiImpl::MacImageSlider *addSlider(MacDialogWindow *window, int x, int y, int width, int minValue, int maxValue, int primaryMarkings = 4);
91
92 void setVolume(int type, int volume);
93
94 void runAboutDialog() override;
95 bool runOpenDialog(int &saveSlotToHandle) override;
96 bool runSaveDialog(int &saveSlotToHandle, Common::String &saveName) override;
97 bool runOptionsDialog() override;
98 bool runQuitDialog() override;
99 bool runRestartDialog() override;
100};
101
102} // End of namespace Scumm
103
104#endif
Definition: path.h:52
Definition: str.h:59
Definition: font.h:83
Definition: macgui_impl.h:665
Definition: macgui_impl.h:555
Definition: macgui_impl.h:52
Definition: macgui_v6.h:33
Definition: scumm.h:536
Definition: actor.h:30
Definition: rect.h:536
Definition: surface.h:67