XEEN: Add launcher Engine tab option for more durable armor

This commit is contained in:
Paul Gilbert 2018-04-13 22:56:37 -04:00
parent 8b717abe38
commit fbed392767
5 changed files with 21 additions and 8 deletions

View File

@ -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) {

View File

@ -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
};

View File

@ -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

View File

@ -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")) {

View File

@ -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;