diff options
author | Denis Kasak | 2009-08-11 04:03:22 +0000 |
---|---|---|
committer | Denis Kasak | 2009-08-11 04:03:22 +0000 |
commit | 51cc821619bda77881f7514757aedb94bfb9070b (patch) | |
tree | fb644b9b50a38226f61c0683c93d19cc7d5aa3dd /engines/draci/game.h | |
parent | d59d03e52f7a75d8af55f7e0af09c0200321e52e (diff) | |
download | scummvm-rg350-51cc821619bda77881f7514757aedb94bfb9070b.tar.gz scummvm-rg350-51cc821619bda77881f7514757aedb94bfb9070b.tar.bz2 scummvm-rg350-51cc821619bda77881f7514757aedb94bfb9070b.zip |
Added dialogue support.
svn-id: r43253
Diffstat (limited to 'engines/draci/game.h')
-rw-r--r-- | engines/draci/game.h | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/engines/draci/game.h b/engines/draci/game.h index 47b940ce7e..a712542e9e 100644 --- a/engines/draci/game.h +++ b/engines/draci/game.h @@ -27,6 +27,7 @@ #define DRACI_GAME_H #include "common/str.h" +#include "draci/barchive.h" #include "draci/script.h" #include "draci/animation.h" #include "draci/sprite.h" @@ -68,6 +69,10 @@ enum { kDefaultRoomMap = -1 }; +enum { + kNoDialogue = -1, kDialogueLines = 4 +}; + enum SpeechConstants { kBaseSpeechDuration = 200, kSpeechTimeUnit = 400 @@ -134,11 +139,11 @@ struct GameInfo { uint _numIcons; byte _numVariables; byte _numPersons; - byte _numDialogs; + byte _numDialogues; uint _maxIconWidth, _maxIconHeight; uint _musicLength; uint _crc[4]; - uint _numDialogBlocks; + uint _numDialogueBlocks; }; struct Person { @@ -146,6 +151,14 @@ struct Person { byte _fontColour; }; +struct Dialogue { + int _canLen; + byte *_canBlock; + Common::String _title; + GPL2Program _program; +}; + + struct Room { int _roomNum; byte _music; @@ -266,13 +279,18 @@ public: void updateTitle(); void updateCursor(); + void dialogueMenu(int dialogueID); + int dialogueDraw(); + void dialogueInit(int dialogID); + void dialogueDone(); + void runDialogueProg(GPL2Program, int offset); + bool _roomChange; private: DraciEngine *_vm; GameInfo _info; - uint *_dialogOffsets; int *_variables; byte *_iconStatus; @@ -286,6 +304,22 @@ private: int _currentIcon; +// HACK: remove public when tested and add getters instead +public: + uint *_dialogueOffsets; + int _currentDialogue; + int *_dialogueVars; + BArchive *_dialogueArchive; + Dialogue *_dialogueBlocks; + bool _dialogueBegin; + bool _dialogueExit; + int _currentBlock; + int _lastBlock; + int _dialogueLines; + int _blockNum; + int _lines[4]; + Animation *_dialogueAnims[4]; + LoopStatus _loopStatus; LoopStatus _loopSubstatus; @@ -296,6 +330,7 @@ private: int _objUnderCursor; int _oldObjUnderCursor; + int _animUnderCursor; int _markedAnimationIndex; //!< Used by the Mark GPL command }; |