ScummVM API documentation
lipsync.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 GRIM_LIPSYNC_H
23 #define GRIM_LIPSYNC_H
24 
25 #include "common/str.h"
26 
27 #include "engines/grim/object.h"
28 
29 namespace Common {
30 class SeekableReadStream;
31 }
32 
33 namespace Grim {
34 
35 class LipSync : public Object {
36 public:
37  LipSync(const Common::String &filename, Common::SeekableReadStream *data);
38  ~LipSync();
39 
40  int getAnim(int pos);
41  bool isValid() { return _numEntries > 0; }
42  const Common::String &getFilename() const { return _fname; };
43 
44 private:
45  struct LipEntry {
46  uint16 frame;
47  uint16 anim;
48  };
49 
50  struct PhonemeAnim {
51  uint16 phoneme;
52  uint16 anim;
53  };
54 
55  LipEntry *_entries;
56  int _numEntries;
57 
58  static const PhonemeAnim _animTable[];
59  static const int _animTableSize;
60  Common::String _fname;
61 };
62 
63 } // end of namespace Grim
64 
65 #endif
66 
Definition: str.h:59
Definition: stream.h:745
Definition: actor.h:33
Definition: lipsync.h:35
Definition: algorithm.h:29
Definition: object.h:32