diff options
Diffstat (limited to 'engines/tinsel/multiobj.cpp')
| -rw-r--r-- | engines/tinsel/multiobj.cpp | 46 | 
1 files changed, 39 insertions, 7 deletions
| diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp index c60592069f..34f7d3ec00 100644 --- a/engines/tinsel/multiobj.cpp +++ b/engines/tinsel/multiobj.cpp @@ -27,6 +27,7 @@  #include "tinsel/multiobj.h"  #include "tinsel/handle.h"  #include "tinsel/object.h" +#include "tinsel/tinsel.h"  namespace Tinsel { @@ -204,14 +205,17 @@ void MultiAdjustXY(OBJECT *pMultiObj, int deltaX, int deltaY) {  	if (deltaX == 0 && deltaY == 0)  		return;		// ignore no change -	if (pMultiObj->flags & DMA_FLIPH) { -		// image is flipped horizontally - flip the x direction -		deltaX = -deltaX; -	} +	if (!TinselV2) { +		// *** This may be wrong!!! +		if (pMultiObj->flags & DMA_FLIPH) { +			// image is flipped horizontally - flip the x direction +			deltaX = -deltaX; +		} -	if (pMultiObj->flags & DMA_FLIPV) { -		// image is flipped vertically - flip the y direction -		deltaY = -deltaY; +		if (pMultiObj->flags & DMA_FLIPV) { +			// image is flipped vertically - flip the y direction +			deltaY = -deltaY; +		}  	}  	// for all the objects that make up this multi-part @@ -530,4 +534,32 @@ int MultiLowest(OBJECT *pMulti) {  	return lowest - 1;  } +/** + * Returns TRUE if the object currently has an image. + * @param pMulti		Multi-part object + */ + +bool MultiHasShape(POBJECT pMulti) { +	return (pMulti->hShape != 0); +} + +/** + * Bodge for text on movies. Makes sure it appears for it's lifetime. + * @param pMultiObj			Multi-part object to be adjusted + */ + +void MultiForceRedraw(POBJECT pMultiObj) { +	// validate object pointer +	assert(pMultiObj >= objectList && pMultiObj <= objectList + NUM_OBJECTS - 1); + +	// for all the objects that make up this multi-part +	do { +		// signal a change in the object +		pMultiObj->flags |= DMA_CHANGED; + +		// next obj in list +		pMultiObj = pMultiObj->pSlave; +	} while (pMultiObj != NULL); +} +  } // end of namespace Tinsel | 
