aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorStrangerke2012-10-10 08:26:41 +0200
committerStrangerke2012-10-10 08:26:41 +0200
commitb164cbb571fc4e0f2a6f002760a851d8ac592540 (patch)
tree4d25f2e1f8241f6f3352fd9fb1135f5faa36dfd4 /engines/cruise
parentb2f2f8d7b08b40e43702e8db325f8136066f10be (diff)
parent1e200620d673af4acdd2d128ed6e390df001aacf (diff)
downloadscummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.tar.gz
scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.tar.bz2
scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.zip
Merge branch 'master' of github.com:scummvm/scummvm into mortevielle
Conflicts: base/plugins.cpp configure
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/cruise.cpp3
-rw-r--r--engines/cruise/cruise_main.cpp107
-rw-r--r--engines/cruise/detection.cpp17
-rw-r--r--engines/cruise/menu.cpp9
-rw-r--r--engines/cruise/staticres.cpp4
-rw-r--r--engines/cruise/staticres.h1
6 files changed, 80 insertions, 61 deletions
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index cf01d9bdbc..2147419886 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -169,6 +169,9 @@ bool CruiseEngine::loadLanguageStrings() {
case Common::DE_DEU:
p = germanLanguageStrings;
break;
+ case Common::IT_ITA:
+ p = italianLanguageStrings;
+ break;
default:
return false;
}
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 6e2847d6d7..911041c1a4 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -1799,32 +1799,60 @@ void CruiseEngine::mainLoop() {
// Handle frame delay
uint32 currentTick = g_system->getMillis();
- if (!bFastMode) {
- // Delay for the specified amount of time, but still respond to events
- bool skipEvents = false;
+ // Delay for the specified amount of time, but still respond to events
+ bool skipEvents = false;
- do {
- g_system->updateScreen();
+ do {
+ if (userEnabled && !userWait && !autoTrack) {
+ if (currentActiveMenu == -1) {
+ static int16 oldMouseX = -1;
+ static int16 oldMouseY = -1;
- g_system->delayMillis(10);
- currentTick = g_system->getMillis();
+ getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
- if (!skipEvents)
- skipEvents = manageEvents();
+ if (mouseX != oldMouseX || mouseY != oldMouseY) {
+ int objectType;
+ int newCursor1;
+ int newCursor2;
- if (playerDontAskQuit)
- break;
+ oldMouseX = mouseX;
+ oldMouseY = mouseY;
- _vm->getDebugger()->onFrame();
- } while (currentTick < lastTick + _gameSpeed);
- } else {
- manageEvents();
+ objectType = findObject(mouseX, mouseY, &newCursor1, &newCursor2);
- if (currentTick >= (lastTickDebug + 10)) {
- lastTickDebug = currentTick;
- _vm->getDebugger()->onFrame();
+ if (objectType == 9) {
+ changeCursor(CURSOR_EXIT);
+ } else if (objectType != -1) {
+ changeCursor(CURSOR_MAGNIFYING_GLASS);
+ } else {
+ changeCursor(CURSOR_WALK);
+ }
+ }
+ } else {
+ changeCursor(CURSOR_NORMAL);
+ }
+ } else {
+ changeCursor(CURSOR_NORMAL);
}
- }
+
+ g_system->updateScreen();
+
+ if (!skipEvents || bFastMode)
+ skipEvents = manageEvents();
+
+ if (bFastMode) {
+ if (currentTick >= (lastTickDebug + 10))
+ lastTickDebug = currentTick;
+ } else {
+ g_system->delayMillis(10);
+ currentTick = g_system->getMillis();
+ }
+
+ if (playerDontAskQuit)
+ break;
+
+ _vm->getDebugger()->onFrame();
+ } while (currentTick < lastTick + _gameSpeed && !bFastMode);
if (playerDontAskQuit)
break;
@@ -1844,6 +1872,14 @@ void CruiseEngine::mainLoop() {
// readKeyboard();
bool isUserWait = userWait != 0;
+ // WORKAROUND: This prevents hotspots responding during
+ // delays i.e. Menu opening if you click fast on another
+ // hotspot after trying to open a locked door, which
+ // occurred with the original interpreter.
+ if (userDelay) {
+ currentMouseButton = 0;
+ }
+
playerDontAskQuit = processInput();
if (playerDontAskQuit)
break;
@@ -1855,7 +1891,6 @@ void CruiseEngine::mainLoop() {
if (userDelay && !userWait) {
userDelay--;
- continue;
}
if (isUserWait & !userWait) {
@@ -1918,38 +1953,6 @@ void CruiseEngine::mainLoop() {
mainDraw(userWait);
flipScreen();
- if (userEnabled && !userWait && !autoTrack) {
- if (currentActiveMenu == -1) {
- static int16 oldMouseX = -1;
- static int16 oldMouseY = -1;
-
- getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
-
- if (mouseX != oldMouseX || mouseY != oldMouseY) {
- int objectType;
- int newCursor1;
- int newCursor2;
-
- oldMouseX = mouseX;
- oldMouseY = mouseY;
-
- objectType = findObject(mouseX, mouseY, &newCursor1, &newCursor2);
-
- if (objectType == 9) {
- changeCursor(CURSOR_EXIT);
- } else if (objectType != -1) {
- changeCursor(CURSOR_MAGNIFYING_GLASS);
- } else {
- changeCursor(CURSOR_WALK);
- }
- }
- } else {
- changeCursor(CURSOR_NORMAL);
- }
- } else {
- changeCursor(CURSOR_NORMAL);
- }
-
if (userWait == 1) {
// Waiting for press - original wait loop has been integrated into the
// main event loop
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index eb7c1c524f..ba79df4822 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -171,6 +171,19 @@ static const CRUISEGameDescription gameDescriptions[] = {
GType_CRUISE,
0,
},
+ { // Amiga Italian US GOLD edition.
+ {
+ "cruise",
+ 0,
+ AD_ENTRY1("D1", "a0011075413b7335e003e8e3c9cf51b9"),
+ Common::IT_ITA,
+ Common::kPlatformAmiga,
+ ADGF_NO_FLAGS,
+ GUIO0()
+ },
+ GType_CRUISE,
+ 0,
+ },
{ // AtariST English KixxXL edition.
{
"cruise",
@@ -282,7 +295,7 @@ void CruiseMetaEngine::removeSaveState(const char *target, int slot) const {
SaveStateDescriptor CruiseMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(
Cruise::CruiseEngine::getSavegameFile(slot));
-
+
if (f) {
Cruise::CruiseSavegameHeader header;
Cruise::readSavegameHeader(f, header);
@@ -290,8 +303,6 @@ SaveStateDescriptor CruiseMetaEngine::querySaveMetaInfos(const char *target, int
// Create the return descriptor
SaveStateDescriptor desc(slot, header.saveName);
- desc.setDeletableFlag(true);
- desc.setWriteProtectedFlag(false);
desc.setThumbnail(header.thumbnail);
return desc;
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index e763e2b8a1..512259f7d7 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -207,16 +207,13 @@ int processMenu(menuStruct *pMenu) {
}
static void handleSaveLoad(bool saveFlag) {
- const EnginePlugin *plugin = 0;
- EngineMan.findGame(_vm->getGameId(), &plugin);
GUI::SaveLoadChooser *dialog;
if (saveFlag)
- dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"));
+ dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
else
- dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"));
+ dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
- dialog->setSaveMode(saveFlag);
- int slot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
+ int slot = dialog->runModalWithCurrentTarget();
if (slot >= 0) {
if (!saveFlag)
diff --git a/engines/cruise/staticres.cpp b/engines/cruise/staticres.cpp
index 1565f254d0..a3fc4f884b 100644
--- a/engines/cruise/staticres.cpp
+++ b/engines/cruise/staticres.cpp
@@ -320,5 +320,9 @@ const char *germanLanguageStrings[13] = {
" ", NULL, NULL, NULL, NULL, "Inventar", "Sprechen ""\xFC""ber", "Speilermen\xFC", "Speicherlaufwerk",
"Speichern", "Laden", "Neu beginnen", "Ende"
};
+const char *italianLanguageStrings[13] = {
+ "Pausa", NULL, NULL, NULL, NULL, "Inventario", "Parla di...", "Menu giocatore", NULL,
+ "Salva", "Carica", "Ricomincia", "Esci"
+};
} // End of namespace Cruise
diff --git a/engines/cruise/staticres.h b/engines/cruise/staticres.h
index a3cf13e41c..acf0b640be 100644
--- a/engines/cruise/staticres.h
+++ b/engines/cruise/staticres.h
@@ -57,6 +57,7 @@ extern const byte mouseCursorMagnifyingGlass[];
extern const char *englishLanguageStrings[13];
extern const char *frenchLanguageStrings[13];
extern const char *germanLanguageStrings[13];
+extern const char *italianLanguageStrings[13];
} // End of namespace Cruise