diff options
author | Paul Gilbert | 2016-09-24 22:32:15 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-24 22:32:15 -0400 |
commit | f77367c42bc699fd51dbde775f09073ca6658a7d (patch) | |
tree | 1d2ffe3df27b9c2334502bea45579f48dbfff944 | |
parent | aa05f9c8025b4db260dc25d6ceb871dc37cd0146 (diff) | |
download | scummvm-rg350-f77367c42bc699fd51dbde775f09073ca6658a7d.tar.gz scummvm-rg350-f77367c42bc699fd51dbde775f09073ca6658a7d.tar.bz2 scummvm-rg350-f77367c42bc699fd51dbde775f09073ca6658a7d.zip |
XEEN: Fix display of cursor
-rw-r--r-- | engines/xeen/events.cpp | 2 | ||||
-rw-r--r-- | engines/xeen/sprites.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/sprites.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/engines/xeen/events.cpp b/engines/xeen/events.cpp index f89164903c..55ff24491d 100644 --- a/engines/xeen/events.cpp +++ b/engines/xeen/events.cpp @@ -43,7 +43,7 @@ EventsManager::~EventsManager() { void EventsManager::setCursor(int cursorId) { XSurface cursor; - _sprites.draw(cursor, cursorId); + _sprites.draw(cursor, cursorId, Common::Point(0, 0), SPRFLAG_RESIZE); CursorMan.replaceCursor(cursor.getPixels(), cursor.w, cursor.h, 0, 0, 0); showCursor(); diff --git a/engines/xeen/sprites.cpp b/engines/xeen/sprites.cpp index d0e9f07aee..7327317156 100644 --- a/engines/xeen/sprites.cpp +++ b/engines/xeen/sprites.cpp @@ -101,7 +101,7 @@ void SpriteResource::clear() { } void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt, - const Common::Rect &bounds, int flags, int scale) { + const Common::Rect &clipRect, int flags, int scale) { static const uint SCALE_TABLE[] = { 0xFFFF, 0xFFEF, 0xEFEF, 0xEFEE, 0xEEEE, 0xEEAE, 0xAEAE, 0xAEAA, 0xAAAA, 0xAA8A, 0x8A8A, 0x8A88, 0x8888, 0x8880, 0x8080, 0x8000 @@ -130,9 +130,11 @@ void SpriteResource::drawOffset(XSurface &dest, uint16 offset, const Common::Poi destPos.y = pt.y + getScaledVal(yOffset, scaleMaskY); // If the flags allow the dest surface to be resized, ensure dest surface is big enough + Common::Rect bounds = clipRect; if (flags & SPRFLAG_RESIZE) { if (dest.w < (xOffset + width) || dest.h < (yOffset + height)) dest.create(xOffset + width, yOffset + height); + bounds = Common::Rect(0, 0, dest.w, dest.h); } uint16 scaleMaskXCopy = scaleMaskX; diff --git a/engines/xeen/sprites.h b/engines/xeen/sprites.h index 025c8db219..17c745f26e 100644 --- a/engines/xeen/sprites.h +++ b/engines/xeen/sprites.h @@ -67,7 +67,7 @@ private: * Draw a sprite frame based on a passed offset into the data stream */ void drawOffset(XSurface &dest, uint16 offset, const Common::Point &pt, - const Common::Rect &bounds, int flags, int scale); + const Common::Rect &clipRect, int flags, int scale); /** * Scale a co-ordinate value based on the passed scaling mask |