ScummVM API documentation
fileset.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 SLUDGE_FILESET_H
22
#define SLUDGE_FILESET_H
23
24
#include "common/file.h"
25
26
namespace
Sludge
{
27
28
class
ResourceManager
{
29
30
public
:
31
ResourceManager
();
32
~
ResourceManager
();
33
34
void
init();
35
void
kill();
36
37
void
setData(
Common::File
*readStream);
38
void
setFileIndices(uint, uint);
39
Common::SeekableReadStream
*getData() {
return
_bigDataFile; }
40
41
uint openFileFromNum(
int
num);
42
bool
openSubSlice(
int
num);
43
bool
openObjectSlice(
int
num);
44
Common::String
getNumberedString(
int
value);
45
46
// Access control flag
47
bool
startAccess();
48
void
finishAccess();
49
50
// Resource names
51
void
readResourceNames(
Common::SeekableReadStream
*readStream);
52
const
Common::String
resourceNameFromNum(
int
i);
53
bool
hasResourceNames() {
return
!_allResourceNames.
empty
(); }
54
55
void
dumpFile(
int
num,
const
char
*pattern);
56
57
private
:
58
bool
_sliceBusy;
59
Common::File
*_bigDataFile;
60
uint32 _startOfDataIndex, _startOfTextIndex, _startOfSubIndex, _startOfObjectIndex;
61
int32 _startIndex;
62
63
Common::Array<Common::String>
_allResourceNames;
64
65
private
:
66
static
uint32 _cp1250ToUTF32[128];
67
Common::String
convertString(
const
Common::String
&s);
68
};
69
70
}
// End of namespace Sludge
71
72
#endif
Common::String
Definition:
str.h:59
Common::Array< Common::String >
Common::SeekableReadStream
Definition:
stream.h:745
Sludge::ResourceManager
Definition:
fileset.h:28
Common::Array::empty
bool empty() const
Definition:
array.h:351
Common::File
Definition:
file.h:47
Sludge
Definition:
builtin.h:27
engines
sludge
fileset.h
Generated on Sat Nov 23 2024 09:19:15 for ScummVM API documentation by
1.8.13