ScummVM API documentation
container.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
/*
23
* Based on
24
* WebVenture (c) 2010, Sean Kasun
25
* https://github.com/mrkite/webventure, http://seancode.com/webventure/
26
*
27
* Used with explicit permission from the author
28
*/
29
30
#ifndef MACVENTURE_CONTAINER_H
31
#define MACVENTURE_CONTAINER_H
32
33
#include "macventure/macventure.h"
34
35
#include "common/file.h"
36
#include "common/fs.h"
37
38
namespace
MacVenture
{
39
40
struct
ItemGroup
{
41
uint32 bitOffset;
//It's really uint24
42
uint32 offset;
//It's really uint24
43
uint32 lengths[64];
44
};
45
46
typedef
uint32 ContainerHeader;
47
48
class
Container
{
49
50
public
:
51
Container
(
const
Common::Path
&filename);
52
~
Container
();
53
54
public
:
58
uint32 getItemByteSize(uint32
id
);
59
63
Common::SeekableReadStream
*getItem(uint32
id
);
64
65
protected
:
66
67
bool
_simplified;
68
69
uint _lenObjs;
// In the case of simple container, lenght of an object
70
uint _numObjs;
71
72
ContainerHeader _header;
73
74
Common::Array<uint16>
_huff;
// huffman masks
75
Common::Array<uint8>
_lens;
// huffman lengths
76
Common::Array<ItemGroup>
_groups;
77
78
Common::Path
_filename;
79
Common::File
_file;
80
Common::SeekableReadStream
*_res;
81
82
};
83
84
85
}
// End of namespace MacVenture
86
87
#endif
Common::Array< uint16 >
Common::Path
Definition:
path.h:52
Common::SeekableReadStream
Definition:
stream.h:745
MacVenture::ItemGroup
Definition:
container.h:40
MacVenture::Container
Definition:
container.h:48
Common::File
Definition:
file.h:47
MacVenture
Definition:
container.h:38
engines
macventure
container.h
Generated on Sat Aug 31 2024 09:12:49 for ScummVM API documentation by
1.8.13