debug fps command (#3418)
This commit is contained in:
parent
e9a9daa794
commit
53f89fb9d9
3 changed files with 12 additions and 2 deletions
|
|
@ -725,6 +725,12 @@ std::string DebugCmdPlayerInfo(const string_view parameter)
|
|||
player._pInvincible ? 1 : 0, player._pHitPoints);
|
||||
}
|
||||
|
||||
std::string DebugCmdToggleFPS(const string_view parameter)
|
||||
{
|
||||
frameflag = !frameflag;
|
||||
return "";
|
||||
}
|
||||
|
||||
std::vector<DebugCmdItem> DebugCmdList = {
|
||||
{ "help", "Prints help overview or help for a specific command.", "({command})", &DebugCmdHelp },
|
||||
{ "give gold", "Fills the inventory with gold.", "", &DebugCmdGiveGoldCheat },
|
||||
|
|
@ -755,6 +761,7 @@ std::vector<DebugCmdItem> DebugCmdList = {
|
|||
{ "iteminfo", "Shows info of currently selected item.", "", &DebugCmdItemInfo },
|
||||
{ "questinfo", "Shows info of quests.", "{id}", &DebugCmdQuestInfo },
|
||||
{ "playerinfo", "Shows info of player.", "{playerid}", &DebugCmdPlayerInfo },
|
||||
{ "fps", "Toggles displaying FPS", "", &DebugCmdToggleFPS },
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
@ -817,7 +824,8 @@ bool CheckDebugTextCommand(const string_view text)
|
|||
parameter = text.substr(dbgCmd.text.length() + 1);
|
||||
const auto result = dbgCmd.actionProc(parameter);
|
||||
Log("DebugCmd: {} Result: {}", text, result);
|
||||
InitDiabloMsg(result);
|
||||
if (result != "")
|
||||
InitDiabloMsg(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ int level_piece_id;
|
|||
// DevilutionX extension.
|
||||
extern void DrawControllerModifierHints(const Surface &out);
|
||||
|
||||
bool frameflag;
|
||||
|
||||
namespace {
|
||||
/**
|
||||
* @brief Hash algorithm for point
|
||||
|
|
@ -202,7 +204,6 @@ uint32_t sgdwCursHgtOld;
|
|||
|
||||
bool dRendered[MAXDUNX][MAXDUNY];
|
||||
|
||||
bool frameflag;
|
||||
int frameend;
|
||||
int framerate;
|
||||
int framestart;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ extern bool cel_transparency_active;
|
|||
extern bool cel_foliage_active;
|
||||
extern int level_piece_id;
|
||||
extern bool AutoMapShowItems;
|
||||
extern bool frameflag;
|
||||
|
||||
/**
|
||||
* @brief Returns the offset for the walking animation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue