diff options
author | Torbjörn Andersson | 2003-12-31 15:41:17 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-12-31 15:41:17 +0000 |
commit | 15559f6646cc040a928fc011d7559054ea8492d8 (patch) | |
tree | a52202db5f577515199c0d7f9f27b84be26882c2 /sword1 | |
parent | 2687402c6b754dbdce3a4b92efa1ccc8f3359969 (diff) | |
download | scummvm-rg350-15559f6646cc040a928fc011d7559054ea8492d8.tar.gz scummvm-rg350-15559f6646cc040a928fc011d7559054ea8492d8.tar.bz2 scummvm-rg350-15559f6646cc040a928fc011d7559054ea8492d8.zip |
Draw the luggage first, then the mouse pointer.
svn-id: r12057
Diffstat (limited to 'sword1')
-rw-r--r-- | sword1/mouse.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sword1/mouse.cpp b/sword1/mouse.cpp index 035ead96a9..2021fdfbc8 100644 --- a/sword1/mouse.cpp +++ b/sword1/mouse.cpp @@ -190,20 +190,8 @@ void SwordMouse::createPointer(uint32 ptrId, uint32 luggageId) { _currentPtr->sizeY = resSizeY; uint8 *ptrData = (uint8*)_currentPtr + sizeof(MousePtr); memset(ptrData, 255, resSizeX * resSizeY * noFrames); - uint8 *dstData = ptrData; - uint8 *srcData = (uint8*)ptr + sizeof(MousePtr); - for (uint32 frameCnt = 0; frameCnt < noFrames; frameCnt++) { - for (uint32 cnty = 0; cnty < FROM_LE_16(ptr->sizeY); cnty++) { - for (uint32 cntx = 0; cntx < FROM_LE_16(ptr->sizeX); cntx++) - if (srcData[cntx]) - dstData[cntx] = srcData[cntx]; - srcData += FROM_LE_16(ptr->sizeX); - dstData += resSizeX; - } - dstData += (resSizeY - FROM_LE_16(ptr->sizeY)) * resSizeX; - } if (luggageId) { - dstData = ptrData + resSizeX - FROM_LE_16(lugg->sizeX); + uint8 *dstData = ptrData + resSizeX - FROM_LE_16(lugg->sizeX); for (uint32 frameCnt = 0; frameCnt < noFrames; frameCnt++) { uint8 *luggSrc = (uint8*)lugg + sizeof(MousePtr); dstData += (resSizeY - FROM_LE_16(lugg->sizeY)) * resSizeX; @@ -217,6 +205,18 @@ void SwordMouse::createPointer(uint32 ptrId, uint32 luggageId) { } _resMan->resClose(luggageId); } + uint8 *dstData = ptrData; + uint8 *srcData = (uint8*)ptr + sizeof(MousePtr); + for (uint32 frameCnt = 0; frameCnt < noFrames; frameCnt++) { + for (uint32 cnty = 0; cnty < FROM_LE_16(ptr->sizeY); cnty++) { + for (uint32 cntx = 0; cntx < FROM_LE_16(ptr->sizeX); cntx++) + if (srcData[cntx]) + dstData[cntx] = srcData[cntx]; + srcData += FROM_LE_16(ptr->sizeX); + dstData += resSizeX; + } + dstData += (resSizeY - FROM_LE_16(ptr->sizeY)) * resSizeX; + } _resMan->resClose(ptrId); } } |