mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
PINK: implemented SideEffectModuleVariable fully
This commit is contained in:
parent
d303144364
commit
7c4bcc033d
@ -47,4 +47,8 @@ Action *Actor::findAction(Common::String &name) {
|
||||
});;
|
||||
}
|
||||
|
||||
GamePage *Actor::getPage() const {
|
||||
return _page;
|
||||
}
|
||||
|
||||
} // End of namespace Pink
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
Action *findAction(Common::String &name);
|
||||
|
||||
Sequencer *getSequencer();
|
||||
GamePage *getPage() const;
|
||||
|
||||
protected:
|
||||
GamePage *_page;
|
||||
|
@ -34,7 +34,8 @@ class Sequencer;
|
||||
class LeadActor : public Actor {
|
||||
public:
|
||||
virtual void deserialize(Archive &archive);
|
||||
void setNextExecutors(Common::String &nextModule, Common::String &nextPage);
|
||||
void setNextExecutors (Common::String &nextModule, Common::String &nextPage);
|
||||
|
||||
private:
|
||||
CursorMgr *_cursorMgr;
|
||||
WalkMgr *_walkMgr;
|
||||
|
@ -95,6 +95,10 @@ PinkEngine *Module::getGame() const {
|
||||
return _game;
|
||||
}
|
||||
|
||||
Common::StringMap &Module::getMap() {
|
||||
return _map;
|
||||
}
|
||||
|
||||
} // End of namespace Pink
|
||||
|
||||
|
||||
|
@ -52,12 +52,13 @@ public:
|
||||
void OnMouseMove();
|
||||
void OnKeyboardButtonClick();
|
||||
|
||||
private:
|
||||
PinkEngine *_game;
|
||||
public:
|
||||
Common::StringMap &getMap();
|
||||
|
||||
PinkEngine *getGame() const;
|
||||
|
||||
|
||||
private:
|
||||
PinkEngine *_game;
|
||||
GamePage *_page;
|
||||
PagesArray _pages;
|
||||
InventoryMgr _invMgr;
|
||||
|
@ -108,4 +108,8 @@ Sequencer *GamePage::getSequencer() {
|
||||
return _sequencer;
|
||||
}
|
||||
|
||||
Module *GamePage::getModule() const {
|
||||
return _module;
|
||||
}
|
||||
|
||||
} // End of namespace Pink
|
||||
|
@ -67,10 +67,13 @@ public:
|
||||
|
||||
PinkEngine *getGame();
|
||||
Sequencer *getSequencer();
|
||||
Module *getModule() const;
|
||||
|
||||
private:
|
||||
int perhapsIsLoaded;
|
||||
Module *_module;
|
||||
|
||||
private:
|
||||
CursorMgr *_cursorMgr;
|
||||
WalkMgr *_walkMgr;
|
||||
Sequencer *_sequencer;
|
||||
|
@ -32,7 +32,7 @@ class LeadActor;
|
||||
class SideEffect : public Object {
|
||||
public:
|
||||
virtual ~SideEffect() {};
|
||||
virtual void init(LeadActor *_actor) {};
|
||||
virtual void init(LeadActor *actor) {};
|
||||
|
||||
};
|
||||
|
||||
|
@ -25,6 +25,8 @@
|
||||
*/
|
||||
|
||||
#include "side_effect_module_variable.h"
|
||||
#include "../actors/lead_actor.h"
|
||||
#include "../page.h"
|
||||
|
||||
namespace Pink {
|
||||
|
||||
@ -34,4 +36,9 @@ void SideEffectModuleVariable::deserialize(Archive &archive) {
|
||||
_name.c_str(), _value.c_str());
|
||||
}
|
||||
|
||||
void SideEffectModuleVariable::init(LeadActor *actor) {
|
||||
Common::StringMap &moduleMap = actor->getPage()->getModule()->getMap();
|
||||
moduleMap[_name] = _value;
|
||||
}
|
||||
|
||||
}
|
@ -30,6 +30,7 @@ class SideEffectModuleVariable : public SideEffectVariable {
|
||||
public:
|
||||
virtual void deserialize(Archive &archive);
|
||||
|
||||
virtual void init(LeadActor *actor);
|
||||
};
|
||||
|
||||
} // End of namespace Pink
|
||||
|
Loading…
Reference in New Issue
Block a user