diff options
author | Paul Gilbert | 2016-09-11 16:53:44 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-11 16:53:44 -0400 |
commit | 7d9526f8880177c5afd0533cb43d3015de949124 (patch) | |
tree | 001eb601fd3d452fa07cf788bd918d043bc55acd /engines/titanic | |
parent | 7d5a064fe141925bfac617c3c964cbf5f1b38b04 (diff) | |
download | scummvm-rg350-7d9526f8880177c5afd0533cb43d3015de949124.tar.gz scummvm-rg350-7d9526f8880177c5afd0533cb43d3015de949124.tar.bz2 scummvm-rg350-7d9526f8880177c5afd0533cb43d3015de949124.zip |
TITANIC: Simplify German version checks
Diffstat (limited to 'engines/titanic')
-rw-r--r-- | engines/titanic/game/arboretum_gate.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/game/chicken_dispensor.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/game/code_wheel.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/game/long_stick_dispenser.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/support/files_manager.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/titanic.h | 5 |
6 files changed, 14 insertions, 8 deletions
diff --git a/engines/titanic/game/arboretum_gate.cpp b/engines/titanic/game/arboretum_gate.cpp index 1f684fdcc0..cf8357f401 100644 --- a/engines/titanic/game/arboretum_gate.cpp +++ b/engines/titanic/game/arboretum_gate.cpp @@ -113,7 +113,7 @@ void CArboretumGate::save(SimpleFile *file, int indent) { file->writeNumberLine(_endFrameWinterOn2, indent); file->writeQuotedLine(_viewName2, indent); - if (g_vm->getLanguage() == Common::DE_DEU) { + if (g_vm->isGerman()) { file->writeNumberLine(_field160, indent); file->writeNumberLine(_field164, indent); file->writeNumberLine(_field168, indent); @@ -177,7 +177,7 @@ void CArboretumGate::load(SimpleFile *file) { _endFrameWinterOn2 = file->readNumber(); _viewName2 = file->readString(); - if (g_vm->getLanguage() == Common::DE_DEU) { + if (g_vm->isGerman()) { _field160 = file->readNumber(); _field164 = file->readNumber(); _field168 = file->readNumber(); diff --git a/engines/titanic/game/chicken_dispensor.cpp b/engines/titanic/game/chicken_dispensor.cpp index 17d1e6a515..e1e07844e1 100644 --- a/engines/titanic/game/chicken_dispensor.cpp +++ b/engines/titanic/game/chicken_dispensor.cpp @@ -72,7 +72,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) { for (obj = getMailManFirstObject(); obj; obj = getNextMail(obj)) { if (obj->isEquals("Chicken")) { - petDisplayMessage(1, ONE_ALLOCATED_CHICKEN_PER_CUSTOMER); + petDisplayMessage(1, ONE_CHICKEN_PER_CUSTOMER); return true; } } @@ -82,7 +82,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) { switch (v1) { case 0: - petDisplayMessage(1, ONE_CHICKEN_PER_CUSTOMER); + petDisplayMessage(1, ONE_ALLOCATED_CHICKEN_PER_CUSTOMER); break; case 1: setVisible(true); diff --git a/engines/titanic/game/code_wheel.cpp b/engines/titanic/game/code_wheel.cpp index cd492ec856..71d59ff514 100644 --- a/engines/titanic/game/code_wheel.cpp +++ b/engines/titanic/game/code_wheel.cpp @@ -41,7 +41,7 @@ void CodeWheel::save(SimpleFile *file, int indent) { file->writeNumberLine(_field108, indent); file->writeNumberLine(_state, indent); file->writeNumberLine(_field110, indent); - if (g_vm->getLanguage() == Common::DE_DEU) { + if (g_vm->isGerman()) { file->writeNumberLine(_field114, indent); file->writeNumberLine(_field118, indent); } @@ -54,7 +54,7 @@ void CodeWheel::load(SimpleFile *file) { _field108 = file->readNumber(); _state = file->readNumber(); _field110 = file->readNumber(); - if (g_vm->getLanguage() == Common::DE_DEU) { + if (g_vm->isGerman()) { _field114 = file->readNumber(); _field118 = file->readNumber(); } diff --git a/engines/titanic/game/long_stick_dispenser.cpp b/engines/titanic/game/long_stick_dispenser.cpp index 04014e8adf..e0c698c103 100644 --- a/engines/titanic/game/long_stick_dispenser.cpp +++ b/engines/titanic/game/long_stick_dispenser.cpp @@ -22,6 +22,7 @@ #include "titanic/game/long_stick_dispenser.h" #include "titanic/core/project_item.h" +#include "titanic/titanic.h" namespace Titanic { @@ -61,7 +62,7 @@ bool CLongStickDispenser::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) { _fieldC0 = 1; loadFrame(19); } else if (_fieldC0) { - playSound("z#63.wav"); + playSound(g_vm->isGerman() ? "z#594.wav" : "z#63.wav"); petDisplayMessage(1, GLASS_IS_UNBREAKABLE); } diff --git a/engines/titanic/support/files_manager.cpp b/engines/titanic/support/files_manager.cpp index 836d35b717..22bff275d2 100644 --- a/engines/titanic/support/files_manager.cpp +++ b/engines/titanic/support/files_manager.cpp @@ -126,7 +126,7 @@ Common::SeekableReadStream *CFilesManager::getResource(const CString &str) { // If we're running the German version, check for the existance of // a German specific version of the given resource - if (_vm->getLanguage() == Common::DE_DEU && _resources.contains(str + "/DE")) + if (_vm->isGerman() && _resources.contains(str + "/DE")) resEntry = _resources[str + "/DE"]; _datFile.seek(resEntry._offset); diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h index ec015551b8..b0776c55a5 100644 --- a/engines/titanic/titanic.h +++ b/engines/titanic/titanic.h @@ -152,6 +152,11 @@ public: Common::Language getLanguage() const; /** + * Returns true if it's the German version + */ + bool isGerman() const { return getLanguage() == Common::DE_DEU; } + + /** * Gets a random number */ uint getRandomNumber(uint max) { return _randomSource.getRandomNumber(max); } |