mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Renamed 'r5apexsdkd64.dll' to 'gamesdk.dll'. * Added required dedicated parameters to code instead. * Bug fixes around CCommandLine class (fixed misaligned VTable indexes). * SDK now supports being directly launched by the game executable. The SDK launcher will pass '-launcher' to the game, which indicated its being launched by the launcher. If the game does not receive '-launcher', it assumes its being launched directly from the game executable, which will instead load 'startup_(dedi_)default.cfg'. The sdk dll's are now added to the game's IAT by their dummy exports allowing for them to be loaded when the exe is loaded (the dll's do everything on init).
40 lines
1.5 KiB
C++
40 lines
1.5 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);
|
|
};
|
|
CCommandLine* CommandLine(void);
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
class HCommandLine : public IDetour
|
|
{
|
|
virtual void GetAdr(void) const
|
|
{
|
|
std::cout << "| VAR: g_pCmdLine : 0x" << std::hex << std::uppercase << CommandLine() << std::setw(0) << " |" << std::endl;
|
|
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
|
}
|
|
virtual void GetFun(void) const { }
|
|
virtual void GetVar(void) const { }
|
|
virtual void GetCon(void) const { }
|
|
virtual void Attach(void) const { }
|
|
virtual void Detach(void) const { }
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
REGISTER(HCommandLine);
|