ScummVM API documentation
spacebar.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 BAGEL_SPACEBAR_H
23#define BAGEL_SPACEBAR_H
24
25#include "bagel/bagel.h"
26#include "bagel/spacebar/baglib/bagel.h"
27#include "bagel/spacebar/bibble_window.h"
28
29namespace Bagel {
30namespace SpaceBar {
31
32class SpaceBarEngine : public BagelEngine, public CBagel {
33private:
34 StBagelSave _saveData;
35
36 ErrorCode InitializeSoundSystem(uint16 nChannels = 1, uint32 nFreq = 11025, uint16 nBitsPerSample = 8);
37 ErrorCode ShutDownSoundSystem();
38
39 bool canSaveLoadFromWindow(bool save) const;
40
41protected:
42 // Engine APIs
43 Common::Error run() override;
44
45 ErrorCode initialize() override;
46 ErrorCode shutdown() override;
47
51 void pauseEngineIntern(bool pause) override;
52
53public:
54 CBetArea g_cBetAreas[BIBBLE_NUM_BET_AREAS];
55 const CBofRect viewPortRect = CBofRect(80, 10, 559, 369);
56 CBofRect viewRect;
57 Graphics::Screen *_screen = nullptr;
58
59public:
60 SpaceBarEngine(OSystem *syst, const ADGameDescription *gameDesc);
61 ~SpaceBarEngine() override;
62 void initializePath(const Common::FSNode &gamePath) override;
63
64 Graphics::Screen *getScreen() const override {
65 return _screen;
66 }
67
68 bool shouldQuit() const override {
70 }
71
72 bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
73 bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
74
78 Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
79 Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave,
80 SpaceBar::StBagelSave &saveData);
81
85 Common::Error loadGameState(int slot) override;
86
90 Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override;
91
96};
97
99
100} // namespace SpaceBar
101} // namespace Bagel
102
103#endif
Definition: bagel.h:35
Definition: rect.h:35
Definition: bagel.h:72
Definition: bibble_window.h:58
Definition: spacebar.h:32
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
void pauseEngineIntern(bool pause) override
ErrorCode initialize() override
void initializePath(const Common::FSNode &gamePath) override
ErrorCode shutdown() override
Common::Error loadGameState(int slot) override
Common::Error run() override
Definition: error.h:81
Definition: fs.h:69
Definition: stream.h:745
Definition: str.h:59
Definition: ustr.h:57
Definition: stream.h:77
static bool shouldQuit()
Definition: screen.h:47
Definition: system.h:166
Engine * g_engine
Definition: advancedDetector.h:164
Definition: save_game_file.h:104