mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
FULLPIPE: Simplify demo check in the engine
This commit is contained in:
parent
a95be40dcd
commit
8f4a662b1d
@ -35,6 +35,10 @@ uint32 FullpipeEngine::getFeatures() const {
|
||||
return _gameDescription->flags;
|
||||
}
|
||||
|
||||
bool FullpipeEngine::isDemo() {
|
||||
return _gameDescription->flags & ADGF_DEMO;
|
||||
}
|
||||
|
||||
Common::Language FullpipeEngine::getLanguage() const {
|
||||
return _gameDescription->language;
|
||||
}
|
||||
|
@ -271,6 +271,7 @@ Common::Error FullpipeEngine::loadGameState(int slot) {
|
||||
else
|
||||
return Common::kUnknownError;
|
||||
}
|
||||
|
||||
Common::Error FullpipeEngine::saveGameState(int slot, const Common::String &description) {
|
||||
if (_gameLoader->writeSavegame(_currentScene, getSavegameFile(slot)))
|
||||
return Common::kNoError;
|
||||
|
@ -113,6 +113,7 @@ public:
|
||||
// Detection related functions
|
||||
const ADGameDescription *_gameDescription;
|
||||
uint32 getFeatures() const;
|
||||
bool isDemo();
|
||||
Common::Language getLanguage() const;
|
||||
|
||||
Common::RandomSource *_rnd;
|
||||
|
@ -35,8 +35,6 @@
|
||||
#include "fullpipe/scenes.h"
|
||||
#include "fullpipe/interaction.h"
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
namespace Fullpipe {
|
||||
|
||||
Vars::Vars() {
|
||||
@ -619,7 +617,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
|
||||
sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1");
|
||||
scene->preloadMovements(sceneVar);
|
||||
|
||||
if (!(g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS))
|
||||
if (!(g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS))
|
||||
sceneIntro_initScene(scene);
|
||||
else
|
||||
sceneIntroDemo_initScene(scene);
|
||||
@ -628,7 +626,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
|
||||
scene->initObjectCursors("SC_INTRO1");
|
||||
setSceneMusicParameters(sceneVar);
|
||||
|
||||
if (!(g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS)) {
|
||||
if (!(g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS)) {
|
||||
addMessageHandler(sceneHandlerIntro, 2);
|
||||
_updateCursorCallback = sceneIntro_updateCursor;
|
||||
} else {
|
||||
|
@ -20,8 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
#include "fullpipe/fullpipe.h"
|
||||
|
||||
#include "fullpipe/objects.h"
|
||||
@ -412,7 +410,7 @@ void sceneHandler08_checkEndArcade() {
|
||||
if (y < 80) {
|
||||
sceneHandler08_finishArcade();
|
||||
|
||||
if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::DE_DEU) {
|
||||
if (g_fp->isDemo() && g_fp->getLanguage() == Common::DE_DEU) {
|
||||
ModalDemo *demo = new ModalDemo;
|
||||
demo->launch();
|
||||
|
||||
|
@ -33,8 +33,6 @@
|
||||
#include "fullpipe/interaction.h"
|
||||
#include "fullpipe/behavior.h"
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
namespace Fullpipe {
|
||||
|
||||
struct Hanger {
|
||||
@ -465,7 +463,7 @@ int sceneHandler09(ExCommand *cmd) {
|
||||
break;
|
||||
|
||||
case 367:
|
||||
if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS) {
|
||||
if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
|
||||
g_fp->_needRestart = true;
|
||||
return 0;
|
||||
}
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include "common/list.h"
|
||||
#include "common/memstream.h"
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
#include "graphics/thumbnail.h"
|
||||
|
||||
#include "fullpipe/objects.h"
|
||||
@ -335,7 +333,7 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) {
|
||||
_gameLoader->loadScene(SC_INTRO1);
|
||||
_gameLoader->gotoScene(SC_INTRO1, TrubaUp);
|
||||
} else {
|
||||
if (g_fp->getFeatures() & ADGF_DEMO && g_fp->getLanguage() == Common::RU_RUS) {
|
||||
if (g_fp->isDemo() && g_fp->getLanguage() == Common::RU_RUS) {
|
||||
_gameLoader->loadScene(SC_9);
|
||||
_gameLoader->gotoScene(SC_9, TrubaDown);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user