Browse Source

Add command for revealing the map

pull/2670/head
Anders Jenbo 5 years ago
parent
commit
7ed3db5f68
  1. 13
      Source/debug.cpp
  2. 1
      Source/debug.h

13
Source/debug.cpp

@ -6,10 +6,11 @@
#ifdef _DEBUG
#include "debug.h"
#include "automap.h"
#include "control.h"
#include "cursor.h"
#include "debug.h"
#include "engine/cel_sprite.hpp"
#include "engine/load_cel.hpp"
#include "engine/point.hpp"
#include "inv.h"
@ -264,6 +265,13 @@ std::string DebugCmdLighting(const std::string_view parameter)
return "All raindrops are the same.";
}
std::string DebugCmdMap(const std::string_view parameter)
{
std::fill(&AutomapView[0][0], &AutomapView[DMAXX - 1][DMAXX - 1], true);
return "The way is made clear when viewed from above";
}
std::string DebugCmdVision(const std::string_view parameter)
{
DebugVision = !DebugVision;
@ -394,6 +402,7 @@ std::vector<DebugCmdItem> DebugCmdList = {
{ "set spells", "Set spell level to {level} for all spells.", "{level}", &DebugCmdSetSpellsLevel },
{ "take gold", "Removes all gold from inventory.", "", &DebugCmdTakeGoldCheat },
{ "give quest", "Enable a given quest.", "({id})", &DebugCmdQuest },
{ "give map", "Reveal the map.", "", &DebugCmdMap },
{ "changelevel", "Moves to specifided {level} (use 0 for town).", "{level}", &DebugCmdWarpToLevel },
{ "map", "Load a quest level {level}.", "{level}", &DebugCmdLoadMap },
{ "visit", "Visit a towner.", "{towner}", &DebugCmdVisitTowner },

1
Source/debug.h

@ -8,6 +8,7 @@
#include <string_view>
#include "engine.h"
#include "engine/cel_sprite.hpp"
#include "miniwin/miniwin.h"
#include "utils/stdcompat/optional.hpp"

Loading…
Cancel
Save