ScummVM API documentation
resource_segacd.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#ifdef ENABLE_EOB
23
24#ifndef KYRA_RESOURCE_SEGACD_H
25#define KYRA_RESOURCE_SEGACD_H
26
27#include "common/scummsys.h"
28#include "common/str.h"
29
30namespace Common {
31 class SeekableReadStream;
32 class SeekableReadStreamEndian;
33}
34
35namespace Kyra {
36
37class Resource;
38class SegaCDResource {
39public:
40 SegaCDResource(Resource *res);
41 ~SegaCDResource();
42
43 bool loadContainer(const Common::Path &filename, uint32 offset = 0, uint32 size = 0);
44 void unloadContainer();
45
46 Common::SeekableReadStreamEndian *resStreamEndian(int resID);
47 Common::SeekableReadStream *resStream(int resID);
48
49 uint8 *resData(int resID, uint32 *resLen = 0);
50
51private:
52 Resource *_res;
53
54 struct TableEntry {
55 TableEntry() : _offset(0), _len(0) {}
56 uint32 _offset;
57 uint32 _len;
58 };
59
60 TableEntry *_resTable;
61 int _numResources;
63 Common::Path _curFile;
64 uint32 _curOffset;
65 uint32 _curSize;
66};
67
68} // End of namespace Kyra
69
70#endif
71#endif // ENABLE_EOB
Definition: path.h:52
Definition: stream.h:944
Definition: stream.h:745
Definition: algorithm.h:29
Definition: detection.h:27