ScummVM API documentation
shape_archive.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 ULTIMA8_GFX_SHAPEARCHIVE_H
23#define ULTIMA8_GFX_SHAPEARCHIVE_H
24
25#include "ultima/ultima8/filesys/archive.h"
26
27namespace Ultima {
28namespace Ultima8 {
29
30class Shape;
31struct ConvertShapeFormat;
32class Palette;
33
34class ShapeArchive : public Archive {
35public:
36 ShapeArchive(uint16 id, const Palette *pal = 0,
37 const ConvertShapeFormat *format = 0)
38 : Archive(), _id(id), _format(format), _palette(pal) { }
39 ShapeArchive(Common::SeekableReadStream *rs, uint16 id, const Palette *pal = 0,
40 const ConvertShapeFormat *format = 0)
41 : Archive(rs), _id(id), _format(format), _palette(pal) { }
42
43 ~ShapeArchive() override;
44
45 Shape *getShape(uint32 shapenum);
46
47 void cache(uint32 shapenum) override;
48 void uncache(uint32 shapenum) override;
49 bool isCached(uint32 shapenum) const override;
50
51protected:
52 uint16 _id;
53 const ConvertShapeFormat *_format;
54 const Palette *_palette;
56};
57
58} // End of namespace Ultima8
59} // End of namespace Ultima
60
61#endif
Definition: array.h:52
Definition: stream.h:745
Definition: atari-screen.h:42
Definition: archive.h:37
Archive()
create Archive without any input sources
Definition: palette.h:36
Definition: shape_archive.h:34
bool isCached(uint32 shapenum) const override
Check if an object is cached.
void cache(uint32 shapenum) override
Cache a single object.
void uncache(uint32 shapenum) override
Definition: shape.h:36
Definition: convert_shape.h:35