Browse Source

Add OptionEntry Theo Quest

pull/3594/head
obligaron 4 years ago committed by Anders Jenbo
parent
commit
a69cd0db2a
  1. 2
      Source/DiabloUI/selgame.cpp
  2. 2
      Source/multi.cpp
  3. 4
      Source/options.cpp
  4. 2
      Source/options.h

2
Source/DiabloUI/selgame.cpp

@ -493,7 +493,7 @@ void selgame_Password_Select(int /*value*/)
m_game_data->nDifficulty = nDifficulty;
m_game_data->nTickRate = nTickRate;
m_game_data->bRunInTown = *sgOptions.Gameplay.runInTown ? 1 : 0;
m_game_data->bTheoQuest = sgOptions.Gameplay.bTheoQuest ? 1 : 0;
m_game_data->bTheoQuest = *sgOptions.Gameplay.theoQuest ? 1 : 0;
m_game_data->bCowQuest = sgOptions.Gameplay.bCowQuest ? 1 : 0;
if (SNetCreateGame(nullptr, gamePassword, (char *)m_game_data, sizeof(*m_game_data), gdwPlayerId)) {

2
Source/multi.cpp

@ -692,7 +692,7 @@ bool NetInit(bool bSinglePlayer)
sgGameInitInfo.versionPatch = PROJECT_VERSION_PATCH;
sgGameInitInfo.nTickRate = sgOptions.Gameplay.nTickRate;
sgGameInitInfo.bRunInTown = *sgOptions.Gameplay.runInTown ? 1 : 0;
sgGameInitInfo.bTheoQuest = sgOptions.Gameplay.bTheoQuest ? 1 : 0;
sgGameInitInfo.bTheoQuest = *sgOptions.Gameplay.theoQuest ? 1 : 0;
sgGameInitInfo.bCowQuest = sgOptions.Gameplay.bCowQuest ? 1 : 0;
sgGameInitInfo.bFriendlyFire = sgOptions.Gameplay.bFriendlyFire ? 1 : 0;
memset(sgbPlayerTurnBitTbl, 0, sizeof(sgbPlayerTurnBitTbl));

4
Source/options.cpp

@ -275,7 +275,6 @@ void LoadOptions()
sgOptions.Graphics.bShowFPS = (GetIniInt("Graphics", "Show FPS", 0) != 0);
sgOptions.Gameplay.nTickRate = GetIniInt("Game", "Speed", 20);
sgOptions.Gameplay.bTheoQuest = GetIniBool("Game", "Theo Quest", false);
sgOptions.Gameplay.bCowQuest = GetIniBool("Game", "Cow Quest", false);
sgOptions.Gameplay.bFriendlyFire = GetIniBool("Game", "Friendly Fire", true);
sgOptions.Gameplay.bTestBard = GetIniBool("Game", "Test Bard", false);
@ -428,7 +427,6 @@ void SaveOptions()
SetIniValue("Graphics", "Show FPS", sgOptions.Graphics.bShowFPS);
SetIniValue("Game", "Speed", sgOptions.Gameplay.nTickRate);
SetIniValue("Game", "Theo Quest", sgOptions.Gameplay.bTheoQuest);
SetIniValue("Game", "Cow Quest", sgOptions.Gameplay.bCowQuest);
SetIniValue("Game", "Friendly Fire", sgOptions.Gameplay.bFriendlyFire);
SetIniValue("Game", "Test Bard", sgOptions.Gameplay.bTestBard);
@ -638,6 +636,7 @@ GameplayOptions::GameplayOptions()
: OptionCategoryBase("Game", N_("Gameplay"), N_("Gameplay Settings"))
, runInTown("Run in Town", OptionEntryFlags::CantChangeInMultiPlayer, N_("Run in Town"), N_("Enable jogging/fast walking in town for Diablo and Hellfire. This option was introduced in the expansion."), AUTO_PICKUP_DEFAULT(false))
, grabInput("Grab Input", OptionEntryFlags::None, N_("Grab Input"), N_("When enabled mouse is locked to the game window."), false)
, theoQuest("Theo Quest", OptionEntryFlags::CantChangeInGame | OptionEntryFlags::OnlyHellfire, N_("Theo Quest"), N_("Enable Little Girl quest."), false)
{
grabInput.SetValueChangedCallback(OptionGrabInputChanged);
}
@ -646,6 +645,7 @@ std::vector<OptionEntryBase *> GameplayOptions::GetEntries()
return {
&runInTown,
&grabInput,
&theoQuest,
};
}

2
Source/options.h

@ -276,7 +276,7 @@ struct GameplayOptions : OptionCategoryBase {
/** @brief Do not let the mouse leave the application window. */
OptionEntryBoolean grabInput;
/** @brief Enable the Theo quest. */
bool bTheoQuest;
OptionEntryBoolean theoQuest;
/** @brief Enable the cow quest. */
bool bCowQuest;
/** @brief Will players still damage other players in non-PvP mode. */

Loading…
Cancel
Save