Skip to content

Commit

Permalink
Fixed unoverridden console functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Oct 22, 2018
1 parent 694127a commit cbc2bbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/xrEngine/xr_ioc_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ class CCC_VidMode : public CCC_Token
return;
}
}
virtual void Status(TStatus& S) { xr_sprintf(S, sizeof(S), "%dx%d", psCurrentVidMode[0], psCurrentVidMode[1]); }
void GetStatus(TStatus& S) override { xr_sprintf(S, sizeof(S), "%dx%d", psCurrentVidMode[0], psCurrentVidMode[1]); }
const xr_token* GetToken() noexcept override { return VidModesToken.data(); }
virtual void Info(TInfo& I) { xr_strcpy(I, sizeof(I), "change screen resolution WxH"); }
virtual void fill_tips(vecTips& tips, u32 mode)
{
TStatus str, cur;
Status(cur);
GetStatus(cur);

bool res = false;
const xr_token* tok = GetToken();
Expand Down Expand Up @@ -596,7 +596,7 @@ class CCC_soundDevice : public CCC_Token
inherited::Execute(args);
}

virtual void Status(TStatus& S)
void GetStatus(TStatus& S) override
{
GetToken();
if (!tokens)
Expand Down Expand Up @@ -657,7 +657,7 @@ class ENGINE_API CCC_HideConsole : public IConsole_Command
public:
CCC_HideConsole(LPCSTR N) : IConsole_Command(N) { bEmptyArgsHandled = true; }
virtual void Execute(LPCSTR args) { Console->Hide(); }
virtual void Status(TStatus& S) { S[0] = 0; }
void GetStatus(TStatus& S) override { S[0] = 0; }
virtual void Info(TInfo& I) { xr_sprintf(I, sizeof(I), "hide console"); }
};

Expand Down
14 changes: 7 additions & 7 deletions src/xrGame/console_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class CCC_ALifeTimeFactor : public IConsole_Command
}

virtual void Save(IWriter* F){};
virtual void Status(TStatus& S)
void GetStatus(TStatus& S) override
{
if (!g_pGameLevel)
return;
Expand Down Expand Up @@ -1086,7 +1086,7 @@ class CCC_PHGravity : public IConsole_Command
#endif
physics_world()->SetGravity(float(atof(args)));
}
virtual void Status(TStatus& S)
void GetStatus(TStatus& S) override
{
if (physics_world())
xr_sprintf(S, "%3.5f", physics_world()->Gravity());
Expand Down Expand Up @@ -1114,7 +1114,7 @@ class CCC_PHFps : public IConsole_Command
if (physics_world())
physics_world()->SetStep(ph_console::ph_step_time);
}
virtual void Status(TStatus& S) { xr_sprintf(S, "%3.5f", 1.f / ph_console::ph_step_time); }
void GetStatus(TStatus& S) override { xr_sprintf(S, "%3.5f", 1.f / ph_console::ph_step_time); }
};

#ifdef DEBUG
Expand Down Expand Up @@ -1217,7 +1217,7 @@ class CCC_Script : public IConsole_Command
}
}

virtual void Status(TStatus& S) { xr_strcpy(S, "<script_name> (Specify script name!)"); }
void GetStatus(TStatus& S) override { xr_strcpy(S, "<script_name> (Specify script name!)"); }
virtual void Save(IWriter* F) {}
virtual void fill_tips(vecTips& tips, u32 mode) { get_files_list(tips, "$game_scripts$", ".script"); }
};
Expand Down Expand Up @@ -1257,7 +1257,7 @@ class CCC_ScriptCommand : public IConsole_Command
}
} // void Execute

virtual void Status(TStatus& S) { xr_strcpy(S, "<script_name.function()> (Specify script and function name!)"); }
void GetStatus(TStatus& S) override { xr_strcpy(S, "<script_name.function()> (Specify script and function name!)"); }
virtual void Save(IWriter* F) {}
virtual void fill_tips(vecTips& tips, u32 mode)
{
Expand All @@ -1281,7 +1281,7 @@ class CCC_TimeFactor : public IConsole_Command
clamp(time_factor, EPS, 1000.f);
Device.time_factor(time_factor);
}
virtual void Status(TStatus& S) { xr_sprintf(S, sizeof(S), "%f", Device.time_factor()); }
void GetStatus(TStatus& S) override { xr_sprintf(S, sizeof(S), "%f", Device.time_factor()); }
virtual void Info(TInfo& I) { xr_strcpy(I, "[0.001 - 1000.0]"); }
virtual void fill_tips(vecTips& tips, u32 mode)
{
Expand Down Expand Up @@ -1352,7 +1352,7 @@ struct CCC_StartTimeSingle : public IConsole_Command
Level().SetGameTimeFactor(g_qwStartGameTime, g_fTimeFactor);
}

virtual void Status(TStatus& S)
void GetStatus(TStatus& S) override
{
u32 year = 1, month = 1, day = 1, hours = 0, mins = 0, secs = 0, milisecs = 0;
split_time(g_qwStartGameTime, year, month, day, hours, mins, secs, milisecs);
Expand Down

0 comments on commit cbc2bbc

Please sign in to comment.