From: Brad A. <br...@us...> - 2011-10-28 00:06:54
|
gemrb: Infinity Engine emulator The branch master has been updated via 3cc6611fd381eb87996414ae8b9e16408dab4ecd (commit) Summary of changes: gemrb/core/Sprite2D.cpp | 4 ++-- gemrb/core/Sprite2D.h | 4 ++-- gemrb/plugins/SDLVideo/SDLVideo.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) from 2743c08fbac8a6fd18af10b4063f270cc5144e15 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=3cc6611fd381eb87996414ae8b9e16408dab4ecd commit 3cc6611fd381eb87996414ae8b9e16408dab4ecd Author: Brad Allred <bra...@me...> Date: Thu Oct 27 18:06:16 2011 -0600 Sprite2D: add a pitch ivar. TTF fonts will need to use this since their glyph pitch isn't always equal to their width as we are currently assuming for BAM fonts. diff --git a/gemrb/core/Sprite2D.cpp b/gemrb/core/Sprite2D.cpp index bcbd1d9..f89b0a0 100644 --- a/gemrb/core/Sprite2D.cpp +++ b/gemrb/core/Sprite2D.cpp @@ -27,8 +27,8 @@ const TypeID Sprite2D::ID = { "Sprite2D" }; -Sprite2D::Sprite2D(int Width, int Height, int Bpp, void* vptr, const void* pixels) - : Width(Width), Height(Height), Bpp(Bpp), vptr(vptr), pixels(pixels) +Sprite2D::Sprite2D(int Width, int Height, int Bpp, int Pitch, void* vptr, const void* pixels) + : Width(Width), Height(Height), Bpp(Bpp), Pitch(Pitch), vptr(vptr), pixels(pixels) { BAM = false; XPos = 0; diff --git a/gemrb/core/Sprite2D.h b/gemrb/core/Sprite2D.h index c2c601b..a6ddfcf 100644 --- a/gemrb/core/Sprite2D.h +++ b/gemrb/core/Sprite2D.h @@ -61,12 +61,12 @@ class GEM_EXPORT Sprite2D { public: static const TypeID ID; public: - int XPos, YPos, Width, Height, Bpp; + int XPos, YPos, Width, Height, Bpp, Pitch; /** Pointer to the Driver Video Structure */ void* vptr; bool BAM; const void* pixels; - Sprite2D(int Width, int Height, int Bpp, void* vptr, const void* pixels); + Sprite2D(int Width, int Height, int Bpp, int Pitch, void* vptr, const void* pixels); ~Sprite2D(); bool IsPixelTransparent(unsigned short x, unsigned short y) const; Palette *GetPalette() const; diff --git a/gemrb/plugins/SDLVideo/SDLVideo.cpp b/gemrb/plugins/SDLVideo/SDLVideo.cpp index dd4bfac..bf72de7 100644 --- a/gemrb/plugins/SDLVideo/SDLVideo.cpp +++ b/gemrb/plugins/SDLVideo/SDLVideo.cpp @@ -764,7 +764,7 @@ Sprite2D* SDLVideoDriver::CreateSprite(int w, int h, int bpp, ieDword rMask, SDL_SetColorKey( ( SDL_Surface * ) p, SDL_SRCCOLORKEY | SDL_RLEACCEL, index ); } - return new Sprite2D(w, h, bpp, p, pixels); + return new Sprite2D(w, h, bpp, p->pitch, p, pixels); } Sprite2D* SDLVideoDriver::CreateSprite8(int w, int h, int bpp, void* pixels, @@ -781,7 +781,7 @@ Sprite2D* SDLVideoDriver::CreateSprite8(int w, int h, int bpp, void* pixels, if (cK) { SDL_SetColorKey( ( SDL_Surface * ) p, SDL_SRCCOLORKEY, index ); } - return new Sprite2D(w, h, bpp, p, pixels); + return new Sprite2D(w, h, bpp, p->pitch, p, pixels); } Sprite2D* SDLVideoDriver::CreateSpriteBAM8(int w, int h, bool rle, @@ -800,7 +800,7 @@ Sprite2D* SDLVideoDriver::CreateSpriteBAM8(int w, int h, bool rle, data->source = datasrc; datasrc->IncDataRefCount(); - Sprite2D* spr = new Sprite2D(w, h, 8 /* FIXME!!!! */, data, pixeldata); + Sprite2D* spr = new Sprite2D(w, h, 8 /* FIXME!!!! */, w, data, pixeldata); spr->BAM = true; return spr; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |