ScummVM API documentation
speech.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 ASYLUM_SYSTEM_SPEECH_H
23#define ASYLUM_SYSTEM_SPEECH_H
24
25#include "common/scummsys.h"
26
27#include "asylum/shared.h"
28
29namespace Asylum {
30
31class AsylumEngine;
32
33class Speech {
34public:
35 Speech(AsylumEngine *engine);
36 ~Speech() {};
37
44 ResourceId play(ResourceId soundResourceId, ResourceId textResourceId);
45
51
59 ResourceId playIndexed(int32 index);
60
69 ResourceId playScene(int32 type, int32 index);
70
78 ResourceId playPlayer(int32 index);
79
84
89
95 ResourceId getSoundResourceId() const { return _soundResourceId; }
96
102 void setTick(int32 val) { _tick = val;}
103
109 uint32 getTick() { return _tick; }
110
116 void setSoundResourceId(ResourceId id) { _soundResourceId = id; }
117
123 void setTextResourceId(ResourceId id) { _textResourceId = id; }
124
130 ResourceId getTextResourceId() { return _textResourceId; }
131
137 void setTextData(char *text) { _textData = text; }
138
144 char *getTextData() { return _textData; }
145
151 void setTextDataPos(char *text) { _textDataPos = text; }
152
158 char *getTextDataPos() { return _textDataPos; }
159
160private:
161 AsylumEngine *_vm;
162
163 int32 _tick;
164 char *_textData;
165 char *_textDataPos;
166
167 ResourceId _soundResourceId;
168 ResourceId _textResourceId;
169
173 void process();
174
175};
176
177} // end of namespace Asylum
178
179#endif // ASYLUM_SYSTEM_SPEECH_H
Definition: asylum.h:73
Definition: speech.h:33
ResourceId getSoundResourceId() const
Definition: speech.h:95
void prepareSpeech()
void setTick(int32 val)
Definition: speech.h:102
void setTextDataPos(char *text)
Definition: speech.h:151
ResourceId playPlayer(int32 index)
void resetResourceIds()
char * getTextDataPos()
Definition: speech.h:158
void setTextData(char *text)
Definition: speech.h:137
ResourceId getTextResourceId()
Definition: speech.h:130
char * getTextData()
Definition: speech.h:144
ResourceId play(ResourceId soundResourceId, ResourceId textResourceId)
void setTextResourceId(ResourceId id)
Definition: speech.h:123
void resetTextData()
uint32 getTick()
Definition: speech.h:109
void setSoundResourceId(ResourceId id)
Definition: speech.h:116
ResourceId playScene(int32 type, int32 index)
ResourceId playIndexed(int32 index)