ScummVM API documentation
bigfile.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#ifndef DRAGONS_BIGFILE_H
22#define DRAGONS_BIGFILE_H
23
24#include "common/array.h"
25#include "common/file.h"
26
27namespace Dragons {
28
29class DragonsEngine;
30
31struct FileInfo {
32 Common::String filename;
33 uint32 offset;
34 uint32 size;
35 FileInfo() {
36 offset = 0;
37 size = 0;
38 filename = "";
39 }
40};
41
43private:
44 DragonsEngine *_vm;
45 Common::File *_fd;
46 uint16 _totalRecords;
47 Common::Array<FileInfo> _fileInfoTbl;
48
49public:
50 BigfileArchive(DragonsEngine *vm, const char *filename);
51 virtual ~BigfileArchive();
52
53 byte *load(const char *filename, uint32 &dataSize);
54 bool doesFileExist(const char *filename);
55
56private:
57 void loadFileInfoTbl();
58 uint32 getResourceId(const char *filename);
59};
60
61} // End of namespace dragons
62
63#endif //DRAGONS_BIGFILE_H
Definition: array.h:52
Definition: file.h:47
Definition: str.h:59
Definition: bigfile.h:42
Definition: dragons.h:166
Definition: bigfile.h:31