diff options
-rw-r--r-- | engines/pink/detection.cpp | 12 | ||||
-rw-r--r-- | engines/pink/detection_tables.h | 2 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_text.cpp | 2 | ||||
-rw-r--r-- | engines/pink/pink.cpp | 5 | ||||
-rw-r--r-- | engines/pink/pink.h | 9 | ||||
-rw-r--r-- | engines/pink/saveload.cpp | 2 |
6 files changed, 23 insertions, 9 deletions
diff --git a/engines/pink/detection.cpp b/engines/pink/detection.cpp index b0d9192f0e..a25fd26cd7 100644 --- a/engines/pink/detection.cpp +++ b/engines/pink/detection.cpp @@ -20,10 +20,20 @@ * */ -#include "gui/EventRecorder.h" +#include "common/system.h" + +#include "engines/advancedDetector.h" #include "pink/pink.h" +namespace Pink { + +Common::Language PinkEngine::getLanguage() const { + return _desc->language; +} + +} // End of Namespace Pink + static const PlainGameDescriptor pinkGames[] = { {"peril", "The Pink Panther: Passport to Peril"}, {"pokus", "The Pink Panther: Hokus Pokus Pink"}, diff --git a/engines/pink/detection_tables.h b/engines/pink/detection_tables.h index c9abef94db..dab187e23f 100644 --- a/engines/pink/detection_tables.h +++ b/engines/pink/detection_tables.h @@ -23,8 +23,6 @@ #ifndef PINK_DETECTION_TABLES_H #define PINK_DETECTION_TABLES_H -#include "gui/EventRecorder.h" - namespace Pink { static const ADGameDescription gameDescriptions[] = { diff --git a/engines/pink/objects/actions/action_text.cpp b/engines/pink/objects/actions/action_text.cpp index ea7d486327..a5b97b10c2 100644 --- a/engines/pink/objects/actions/action_text.cpp +++ b/engines/pink/objects/actions/action_text.cpp @@ -90,7 +90,7 @@ void ActionText::start() { _txtWnd->move(_xLeft, _yTop); _txtWnd->resize(_xRight - _xLeft, _yBottom - _yTop); - if (_actor->getPage()->getGame()->getGameDesc().language == Common::EN_ANY) + if (_actor->getPage()->getGame()->getLanguage() == Common::EN_ANY) _txtWnd->appendText(str, font); } else { director->addTextAction(this); diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp index 5eebeaa0e7..2852348a72 100644 --- a/engines/pink/pink.cpp +++ b/engines/pink/pink.cpp @@ -24,6 +24,7 @@ #include "common/winexe_pe.h" #include "common/config-manager.h" +#include "engines/advancedDetector.h" #include "engines/util.h" #include "graphics/cursorman.h" @@ -40,7 +41,7 @@ namespace Pink { PinkEngine::PinkEngine(OSystem *system, const ADGameDescription *desc) : Engine(system), _console(nullptr), _rnd("pink"), - _desc(*desc), _bro(nullptr), _menu(nullptr), _actor(nullptr), + _desc(desc), _bro(nullptr), _menu(nullptr), _actor(nullptr), _module(nullptr), _director(nullptr), _pdaMgr(this) { DebugMan.addDebugChannel(kPinkDebugGeneral, "general", "General issues"); @@ -300,7 +301,7 @@ void PinkEngine::pauseEngineIntern(bool pause) { } bool PinkEngine::isPeril() { - return !strcmp(_desc.gameId, kPeril); + return !strcmp(_desc->gameId, kPeril); } } diff --git a/engines/pink/pink.h b/engines/pink/pink.h index bafe15f6c5..cfc7190399 100644 --- a/engines/pink/pink.h +++ b/engines/pink/pink.h @@ -24,12 +24,13 @@ #define PINK_PINK_H #include "common/random.h" +#include "common/savefile.h" #include "engines/engine.h" +#include "engines/savestate.h" #include "graphics/wincursor.h" -#include "gui/EventRecorder.h" #include "gui/debugger.h" #include "pink/constants.h" @@ -59,6 +60,8 @@ * missing menu */ +struct ADGameDescription; + namespace Graphics { class MacMenu; } @@ -115,7 +118,7 @@ public: void executeMenuCommand(uint id); - const ADGameDescription &getGameDesc() { return _desc; } + Common::Language getLanguage() const; OrbFile *getOrb() { return &_orb; } BroFile *getBro() { return _bro; } Common::RandomSource &getRnd() { return _rnd; }; @@ -158,7 +161,7 @@ private: StringMap _variables; PDAMgr _pdaMgr; - const ADGameDescription _desc; + const ADGameDescription *_desc; }; WARN_UNUSED_RESULT bool readSaveHeader(Common::InSaveFile &in, SaveStateDescriptor &desc, bool skipThumbnail = true); diff --git a/engines/pink/saveload.cpp b/engines/pink/saveload.cpp index 02bda4f0df..dacec35610 100644 --- a/engines/pink/saveload.cpp +++ b/engines/pink/saveload.cpp @@ -20,6 +20,8 @@ * */ +#include "common/system.h" + #include "graphics/thumbnail.h" #include "pink/pink.h" |