r5sdk/r5dev/tier0/commandline.h
IcePixelx f43c5da8ae Huge engine/host commit.
* Rebuild CModGroupApp::Main, did not include the dedicated routine with the empty class global.
* Using a template function now for virtual function calls
* Implemented most of the CEngine class and grabbing its global var now.
* Using local CEngine now in FrameUpdate
* Implemented EngineParms_t fully and grabbing its global var.
* Added macro for adding class member variables at offsets.

A lot of comments added regarding what needs to be done for this commit.

* Check other season compability, wasn't able to do that due to not having access to said binaries at the moment.
* Fix sdklauncher to use widestrings to fix the bug with other languages in path
2022-01-23 18:26:48 +01:00

35 lines
1.3 KiB
C++

#pragma once
class CCommandLine // VTABLE @0x141369C78 in R5pc_r5launch_N1094_CL456479_2019_10_30_05_20_PM
{
public:
void CreateCmdLine(const char* pszCommandline);
void CreateCmdLine(int argc, char** argv);
void CreatePool(void* pMem);
const char* GetCmdLine(void);
const char* CheckParm(const char* psz, const char** ppszValue = NULL);
void RemoveParm(const char* pszParm);
void AppendParm(const char* pszParm, const char* pszValues);
const char* ParmValue(const char* psz, const char* pDefaultVal = NULL);
int ParmValue(const char* psz, int nDefaultVal);
float ParmValue(const char* psz, float flDefaultVal);
int ParmCount(void);
int FindParm(const char* psz);
const char* GetParm(int nIndex);
void SetParm(int nIndex, char const* pParm);
};
extern CCommandLine* g_pCmdLine;
///////////////////////////////////////////////////////////////////////////////
class HCommandLine : public IDetour
{
virtual void debugp()
{
std::cout << "| VAR: g_pCmdLine : 0x" << std::hex << std::uppercase << g_pCmdLine << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(HCommandLine);