mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2025-01-04 00:23:23 +08:00
Merge pull request #8 from Yimura/CTunables
feat(CTunables): Added new class
This commit is contained in:
commit
ef4cfaf14b
14
CTunables.hpp
Normal file
14
CTunables.hpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace rage
|
||||||
|
{
|
||||||
|
class CTunables
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
char pad_0000[112]; //0x0000
|
||||||
|
uint64_t m_bPtr; //0x0070
|
||||||
|
uint16_t m_bCount; //0x0078
|
||||||
|
}; //Size: 0x007A
|
||||||
|
}
|
22
atSingleton.hpp
Normal file
22
atSingleton.hpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace rage
|
||||||
|
{
|
||||||
|
template <typename T>
|
||||||
|
struct atSingleton
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
T* m_basePtr{};
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool isValid() const
|
||||||
|
{
|
||||||
|
return m_basePtr != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
T* getInstance()
|
||||||
|
{
|
||||||
|
return m_basePtr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user