aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorMatthew Hoops2011-12-12 15:25:28 -0500
committerMatthew Hoops2011-12-12 15:25:28 -0500
commit00279659b22cbd5db739d5351e83a9fc2a2ae408 (patch)
tree497f06f46820043cbdf1725652b8f0073223e24a /engines/cruise
parentd932df79bed5aac97e17c0920a5e75cb5ce733ee (diff)
parentd1628feb761acc9f4607f64de3eb620fea53bcc9 (diff)
downloadscummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.tar.gz
scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.tar.bz2
scummvm-rg350-00279659b22cbd5db739d5351e83a9fc2a2ae408.zip
Merge remote branch 'upstream/master' into pegasus
Conflicts: video/qt_decoder.cpp
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise_main.cpp8
-rw-r--r--engines/cruise/detection.cpp26
-rw-r--r--engines/cruise/gfxModule.cpp2
-rw-r--r--engines/cruise/mainDraw.cpp4
-rw-r--r--engines/cruise/overlay.cpp6
-rw-r--r--engines/cruise/saveload.cpp1
-rw-r--r--engines/cruise/volume.cpp4
7 files changed, 24 insertions, 27 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index ff4669607d..a1337aefa7 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -998,7 +998,7 @@ bool findRelation(int objOvl, int objIdx, int x, int y) {
ovlDataStruct *ovl2 = NULL;
ovlDataStruct *ovl3 = NULL;
- ovlDataStruct *ovl4 = NULL;
+ //ovlDataStruct *ovl4 = NULL;
if (verbeOvl > 0)
ovl2 = overlayTable[verbeOvl].ovlData;
@@ -1006,8 +1006,8 @@ bool findRelation(int objOvl, int objIdx, int x, int y) {
if (obj1Ovl > 0)
ovl3 = overlayTable[obj1Ovl].ovlData;
- if (obj2Ovl > 0)
- ovl4 = overlayTable[obj2Ovl].ovlData;
+ //if (obj2Ovl > 0)
+ // ovl4 = overlayTable[obj2Ovl].ovlData;
if ((ovl3) && (ptrHead->obj1Number >= 0)) {
testState = ptrHead->obj1OldState;
@@ -1804,6 +1804,8 @@ void CruiseEngine::mainLoop() {
bool skipEvents = false;
do {
+ g_system->updateScreen();
+
g_system->delayMillis(10);
currentTick = g_system->getMillis();
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index a68b14d986..eb7c1c524f 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -66,8 +66,6 @@ static const PlainGameDescriptor cruiseGames[] = {
namespace Cruise {
-using Common::GUIO_NONE;
-
static const CRUISEGameDescription gameDescriptions[] = {
{
{
@@ -77,7 +75,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::EN_GRB,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -90,7 +88,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -103,7 +101,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -116,7 +114,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -129,7 +127,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -142,7 +140,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -155,7 +153,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformAmiga,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -168,7 +166,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformAmiga,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -181,7 +179,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformAtariST,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -194,7 +192,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::IT_ITA,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -207,7 +205,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- GUIO_NONE
+ GUIO0()
},
GType_CRUISE,
0,
@@ -221,7 +219,7 @@ class CruiseMetaEngine : public AdvancedMetaEngine {
public:
CruiseMetaEngine() : AdvancedMetaEngine(Cruise::gameDescriptions, sizeof(Cruise::CRUISEGameDescription), cruiseGames) {
_singleid = "cruise";
- _guioptions = Common::GUIO_NOSPEECH | Common::GUIO_NOMIDI;
+ _guioptions = GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI);
}
virtual const char *getName() const {
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index 7bbcae2259..aa2dbc5370 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -326,7 +326,7 @@ void flip() {
void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 color) {
for (int y = y1; y < y2; ++y) {
byte *p = &gfxModuleData.pPage00[y * 320 + x1];
- Common::set_to(p, p + (x2 - x1), color);
+ Common::fill(p, p + (x2 - x1), color);
}
}
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 14b6daf4bb..9a5df69cae 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -621,11 +621,9 @@ void buildSegment() {
unsigned char *drawPolyMode1(unsigned char *dataPointer, int linesToDraw) {
int index;
- int16 *pBufferDest;
+ int16 *pBufferDest = polyBuffer4 + nbseg * 2;
- pBufferDest = polyBuffer4 + nbseg * 2;
nbseg = linesToDraw;
- A2ptr = polyBuffer4;
index = *(dataPointer++);
polyXMin = polyXMax = pBufferDest[-2] = pBufferDest[-2 + linesToDraw * 2] = polyBuffer2[index * 2];
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index 2f4b375865..d618ab5599 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -185,11 +185,10 @@ int loadOverlay(const char *scriptName) {
// This memory block will be later passed to a MemoryReadStream, which will dispose of it
unpackedBuffer = (byte *)malloc(unpackedSize);
- memset(unpackedBuffer, 0, unpackedSize);
-
if (!unpackedBuffer) {
return (-2);
}
+ memset(unpackedBuffer, 0, unpackedSize);
if (volumePtrToFileDescriptor[fileIdx].size + 2 != unpackedSize) {
char *pakedBuffer =
@@ -566,11 +565,10 @@ int loadOverlay(const char *scriptName) {
// This memory block will be later passed to a MemoryReadStream, which will dispose of it
unpackedBuffer = (byte *)malloc(unpackedSize);
- memset(unpackedBuffer, 0, unpackedSize);
-
if (!unpackedBuffer) {
return (-2);
}
+ memset(unpackedBuffer, 0, unpackedSize);
if (volumePtrToFileDescriptor[fileIdx].size + 2 !=
unpackedSize) {
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index c3d1ea6643..e2bd1ebc34 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -84,6 +84,7 @@ void writeSavegameHeader(Common::OutSaveFile *out, CruiseSavegameHeader &header)
Graphics::Surface *thumb = new Graphics::Surface();
::createThumbnail(thumb, globalScreen, 320, 200, workpal);
Graphics::saveThumbnail(*out, *thumb);
+ thumb->free();
delete thumb;
}
diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp
index 773a146b9a..4b64d4ff77 100644
--- a/engines/cruise/volume.cpp
+++ b/engines/cruise/volume.cpp
@@ -326,7 +326,7 @@ int closeCnf() {
int16 readVolCnf() {
int i;
Common::File fileHandle;
- short int sizeHEntry;
+ //short int sizeHEntry;
volumeDataLoaded = 0;
@@ -344,7 +344,7 @@ int16 readVolCnf() {
}
numOfDisks = fileHandle.readSint16BE();
- sizeHEntry = fileHandle.readSint16BE(); // size of one header entry - 20 bytes
+ /*sizeHEntry =*/ fileHandle.readSint16BE(); // size of one header entry - 20 bytes
for (i = 0; i < numOfDisks; i++) {
// fread(&volumeData[i],20,1,fileHandle);