ScummVM API documentation
files.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 HOPKINS_FILES_H
23 #define HOPKINS_FILES_H
24 
25 #include "common/scummsys.h"
26 
27 namespace Common {
28 class ReadStream;
29 class Path;
30 }
31 
32 namespace Hopkins {
33 
34 class HopkinsEngine;
35 
36 // RES_ANI = 4 has been removed because it's not used
37 enum CatMode { RES_INI = 1, RES_REP = 2, RES_LIN = 3, RES_PER = 5,
38  RES_PIC = 6, RES_SAN = 7, RES_SLI = 8, RES_VOI = 9 };
39 
40 class FileManager {
41 public:
42  uint32 _catalogPos;
43  uint32 _catalogSize;
44 
45  HopkinsEngine *_vm;
46 
48 
49  bool fileExists(const Common::Path &file);
50  byte *loadFile(const Common::Path &file);
51  int readStream(Common::ReadStream &stream, void *buf, size_t nbytes);
52  void initCensorship();
53  byte *searchCat(const Common::Path &file, CatMode mode, bool &fileFoundFl);
54  uint32 fileSize(const Common::Path &filename);
55 };
56 
57 } // End of namespace Hopkins
58 
59 #endif /* HOPKINS_GLOBALS_H */
Definition: path.h:52
Path
Definition: game.h:75
Definition: algorithm.h:29
Definition: anim.h:30
Definition: files.h:40
Definition: stream.h:385
Definition: hopkins.h:86