aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-13 22:56:37 -0400
committerPaul Gilbert2018-04-13 22:56:57 -0400
commitfbed39276714cc1eeeb03c04c834365beb5ada38 (patch)
treea68869766a43a16ab3a0b1ce9ea9830748c8ec22 /engines
parent8b717abe3801eb85faf3983b032565dad1d2e46f (diff)
downloadscummvm-rg350-fbed39276714cc1eeeb03c04c834365beb5ada38.tar.gz
scummvm-rg350-fbed39276714cc1eeeb03c04c834365beb5ada38.tar.bz2
scummvm-rg350-fbed39276714cc1eeeb03c04c834365beb5ada38.zip
XEEN: Add launcher Engine tab option for more durable armor
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/character.cpp2
-rw-r--r--engines/xeen/detection.cpp11
-rw-r--r--engines/xeen/detection_tables.h12
-rw-r--r--engines/xeen/xeen.cpp1
-rw-r--r--engines/xeen/xeen.h3
5 files changed, 21 insertions, 8 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 1f53b2bbfe..cbade04248 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -1222,7 +1222,7 @@ void Character::subtractHitPoints(int amount) {
// Subtract the given HP amount
_currentHp -= amount;
- bool breakFlag = _currentHp <= -10;
+ bool breakFlag = _currentHp <= (g_vm->_extOptions._durableArmor ? -80 : -10);
assert(_currentHp < 65000);
if (_currentHp < 1) {
diff --git a/engines/xeen/detection.cpp b/engines/xeen/detection.cpp
index abf82188a9..91eab285b3 100644
--- a/engines/xeen/detection.cpp
+++ b/engines/xeen/detection.cpp
@@ -73,6 +73,7 @@ static const PlainGameDescriptor XeenGames[] = {
};
#define GAMEOPTION_SHOW_ITEM_COSTS GUIO_GAMEOPTIONS1
+#define GAMEOPTION_DURABLE_ARMOR GUIO_GAMEOPTIONS2
#include "xeen/detection_tables.h"
@@ -88,6 +89,16 @@ static const ADExtraGuiOptionsMap optionsList[] = {
}
},
+ {
+ GAMEOPTION_DURABLE_ARMOR,
+ {
+ _s("More durable armor"),
+ _s("Armor won't break until character is at -80HP, rather than merely -10HP"),
+ "DurableArmor",
+ false
+ }
+ },
+
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
diff --git a/engines/xeen/detection_tables.h b/engines/xeen/detection_tables.h
index 282fc62cc7..36c116fc2c 100644
--- a/engines/xeen/detection_tables.h
+++ b/engines/xeen/detection_tables.h
@@ -36,7 +36,7 @@ static const XeenGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_SHOW_ITEM_COSTS)
+ GUIO2(GAMEOPTION_SHOW_ITEM_COSTS, GAMEOPTION_DURABLE_ARMOR)
},
GType_WorldOfXeen,
0
@@ -55,7 +55,7 @@ static const XeenGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_SHOW_ITEM_COSTS)
+ GUIO2(GAMEOPTION_SHOW_ITEM_COSTS, GAMEOPTION_DURABLE_ARMOR)
},
GType_WorldOfXeen,
0
@@ -74,7 +74,7 @@ static const XeenGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_SHOW_ITEM_COSTS)
+ GUIO2(GAMEOPTION_SHOW_ITEM_COSTS, GAMEOPTION_DURABLE_ARMOR)
},
GType_WorldOfXeen,
0
@@ -92,7 +92,7 @@ static const XeenGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_SHOW_ITEM_COSTS)
+ GUIO2(GAMEOPTION_SHOW_ITEM_COSTS, GAMEOPTION_DURABLE_ARMOR)
},
GType_Clouds,
0
@@ -110,7 +110,7 @@ static const XeenGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_SHOW_ITEM_COSTS)
+ GUIO2(GAMEOPTION_SHOW_ITEM_COSTS, GAMEOPTION_DURABLE_ARMOR)
},
GType_DarkSide,
0
@@ -128,7 +128,7 @@ static const XeenGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_SHOW_ITEM_COSTS)
+ GUIO2(GAMEOPTION_SHOW_ITEM_COSTS, GAMEOPTION_DURABLE_ARMOR)
},
GType_Swords,
0
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp
index d5240287ac..1e15ec7792 100644
--- a/engines/xeen/xeen.cpp
+++ b/engines/xeen/xeen.cpp
@@ -129,6 +129,7 @@ void XeenEngine::loadSettings() {
_finalScore = ConfMan.hasKey("final_score") ? ConfMan.getInt("final_score") : 0;
_extOptions._showItemCosts = ConfMan.hasKey("ShowItemCosts") && ConfMan.getBool("ShowItemCosts");
+ _extOptions._durableArmor = ConfMan.hasKey("DurableArmor") && ConfMan.getBool("DurableArmor");
// If requested, load a savegame instead of showing the intro
if (ConfMan.hasKey("save_slot")) {
diff --git a/engines/xeen/xeen.h b/engines/xeen/xeen.h
index 93be6d202f..85cc01d7e7 100644
--- a/engines/xeen/xeen.h
+++ b/engines/xeen/xeen.h
@@ -112,8 +112,9 @@ class XeenEngine : public Engine {
*/
struct ExtendedOptions {
bool _showItemCosts;
+ bool _durableArmor;
- ExtendedOptions() : _showItemCosts(false) {}
+ ExtendedOptions() : _showItemCosts(false), _durableArmor(false) {}
};
private:
const XeenGameDescription *_gameDescription;