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 
43 namespace Graphics {
44 
48 class MacCursor : public Cursor {
49 public:
50  MacCursor();
51  ~MacCursor();
52 
54  uint16 getWidth() const { return 16; }
56  uint16 getHeight() const { return 16; }
58  uint16 getHotspotX() const { return _hotspotX; }
60  uint16 getHotspotY() const { return _hotspotY; }
62  virtual byte getKeyColor() const { return 0xFF; }
63 
64  const byte *getSurface() const { return _surface; }
65 
66  virtual const byte *getPalette() const { return _palette; }
67  byte getPaletteStartIndex() const { return 0; }
68  uint16 getPaletteCount() const { return 256; }
69 
71  bool readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome = false, byte monochromeInvertedPixelColor = 0xff, bool forceCURSFormat = false);
72 
73 protected:
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
virtual byte getKeyColor() const
Definition: maccursor.h:62
byte getPaletteStartIndex() const
Definition: maccursor.h:67
uint16 getWidth() const
Definition: maccursor.h:54
uint16 _hotspotX
The cursor&#39;s hotspot&#39;s x coordinate.
Definition: maccursor.h:80
Definition: stream.h:745
uint16 getHotspotY() const
Definition: maccursor.h:60
uint16 _hotspotY
The cursor&#39;s hotspot&#39;s y coordinate.
Definition: maccursor.h:81
const byte * getSurface() const
Definition: maccursor.h:64
uint16 getHotspotX() const
Definition: maccursor.h:58
bool readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome=false, byte monochromeInvertedPixelColor=0xff, bool forceCURSFormat=false)
Definition: cursor.h:42
Definition: formatinfo.h:28
Definition: maccursor.h:48
virtual const byte * getPalette() const
Definition: maccursor.h:66
uint16 getPaletteCount() const
Definition: maccursor.h:68
uint16 getHeight() const
Definition: maccursor.h:56