Skip to content

Commit

Permalink
GRAPHICS: Add cursor palette start/count functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Aug 16, 2011
1 parent 1793d92 commit 91ae23e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions graphics/cursor.h
Expand Up @@ -49,8 +49,13 @@ class Cursor {

/** Return the cursor's surface. */
virtual const byte *getSurface() const = 0;

/** Return the cursor's palette in RGB format. */
virtual const byte *getPalette() const = 0;
/** Return the starting index of the palette. */
virtual byte getPaletteStartIndex() const = 0;
/** Return the number of colors in the palette. */
virtual uint16 getPaletteCount() const = 0;
};

} // End of namespace Graphics
Expand Down
3 changes: 3 additions & 0 deletions graphics/maccursor.h
Expand Up @@ -57,7 +57,10 @@ class MacCursor : public Cursor {
byte getKeyColor() const { return 0xFF; }

const byte *getSurface() const { return _surface; }

const byte *getPalette() const { return _palette; }
byte getPaletteStartIndex() const { return 0; }
uint16 getPaletteCount() const { return 256; }

/** Read the cursor's data out of a stream. */
bool readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome = false);
Expand Down
3 changes: 3 additions & 0 deletions graphics/wincursor.h
Expand Up @@ -54,7 +54,10 @@ class WinCursor : public Cursor {
byte getKeyColor() const;

const byte *getSurface() const { return _surface; }

const byte *getPalette() const { return _palette; }
byte getPaletteStartIndex() const { return 0; }
uint16 getPaletteCount() const { return 256; }

/** Read the cursor's data out of a stream. */
bool readFromStream(Common::SeekableReadStream &stream);
Expand Down

0 comments on commit 91ae23e

Please sign in to comment.