2023-10-23 23:04:28 +08:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-11-01 21:24:45 +08:00
|
|
|
#include "address.h"
|
2024-02-06 21:37:52 +08:00
|
|
|
#include "common.h"
|
2024-02-15 22:23:36 +08:00
|
|
|
#include "playerped.h"
|
2023-10-23 23:04:28 +08:00
|
|
|
#include "audio.h"
|
|
|
|
#include "camera.h"
|
2024-01-09 23:53:36 +08:00
|
|
|
#include "scripting.h"
|
2024-07-16 23:12:10 +08:00
|
|
|
#include "menu.h"
|
2023-10-23 23:04:28 +08:00
|
|
|
|
|
|
|
//-----------------------------------------------------------
|
|
|
|
|
|
|
|
class CGame // size: 322
|
|
|
|
{
|
|
|
|
private:
|
2024-02-15 22:41:04 +08:00
|
|
|
|
|
|
|
CAudio *m_pGameAudio;
|
|
|
|
CCamera *m_pGameCamera;
|
|
|
|
CPlayerPed *m_pGamePlayer;
|
2023-10-23 23:04:28 +08:00
|
|
|
char gapC[29];
|
2024-02-27 23:37:45 +08:00
|
|
|
BOOL m_bRaceCheckpointsEnabled;
|
2023-10-23 23:04:28 +08:00
|
|
|
char gap2D[4];
|
2024-02-27 23:37:45 +08:00
|
|
|
DWORD m_dwRaceCheckpointHandle;
|
2023-10-23 23:04:28 +08:00
|
|
|
char gap35[24];
|
|
|
|
int field_4D;
|
|
|
|
char gap51[4];
|
|
|
|
int field_55;
|
|
|
|
int field_59;
|
2024-02-18 21:46:45 +08:00
|
|
|
DWORD field_5D;
|
2023-10-23 23:04:28 +08:00
|
|
|
int field_61;
|
|
|
|
int field_65;
|
|
|
|
int field_69;
|
|
|
|
char field_6D;
|
|
|
|
char field_6E[212];
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2024-07-28 22:49:57 +08:00
|
|
|
int GetWeaponModelIDFromWeapon(int iWeaponID);
|
2024-07-28 22:54:55 +08:00
|
|
|
BOOL IsKeyPressed(int iKeyIdentifier);
|
2024-07-28 22:55:34 +08:00
|
|
|
float FindGroundZForCoord(float x, float y, float z);
|
2024-07-28 23:07:50 +08:00
|
|
|
void ToggleKeyInputsDisabled(int a2, BOOL a3);
|
2024-03-22 23:47:43 +08:00
|
|
|
void StartGame();
|
|
|
|
void InitGame();
|
2024-02-16 22:16:57 +08:00
|
|
|
BOOL IsGameLoaded();
|
2024-02-10 22:57:18 +08:00
|
|
|
|
2024-02-18 21:46:45 +08:00
|
|
|
void RequestModel(int iModelID, int iLoadingStream = 2);
|
|
|
|
void LoadRequestedModels();
|
|
|
|
BOOL IsModelLoaded(int iModelID);
|
|
|
|
|
|
|
|
void SetWorldWeather(int iWeatherID);
|
|
|
|
int GetWorldWeather();
|
|
|
|
void DisplayHud(BOOL bDisp);
|
|
|
|
BYTE IsHudEnabled();
|
|
|
|
void SetFrameLimiterOn(BOOL bLimiter);
|
|
|
|
BOOL IsFrameLimiterEnabled();
|
|
|
|
void EnableFrameLimiter();
|
|
|
|
void SetFrameLimit(DWORD dwLimit);
|
|
|
|
void SetMaxStats();
|
|
|
|
void DisableTrainTraffic();
|
|
|
|
void RefreshStreamingAt(float x, float y);
|
|
|
|
void RequestAnimation(char *szAnimFile);
|
|
|
|
int IsAnimationLoaded(char *szAnimFile);
|
|
|
|
void ReleaseAnimation(char *szAnimFile);
|
|
|
|
void ToggleRadar(int iToggle);
|
2024-02-27 23:37:45 +08:00
|
|
|
void DisplayGameText(char *szStr,int iTime,int iSize);
|
2024-02-10 22:57:18 +08:00
|
|
|
void SetGravity(float fGravity);
|
2024-07-23 16:57:24 -03:00
|
|
|
void EnableZoneNames(BYTE byteEnable);
|
2024-02-10 22:57:18 +08:00
|
|
|
void SetWantedLevel(BYTE byteLevel);
|
|
|
|
void SetGameTextCount(WORD wCount);
|
|
|
|
void DrawGangZone(float* fPos, DWORD dwColor);
|
2024-08-14 23:07:27 +08:00
|
|
|
void EnableStuntBonus(bool bEnable);
|
2024-02-21 18:54:22 +08:00
|
|
|
|
2024-02-27 23:37:45 +08:00
|
|
|
void DisableRaceCheckpoint();
|
|
|
|
|
2024-02-21 18:54:22 +08:00
|
|
|
DWORD CreateRadarMarkerIcon(int iMarkerType, float fX, float fY, float fZ, DWORD dwColor, int iStyle);
|
2024-02-21 18:58:07 +08:00
|
|
|
void DisableMarker(DWORD dwMarkerID);
|
2024-02-21 18:54:22 +08:00
|
|
|
|
2024-02-27 23:37:45 +08:00
|
|
|
void AddToLocalMoney(int iAmount);
|
|
|
|
int GetLocalMoney();
|
|
|
|
|
|
|
|
BYTE GetActiveInterior();
|
|
|
|
void UpdateFarClippingPlane();
|
|
|
|
|
2024-02-01 00:11:46 +08:00
|
|
|
DWORD GetD3DDevice();
|
|
|
|
|
2024-02-18 22:05:04 +08:00
|
|
|
DWORD GetD3D() { return *(DWORD *)ADDR_ID3D9DEVICE; };
|
|
|
|
|
2023-11-08 20:10:20 +08:00
|
|
|
HWND GetMainWindowHwnd() { return *(HWND *)ADDR_HWND; };
|
|
|
|
|
2024-03-22 23:47:43 +08:00
|
|
|
void RestartEverything();
|
2024-07-28 23:07:04 +08:00
|
|
|
void ProcessInputDisabling();
|
2024-03-22 23:47:43 +08:00
|
|
|
|
|
|
|
//-----------------------------------------------------------
|
|
|
|
|
2024-07-24 17:01:39 +08:00
|
|
|
void FUNC_10062570() { field_55++; };
|
2024-04-17 22:48:54 +08:00
|
|
|
|
2024-02-15 22:41:04 +08:00
|
|
|
CPlayerPed *FindPlayerPed() {
|
|
|
|
if(m_pGamePlayer==NULL) m_pGamePlayer = new CPlayerPed();
|
|
|
|
return m_pGamePlayer;
|
|
|
|
};
|
2023-11-01 21:24:45 +08:00
|
|
|
|
2024-02-19 21:08:29 +08:00
|
|
|
const PCHAR GetWeaponName(int iWeaponID);
|
|
|
|
|
2024-08-14 23:06:11 +08:00
|
|
|
DWORD CreateWeaponPickup(int iModel, DWORD dwAmmo, float fX, float fY, float fZ);
|
|
|
|
|
2024-03-22 23:47:43 +08:00
|
|
|
int GetScreenWidth() { return *(int*)0xC17044; };
|
|
|
|
int GetScreenHeight() { return *(int*)0xC17048; };
|
|
|
|
|
|
|
|
DWORD GetWeaponInfo(int iWeapon, int iUnk);
|
2024-08-14 23:08:30 +08:00
|
|
|
void DisableEnterExits();
|
2024-02-10 22:57:18 +08:00
|
|
|
|
2023-10-23 23:04:28 +08:00
|
|
|
CGame();
|
2023-11-15 18:49:21 +08:00
|
|
|
|
|
|
|
void sub_100A0010();
|
2024-02-07 23:50:57 +08:00
|
|
|
void sub_100A0090(int a1, int a2);
|
|
|
|
BYTE sub_100A00C0();
|
|
|
|
BYTE sub_100A00F0();
|
2023-11-15 18:49:21 +08:00
|
|
|
void sub_100A0110();
|
|
|
|
void sub_100A0210();
|
|
|
|
void sub_100A0250();
|
|
|
|
void sub_100A02E0();
|
|
|
|
void sub_100A0310();
|
|
|
|
void sub_100A0330();
|
|
|
|
|
|
|
|
void sub_100A1C10();
|
2024-08-14 23:09:34 +08:00
|
|
|
|
|
|
|
void LoadScene(char* szScene);
|
2024-08-14 23:10:17 +08:00
|
|
|
int GetMemoryUsedForStreaming();
|
2024-08-14 23:11:20 +08:00
|
|
|
int GetMemoryAvailableForStreaming();
|
2023-10-23 23:04:28 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
//-----------------------------------------------------------
|