aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/talk.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-03 21:03:44 -0400
committerPaul Gilbert2015-06-03 21:03:44 -0400
commit60378fe22883387c9d116764dc631c5cd5a6d3f8 (patch)
treea1503969168bb2775a29b82fdd57a722a12c5421 /engines/sherlock/talk.h
parentbc7127c52222fc98c36f6b33b534acdcb10027c8 (diff)
downloadscummvm-rg350-60378fe22883387c9d116764dc631c5cd5a6d3f8.tar.gz
scummvm-rg350-60378fe22883387c9d116764dc631c5cd5a6d3f8.tar.bz2
scummvm-rg350-60378fe22883387c9d116764dc631c5cd5a6d3f8.zip
SHERLOCK: Implemented setObjTalkSequence methods
Diffstat (limited to 'engines/sherlock/talk.h')
-rw-r--r--engines/sherlock/talk.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h
index ebfe8f1732..79616b246b 100644
--- a/engines/sherlock/talk.h
+++ b/engines/sherlock/talk.h
@@ -29,11 +29,13 @@
#include "common/serializer.h"
#include "common/stream.h"
#include "common/stack.h"
+#include "sherlock/objects.h"
namespace Sherlock {
#define MAX_TALK_SEQUENCES 11
#define MAX_TALK_FILES 500
+#define TALK_SEQUENCE_STACK_SIZE 20
enum {
OP_SWITCH_SPEAKER = 0,
@@ -153,16 +155,19 @@ struct TalkHistoryEntry {
bool &operator[](int index) { return _data[index]; }
};
-struct TalkSequences {
- byte _data[MAX_TALK_SEQUENCES];
+struct TalkSequence {
+ Object *_obj; // Pointer to the bgshape that these values go to
+ short _frameNumber; // Frame number in frame sequence to draw
+ short _sequenceNumber; // Start frame of sequences that are repeated
+ int _seqStack; // Allows gosubs to return to calling frame
+ int _seqTo; // Allows 1-5, 8-3 type sequences encoded
+ int _seqCounter; // How many times this sequence has been executed
+ int _seqCounter2;
- TalkSequences() { clear(); }
- TalkSequences(const byte *data);
-
- byte &operator[](int idx) { return _data[idx]; }
- void clear();
+ TalkSequence();
};
+
class Talk {
friend class Scalpel::ScalpelUserInterface;
private:
@@ -248,6 +253,7 @@ protected:
OpcodeReturn cmdWalkToCAnimation(const byte *&str);
OpcodeReturn cmdWalkToCoords(const byte *&str);
public:
+ TalkSequence _talkSequenceStack[TALK_SEQUENCE_STACK_SIZE];
bool _talkToAbort;
int _talkCounter;
int _talkTo;
@@ -324,6 +330,11 @@ public:
void pushSequence(int speaker);
/**
+ * Push a given shape's sequence data onto the Rose Tattoo talk sequence stack
+ */
+ void pushTalkSequence(Object *obj);
+
+ /**
* Change the sequence of the scene background object associated with the current speaker.
*/
void setSequence(int speaker);