Browse Source

🚩 Move barbarian and bard test options to the ini

pull/1104/head
Anders Jenbo 5 years ago
parent
commit
fe0295fa2e
  1. 10
      Source/diablo.cpp
  2. 12
      Source/diablo.h
  3. 4
      SourceX/DiabloUI/selhero.cpp

10
Source/diablo.cpp

@ -101,8 +101,6 @@ static void print_help_and_exit()
printf(" %-20s %-30s\n", "-f", "Display frames per second");
printf(" %-20s %-30s\n", "-x", "Run in windowed mode");
printf(" %-20s %-30s\n", "--spawn", "Force spawn mode even if diabdat.mpq is found");
printf(" %-20s %-30s\n", "--bardtest", "Enable the Bard class");
printf(" %-20s %-30s\n", "--barbariantest", "Enable the Barbarian class");
printf("\nHellfire options:\n");
printf(" %-20s %-30s\n", "--diablo", "Force diablo mode even if hellfire.mpq is found");
printf(" %-20s %-30s\n", "--nestart", "Use alternate nest palette");
@ -153,10 +151,6 @@ static void diablo_parse_flags(int argc, char **argv)
forceDiablo = TRUE;
} else if (strcasecmp("--nestart", argv[i]) == 0) {
gbNestArt = true;
} else if (strcasecmp("--bardtest", argv[i]) == 0) {
gbBard = true;
} else if (strcasecmp("--barbariantest", argv[i]) == 0) {
gbBarbarian = true;
#ifdef _DEBUG
} else if (strcasecmp("-^", argv[i]) == 0) {
debug_mode_key_inverted_v = TRUE;
@ -427,6 +421,8 @@ static void SaveOptions()
setIniInt("Game", "Grab Input", sgOptions.bGrabInput);
setIniInt("Game", "Theo Quest", sgOptions.bTheoQuest);
setIniInt("Game", "Cow Quest", sgOptions.bCowQuest);
setIniInt("Game", "Test Bard", sgOptions.bTestBard);
setIniInt("Game", "Test Barbarian", sgOptions.bTestBarbarian);
setIniValue("Network", "Bind Address", sgOptions.szBindAddress);
}
@ -466,6 +462,8 @@ static void LoadOptions()
sgOptions.bGrabInput = getIniBool("Game", "Grab Input", false);
sgOptions.bTheoQuest = getIniBool("Game", "Theo Quest", false);
sgOptions.bCowQuest = getIniBool("Game", "Cow Quest", false);
sgOptions.bTestBard = getIniBool("Game", "Test Bard", false);
sgOptions.bTestBarbarian = getIniBool("Game", "Test Barbarian", false);
getIniValue("Network", "Bind Address", sgOptions.szBindAddress, sizeof(sgOptions.szBindAddress), "0.0.0.0");
}

12
Source/diablo.h

@ -36,11 +36,13 @@ typedef struct Options {
Sint32 nGammaCorrection; // Gamma correction level
bool bColorCycling; // Enable color cycling animations
Sint32 nTickRate; // Game play ticks per secound
bool bJogInTown; // Enable double walk speed when in town
bool bGrabInput; // Do not let the mouse leave the application window
bool bTheoQuest; // Enable the Theo quest
bool bCowQuest; // Enable the cow quest
Sint32 nTickRate; // Game play ticks per secound
bool bJogInTown; // Enable double walk speed when in town
bool bGrabInput; // Do not let the mouse leave the application window
bool bTheoQuest; // Enable the Theo quest
bool bCowQuest; // Enable the cow quest
bool bTestBard; // Enable the bard hero class
bool bTestBarbarian; // Enable the babarian hero class
char szBindAddress[129]; // Optionally bind to a specific network interface
} Options;

4
SourceX/DiabloUI/selhero.cpp

@ -274,10 +274,10 @@ void selhero_List_Select(int value)
if (gbIsHellfire) {
vecSelHeroDlgItems.push_back(new UiListItem("Monk", PC_MONK));
}
if (gbBard) {
if (gbBard || sgOptions.bTestBard) {
vecSelHeroDlgItems.push_back(new UiListItem("Bard", PC_BARD));
}
if (gbBarbarian) {
if (gbBarbarian || sgOptions.bTestBarbarian) {
vecSelHeroDlgItems.push_back(new UiListItem("Barbarian", PC_BARBARIAN));
}
if (vecSelHeroDlgItems.size() > 4)

Loading…
Cancel
Save