ScummVM API documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
parser.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 DGDS_PARSER_H
23
#define DGDS_PARSER_H
24
25
#include "common/hashmap.h"
26
#include "common/str.h"
27
#include "common/stream.h"
28
29
namespace
Dgds
{
30
31
class
DgdsChunkReader;
32
class
ResourceManager;
33
class
Decompressor;
34
35
class
ParserData
{};
36
37
class
DgdsParser
{
38
public
:
39
// FIXME: Make these private/protected
40
uint32 _bytesRead;
41
//Common::SeekableReadStream *_file;
42
43
public
:
44
DgdsParser
(
ResourceManager
*resman,
Decompressor
*decompressor);
45
virtual
~
DgdsParser
() {};
46
bool
parse(
ParserData
*data,
const
Common::String
&filename);
47
virtual
bool
handleChunk(
DgdsChunkReader
&chunk,
ParserData
*data) {
return
false
; };
48
49
static
Common::HashMap<uint16, Common::String>
readTags(
Common::SeekableReadStream
*stream);
50
51
protected
:
52
Common::String
_filename;
53
54
private
:
55
ResourceManager
*_resman;
56
Decompressor
*_decompressor;
57
};
58
59
class
TTMParser
:
public
DgdsParser
{
60
public
:
61
TTMParser
(
ResourceManager
*resman,
Decompressor
*decompressor) :
DgdsParser
(resman, decompressor) {}
62
63
private
:
64
bool
handleChunk(
DgdsChunkReader
&chunk,
ParserData
*data)
override
;
65
};
66
67
class
ADSParser
:
public
DgdsParser
{
68
public
:
69
ADSParser
(
ResourceManager
*resman,
Decompressor
*decompressor) :
DgdsParser
(resman, decompressor) {}
70
71
private
:
72
bool
handleChunk(
DgdsChunkReader
&chunk,
ParserData
*data)
override
;
73
};
74
75
}
// End of namespace Dgds
76
77
#endif // DGDS_RESOURCE_H
Common::String
Definition:
str.h:59
Dgds
Definition:
ads.h:28
Common::SeekableReadStream
Definition:
stream.h:745
Common::HashMap< uint16, Common::String >
Dgds::ADSParser
Definition:
parser.h:67
Dgds::DgdsChunkReader
Definition:
resource.h:64
Dgds::TTMParser
Definition:
parser.h:59
Dgds::ParserData
Definition:
parser.h:35
Dgds::DgdsParser
Definition:
parser.h:37
Dgds::Decompressor
Definition:
decompress.h:67
Dgds::ResourceManager
Definition:
resource.h:48
engines
dgds
parser.h
Generated on Thu Apr 10 2025 09:03:43 for ScummVM API documentation by
1.8.13