ScummVM API documentation
scalpel_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_SCALPEL_TALK_H
23 #define SHERLOCK_SCALPEL_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 
33 namespace Sherlock {
34 
35 namespace Scalpel {
36 
37 class ScalpelTalk : public Talk {
38 private:
39  Common::Stack<SequenceEntry> _sequenceStack;
40 
44  Common::Point get3doPortraitPosition() const;
45 
46  OpcodeReturn cmdSwitchSpeaker(const byte *&str);
47  OpcodeReturn cmdAssignPortraitLocation(const byte *&str);
48  OpcodeReturn cmdGotoScene(const byte *&str);
49  OpcodeReturn cmdCallTalkFile(const byte *&str);
50  OpcodeReturn cmdClearInfoLine(const byte *&str);
51  OpcodeReturn cmdClearWindow(const byte *&str);
52  OpcodeReturn cmdDisplayInfoLine(const byte *&str);
53  OpcodeReturn cmdElse(const byte *&str);
54  OpcodeReturn cmdIf(const byte *&str);
55  OpcodeReturn cmdMoveMouse(const byte *&str);
56  OpcodeReturn cmdPlayPrologue(const byte *&str);
57  OpcodeReturn cmdRemovePortrait(const byte *&str);
58  OpcodeReturn cmdSfxCommand(const byte *&str);
59  OpcodeReturn cmdSummonWindow(const byte *&str);
60  OpcodeReturn cmdWalkToCoords(const byte *&str);
61 protected:
65  void talkInterface(const byte *&str) override;
66 
70  void talkWait(const byte *&str) override;
71 
75  void switchSpeaker() override;
76 
80  void nothingToSay() override;
81 
85  void showTalk() override;
86 public:
88  ~ScalpelTalk() override {}
89 
90  Common::String _fixedTextWindowExit;
91  Common::String _fixedTextWindowUp;
92  Common::String _fixedTextWindowDown;
93 
98  void loadTalkFile(const Common::String &filename) override;
99 
108  void talkTo(const Common::String &filename) override;
109 
114  int waitForMore(int delay) override;
115 
119  void drawInterface() override;
120 
125  bool displayTalk(bool slamIt) override;
126 
130  int talkLine(int lineNum, int stateNum, byte color, int lineY, bool slamIt) override;
131 
135  bool talk3DOMovieTrigger(int subIndex);
136 
140  static void skipBadText(const byte *&msgP);
141 
145  void pushSequenceEntry(Object *obj) override;
146 
151  void pullSequence(int slot = -1) override;
152 
156  bool isSequencesEmpty() const override { return _sequenceStack.empty(); }
157 
161  void clearSequences() override;
162 };
163 
164 } // End of namespace Scalpel
165 
166 } // End of namespace Sherlock
167 
168 #endif
void talkWait(const byte *&str) override
Definition: str.h:59
static void skipBadText(const byte *&msgP)
bool isSequencesEmpty() const override
Definition: scalpel_talk.h:156
Definition: talk.h:164
Definition: animation.h:29
void talkInterface(const byte *&str) override
bool talk3DOMovieTrigger(int subIndex)
Definition: scalpel_talk.h:37
Definition: sherlock.h:206
Definition: rect.h:144
Definition: objects.h:363
void loadTalkFile(const Common::String &filename) override
void pushSequenceEntry(Object *obj) override
void talkTo(const Common::String &filename) override
int waitForMore(int delay) override
void pullSequence(int slot=-1) override
Definition: stack.h:102
bool displayTalk(bool slamIt) override
int talkLine(int lineNum, int stateNum, byte color, int lineY, bool slamIt) override