diff options
author | johndoe123 | 2014-04-07 12:58:26 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 3f15233f78a264e45ce74ecd2db9ed3119b1b654 (patch) | |
tree | 821bda821f8b1d0813e271d682c5c42b59103c59 /engines/illusions/illusions.h | |
parent | 6ba5570de52344da602cf02fb83725b468e3d8c5 (diff) | |
download | scummvm-rg350-3f15233f78a264e45ce74ecd2db9ed3119b1b654.tar.gz scummvm-rg350-3f15233f78a264e45ce74ecd2db9ed3119b1b654.tar.bz2 scummvm-rg350-3f15233f78a264e45ce74ecd2db9ed3119b1b654.zip |
ILLUSIONS: Refactor code in preparation for the Duckman engine
Diffstat (limited to 'engines/illusions/illusions.h')
-rw-r--r-- | engines/illusions/illusions.h | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/engines/illusions/illusions.h b/engines/illusions/illusions.h index 08a9f760ef..a9b8555c50 100644 --- a/engines/illusions/illusions.h +++ b/engines/illusions/illusions.h @@ -62,25 +62,23 @@ class Dictionary; class FramesList; class Input; class Screen; +class ScriptOpcodes; class ScriptResource; -class ScriptMan; class Sequence; class SpecialCode; class TalkItems; -class TriggerFunctions; -class TriggerFunction; +class ThreadList; -typedef Common::Functor2<TriggerFunction*, uint32, void> TriggerFunctionCallback; +enum { + kGameIdBBDOU = 1, + kGameIdDuckman = 2 +}; class IllusionsEngine : public Engine { -protected: - Common::Error run(); - virtual bool hasFeature(EngineFeature f) const; public: IllusionsEngine(OSystem *syst, const ADGameDescription *gd); ~IllusionsEngine(); const Common::String getTargetName() { return _targetName; } - private: const ADGameDescription *_gameDescription; Graphics::PixelFormat _pixelFormat; @@ -93,51 +91,61 @@ public: Screen *_screen; Input *_input; - ScriptMan *_scriptMan; ActorItems *_actorItems; BackgroundItems *_backgroundItems; Camera *_camera; Controls *_controls; - Cursor *_cursor; TalkItems *_talkItems; + ScriptOpcodes *_scriptOpcodes; SpecialCode *_specialCode; - TriggerFunctions *_triggerFunctions; + ThreadList *_threads; + Cursor *_cursor; + + ScriptResource *_scriptResource; int _resGetCtr; uint32 _resGetTime; bool _unpauseControlActorFlag; uint32 _lastUpdateTime; + uint32 _fontId; + int _field8; + uint32 _fieldA, _fieldE; + + int16 _menuChoiceOfs; + Common::Point *getObjectActorPositionPtr(uint32 objectId); - - void notifyThreadId(uint32 &threadId); - uint32 getElapsedUpdateTime(); int updateActors(); int updateSequences(); int updateGraphics(); int getRandom(int max); - - // TODO Move to ScriptMan? - bool causeIsDeclared(uint32 sceneId, uint32 verbId, uint32 objectId2, uint32 objectId); - void causeDeclare(uint32 verbId, uint32 objectId2, uint32 objectId, TriggerFunctionCallback *callback); - uint32 causeTrigger(uint32 sceneId, uint32 verbId, uint32 objectId2, uint32 objectId, uint32 callingThreadId); - int convertPanXCoord(int16 x); - Common::Point getNamedPointPosition(uint32 namedPointId); - uint32 getPriorityFromBase(int16 priority); bool calcPointDirection(Common::Point &srcPt, Common::Point &dstPt, uint &facing); - void playVideo(uint32 videoId, uint32 objectId, uint32 value, uint32 threadId); - bool isSoundActive(); bool cueVoice(byte *voiceName); bool isVoiceCued(); void startVoice(int volume, int panX); void stopVoice(); bool isVoicePlaying(); + + void setCurrFontId(uint32 fontId); + bool checkActiveTalkThreads(); + uint32 clipTextDuration(uint32 duration); - uint32 getCurrentScene(); + virtual void loadSpecialCode(uint32 resId) = 0; + virtual void unloadSpecialCode(uint32 resId) = 0; + virtual void notifyThreadId(uint32 &threadId) = 0; + virtual Control *getObjectControl(uint32 objectId) = 0; + virtual Common::Point getNamedPointPosition(uint32 namedPointId) = 0; + virtual uint32 getPriorityFromBase(int16 priority) = 0; + virtual uint32 getPrevScene() = 0; + virtual uint32 getCurrentScene() = 0; + + virtual void startScriptThreadSimple(uint32 threadId, uint32 callingThreadId) = 0; + virtual uint32 startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId, + uint32 value8, uint32 valueC, uint32 value10) = 0; #if 0 |