ScummVM API documentation
concat.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 MADS_CORE_CONCAT_H
23#define MADS_CORE_CONCAT_H
24
25#include "common/stream.h"
26
27namespace MADS {
28
29#define CONCAT_ID_STRING "MADSCONCAT 1.0\032"
30#define CONCAT_ID_LENGTH 16
31#define CONCAT_ID_CHECK 10
32
33#define CONCAT_EXT ".HAG"
34
35#define CONCAT_MAX_FILES 750
36#define CONCAT_MAX_OUT 10
37
38struct Concat {
39 long file_offset;
40 long file_size;
41 char name[13];
42
43 void load(Common::SeekableReadStream *src) {
44 file_offset = src->readSint32LE();
45 file_size = src->readSint32LE();
46 src->read(name, 13);
47 src->skip(1);
48 }
49 static uint record_size() {
50 return 4 + 4 + 13 + 1;
51 }
52};
53
54typedef Concat *ConcatPtr;
55
56} // namespace MADS
57
58#endif
virtual uint32 read(void *dataPtr, uint32 dataSize)=0
FORCEINLINE int32 readSint32LE()
Definition: stream.h:555
Definition: stream.h:745
virtual bool skip(uint32 offset)
Definition: stream.h:793
Definition: concat.h:38