diff options
author | Gregory Montoir | 2004-08-24 16:31:46 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-08-24 16:31:46 +0000 |
commit | 45d8b3b00291b6dcdae4d4966021ded316c2cfae (patch) | |
tree | d7de6814592f453b7e27fe679ad676b0c1023c1a /queen/talk.h | |
parent | 649e9b71a5837b10573fcfcb11497497827e35a8 (diff) | |
download | scummvm-rg350-45d8b3b00291b6dcdae4d4966021ded316c2cfae.tar.gz scummvm-rg350-45d8b3b00291b6dcdae4d4966021ded316c2cfae.tar.bz2 scummvm-rg350-45d8b3b00291b6dcdae4d4966021ded316c2cfae.zip |
Rewrote the way strings are extracting from the datafiles, now it should be 'alignment safe'. Maybe it will fix bugs #923570 and #1013886, too.
svn-id: r14734
Diffstat (limited to 'queen/talk.h')
-rw-r--r-- | queen/talk.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/queen/talk.h b/queen/talk.h index d7f84a1de8..395eccced9 100644 --- a/queen/talk.h +++ b/queen/talk.h @@ -46,8 +46,8 @@ class Talk { const char *voiceFilePrefix, QueenEngine *vm); - //! Read a string from ptr and return new ptr - static byte *getString(byte *ptr, char *str, int maxLength, int align = 2); + //! Read a string from ptr and update offset + static void getString(const byte *ptr, uint16 &offset, char *str, int maxLength, int align = 2); private: //! Collection of constants used by Talk @@ -131,16 +131,16 @@ private: int16 _itemNumber[2]; //! String data - byte *_person1Ptr; + uint16 _person1PtrOff; //! Cutaway data - byte *_cutawayPtr; + uint16 _cutawayPtrOff; //! Data used if we have talked to the person before - byte *_person2Ptr; + uint16 _person2PtrOff; //! Data used if we haven't talked to the person before - byte *_joePtr; + uint16 _joePtrOff; //! Is a talking head bool _talkHead; @@ -176,7 +176,7 @@ private: void initialTalk(); //! Find a string in the dialogue tree - void findDialogueString(byte *ptr, int16 id, int16 max, char *str); + void findDialogueString(uint16 offset, int16 id, int16 max, char *str); //! Get TalkSelected struct for this talk TalkSelected *talkSelected(); |