From 32972a5ffb180c9e8a6a9eae51d0e7564ce76d9e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 23 Oct 2011 17:52:43 +0100 Subject: AD: Switched rest of the engines to new GUIO --- engines/parallaction/detection.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'engines/parallaction') diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp index d0610f7a29..43176a0759 100644 --- a/engines/parallaction/detection.cpp +++ b/engines/parallaction/detection.cpp @@ -53,9 +53,6 @@ static const PlainGameDescriptor parallactionGames[] = { namespace Parallaction { -using Common::GUIO_NONE; -using Common::GUIO_NOSPEECH; - static const PARALLACTIONGameDescription gameDescriptions[] = { { { @@ -75,7 +72,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::UNK_LANG, Common::kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_Nippon, GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT, @@ -99,7 +96,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::UNK_LANG, Common::kPlatformAmiga, ADGF_NO_FLAGS, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_Nippon, GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_MULT, @@ -117,7 +114,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformAmiga, ADGF_DEMO, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_Nippon, GF_LANG_EN | GF_DEMO, @@ -140,7 +137,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::IT_ITA, Common::kPlatformAmiga, ADGF_NO_FLAGS, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_Nippon, GF_LANG_IT, @@ -158,7 +155,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::UNK_LANG, Common::kPlatformPC, ADGF_NO_FLAGS, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_BRA, GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT, @@ -175,7 +172,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::UNK_LANG, Common::kPlatformPC, ADGF_DEMO, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_BRA, GF_LANG_EN | GF_DEMO, @@ -192,7 +189,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::UNK_LANG, Common::kPlatformAmiga, ADGF_NO_FLAGS, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_BRA, GF_LANG_EN | GF_LANG_FR | GF_LANG_DE | GF_LANG_IT | GF_LANG_MULT, @@ -209,7 +206,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { Common::UNK_LANG, Common::kPlatformAmiga, ADGF_DEMO, - GUIO_NOSPEECH + GUIO1(GUIO_NOSPEECH) }, GType_BRA, GF_LANG_EN | GF_DEMO, @@ -223,7 +220,7 @@ static const PARALLACTIONGameDescription gameDescriptions[] = { class ParallactionMetaEngine : public AdvancedMetaEngine { public: ParallactionMetaEngine() : AdvancedMetaEngine(Parallaction::gameDescriptions, sizeof(Parallaction::PARALLACTIONGameDescription), parallactionGames) { - _guioptions = Common::GUIO_NOLAUNCHLOAD; + _guioptions = GUIO1(GUIO_NOLAUNCHLOAD); } virtual const char *getName() const { -- cgit v1.2.3 From e1a311a236131b909d29f1e5cc6f5a369682bd07 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 3 Nov 2011 00:48:14 +0000 Subject: PARALLACTION: Fix warnings. Fix nasty out-of-scope bug in parallaction_br.cpp --- engines/parallaction/graphics.cpp | 24 +++++++++++++----------- engines/parallaction/parallaction_br.cpp | 2 +- engines/parallaction/saveload.cpp | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'engines/parallaction') diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 1da61b68ae..a006edf114 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -596,20 +596,22 @@ void Gfx::updateFloatingLabel() { Common::Rect r; _floatingLabel->getRect(0, r); + FloatingLabelTraits traits_NS = { + Common::Point(16 - r.width()/2, 34), + Common::Point(8 - r.width()/2, 21), + 0, 0, _vm->_screenWidth - r.width(), 190 + }; + + // FIXME: _maxY for BRA is not constant (390), but depends on _vm->_subtitleY + FloatingLabelTraits traits_BR = { + Common::Point(34 - r.width()/2, 70), + Common::Point(16 - r.width()/2, 37), + 0, 0, _vm->_screenWidth - r.width(), 390 + }; + if (_gameType == GType_Nippon) { - FloatingLabelTraits traits_NS = { - Common::Point(16 - r.width()/2, 34), - Common::Point(8 - r.width()/2, 21), - 0, 0, _vm->_screenWidth - r.width(), 190 - }; traits = &traits_NS; } else { - // FIXME: _maxY for BRA is not constant (390), but depends on _vm->_subtitleY - FloatingLabelTraits traits_BR = { - Common::Point(34 - r.width()/2, 70), - Common::Point(16 - r.width()/2, 37), - 0, 0, _vm->_screenWidth - r.width(), 390 - }; traits = &traits_BR; } diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 44a8899304..d850d406a2 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -289,7 +289,7 @@ void Parallaction_br::changeLocation() { _disk->selectArchive(_partNames[_part]); - memset(_counters, 0, ARRAYSIZE(_counters)); + memset(_counters, 0, sizeof(*_counters)); _globalFlagsNames = _disk->loadTable("global"); _objectsNames = _disk->loadTable("objects"); diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp index 5a1daa256b..3ab25f203f 100644 --- a/engines/parallaction/saveload.cpp +++ b/engines/parallaction/saveload.cpp @@ -49,7 +49,7 @@ Common::String SaveLoad::genSaveFileName(uint slot) { assert(slot < NUM_SAVESLOTS || slot == SPECIAL_SAVESLOT); char s[20]; - sprintf(s, "%s.%.3d", _saveFilePrefix.c_str(), slot); + sprintf(s, "%s.%.3u", _saveFilePrefix.c_str(), slot); return Common::String(s); } -- cgit v1.2.3 From 3ad89a0d18f3cc1e20042288f37af99fedfabe0c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 3 Nov 2011 02:26:45 +0100 Subject: PARALLACTION: Fix memset size parameter. --- engines/parallaction/parallaction_br.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/parallaction') diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index d850d406a2..658a8e8795 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -289,7 +289,7 @@ void Parallaction_br::changeLocation() { _disk->selectArchive(_partNames[_part]); - memset(_counters, 0, sizeof(*_counters)); + memset(_counters, 0, sizeof(_counters)); _globalFlagsNames = _disk->loadTable("global"); _objectsNames = _disk->loadTable("objects"); -- cgit v1.2.3