ScummVM API documentation
tattoo_talk.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef SHERLOCK_TATTOO_TALK_H
23 #define SHERLOCK_TATTOO_TALK_H
24 
25 #include "common/scummsys.h"
26 #include "common/array.h"
27 #include "common/rect.h"
28 #include "common/serializer.h"
29 #include "common/stream.h"
30 #include "common/stack.h"
31 #include "sherlock/talk.h"
32 #include "sherlock/tattoo/widget_password.h"
33 #include "sherlock/tattoo/widget_talk.h"
34 
35 namespace Sherlock {
36 
37 namespace Tattoo {
38 
39 #define TALK_SEQUENCE_STACK_SIZE 20
40 
41 class WidgetTalk;
42 
43 class TattooTalk : public Talk {
44  friend class WidgetTalk;
45 private:
46  WidgetTalk _talkWidget;
47  WidgetPassword _passwordWidget;
48  SequenceEntry _sequenceStack[TALK_SEQUENCE_STACK_SIZE];
49 
50  OpcodeReturn cmdCallTalkFile(const byte *&str);
51  OpcodeReturn cmdSwitchSpeaker(const byte *&str);
52  OpcodeReturn cmdMouseOnOff(const byte *&str);
53  OpcodeReturn cmdGotoScene(const byte *&str);
54  OpcodeReturn cmdWalkHolmesToCoords(const byte *&str);
55  OpcodeReturn cmdNextSong(const byte *&str);
56  OpcodeReturn cmdPassword(const byte *&str);
57  OpcodeReturn cmdPlaySong(const byte *&str);
58  OpcodeReturn cmdRestorePeopleSequence(const byte *&str);
59  OpcodeReturn cmdSetNPCDescOnOff(const byte *&str);
60  OpcodeReturn cmdSetNPCInfoLine(const byte *&str);
61  OpcodeReturn cmdNPCLabelGoto(const byte *&str);
62  OpcodeReturn cmdNPCLabelIfFlagGoto(const byte *&str);
63  OpcodeReturn cmdNPCLabelSet(const byte *&str);
64  OpcodeReturn cmdSetNPCOff(const byte *&str);
65  OpcodeReturn cmdSetNPCOn(const byte *&str);
66  OpcodeReturn cmdSetNPCPathDest(const byte *&str);
67  OpcodeReturn cmdSetNPCPathPause(const byte *&str);
68  OpcodeReturn cmdSetNPCPathPauseTakingNotes(const byte *&str);
69  OpcodeReturn cmdSetNPCPathPauseLookingHolmes(const byte *&str);
70  OpcodeReturn cmdSetNPCPosition(const byte *&str);
71  OpcodeReturn cmdSetNPCTalkFile(const byte *&str);
72  OpcodeReturn cmdSetNPCVerb(const byte *&str);
73  OpcodeReturn cmdSetNPCVerbCAnimation(const byte *&str);
74  OpcodeReturn cmdSetNPCVerbScript(const byte *&str);
75  OpcodeReturn cmdSetNPCVerbTarget(const byte *&str);
76  OpcodeReturn cmdSetNPCWalkGraphics(const byte *&str);
77  OpcodeReturn cmdSetSceneEntryFlag(const byte *&str);
78  OpcodeReturn cmdSetTalkSequence(const byte *&str);
79  OpcodeReturn cmdSetWalkControl(const byte *&str);
80  OpcodeReturn cmdTalkInterruptsDisable(const byte *&str);
81  OpcodeReturn cmdTalkInterruptsEnable(const byte *&str);
82  OpcodeReturn cmdTurnSoundsOff(const byte *&str);
83  OpcodeReturn cmdWalkHolmesAndNPCToCAnimation(const byte *&str);
84  OpcodeReturn cmdWalkNPCToCAnimation(const byte *&str);
85  OpcodeReturn cmdWalkNPCToCoords(const byte *&str);
86  OpcodeReturn cmdWalkHomesAndNPCToCoords(const byte *&str);
87 protected:
91  void talkInterface(const byte *&str) override;
92 
96  void nothingToSay() override;
97 
101  void showTalk() override;
102 public:
104  ~TattooTalk() override {}
105 
114  void talkTo(const Common::String &filename) override;
115 
119  void pushSequenceEntry(Object *obj) override;
120 
125  void pullSequence(int slot = -1) override;
126 
130  bool isSequencesEmpty() const override;
131 
135  void clearSequences() override;
136 };
137 
138 } // End of namespace Tattoo
139 
140 } // End of namespace Sherlock
141 
142 #endif
void talkTo(const Common::String &filename) override
Definition: str.h:59
Definition: talk.h:164
Definition: animation.h:29
Definition: tattoo_talk.h:43
Definition: talk.h:118
Definition: widget_password.h:34
void pullSequence(int slot=-1) override
void talkInterface(const byte *&str) override
Definition: sherlock.h:76
Definition: objects.h:363
void nothingToSay() override
Definition: widget_talk.h:39
void pushSequenceEntry(Object *obj) override
bool isSequencesEmpty() const override
void clearSequences() override