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
32namespace MediaStation {
33
34enum ContextReferenceSectionType {
35 kContextReferencePlaceholder = 0x0003,
36 kContextReferenceContextId = 0x0004,
37 kContextReferenceStreamId = 0x0005,
38 kContextReferenceParentContextId = 0x0006,
39 kContextReferenceName = 0x0bb8
40};
41
43public:
44 ContextReference(Chunk &chunk);
46
47 uint _contextId = 0;
48 uint _streamId = 0;
49 Common::String _name;
50 Common::Array<uint> _parentContextIds;
51
52private:
53 ContextReferenceSectionType getSectionType(Chunk &chunk);
54};
55
56enum ScreenReferenceSectionType {
57 kScreenReferenceScreenId = 0x0009,
58 kScreenReferenceContextId = 0x0004
59};
60
62public:
63 ScreenReference(Chunk &chunk);
64 ScreenReference() {};
65
66 uint _screenActorId = 0;
67 uint _contextId = 0;
68
69private:
70 ScreenReferenceSectionType getSectionType(Chunk &chunk);
71};
72
73enum 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".
81enum 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
92class FileInfo {
93public:
94 FileInfo(Chunk &chunk);
95 FileInfo() {};
96
97 uint _id = 0;
98 IntendedFileLocation _intendedLocation = kFileLocationEmpty;
99 Common::String _name;
100
101private:
102 FileInfoSectionType getSectionType(Chunk &chunk);
103};
104
105enum StreamInfoSectionType {
106 kStreamInfoEmptySection = 0x0000,
107 kStreamInfoActorId = 0x002a,
108 kStreamInfoFileId = 0x002b,
109 kStreamInfoStartOffset = 0x002c
110};
111
113public:
114 StreamInfo(Chunk &chunk);
115 StreamInfo() {};
116
117 uint _actorId = 0;
118 uint _fileId = 0;
119 uint _startOffsetInFile = 0;
120
121private:
122 StreamInfoSectionType getSectionType(Chunk &chunk);
123};
124
125// Declares a cursor, which is stored as a cursor resource in the game executable.
127public:
128 CursorDeclaration(Chunk &chunk);
130
131 uint _id = 0;
132 uint _unk = 0;
133 Common::String _name;
134};
135
137public:
138 ParamTokenDeclaration(Common::String resourceName, Common::String resourceId) : _name(resourceName), _id(resourceId) {};
140
141 Common::String _name;
142 Common::String _id;
143};
144
145enum BootSectionType {
146 kBootLastSection = 0x0000,
147 kBootContextReference = 0x0002,
148 kBootVersionInformation = 0x0190,
149 kBootUnk1 = 0x0191,
150 kBootFunctionTableSize = 0x0192,
151 kBootUnk3 = 0x0193,
152 kBootParamTokenDeclaration = 0x0bba,
153 kBootParamTokenValue = 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: datafile.h:99
Definition: boot.h:42
Definition: boot.h:126
Definition: boot.h:92
Definition: boot.h:61
Definition: boot.h:112