mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
PINK: Made _director a pointer and reduced header dependencies
This commit is contained in:
parent
a4b8ffc2de
commit
ace8fcca82
@ -25,6 +25,7 @@
|
||||
|
||||
#include "pink/archive.h"
|
||||
#include "pink/cel_decoder.h"
|
||||
#include "pink/director.h"
|
||||
#include "pink/pink.h"
|
||||
#include "pink/objects/actions/action_cel.h"
|
||||
#include "pink/objects/actors/actor.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "pink/archive.h"
|
||||
#include "pink/pink.h"
|
||||
#include "pink/director.h"
|
||||
#include "pink/sound.h"
|
||||
#include "pink/objects/actions/action_sound.h"
|
||||
#include "pink/objects/actors/actor.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "pink/archive.h"
|
||||
#include "pink/cursor_mgr.h"
|
||||
#include "pink/pink.h"
|
||||
#include "pink/director.h"
|
||||
#include "pink/objects/actions/action.h"
|
||||
#include "pink/objects/actors/supporting_actor.h"
|
||||
#include "pink/objects/actors/lead_actor.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "pink/pda_mgr.h"
|
||||
#include "pink/pink.h"
|
||||
#include "pink/director.h"
|
||||
#include "pink/objects/actors/pda_button_actor.h"
|
||||
#include "pink/objects/actors/lead_actor.h"
|
||||
#include "pink/objects/pages/pda_page.h"
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include "pink/pink.h"
|
||||
#include "pink/console.h"
|
||||
#include "pink/director.h"
|
||||
#include "pink/objects/module.h"
|
||||
#include "pink/objects/actors/lead_actor.h"
|
||||
|
||||
@ -40,7 +41,7 @@ namespace Pink {
|
||||
PinkEngine::PinkEngine(OSystem *system, const ADGameDescription *desc)
|
||||
: Engine(system), _console(nullptr), _rnd("pink"),
|
||||
_desc(*desc), _bro(nullptr), _actor(nullptr),
|
||||
_module(nullptr), _director(), _pdaMgr(this) {
|
||||
_module(nullptr), _director(nullptr), _pdaMgr(this) {
|
||||
debug("PinkEngine constructed");
|
||||
|
||||
DebugMan.addDebugChannel(kPinkDebugGeneral, "general", "General issues");
|
||||
@ -72,6 +73,7 @@ Common::Error PinkEngine::init() {
|
||||
initGraphics(640, 480);
|
||||
|
||||
_console = new Console(this);
|
||||
_director = new Director();
|
||||
|
||||
Common::String orbName;
|
||||
Common::String broName;
|
||||
@ -112,7 +114,7 @@ Common::Error Pink::PinkEngine::run() {
|
||||
while (!shouldQuit()) {
|
||||
Common::Event event;
|
||||
while (_eventMan->pollEvent(event)) {
|
||||
if (_director.processEvent(event))
|
||||
if (_director->processEvent(event))
|
||||
continue;
|
||||
|
||||
switch (event.type) {
|
||||
@ -146,7 +148,7 @@ Common::Error Pink::PinkEngine::run() {
|
||||
}
|
||||
|
||||
_actor->update();
|
||||
_director.update();
|
||||
_director->update();
|
||||
_system->delayMillis(10);
|
||||
}
|
||||
|
||||
@ -174,7 +176,7 @@ void PinkEngine::initModule(const Common::String &moduleName, const Common::Stri
|
||||
|
||||
void PinkEngine::changeScene() {
|
||||
setCursor(kLoadingCursor);
|
||||
_director.clear();
|
||||
_director->clear();
|
||||
|
||||
if (!_nextModule.empty() && _nextModule != _module->getName())
|
||||
initModule(_nextModule, _nextPage, nullptr);
|
||||
@ -285,7 +287,7 @@ bool PinkEngine::hasFeature(Engine::EngineFeature f) const {
|
||||
|
||||
void PinkEngine::pauseEngineIntern(bool pause) {
|
||||
Engine::pauseEngineIntern(pause);
|
||||
_director.pause(pause);
|
||||
_director->pause(pause);
|
||||
}
|
||||
|
||||
bool PinkEngine::isPeril() {
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "gui/debugger.h"
|
||||
|
||||
#include "pink/constants.h"
|
||||
#include "pink/director.h"
|
||||
#include "pink/file.h"
|
||||
#include "pink/utils.h"
|
||||
#include "pink/pda_mgr.h"
|
||||
@ -63,6 +62,7 @@
|
||||
namespace Pink {
|
||||
|
||||
class Console;
|
||||
class Director;
|
||||
class Archive;
|
||||
class NamedObject;
|
||||
class Module;
|
||||
@ -110,7 +110,7 @@ public:
|
||||
OrbFile *getOrb() { return &_orb; }
|
||||
BroFile *getBro() { return _bro; }
|
||||
Common::RandomSource &getRnd() { return _rnd; };
|
||||
Director *getDirector() { return &_director; }
|
||||
Director *getDirector() { return _director; }
|
||||
PDAMgr &getPdaMgr() { return _pdaMgr; }
|
||||
|
||||
void setNextExecutors(const Common::String &nextModule, const Common::String &nextPage) { _nextModule = nextModule; _nextPage = nextPage; }
|
||||
@ -137,7 +137,7 @@ private:
|
||||
OrbFile _orb;
|
||||
BroFile *_bro;
|
||||
|
||||
Director _director;
|
||||
Director *_director;
|
||||
LeadActor *_actor;
|
||||
|
||||
Module *_module;
|
||||
|
Loading…
x
Reference in New Issue
Block a user