diff options
-rw-r--r-- | engines/cruise/background.cpp | 15 | ||||
-rw-r--r-- | engines/cruise/backgroundIncrust.cpp | 2 | ||||
-rw-r--r-- | engines/cruise/mainDraw.cpp | 8 | ||||
-rw-r--r-- | engines/cruise/script.cpp | 5 |
4 files changed, 18 insertions, 12 deletions
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp index f29cccf7b3..d52ca19783 100644 --- a/engines/cruise/background.cpp +++ b/engines/cruise/background.cpp @@ -145,10 +145,15 @@ int loadBackground(const char *name, int idx) { ptr2 += 0x20; flipGen(oldPalette, 0x20); - for(unsigned long int i=0; i<32; i++) - { + for(unsigned long int i=0; i<32; i++) { gfxModuleData_convertOldPalColor(oldPalette[i], &palScreen[idx][i*3]); } + + // duplicate the palette + for(unsigned long int i=1; i<8; i++) { + memcpy(&palScreen[idx][32*i*3], &palScreen[idx][0], 32*3); + } + break; } case 5: // color on 4 bit @@ -163,6 +168,12 @@ int loadBackground(const char *name, int idx) { outPtr[0] = ((inPtr[0])&0x0F) * 17; } ptr2 += 2*32; + + // duplicate the palette + for(unsigned long int i=1; i<8; i++) { + memcpy(&palScreen[idx][32*i*3], &palScreen[idx][0], 32*3); + } + break; } case 8: diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp index a3f92c6127..e4a716b25a 100644 --- a/engines/cruise/backgroundIncrust.cpp +++ b/engines/cruise/backgroundIncrust.cpp @@ -177,7 +177,7 @@ backgroundIncrustStruct *addBackgroundIncrust(int16 overlayIdx, int16 objectIdx, int width = (sizeTable[1]+2) - (sizeTable[0]-2) + 1; int height = sizeTable[3]-sizeTable[2]+1; - backupBackground(newElement, newElement->X, newElement->Y, width, height, backgroundPtr); + backupBackground(newElement, sizeTable[0]-2, sizeTable[2], width, height, backgroundPtr); } addBackgroundIncrustSub1(params.fileIdx, newElement->X, newElement->Y, NULL, params.scale, (char *)backgroundPtr, (char *)filesDatabase[params.fileIdx].subData.ptr); diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp index 4cdcadd223..943c7954e0 100644 --- a/engines/cruise/mainDraw.cpp +++ b/engines/cruise/mainDraw.cpp @@ -239,8 +239,8 @@ void getPolySize(int positionX, int positionY, int scale, int sizeTable[4], unsi SWAP(upperBorder, lowerBorder); } - sizeTable[0] = lowerBorder; // left - sizeTable[1] = upperBorder; // right + sizeTable[0] = lowerBorder + positionX; // left + sizeTable[1] = upperBorder + positionX; // right // Y1 @@ -259,8 +259,8 @@ void getPolySize(int positionX, int positionY, int scale, int sizeTable[4], unsi SWAP(upperBorder, lowerBorder); } - sizeTable[2] = lowerBorder; // bottom - sizeTable[3] = upperBorder; // top + sizeTable[2] = lowerBorder + positionY; // bottom + sizeTable[3] = upperBorder + positionY; // top } int nbseg; diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp index e83f1d2722..2f1ab17c6c 100644 --- a/engines/cruise/script.cpp +++ b/engines/cruise/script.cpp @@ -634,11 +634,6 @@ int executeScripts(scriptInstanceStruct *ptr) { numScript2 = ptr->scriptNumber; - if(ptr->overlayNumber == 66) - { - ptr->overlayNumber= ptr->overlayNumber; - } - if (ptr->type == 20) { ptr2 = getOvlData3Entry(ptr->overlayNumber, numScript2); |