2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2021-06-15 09:30:48 -04:00
|
|
|
#include "TCHAR.h"
|
|
|
|
#include "pdh.h"
|
|
|
|
|
|
|
|
static PDH_HQUERY cpuQuery;
|
|
|
|
static PDH_HCOUNTER cpuTotal;
|
|
|
|
static ULARGE_INTEGER lastCPU, lastSysCPU, lastUserCPU;
|
|
|
|
static int numProcessors;
|
|
|
|
static HANDLE self;
|
2021-01-03 06:48:07 -05:00
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
class Util
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
static bool LoadTextureFromFileDx11(const char* filename, ID3D11ShaderResourceView** out_srv);
|
|
|
|
|
|
|
|
public:
|
|
|
|
static void ClearCharTasksVehCheck(CPed* ped);
|
2021-06-18 12:49:11 -04:00
|
|
|
static CPed* GetClosestPed();
|
|
|
|
static CVehicle* GetClosestVehicle();
|
2020-12-02 16:19:16 -05:00
|
|
|
static int GetLargestGangInZone();
|
2021-06-18 12:49:11 -04:00
|
|
|
static void LoadTexturesInDirRecursive(const char* path, const char* file_ext,
|
|
|
|
std::vector<std::string>& category_vec,
|
|
|
|
std::vector<std::unique_ptr<STextureStructure>>& store_vec);
|
|
|
|
static void ReleaseTextures(std::vector<std::unique_ptr<STextureStructure>>& store_vec);
|
2021-04-25 14:59:14 -04:00
|
|
|
static bool IsOnCutscene();
|
2020-12-02 16:19:16 -05:00
|
|
|
static bool IsOnMission();
|
2021-06-18 12:49:11 -04:00
|
|
|
static std::string GetLocationName(CVector* pos);
|
|
|
|
static void RainbowValues(int& r, int& g, int& b, float speed);
|
2020-12-25 16:22:28 -05:00
|
|
|
static RwTexture* LoadTextureFromPngFile(fs::path path);
|
2021-06-15 09:30:48 -04:00
|
|
|
static void GetCPUUsageInit();
|
|
|
|
static double GetCurrentCPUUsage();
|
2020-12-02 16:19:16 -05:00
|
|
|
};
|