Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Sprite2D: add colorkey ivar

  • Loading branch information...
commit a713f3f64d53dbe9addcc181b44733e79a3151a3 1 parent 951ca22
Brad Allred bradallred authored
Showing with 15 additions and 0 deletions.
  1. +11 −0 gemrb/core/Sprite2D.cpp
  2. +4 −0 gemrb/core/Sprite2D.h
11 gemrb/core/Sprite2D.cpp
View
@@ -36,6 +36,7 @@ Sprite2D::Sprite2D(int Width, int Height, int Bpp, void* vptr, const void* pixel
XPos = 0;
YPos = 0;
RefCount = 1;
+ colorkey = 0;
}
Sprite2D::~Sprite2D()
@@ -121,4 +122,14 @@ void Sprite2D::release()
core->GetVideoDriver()->FreeSprite(that);
}
+ieDword Sprite2D::GetColorKey() const
+{
+ return colorkey;
+}
+
+void Sprite2D::SetColorKey(ieDword ck)
+{
+ colorkey = ck;
+}
+
}
4 gemrb/core/Sprite2D.h
View
@@ -62,6 +62,8 @@ class Sprite2D_BAM_Internal {
class GEM_EXPORT Sprite2D {
public:
static const TypeID ID;
+protected:
+ ieDword colorkey;
public:
int XPos, YPos, Width, Height, Bpp;
/** Pointer to the Driver Video Structure */
@@ -74,6 +76,8 @@ class GEM_EXPORT Sprite2D {
Palette *GetPalette() const;
void SetPalette(Palette *pal);
Color GetPixel(unsigned short x, unsigned short y) const;
+ virtual ieDword GetColorKey() const;
+ virtual void SetColorKey(ieDword ck);
public: // public only for SDLVideo
int RefCount;
public:
Please sign in to comment.
Something went wrong with that request. Please try again.