Browse Source

🐮 Minor typo fixes for options struct

pull/1310/head
FluffyQuack 5 years ago committed by Anders Jenbo
parent
commit
489a32d19a
  1. 16
      Source/diablo.cpp
  2. 14
      Source/options.h

16
Source/diablo.cpp

@ -402,8 +402,8 @@ BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer)
*/ */
static void SaveOptions() static void SaveOptions()
{ {
setIniInt("Diablo", "Intro", sgOptions.Diablo.bInto); setIniInt("Diablo", "Intro", sgOptions.Diablo.bIntro);
setIniInt("Hellfire", "Intro", sgOptions.Hellfire.bInto); setIniInt("Hellfire", "Intro", sgOptions.Hellfire.bIntro);
setIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem); setIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem);
setIniInt("Audio", "Sound Volume", sgOptions.Audio.nSoundVolume); setIniInt("Audio", "Sound Volume", sgOptions.Audio.nSoundVolume);
@ -470,8 +470,8 @@ static void SaveOptions()
*/ */
static void LoadOptions() static void LoadOptions()
{ {
sgOptions.Diablo.bInto = getIniBool("Diablo", "Intro", true); sgOptions.Diablo.bIntro = getIniBool("Diablo", "Intro", true);
sgOptions.Hellfire.bInto = getIniBool("Hellfire", "Intro", true); sgOptions.Hellfire.bIntro = getIniBool("Hellfire", "Intro", true);
getIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem, sizeof(sgOptions.Hellfire.szItem), ""); getIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem, sizeof(sgOptions.Hellfire.szItem), "");
sgOptions.Audio.nSoundVolume = getIniInt("Audio", "Sound Volume", VOLUME_MAX); sgOptions.Audio.nSoundVolume = getIniInt("Audio", "Sound Volume", VOLUME_MAX);
@ -588,13 +588,13 @@ static void diablo_splash()
play_movie("gendata\\logo.smk", TRUE); play_movie("gendata\\logo.smk", TRUE);
if (gbIsHellfire && sgOptions.Hellfire.bInto) { if (gbIsHellfire && sgOptions.Hellfire.bIntro) {
play_movie("gendata\\Hellfire.smk", TRUE); play_movie("gendata\\Hellfire.smk", TRUE);
sgOptions.Hellfire.bInto = false; sgOptions.Hellfire.bIntro = false;
} }
if (!gbIsHellfire && !gbIsSpawn && sgOptions.Diablo.bInto) { if (!gbIsHellfire && !gbIsSpawn && sgOptions.Diablo.bIntro) {
play_movie("gendata\\diablo1.smk", TRUE); play_movie("gendata\\diablo1.smk", TRUE);
sgOptions.Diablo.bInto = false; sgOptions.Diablo.bIntro = false;
} }
UiTitleDialog(); UiTitleDialog();

14
Source/options.h

@ -4,13 +4,13 @@ DEVILUTION_BEGIN_NAMESPACE
struct DiabloOptions { struct DiabloOptions {
/** @brief Play game intro video on startup. */ /** @brief Play game intro video on startup. */
bool bInto; bool bIntro;
}; };
struct HellfireOptions { struct HellfireOptions {
/** @brief Play game intro video on startup. */ /** @brief Play game intro video on startup. */
bool bInto; bool bIntro;
/** @brief Corner stone of the world item. */ /** @brief Cornerstone of the world item. */
char szItem[sizeof(PkItemStruct) * 2 + 1]; char szItem[sizeof(PkItemStruct) * 2 + 1];
}; };
@ -53,7 +53,7 @@ struct GraphicsOptions {
}; };
struct GameplayOptions { struct GameplayOptions {
/** @brief Game play ticks per secound. */ /** @brief Gameplay ticks per second. */
Sint32 nTickRate; Sint32 nTickRate;
/** @brief Enable double walk speed when in town. */ /** @brief Enable double walk speed when in town. */
bool bJogInTown; bool bJogInTown;
@ -73,7 +73,7 @@ struct GameplayOptions {
bool bExperienceBar; bool bExperienceBar;
/** @brief Show enemy health at the top of the screen. */ /** @brief Show enemy health at the top of the screen. */
bool bEnemyHealthBar; bool bEnemyHealthBar;
/** @brief Automatically pick up goald when walking on to it. */ /** @brief Automatically pick up gold when walking over it. */
bool bAutoGoldPickup; bool bAutoGoldPickup;
/** @brief Recover mana when talking to Adria. */ /** @brief Recover mana when talking to Adria. */
bool bAdriaRefillsMana; bool bAdriaRefillsMana;
@ -87,9 +87,9 @@ struct GameplayOptions {
bool bAutoEquipShields; bool bAutoEquipShields;
/** @brief Automatically attempt to equip jewelry-type items when picking them up. */ /** @brief Automatically attempt to equip jewelry-type items when picking them up. */
bool bAutoEquipJewelry; bool bAutoEquipJewelry;
/** @brief Only enable 2/3 quests in each game sessoin */ /** @brief Only enable 2/3 quests in each game session */
bool bRandomizeQuests; bool bRandomizeQuests;
/** @brief Indicates whether or not mosnter type (Animal, Demon, Undead) is shown along with other monster information. */ /** @brief Indicates whether or not monster type (Animal, Demon, Undead) is shown along with other monster information. */
bool bShowMonsterType; bool bShowMonsterType;
}; };

Loading…
Cancel
Save