[Scummvm-cvs-logs] scummvm master -> 7b80c033c16a2f013a233cde1157403a9e6125b6
bluegr
bluegr at gmail.com
Wed Jan 2 16:02:53 CET 2013
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ef6003c29f TOLTECS: Add an option to use the ScummVM save/load screens
9964f97e67 TRANSLATION: Add the new translatable files in the toltecs engine
7b80c033c1 TOLTECS: Fix the colors of the arrows in the sound volume screen
Commit: ef6003c29fde58f7fd96eab989ed54b5c5e0a2d0
https://github.com/scummvm/scummvm/commit/ef6003c29fde58f7fd96eab989ed54b5c5e0a2d0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-02T06:48:52-08:00
Commit Message:
TOLTECS: Add an option to use the ScummVM save/load screens
Changed paths:
engines/toltecs/detection.cpp
engines/toltecs/menu.cpp
engines/toltecs/toltecs.cpp
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp
index c1a5763..34f5ebd 100644
--- a/engines/toltecs/detection.cpp
+++ b/engines/toltecs/detection.cpp
@@ -24,6 +24,8 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
+
+#include "common/translation.h"
#include "common/savefile.h"
#include "common/str-array.h"
#include "common/system.h"
@@ -154,6 +156,13 @@ static const ToltecsGameDescription gameDescriptions[] = {
} // End of namespace Toltecs
+static const ExtraGuiOption toltecsExtraGuiOption = {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens, instead of the ScummVM ones"),
+ "originalsaveload",
+ false
+};
+
class ToltecsMetaEngine : public AdvancedMetaEngine {
public:
ToltecsMetaEngine() : AdvancedMetaEngine(Toltecs::gameDescriptions, sizeof(Toltecs::ToltecsGameDescription), toltecsGames) {
@@ -170,6 +179,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
SaveStateList listSaves(const char *target) const;
virtual int getMaximumSaveSlot() const;
void removeSaveState(const char *target, int slot) const;
@@ -202,6 +212,12 @@ bool ToltecsMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADG
return gd != 0;
}
+const ExtraGuiOptions ToltecsMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ ExtraGuiOptions options;
+ options.push_back(toltecsExtraGuiOption);
+ return options;
+}
+
SaveStateList ToltecsMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Toltecs::ToltecsEngine::SaveHeader header;
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index f87a739..8996ae6 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -22,9 +22,12 @@
*/
#include "audio/mixer.h"
-#include "common/savefile.h"
+#include "common/savefile.h"
#include "common/config-manager.h"
+#include "common/translation.h"
+
+#include "gui/saveload.h"
#include "toltecs/toltecs.h"
#include "toltecs/menu.h"
@@ -118,7 +121,7 @@ void MenuSystem::handleEvents() {
case Common::EVENT_MOUSEMOVE:
handleMouseMove(event.mouse.x, event.mouse.y);
break;
- case Common::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONUP:
handleMouseClick(event.mouse.x, event.mouse.y);
break;
default:
@@ -237,29 +240,55 @@ void MenuSystem::initMenu(MenuID menuID) {
addClickTextItem(kItemIdQuit, 0, 275, 320, 0, _vm->getSysString(kStrQuit), 253, 255);
break;
case kMenuIdLoad:
- drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrLoadGame));
- addClickTextItem(kItemIdSavegameUp, 0, 155, 545, 1, "^", 253, 255);
- addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 253, 255);
- addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 253, 255);
- for (int i = 1; i <= 7; i++) {
- Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
- addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ if (ConfMan.getBool("originalsaveload")) {
+ drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrLoadGame));
+ addClickTextItem(kItemIdSavegameUp, 0, 155, 545, 1, "^", 253, 255);
+ addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 253, 255);
+ addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 253, 255);
+ for (int i = 1; i <= 7; i++) {
+ Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
+ addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ }
+ loadSavegamesList();
+ setSavegameCaptions();
+ } else {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
+ int slot = dialog->runModalWithCurrentTarget();
+ delete dialog;
+
+ if (slot >= 0)
+ _vm->requestLoadgame(slot);
+
+ _running = false;
}
- loadSavegamesList();
- setSavegameCaptions();
break;
case kMenuIdSave:
- drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrSaveGame));
- addClickTextItem(kItemIdSavegameUp, 0, 155, 545, 1, "^", 253, 255);
- addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 253, 255);
- addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 253, 255);
- for (int i = 1; i <= 7; i++) {
- Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
- addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ if (ConfMan.getBool("originalsaveload")) {
+ drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrSaveGame));
+ addClickTextItem(kItemIdSavegameUp, 0, 155, 545, 1, "^", 253, 255);
+ addClickTextItem(kItemIdSavegameDown, 0, 195, 545, 1, "\\", 253, 255);
+ addClickTextItem(kItemIdCancel, 0, 275, 320, 0, _vm->getSysString(kStrCancel), 253, 255);
+ for (int i = 1; i <= 7; i++) {
+ Common::String saveDesc = Common::String::format("SAVEGAME %d", i);
+ addClickTextItem((ItemID)(kItemIdSavegame1 + i - 1), 0, 115 + 20 * (i - 1), 300, 0, saveDesc.c_str(), 231, 234);
+ }
+ newSlotNum = loadSavegamesList() + 1;
+ _savegames.push_back(SavegameItem(newSlotNum, Common::String::format("GAME %03d", _savegames.size() + 1)));
+ setSavegameCaptions();
+ } else {
+ GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
+ int slot = dialog->runModalWithCurrentTarget();
+ Common::String desc = dialog->getResultString();
+ if (desc.empty()) {
+ // Create our own description for the saved game, the user didn't enter one
+ desc = dialog->createDefaultSaveDescription(slot);
+ }
+
+ if (slot >= 0)
+ _vm->requestSavegame(slot, desc);
+
+ _running = false;
}
- newSlotNum = loadSavegamesList() + 1;
- _savegames.push_back(SavegameItem(newSlotNum, Common::String::format("GAME %03d", _savegames.size() + 1)));
- setSavegameCaptions();
break;
case kMenuIdVolumes:
drawString(0, 74, 320, 1, 229, _vm->getSysString(kStrAdjustVolume));
@@ -431,7 +460,6 @@ void MenuSystem::drawString(int16 x, int16 y, int w, uint fontNum, byte color, c
}
int MenuSystem::loadSavegamesList() {
-
int maxSlotNum = -1;
_savegameListTopIndex = 0;
diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 9f3a10a..b3ab097 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -62,6 +62,9 @@ struct GameSettings {
};
ToltecsEngine::ToltecsEngine(OSystem *syst, const ToltecsGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+ // Assign default values to the config manager, in case settings are missing
+ ConfMan.registerDefault("originalsaveload", "false");
+
_rnd = new Common::RandomSource("toltecs");
}
Commit: 9964f97e6721e5fb4a87e62605a89b38b0225272
https://github.com/scummvm/scummvm/commit/9964f97e6721e5fb4a87e62605a89b38b0225272
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-02T06:50:12-08:00
Commit Message:
TRANSLATION: Add the new translatable files in the toltecs engine
Changed paths:
po/POTFILES
diff --git a/po/POTFILES b/po/POTFILES
index f79391d..ba47dbf 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -56,6 +56,8 @@ engines/sword2/animation.cpp
engines/sword2/sword2.cpp
engines/teenagent/resources.cpp
engines/tinsel/saveload.cpp
+engines/toltecs/detection.cpp
+engines/toltecs/menu.cpp
engines/parallaction/saveload.cpp
audio/fmopl.cpp
Commit: 7b80c033c16a2f013a233cde1157403a9e6125b6
https://github.com/scummvm/scummvm/commit/7b80c033c16a2f013a233cde1157403a9e6125b6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-02T07:01:52-08:00
Commit Message:
TOLTECS: Fix the colors of the arrows in the sound volume screen
Changed paths:
engines/toltecs/menu.cpp
diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp
index 8996ae6..201c256 100644
--- a/engines/toltecs/menu.cpp
+++ b/engines/toltecs/menu.cpp
@@ -299,16 +299,16 @@ void MenuSystem::initMenu(MenuID menuID) {
drawString(0, 230, 200, 0, 244, _vm->getSysString(kStrBackground));
addClickTextItem(kItemIdDone, 0, 275, 200, 0, _vm->getSysString(kStrDone), 253, 255);
addClickTextItem(kItemIdCancel, 0, 275, 440, 0, _vm->getSysString(kStrCancel), 253, 255);
- addClickTextItem(kItemIdMasterDown, 0, 130 + 25 * 0, 348, 1, "[", 244, 246);
- addClickTextItem(kItemIdVoicesDown, 0, 130 + 25 * 1, 348, 1, "[", 244, 246);
- addClickTextItem(kItemIdMusicDown, 0, 130 + 25 * 2, 348, 1, "[", 244, 246);
- addClickTextItem(kItemIdSoundFXDown, 0, 130 + 25 * 3, 348, 1, "[", 244, 246);
- addClickTextItem(kItemIdBackgroundDown, 0, 130 + 25 * 4, 348, 1, "[", 244, 246);
- addClickTextItem(kItemIdMasterUp, 0, 130 + 25 * 0, 372, 1, "]", 244, 246);
- addClickTextItem(kItemIdVoicesUp, 0, 130 + 25 * 1, 372, 1, "]", 244, 246);
- addClickTextItem(kItemIdMusicUp, 0, 130 + 25 * 2, 372, 1, "]", 244, 246);
- addClickTextItem(kItemIdSoundFXUp, 0, 130 + 25 * 3, 372, 1, "]", 244, 246);
- addClickTextItem(kItemIdBackgroundUp, 0, 130 + 25 * 4, 372, 1, "]", 244, 246);
+ addClickTextItem(kItemIdMasterDown, 0, 130 + 25 * 0, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdVoicesDown, 0, 130 + 25 * 1, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdMusicDown, 0, 130 + 25 * 2, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdSoundFXDown, 0, 130 + 25 * 3, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdBackgroundDown, 0, 130 + 25 * 4, 348, 1, "[", 243, 246);
+ addClickTextItem(kItemIdMasterUp, 0, 130 + 25 * 0, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdVoicesUp, 0, 130 + 25 * 1, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdMusicUp, 0, 130 + 25 * 2, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdSoundFXUp, 0, 130 + 25 * 3, 372, 1, "]", 243, 246);
+ addClickTextItem(kItemIdBackgroundUp, 0, 130 + 25 * 4, 372, 1, "]", 243, 246);
drawVolumeBar(kItemIdMaster);
drawVolumeBar(kItemIdVoices);
drawVolumeBar(kItemIdMusic);
More information about the Scummvm-git-logs
mailing list