ScummVM API documentation
files_manager.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 TITANIC_FILES_MANAGER_H
23#define TITANIC_FILES_MANAGER_H
24
25#include "common/hashmap.h"
26#include "titanic/core/list.h"
27#include "titanic/support/screen_manager.h"
28
29namespace Titanic {
30
31enum ResourceFlag { FLAG_COMPRESSED = 1 };
32
33class TitanicEngine;
34class CGameManager;
35
36class CFilesManagerList : public List<ListItem> {
37};
38
40 struct ResourceEntry {
41 uint _offset;
42 uint _size;
43 uint _flags;
44
45 ResourceEntry() : _offset(0), _size(0), _flags(0) {}
46 ResourceEntry(uint offset, uint size, uint flags) :
47 _offset(offset), _size(size), _flags(flags) {}
48 };
50private:
51 TitanicEngine *_vm;
52 CGameManager *_gameManager;
53 Common::File _datFile;
54 ResourceHash _resources;
56 int _drive;
57 const CString _assetsPath;
58 int _version;
59public:
62
67
71 void setGameManager(CGameManager *gameManager) {
72 _gameManager = gameManager;
73 }
74
78 static bool fileExists(const CString &name);
79
83 bool scanForFile(const CString &name);
84
88 void loadDrive();
89
93 void insertCD(CScreenManager *screenManager);
94
98 void resetView();
99
103 void preload(const CString &name);
104
109};
110
111} // End of namespace Titanic
112
113#endif /* TITANIC_FILES_MANAGER_H */
Definition: file.h:47
Definition: stream.h:745
Definition: files_manager.h:39
void insertCD(CScreenManager *screenManager)
void setGameManager(CGameManager *gameManager)
Definition: files_manager.h:71
Common::SeekableReadStream * getResource(const CString &str)
static bool fileExists(const CString &name)
bool scanForFile(const CString &name)
void preload(const CString &name)
Definition: files_manager.h:36
Definition: game_manager.h:48
Definition: screen_manager.h:49
Definition: string.h:40
Definition: list.h:71
Definition: titanic.h:121