97 lines
2.5 KiB
C++
97 lines
2.5 KiB
C++
/* ScummVM - Graphic Adventure Engine
|
|
*
|
|
* ScummVM is the legal property of its developers, whose names
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
* file distributed with this source distribution.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#ifndef HODJNPODJ_H
|
|
#define HODJNPODJ_H
|
|
|
|
#include "common/scummsys.h"
|
|
#include "bagel/bagel.h"
|
|
#include "bagel/hodjnpodj/metagame/bgen/bfc.h"
|
|
|
|
namespace Bagel {
|
|
namespace HodjNPodj {
|
|
|
|
class HodjNPodjEngine : public BagelEngine {
|
|
private:
|
|
//CBofSound *_backgroundMidi = nullptr;
|
|
|
|
protected:
|
|
// Engine APIs
|
|
Common::Error run() override;
|
|
|
|
public:
|
|
Common::String _gameId;
|
|
Metagame::CBfcMgr _bfcMgr;
|
|
Graphics::Surface _boardgameThumbnail;
|
|
|
|
public:
|
|
HodjNPodjEngine(OSystem *syst, const ADGameDescription *gameDesc);
|
|
~HodjNPodjEngine() override;
|
|
|
|
Graphics::Screen *getScreen() const override;
|
|
|
|
/**
|
|
* Gets a random number
|
|
*/
|
|
uint32 getRandomNumber(uint maxNum) {
|
|
return BagelEngine::getRandomNumber(maxNum);
|
|
}
|
|
|
|
bool hasFeature(EngineFeature f) const override {
|
|
return
|
|
(f == kSupportsLoadingDuringRuntime) ||
|
|
(f == kSupportsSavingDuringRuntime) ||
|
|
(f == kSupportsReturnToLauncher);
|
|
};
|
|
|
|
bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override {
|
|
return true;
|
|
}
|
|
bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override {
|
|
return true;
|
|
}
|
|
bool canSaveAutosaveCurrently() override {
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Uses a serializer to allow implementing savegame
|
|
* loading and saving using a single method
|
|
*/
|
|
Common::Error syncGame(Common::Serializer &s);
|
|
|
|
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override {
|
|
Common::Serializer s(nullptr, stream);
|
|
return syncGame(s);
|
|
}
|
|
Common::Error loadGameStream(Common::SeekableReadStream *stream) override {
|
|
Common::Serializer s(stream, nullptr);
|
|
return syncGame(s);
|
|
}
|
|
};
|
|
|
|
extern HodjNPodjEngine *g_engine;
|
|
|
|
} // namespace HodjNPodj
|
|
} // namespace Bagel
|
|
|
|
#endif
|