Browse Source

diablo.ini: Rename "Fast Walk" to "Run in Town" (#1326)

pull/1328/head
Gleb Mazovetskiy 5 years ago committed by GitHub
parent
commit
0f3951744f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Source/diablo.cpp
  2. 10
      Source/gamemenu.cpp
  3. 2
      Source/gamemenu.h
  4. 2
      Source/mainmenu.cpp
  5. 4
      Source/multi.cpp
  6. 2
      Source/multi.h
  7. 2
      Source/options.h
  8. 4
      Source/player.cpp
  9. 2
      SourceX/DiabloUI/selgame.cpp

4
Source/diablo.cpp

@ -430,7 +430,7 @@ static void SaveOptions()
setIniInt("Graphics", "FPS Limiter", sgOptions.Graphics.bFPSLimit);
setIniInt("Game", "Speed", sgOptions.Gameplay.nTickRate);
setIniInt("Game", "Fast Walk", sgOptions.Gameplay.bJogInTown);
setIniInt("Game", "Run in Town", sgOptions.Gameplay.bRunInTown);
setIniInt("Game", "Grab Input", sgOptions.Gameplay.bGrabInput);
setIniInt("Game", "Theo Quest", sgOptions.Gameplay.bTheoQuest);
setIniInt("Game", "Cow Quest", sgOptions.Gameplay.bCowQuest);
@ -503,7 +503,7 @@ static void LoadOptions()
sgOptions.Graphics.bFPSLimit = getIniBool("Graphics", "FPS Limiter", true);
sgOptions.Gameplay.nTickRate = getIniInt("Game", "Speed", 20);
sgOptions.Gameplay.bJogInTown = getIniBool("Game", "Fast Walk", false);
sgOptions.Gameplay.bRunInTown = getIniBool("Game", "Run in Town", false);
sgOptions.Gameplay.bGrabInput = getIniBool("Game", "Grab Input", false);
sgOptions.Gameplay.bTheoQuest = getIniBool("Game", "Theo Quest", false);
sgOptions.Gameplay.bCowQuest = getIniBool("Game", "Cow Quest", false);

10
Source/gamemenu.cpp

@ -9,7 +9,7 @@
DEVILUTION_BEGIN_NAMESPACE
bool gbJogInTown = false;
bool gbRunInTown = false;
/** Contains the game menu items of the single player menu. */
TMenuItem sgSingleMenu[] = {
@ -220,8 +220,8 @@ static void gamemenu_get_sound()
static void gamemenu_jogging()
{
gmenu_slider_steps(&sgOptionsMenu[3], 2);
gmenu_slider_set(&sgOptionsMenu[3], 0, 1, sgOptions.Gameplay.bJogInTown);
sgOptionsMenu[3].pszStr = jogging_toggle_names[!sgOptions.Gameplay.bJogInTown ? 1 : 0];
gmenu_slider_set(&sgOptionsMenu[3], 0, 1, sgOptions.Gameplay.bRunInTown);
sgOptionsMenu[3].pszStr = jogging_toggle_names[!sgOptions.Gameplay.bRunInTown ? 1 : 0];
}
static void gamemenu_get_gamma()
@ -350,8 +350,8 @@ void gamemenu_sound_volume(BOOL bActivate)
void gamemenu_loadjog(BOOL bActivate)
{
if (!gbIsMultiplayer) {
sgOptions.Gameplay.bJogInTown = !sgOptions.Gameplay.bJogInTown;
gbJogInTown = sgOptions.Gameplay.bJogInTown;
sgOptions.Gameplay.bRunInTown = !sgOptions.Gameplay.bRunInTown;
gbRunInTown = sgOptions.Gameplay.bRunInTown;
PlaySFX(IS_TITLEMOV);
gamemenu_jogging();
}

2
Source/gamemenu.h

@ -12,7 +12,7 @@ DEVILUTION_BEGIN_NAMESPACE
extern "C" {
#endif
extern bool gbJogInTown;
extern bool gbRunInTown;
void gamemenu_on();
void gamemenu_off();

2
Source/mainmenu.cpp

@ -54,7 +54,7 @@ static BOOL mainmenu_single_player()
{
gbIsMultiplayer = false;
gbJogInTown = sgOptions.Gameplay.bJogInTown;
gbRunInTown = sgOptions.Gameplay.bRunInTown;
gnTickRate = sgOptions.Gameplay.nTickRate;
gbTheoQuest = sgOptions.Gameplay.bTheoQuest;
gbCowQuest = sgOptions.Gameplay.bCowQuest;

4
Source/multi.cpp

@ -744,7 +744,7 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram)
sgGameInitInfo.versionPatch = PROJECT_VERSION_PATCH;
sgGameInitInfo.nDifficulty = gnDifficulty;
sgGameInitInfo.nTickRate = sgOptions.Gameplay.nTickRate;
sgGameInitInfo.bJogInTown = sgOptions.Gameplay.bJogInTown;
sgGameInitInfo.bRunInTown = sgOptions.Gameplay.bRunInTown;
sgGameInitInfo.bTheoQuest = sgOptions.Gameplay.bTheoQuest;
sgGameInitInfo.bCowQuest = sgOptions.Gameplay.bCowQuest;
sgGameInitInfo.bFriendlyFire = sgOptions.Gameplay.bFriendlyFire;
@ -803,7 +803,7 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram)
gnDifficulty = sgGameInitInfo.nDifficulty;
gnTickRate = sgGameInitInfo.nTickRate;
gnTickDelay = 1000 / gnTickRate;
gbJogInTown = sgGameInitInfo.bJogInTown;
gbRunInTown = sgGameInitInfo.bRunInTown;
gbTheoQuest = sgGameInitInfo.bTheoQuest;
gbCowQuest = sgGameInitInfo.bCowQuest;
gbFriendlyFire = sgGameInitInfo.bFriendlyFire;

2
Source/multi.h

@ -21,7 +21,7 @@ typedef struct GameData {
Uint8 versionPatch;
Uint8 nDifficulty;
Uint8 nTickRate;
Uint8 bJogInTown;
Uint8 bRunInTown;
Uint8 bTheoQuest;
Uint8 bCowQuest;
Uint8 bFriendlyFire;

2
Source/options.h

@ -56,7 +56,7 @@ struct GameplayOptions {
/** @brief Gameplay ticks per second. */
Sint32 nTickRate;
/** @brief Enable double walk speed when in town. */
bool bJogInTown;
bool bRunInTown;
/** @brief Do not let the mouse leave the application window. */
bool bGrabInput;
/** @brief Enable the Theo quest. */

4
Source/player.cpp

@ -1293,7 +1293,7 @@ void PM_ChangeOffset(int pnum)
plr[pnum]._pVar6 += plr[pnum]._pxvel;
plr[pnum]._pVar7 += plr[pnum]._pyvel;
if (currlevel == 0 && gbJogInTown) {
if (currlevel == 0 && gbRunInTown) {
plr[pnum]._pVar6 += plr[pnum]._pxvel;
plr[pnum]._pVar7 += plr[pnum]._pyvel;
}
@ -2150,7 +2150,7 @@ bool PM_DoWalk(int pnum, int variant)
}
//"Jog" in town which works by doubling movement speed and skipping every other animation frame
if (currlevel == 0 && gbJogInTown) {
if (currlevel == 0 && gbRunInTown) {
if (plr[pnum]._pAnimFrame % 2 == 0) {
plr[pnum]._pAnimFrame++;
plr[pnum]._pVar8++;

2
SourceX/DiabloUI/selgame.cpp

@ -446,7 +446,7 @@ void selgame_Password_Select(int value)
GameData *data = m_client_info->initdata;
data->nDifficulty = nDifficulty;
data->nTickRate = nTickRate;
data->bJogInTown = sgOptions.Gameplay.bJogInTown;
data->bRunInTown = sgOptions.Gameplay.bRunInTown;
data->bTheoQuest = sgOptions.Gameplay.bTheoQuest;
data->bCowQuest = sgOptions.Gameplay.bCowQuest;

Loading…
Cancel
Save