Remove debug command line argument -^ (Enable debug tools) and added
scrollview debug command
This commit is contained in:
parent
0acaec710c
commit
f9192d2312
5 changed files with 18 additions and 19 deletions
|
|
@ -34,6 +34,7 @@ bool DebugGodMode = false;
|
|||
bool DebugVision = false;
|
||||
bool DebugGrid = false;
|
||||
std::unordered_map<int, Point> DebugCoordsMap;
|
||||
bool DebugScrollViewEnabled = false;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
@ -621,6 +622,15 @@ std::string DebugCmdShowTileData(const string_view parameter)
|
|||
return "Special powers activated.";
|
||||
}
|
||||
|
||||
std::string DebugCmdScrollView(const string_view parameter)
|
||||
{
|
||||
DebugScrollViewEnabled = !DebugScrollViewEnabled;
|
||||
if (DebugScrollViewEnabled)
|
||||
return "You can see as far as an eagle.";
|
||||
InitMultiView();
|
||||
return "If you want to see the world, you need to explore it yourself.";
|
||||
}
|
||||
|
||||
std::vector<DebugCmdItem> DebugCmdList = {
|
||||
{ "help", "Prints help overview or help for a specific command.", "({command})", &DebugCmdHelp },
|
||||
{ "give gold", "Fills the inventory with gold.", "", &DebugCmdGiveGoldCheat },
|
||||
|
|
@ -646,6 +656,7 @@ std::vector<DebugCmdItem> DebugCmdList = {
|
|||
{ "seedinfo", "Show seed infos for current level.", "", &DebugCmdLevelSeed },
|
||||
{ "spawn", "Spawns monster {name}.", "({count}) {name}", &DebugCmdSpawnMonster },
|
||||
{ "tiledata", "Toggles showing tile data {name} (leave name empty to see a list).", "{name}", &DebugCmdShowTileData },
|
||||
{ "scrollview", "Toggles scroll view feature (with shift+mouse).", "", &DebugCmdScrollView },
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ extern bool DebugGodMode;
|
|||
extern bool DebugVision;
|
||||
extern bool DebugGrid;
|
||||
extern std::unordered_map<int, Point> DebugCoordsMap;
|
||||
extern bool DebugScrollViewEnabled;
|
||||
|
||||
void FreeDebugGFX();
|
||||
void LoadDebugGFX();
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ std::array<Keymapper::ActionIndex, 4> quickSpellActionIndexes;
|
|||
|
||||
bool gbForceWindowed = false;
|
||||
#ifdef _DEBUG
|
||||
bool debug_mode_key_inverted_v = false;
|
||||
bool debug_mode_key_i = false;
|
||||
std::vector<std::string> DebugCmdsFromCommandLine;
|
||||
#endif
|
||||
|
|
@ -584,13 +583,11 @@ void PressChar(char vkey)
|
|||
return;
|
||||
case 'T':
|
||||
case 't':
|
||||
if (debug_mode_key_inverted_v) {
|
||||
auto &myPlayer = Players[MyPlayerId];
|
||||
sprintf(tempstr, "PX = %i PY = %i", myPlayer.position.tile.x, myPlayer.position.tile.y);
|
||||
NetSendCmdString(1 << MyPlayerId, tempstr);
|
||||
sprintf(tempstr, "CX = %i CY = %i DP = %i", cursPosition.x, cursPosition.y, dungeon[cursPosition.x][cursPosition.y]);
|
||||
NetSendCmdString(1 << MyPlayerId, tempstr);
|
||||
}
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -812,7 +809,6 @@ void RunGameLoop(interface_mode uMsg)
|
|||
printInConsole(" %-20s %-30s\n", /* TRANSLATORS: Commandline Option */ "--nestart", _("Use alternate nest palette"));
|
||||
#ifdef _DEBUG
|
||||
printInConsole("\nDebug options:\n");
|
||||
printInConsole(" %-20s %-30s\n", "-^", "Enable debug tools");
|
||||
printInConsole(" %-20s %-30s\n", "-i", "Ignore network timeout");
|
||||
printInConsole(" %-20s %-30s\n", "+<internal command>", "Pass commands to the engine");
|
||||
#endif
|
||||
|
|
@ -871,8 +867,6 @@ void DiabloParseFlags(int argc, char **argv)
|
|||
} else if (strcasecmp("--verbose", argv[i]) == 0) {
|
||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_VERBOSE);
|
||||
#ifdef _DEBUG
|
||||
} else if (strcasecmp("-^", argv[i]) == 0) {
|
||||
debug_mode_key_inverted_v = true;
|
||||
} else if (strcasecmp("-i", argv[i]) == 0) {
|
||||
debug_mode_key_i = true;
|
||||
} else if (argv[i][0] == '+') {
|
||||
|
|
@ -1201,7 +1195,7 @@ void GameLogic()
|
|||
gGameLogicStep = GameLogicStep::None;
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (debug_mode_key_inverted_v && GetAsyncKeyState(DVL_VK_SHIFT)) {
|
||||
if (DebugScrollViewEnabled && GetAsyncKeyState(DVL_VK_SHIFT)) {
|
||||
ScrollView();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ void diablo_color_cyc_logic();
|
|||
extern Keymapper keymapper;
|
||||
extern bool gbForceWindowed;
|
||||
#ifdef _DEBUG
|
||||
extern bool debug_mode_key_inverted_v;
|
||||
extern bool debug_mode_key_i;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -2776,12 +2776,6 @@ void InitPlayer(Player &player, bool firstTime)
|
|||
player._pAblSpells = GetSpellBitmask(SPL_BLODBOIL);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (debug_mode_key_inverted_v && firstTime) {
|
||||
player._pMemSpells = SPL_INVALID;
|
||||
}
|
||||
#endif
|
||||
|
||||
player._pNextExper = ExpLvlsTbl[player._pLevel];
|
||||
player._pInvincible = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue