22 #ifndef MEDIASTATION_BOOT_H 23 #define MEDIASTATION_BOOT_H 25 #include "common/path.h" 26 #include "common/str.h" 27 #include "common/array.h" 28 #include "common/hashmap.h" 30 #include "mediastation/datafile.h" 34 enum ContextDeclarationSectionType {
35 kContextDeclarationPlaceholder = 0x0003,
36 kContextDeclarationContextId = 0x0004,
37 kContextDeclarationStreamId = 0x0005,
38 kContextDeclarationParentContextId = 0x0006,
39 kContextDeclarationName = 0x0bb8
53 ContextDeclarationSectionType getSectionType(
Chunk &chunk);
56 enum ScreenDeclarationSectionType {
57 kScreenDeclarationActorId = 0x0009,
58 kScreenDeclarationScreenId = 0x0004
70 ScreenDeclarationSectionType getSectionType(
Chunk &chunk);
73 enum FileDeclarationSectionType {
74 kFileDeclarationEmptySection = 0x0000,
75 kFileDeclarationFileId = 0x002b,
76 kFileDeclarationFileNameAndType = 0x002d
81 enum IntendedFileLocation {
82 kFileLocationEmpty = 0x0000,
84 kFileIntendedOnCdRom = 0x0007,
86 kFileIntendedForUnk1 = 0x0008,
87 kFileIntendedForUnk2 = 0x0009,
89 kFileIntendedOnHardDisk = 0x000b
98 IntendedFileLocation _intendedLocation = kFileLocationEmpty;
102 FileDeclarationSectionType getSectionType(
Chunk &chunk);
105 enum SubfileDeclarationSectionType {
106 kSubfileDeclarationEmptySection = 0x0000,
107 kSubfileDeclarationActorId = 0x002a,
108 kSubfileDeclarationFileId = 0x002b,
109 kSubfileDeclarationStartOffset = 0x002c
119 uint _startOffsetInFile = 0;
122 SubfileDeclarationSectionType getSectionType(
Chunk &chunk);
145 enum BootStreamType {
146 kBootDocumentDef = 0x01,
147 kBootControlCommands = 0x0d,
150 enum BootSectionType {
151 kBootLastSection = 0x0000,
152 kBootContextDeclaration = 0x0002,
153 kBootVersionInformation = 0x0190,
155 kBootFunctionTableSize = 0x0192,
157 kBootEngineResource = 0x0bba,
158 kBootEngineResourceId = 0x0bbb,
159 kBootScreenDeclaration = 0x0007,
160 kBootFileDeclaration = 0x000a,
161 kBootSubfileDeclaration = 0x000b,
166 BootSectionType getSectionType(
Chunk &chunk);
179 uint _functionTableSize = 0;
182 void readDocumentDef(
Chunk &chunk);
183 void readDocumentInfoFromStream(
Chunk &chunk, BootSectionType sectionType);
184 void readVersionInfoFromStream(
Chunk &chunk);
185 void readContextReferencesFromStream(
Chunk &chunk);
186 void readScreenDeclarationsFromStream(
Chunk &chunk);
187 void readAndAddFileMaps(
Chunk &chunk);
188 void readAndAddStreamMaps(
Chunk &chunk);
190 void readStartupInformation(
Chunk &chunk);