ScummVM API documentation
names.h
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5  */
6 
7 #ifndef LINGODEC_NAMES_H
8 #define LINGODEC_NAMES_H
9 
10 #include "common/array.h"
11 #include "common/stablemap.h"
12 
13 namespace Common {
14 class SeekableReadStream;
15 class String;
16 }
17 
18 namespace LingoDec {
19 
20 /* StandardNames */
21 
22 namespace StandardNames {
23 extern const char *opcodeNamesS[];
24 extern const char *opcodeNamesM[];
25 extern const char *binaryOpNames[];
26 extern const char *chunkTypeNames[];
27 extern const char *putTypeNames[];
28 
29 extern const char *moviePropertyNames[];
30 extern const char *whenEventNames[];
31 extern const char *menuPropertyNames[];
32 extern const char *menuItemPropertyNames[];
33 extern const char *soundPropertyNames[];
34 extern const char *spritePropertyNames[];
35 extern const char *animationPropertyNames[];
36 extern const char *animation2PropertyNames[];
37 extern const char *memberPropertyNames[];
38 
39 Common::String getOpcodeName(byte id);
40 }
41 
42 /* ScriptNames */
43 
44 struct ScriptNames {
45  int32 unknown0;
46  int32 unknown1;
47  uint32 len1;
48  uint32 len2;
49  uint16 namesOffset;
50  uint16 namesCount;
52 
53  unsigned int version;
54 
55  ScriptNames(unsigned int version_) : version(version_) {}
56  void read(Common::SeekableReadStream &stream);
57  bool validName(int id) const;
58  Common::String getName(int id) const;
59 };
60 
61 } // namespace LingoDec
62 
63 #endif // LINGODEC_NAMES_H
Definition: names.h:44
Definition: str.h:59
Definition: cast.h:33
Definition: stream.h:745
Definition: algorithm.h:29