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 ACCESS_FILES_H
23
#define ACCESS_FILES_H
24
25
#include "common/scummsys.h"
26
#include "common/array.h"
27
#include "common/file.h"
28
#include "graphics/managed_surface.h"
29
#include "access/decompress.h"
30
31
namespace
Access
{
32
33
class
AccessEngine;
34
35
struct
FileIdent
{
36
int
_fileNum;
37
int
_subfile;
38
39
FileIdent
();
40
FileIdent
(
int
fileNum,
int
subfile) { _fileNum = fileNum; _subfile = subfile; }
41
42
void
load(
Common::SeekableReadStream
&s);
43
};
44
45
struct
CellIdent
:
FileIdent
{
46
byte _cell;
47
48
CellIdent
();
49
CellIdent
(
int
cell,
int
fileNum,
int
subfile);
50
};
51
52
class
FileManager
;
53
54
class
Resource
{
55
friend
class
FileManager
;
56
private
:
57
Common::File
_file;
58
byte *_data;
59
public
:
60
Common::SeekableReadStream
*_stream;
61
int
_size;
62
63
Resource
();
64
Resource
(byte *data,
int
size);
65
~
Resource
();
66
byte *data();
67
68
const
char
*getFileName()
const
;
69
};
70
71
class
FileManager
{
72
private
:
73
AccessEngine
*_vm;
74
75
void
openFile(
Resource
*res,
const
Common::Path
&filename);
76
80
void
handleFile(
Resource
*res);
81
85
void
handleScreen(
Graphics::ManagedSurface
*dest,
Resource
*res);
86
90
void
setAppended(
Resource
*file,
int
fileNum);
91
95
void
gotoAppended(
Resource
*file,
int
subfile);
96
public
:
97
int
_fileNumber;
98
Common::Array<uint32>
_fileIndex;
99
bool
_setPaletteFlag;
100
public
:
101
FileManager
(
AccessEngine
*vm);
102
~
FileManager
();
103
107
bool
existFile(
const
Common::Path
&filename);
108
112
Resource
*loadFile(
int
fileNum,
int
subfile);
113
117
Resource
*loadFile(
const
FileIdent
&fileIdent);
118
122
Resource
*loadFile(
const
Common::Path
&filename);
123
127
void
loadScreen(
int
fileNum,
int
subfile);
128
132
void
loadScreen(
const
Common::Path
&filename);
133
137
void
loadScreen(
Graphics::ManagedSurface
*dest,
int
fileNum,
int
subfile);
138
};
139
140
}
// End of namespace Access
141
142
#endif
/* ACCESS_FILES_H */
Graphics::ManagedSurface
Definition:
managed_surface.h:51
Access::FileIdent
Definition:
files.h:35
Access::AccessEngine
Definition:
access.h:139
Common::Array< uint32 >
Common::Path
Definition:
path.h:52
Common::SeekableReadStream
Definition:
stream.h:745
Access::Resource
Definition:
files.h:54
Common::File
Definition:
file.h:47
Access::FileManager
Definition:
files.h:71
Access::CellIdent
Definition:
files.h:45
Access
Definition:
access.h:62
engines
access
files.h
Generated on Tue Oct 21 2025 09:09:14 for ScummVM API documentation by
1.8.13