2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
2021-06-15 09:30:48 -04:00
|
|
|
#include "pdh.h"
|
2021-10-24 18:08:00 -04:00
|
|
|
#include "tchar.h"
|
2021-06-15 09:30:48 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
public:
|
2021-08-06 11:53:18 -04:00
|
|
|
#ifdef GTASA
|
2021-10-24 18:08:00 -04:00
|
|
|
static void ClearCharTasksVehCheck(CPed *ped);
|
|
|
|
static int GetLargestGangInZone();
|
|
|
|
static RwTexture *LoadTextureFromMemory(char *data, unsigned int size);
|
2021-08-06 11:53:18 -04:00
|
|
|
#endif
|
|
|
|
|
2021-10-24 18:08:00 -04:00
|
|
|
static CPed *GetClosestPed();
|
|
|
|
static CVehicle *GetClosestVehicle();
|
|
|
|
static std::string GetLocationName(CVector *pos);
|
|
|
|
static bool IsOnMission();
|
|
|
|
static bool IsOnCutscene();
|
|
|
|
static void RainbowValues(int &r, int &g, int &b, float speed);
|
|
|
|
static void GetCPUUsageInit();
|
|
|
|
static double GetCurrentCPUUsage();
|
2020-12-02 16:19:16 -05:00
|
|
|
};
|