[Scummvm-git-logs] scummvm master -> f77367c42bc699fd51dbde775f09073ca6658a7d

dreammaster dreammaster at scummvm.org
Sun Sep 25 04:32:25 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f77367c42b XEEN: Fix display of cursor


Commit: f77367c42bc699fd51dbde775f09073ca6658a7d
    https://github.com/scummvm/scummvm/commit/f77367c42bc699fd51dbde775f09073ca6658a7d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-09-24T22:32:15-04:00

Commit Message:
XEEN: Fix display of cursor

Changed paths:
    engines/xeen/events.cpp
    engines/xeen/sprites.cpp
    engines/xeen/sprites.h



diff --git a/engines/xeen/events.cpp b/engines/xeen/events.cpp
index f891649..55ff244 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 d0e9f07..7327317 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 025c8db..17c745f 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





More information about the Scummvm-git-logs mailing list