ScummVM API documentation
maccursor.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
36#ifndef GRAPHICS_MACCURSOR_H
37#define GRAPHICS_MACCURSOR_H
38
39#include "common/stream.h"
40
41#include "graphics/cursor.h"
42
43namespace Graphics {
44
48class MacCursor : public Cursor {
49public:
50 MacCursor();
51 ~MacCursor();
52
54 uint16 getWidth() const override { return 16; }
56 uint16 getHeight() const override { return 16; }
58 uint16 getHotspotX() const override { return _hotspotX; }
60 uint16 getHotspotY() const override { return _hotspotY; }
62 byte getKeyColor() const override { return 0xFF; }
63
64 const byte *getSurface() const override { return _surface; }
65
66 const byte *getPalette() const override { return _palette; }
67 byte getPaletteStartIndex() const override { return 0; }
68 uint16 getPaletteCount() const override { return 256; }
69
71 bool readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome = false, byte monochromeInvertedPixelColor = 0xff, bool forceCURSFormat = false);
72
73protected:
74 bool readFromCURS(Common::SeekableReadStream &stream, byte monochromeInvertedPixelColor);
75 bool readFromCRSR(Common::SeekableReadStream &stream, bool forceMonochrome, byte monochromeInvertedPixelColor);
76
77 byte *_surface;
78 byte _palette[256 * 3];
79
80 uint16 _hotspotX;
81 uint16 _hotspotY;
82
84 void clear();
85};
87} // End of namespace Graphics
88
89#endif
Definition: stream.h:745
Definition: cursor.h:42
Definition: maccursor.h:48
uint16 getWidth() const override
Definition: maccursor.h:54
const byte * getSurface() const override
Definition: maccursor.h:64
uint16 getHotspotX() const override
Definition: maccursor.h:58
uint16 _hotspotY
The cursor's hotspot's y coordinate.
Definition: maccursor.h:81
byte getPaletteStartIndex() const override
Definition: maccursor.h:67
const byte * getPalette() const override
Definition: maccursor.h:66
uint16 _hotspotX
The cursor's hotspot's x coordinate.
Definition: maccursor.h:80
uint16 getHotspotY() const override
Definition: maccursor.h:60
byte getKeyColor() const override
Definition: maccursor.h:62
uint16 getPaletteCount() const override
Definition: maccursor.h:68
bool readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome=false, byte monochromeInvertedPixelColor=0xff, bool forceCURSFormat=false)
uint16 getHeight() const override
Definition: maccursor.h:56
Definition: formatinfo.h:28