[Scummvm-cvs-logs] SF.net SVN: scummvm:[55334] scummvm/trunk/engines/mohawk
fuzzie at users.sourceforge.net
fuzzie at users.sourceforge.net
Wed Jan 19 21:53:29 CET 2011
Revision: 55334
http://scummvm.svn.sourceforge.net/scummvm/?rev=55334&view=rev
Author: fuzzie
Date: 2011-01-19 20:53:28 +0000 (Wed, 19 Jan 2011)
Log Message:
-----------
MOHAWK: Add getSubImageSize function.
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/graphics.cpp
scummvm/trunk/engines/mohawk/graphics.h
Modified: scummvm/trunk/engines/mohawk/graphics.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/graphics.cpp 2011-01-19 18:57:43 UTC (rev 55333)
+++ scummvm/trunk/engines/mohawk/graphics.cpp 2011-01-19 20:53:28 UTC (rev 55334)
@@ -174,6 +174,16 @@
copyAnimImageSectionToScreen(images[subimage], srcRect, dstRect);
}
+void GraphicsManager::getSubImageSize(uint16 image, uint16 subimage, uint16 &width, uint16 &height) {
+ if (!_subImageCache.contains(image))
+ _subImageCache[image] = decodeImages(image);
+ Common::Array<MohawkSurface *> &images = _subImageCache[image];
+
+ Graphics::Surface *surface = images[subimage]->getSurface();
+ width = surface->w;
+ height = surface->h;
+}
+
void GraphicsManager::copyAnimImageSectionToScreen(MohawkSurface *image, Common::Rect srcRect, Common::Rect dstRect) {
uint16 startX = 0;
uint16 startY = 0;
Modified: scummvm/trunk/engines/mohawk/graphics.h
===================================================================
--- scummvm/trunk/engines/mohawk/graphics.h 2011-01-19 18:57:43 UTC (rev 55333)
+++ scummvm/trunk/engines/mohawk/graphics.h 2011-01-19 20:53:28 UTC (rev 55334)
@@ -95,6 +95,8 @@
void copyAnimImageSectionToScreen(uint16 image, Common::Rect src, Common::Rect dest);
void copyAnimSubImageToScreen(uint16 image, uint16 subimage, int left = 0, int top = 0);
+ void getSubImageSize(uint16 image, uint16 subimage, uint16 &width, uint16 &height);
+
protected:
void copyAnimImageSectionToScreen(MohawkSurface *image, Common::Rect src, Common::Rect dest);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list