ScummVM API documentation
boot.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 MEDIASTATION_BOOT_H
23 #define MEDIASTATION_BOOT_H
24 
25 #include "common/path.h"
26 #include "common/str.h"
27 #include "common/array.h"
28 #include "common/hashmap.h"
29 
30 #include "mediastation/datafile.h"
31 
32 namespace MediaStation {
33 
34 enum ContextReferenceSectionType {
35  kContextReferencePlaceholder = 0x0003,
36  kContextReferenceContextId = 0x0004,
37  kContextReferenceStreamId = 0x0005,
38  kContextReferenceParentContextId = 0x0006,
39  kContextReferenceName = 0x0bb8
40 };
41 
43 public:
44  ContextReference(Chunk &chunk);
45  ContextReference() {};
46 
47  uint _contextId = 0;
48  uint _streamId = 0;
49  Common::String _name;
50  Common::Array<uint> _parentContextIds;
51 
52 private:
53  ContextReferenceSectionType getSectionType(Chunk &chunk);
54 };
55 
56 enum ScreenReferenceSectionType {
57  kScreenReferenceScreenId = 0x0009,
58  kScreenReferenceContextId = 0x0004
59 };
60 
62 public:
63  ScreenReference(Chunk &chunk);
64  ScreenReference() {};
65 
66  uint _screenActorId = 0;
67  uint _contextId = 0;
68 
69 private:
70  ScreenReferenceSectionType getSectionType(Chunk &chunk);
71 };
72 
73 enum FileInfoSectionType {
74  kFileInfoEmptySection = 0x0000,
75  kFileInfoFileId = 0x002b,
76  kFileInfoFileNameAndType = 0x002d
77 };
78 
79 // Indicates where a file is intended to be stored.
80 // NOTE: This might not be correct and this might be a more general "file type".
81 enum IntendedFileLocation {
82  kFileLocationEmpty = 0x0000,
83  // Usually all files that have numbers remain on the CD-ROM.
84  kFileIntendedOnCdRom = 0x0007,
85  // These UNKs only appear in George Shrinks.
86  kFileIntendedForUnk1 = 0x0008,
87  kFileIntendedForUnk2 = 0x0009,
88  // Usually only INSTALL.CXT is copied to the hard disk.
89  kFileIntendedOnHardDisk = 0x000b
90 };
91 
92 class FileInfo {
93 public:
94  FileInfo(Chunk &chunk);
95  FileInfo() {};
96 
97  uint _id = 0;
98  IntendedFileLocation _intendedLocation = kFileLocationEmpty;
99  Common::String _name;
100 
101 private:
102  FileInfoSectionType getSectionType(Chunk &chunk);
103 };
104 
105 enum StreamInfoSectionType {
106  kStreamInfoEmptySection = 0x0000,
107  kStreamInfoActorId = 0x002a,
108  kStreamInfoFileId = 0x002b,
109  kStreamInfoStartOffset = 0x002c
110 };
111 
112 class StreamInfo {
113 public:
114  StreamInfo(Chunk &chunk);
115  StreamInfo() {};
116 
117  uint _actorId = 0;
118  uint _fileId = 0;
119  uint _startOffsetInFile = 0;
120 
121 private:
122  StreamInfoSectionType getSectionType(Chunk &chunk);
123 };
124 
125 // Declares a cursor, which is stored as a cursor resource in the game executable.
127 public:
128  CursorDeclaration(Chunk &chunk);
129  CursorDeclaration() {};
130 
131  uint _id = 0;
132  uint _unk = 0;
133  Common::String _name;
134 };
135 
137 public:
138  EngineResourceDeclaration(Common::String resourceName, int resourceId) : _name(resourceName), _id(resourceId) {};
140 
141  Common::String _name;
142  int _id = 0;
143 };
144 
145 enum BootSectionType {
146  kBootLastSection = 0x0000,
147  kBootContextReference = 0x0002,
148  kBootVersionInformation = 0x0190,
149  kBootUnk1 = 0x0191,
150  kBootFunctionTableSize = 0x0192,
151  kBootUnk3 = 0x0193,
152  kBootEngineResource = 0x0bba,
153  kBootEngineResourceId = 0x0bbb,
154  kBootScreenReference = 0x0007,
155  kBootFileInfo = 0x000a,
156  kBootStreamInfo = 0x000b,
157 };
158 
159 } // End of namespace MediaStation
160 
161 #endif
Definition: str.h:59
Definition: actor.h:33
Definition: datafile.h:102
Definition: boot.h:61
Definition: boot.h:42
Definition: boot.h:126
Definition: boot.h:112
Definition: boot.h:92