ScummVM API documentation
mouse_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_MOUSESHAPEARCHIVE_H
23#define ULTIMA8_GFX_MOUSESHAPEARCHIVE_H
24
25#include "ultima/ultima8/gfx/shape_archive.h"
26
27namespace Ultima {
28namespace Ultima8 {
29
30// Fake archive class for mouse shape in the shape viewer
31// TODO - consider using this in GameData and owning the shape
33public:
34 MouseShapeArchive(uint16 id, Palette *pal = 0,
35 const ConvertShapeFormat *format = 0)
36 : ShapeArchive(id, pal, format) {}
37 MouseShapeArchive(Shape *shape, uint16 id, Palette *pal = 0,
38 const ConvertShapeFormat *format = 0)
39 : ShapeArchive(id, pal, format) {
40 _shapes.push_back(shape);
41 _count = 1;
42 }
43 ~MouseShapeArchive() override {
44 _shapes.clear();
45 }
46
47 void cache(uint32 shapenum) override {}
48 void uncache(uint32 shapenum) override {}
49 bool isCached(uint32 shapenum) const override { return true; }
50};
51
52
53} // End of namespace Ultima8
54} // End of namespace Ultima
55
56#endif
Definition: mouse_shape_archive.h:32
bool isCached(uint32 shapenum) const override
Check if an object is cached.
Definition: mouse_shape_archive.h:49
void cache(uint32 shapenum) override
Cache a single object.
Definition: mouse_shape_archive.h:47
void uncache(uint32 shapenum) override
Definition: mouse_shape_archive.h:48
Definition: palette.h:36
Definition: shape_archive.h:34
Definition: shape.h:36
Definition: convert_shape.h:35