mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 00:30:06 +00:00
New updates for Hud.cpp and more.
This commit is contained in:
parent
8b55b8b144
commit
92cc1cf3af
|
@ -14,8 +14,7 @@
|
||||||
const float DefaultFOV = 80.0f; // actually 70.0f
|
const float DefaultFOV = 80.0f; // actually 70.0f
|
||||||
|
|
||||||
CCamera &TheCamera = *(CCamera*)0x6FACF8;
|
CCamera &TheCamera = *(CCamera*)0x6FACF8;
|
||||||
|
Bool &CCamera::m_bUseMouse3rdPerson = *(Bool *)0x5F03D8;
|
||||||
WRAPPER Bool CCam::Using3rdPersonMouseCam() { EAXJMP(0x457460); }
|
|
||||||
|
|
||||||
WRAPPER void CCamera::DrawBordersForWideScreen(void) { EAXJMP(0x46B430); }
|
WRAPPER void CCamera::DrawBordersForWideScreen(void) { EAXJMP(0x46B430); }
|
||||||
|
|
||||||
|
@ -1250,6 +1249,14 @@ CCam::FixCamWhenObscuredByVehicle(const CVector &TargetCoors)
|
||||||
Source.z += HeightFixerCarsObscuring;
|
Source.z += HeightFixerCarsObscuring;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CCam::Using3rdPersonMouseCam() {
|
||||||
|
return CCamera::m_bUseMouse3rdPerson &&
|
||||||
|
(Mode == MODE_FOLLOWPED ||
|
||||||
|
TheCamera.m_bPlayerIsInGarage &&
|
||||||
|
FindPlayerPed() && FindPlayerPed()->m_nPedState != PED_DRIVING &&
|
||||||
|
Mode != MODE_TOPDOWN1 && this->CamTargetEntity == FindPlayerPed());
|
||||||
|
}
|
||||||
|
|
||||||
STARTPATCHES
|
STARTPATCHES
|
||||||
InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP);
|
InjectHook(0x42C760, &CCamera::IsSphereVisible, PATCH_JUMP);
|
||||||
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
|
InjectHook(0x46FD00, &CCamera::SetFadeColour, PATCH_JUMP);
|
||||||
|
|
|
@ -161,7 +161,6 @@ struct CCam
|
||||||
CPed *m_pLastPedLookedAt;// So interpolation works
|
CPed *m_pLastPedLookedAt;// So interpolation works
|
||||||
bool m_bFirstPersonRunAboutActive;
|
bool m_bFirstPersonRunAboutActive;
|
||||||
|
|
||||||
Bool Using3rdPersonMouseCam();
|
|
||||||
|
|
||||||
void GetVectorsReadyForRW(void);
|
void GetVectorsReadyForRW(void);
|
||||||
CVector DoAverageOnVector(const CVector &vec);
|
CVector DoAverageOnVector(const CVector &vec);
|
||||||
|
@ -172,6 +171,7 @@ struct CCam
|
||||||
bool FixCamIfObscured(CVector &TargetCoors, float TargetHeight, float TargetOrientation);
|
bool FixCamIfObscured(CVector &TargetCoors, float TargetHeight, float TargetOrientation);
|
||||||
void Cam_On_A_String_Unobscured(const CVector &TargetCoors, float BaseDist);
|
void Cam_On_A_String_Unobscured(const CVector &TargetCoors, float BaseDist);
|
||||||
void FixCamWhenObscuredByVehicle(const CVector &TargetCoors);
|
void FixCamWhenObscuredByVehicle(const CVector &TargetCoors);
|
||||||
|
bool Using3rdPersonMouseCam();
|
||||||
|
|
||||||
void Process_Debug(float *vec, float a, float b, float c);
|
void Process_Debug(float *vec, float a, float b, float c);
|
||||||
void Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, float, float);
|
void Process_FollowPed(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||||
|
@ -439,6 +439,7 @@ int m_iModeObbeCamIsInForCar;
|
||||||
uint32 m_uiFadeTimeStarted;
|
uint32 m_uiFadeTimeStarted;
|
||||||
uint32 m_uiFadeTimeStartedMusic;
|
uint32 m_uiFadeTimeStartedMusic;
|
||||||
|
|
||||||
|
static Bool &m_bUseMouse3rdPerson;
|
||||||
|
|
||||||
CMatrix &GetCameraMatrix(void) { return m_cameraMatrix; }
|
CMatrix &GetCameraMatrix(void) { return m_cameraMatrix; }
|
||||||
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
|
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
|
||||||
|
|
|
@ -2,15 +2,30 @@
|
||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
|
|
||||||
int &CMenuManager::OS_Language = *(int*)0x5F2F78;
|
int32 &CMenuManager::OS_Language = *(int32*)0x5F2F78;
|
||||||
int &CMenuManager::m_PrefsBrightness = *(int*)0x5F2E50;
|
int8 &CMenuManager::m_PrefsUseVibration = *(int8*)0x95CD92;
|
||||||
int &CMenuManager::m_PrefsLanguage = *(int*)0x941238;
|
int8 &CMenuManager::m_DisplayControllerOnFoot = *(int8*)0x95CD8D;
|
||||||
bool &CMenuManager::m_PrefsUseWideScreen = *(bool*)0x95CD23;
|
int8 &CMenuManager::m_PrefsVsync = *(int8*)0x5F2E58;
|
||||||
Bool &CMenuManager::m_PrefsVsync = *(Bool*)0x5F2E58;
|
int8 &CMenuManager::m_PrefsVsyncDisp = *(int8*)0x5F2E5C;
|
||||||
|
int8 &CMenuManager::m_PrefsFrameLimiter = *(int8*)0x5F2E60;
|
||||||
|
int8 &CMenuManager::BlurOn = *(int8*)0x95CDAD;
|
||||||
|
int8 &CMenuManager::m_PrefsShowSubtitles = *(int8*)0x5F2E54;
|
||||||
|
int8 &CMenuManager::m_PrefsSpeakers = *(int8*)0x95CD7E;
|
||||||
|
int8 &CMenuManager::m_ControlMethod = *(int8*)0x8F5F7C;
|
||||||
|
int8 &CMenuManager::m_PrefsDMA = *(int8*)0x5F2F74;
|
||||||
|
int8 &CMenuManager::m_PrefsLanguage = *(int8*)0x941238;
|
||||||
|
|
||||||
Bool &CMenuManager::m_PrefsAllowNastyGame = *(Bool*)0x5F2E64;
|
Bool &CMenuManager::m_PrefsAllowNastyGame = *(Bool*)0x5F2E64;
|
||||||
Bool &CMenuManager::m_bStartUpFrontEndRequested = *(Bool*)0x95CCF4;
|
Bool &CMenuManager::m_bStartUpFrontEndRequested = *(Bool*)0x95CCF4;
|
||||||
Bool &CMenuManager::m_PrefsFrameLimiter = *(Bool*)0x5F2E60;
|
|
||||||
Bool &CMenuManager::m_PrefsUseVibration = *(Bool*)0x95CD92;
|
int8 &CMenuManager::m_PrefsUseWideScreen = *(int8*)0x95CD23;
|
||||||
|
int8 &CMenuManager::m_PrefsRadioStation = *(int8*)0x95CDA4;
|
||||||
|
int8 &CMenuManager::m_bDisableMouseSteering = *(int8*)0x60252C;
|
||||||
|
int32 &CMenuManager::m_PrefsBrightness = *(int32*)0x5F2E50;
|
||||||
|
Float &CMenuManager::m_PrefsLOD = *(Float*)0x8F42C4;
|
||||||
|
int8 &CMenuManager::m_bFrontEnd_ReloadObrTxtGxt = *(int8*)0x628CFC;
|
||||||
|
int32 &CMenuManager::m_PrefsMusicVolume = *(int32*)0x5F2E4C;
|
||||||
|
int32 &CMenuManager::m_PrefsSfxVolume = *(int32*)0x5F2E48;
|
||||||
|
|
||||||
CMenuManager &FrontEndMenuManager = *(CMenuManager*)0x8F59D8;
|
CMenuManager &FrontEndMenuManager = *(CMenuManager*)0x8F59D8;
|
||||||
|
|
||||||
|
@ -20,3 +35,19 @@ WRAPPER void CMenuManager::UnloadTextures(void) { EAXJMP(0x47A440); }
|
||||||
WRAPPER void CMenuManager::LoadAllTextures(void) { EAXJMP(0x47A230); }
|
WRAPPER void CMenuManager::LoadAllTextures(void) { EAXJMP(0x47A230); }
|
||||||
WRAPPER void CMenuManager::LoadSettings(void) { EAXJMP(0x488EE0); }
|
WRAPPER void CMenuManager::LoadSettings(void) { EAXJMP(0x488EE0); }
|
||||||
WRAPPER void CMenuManager::WaitForUserCD(void) { EAXJMP(0x48ADD0); }
|
WRAPPER void CMenuManager::WaitForUserCD(void) { EAXJMP(0x48ADD0); }
|
||||||
|
|
||||||
|
int CMenuManager::FadeIn(int alpha) {
|
||||||
|
if (FrontEndMenuManager.m_nCurrScreen == MENU_LOADING_IN_PROGRESS ||
|
||||||
|
FrontEndMenuManager.m_nCurrScreen == MENU_SAVING_IN_PROGRESS ||
|
||||||
|
FrontEndMenuManager.m_nCurrScreen == MENU_DELETING)
|
||||||
|
return alpha;
|
||||||
|
|
||||||
|
if (FrontEndMenuManager.m_nMenuFadeAlpha >= alpha)
|
||||||
|
return alpha;
|
||||||
|
|
||||||
|
return FrontEndMenuManager.m_nMenuFadeAlpha;
|
||||||
|
}
|
||||||
|
|
||||||
|
STARTPATCHES
|
||||||
|
InjectHook(0x48AC60, &CMenuManager::FadeIn, PATCH_JUMP);
|
||||||
|
ENDPATCHES
|
|
@ -10,6 +10,68 @@ enum {
|
||||||
LANGUAGE_SPANISH,
|
LANGUAGE_SPANISH,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum eMenuScreen {
|
||||||
|
MENU_NONE = 0,
|
||||||
|
MENU_STATS = 1,
|
||||||
|
MENU_NEW_GAME = 2,
|
||||||
|
MENU_BRIEFS = 3,
|
||||||
|
MENU_CONTROLLER_SETTINGS = 4,
|
||||||
|
MENU_SOUND_SETTINGS = 5,
|
||||||
|
MENU_GRAPHICS_SETTINGS = 6,
|
||||||
|
MENU_LANGUAGE_SETTINGS = 7,
|
||||||
|
MENU_CHOOSE_LOAD_SLOT = 8,
|
||||||
|
MENU_CHOOSE_DELETE_SLOT = 9,
|
||||||
|
MENU_NEW_GAME_RELOAD = 10,
|
||||||
|
MENU_LOAD_SLOT_CONFIRM = 11,
|
||||||
|
MENU_DELETE_SLOT_CONFIRM = 12,
|
||||||
|
MENU_13 = 13,
|
||||||
|
MENU_LOADING_IN_PROGRESS = 14,
|
||||||
|
MENU_DELETING_IN_PROGRESS = 15,
|
||||||
|
MENU_16 = 16,
|
||||||
|
MENU_DELETE_FAILED = 17,
|
||||||
|
MENU_DEBUG_MENU = 18,
|
||||||
|
MENU_MEMORY_CARD_1 = 19,
|
||||||
|
MENU_MEMORY_CARD_2 = 20,
|
||||||
|
MENU_MULTIPLAYER_MAIN = 21,
|
||||||
|
MENU_SAVE_FAILED_1 = 22,
|
||||||
|
MENU_SAVE_FAILED_2 = 23,
|
||||||
|
MENU_SAVE = 24,
|
||||||
|
MENU_NO_MEMORY_CARD = 25,
|
||||||
|
MENU_CHOOSE_SAVE_SLOT = 26,
|
||||||
|
MENU_SAVE_OVERWRITE_CONFIRM = 27,
|
||||||
|
MENU_MULTIPLAYER_MAP = 28,
|
||||||
|
MENU_MULTIPLAYER_CONNECTION = 29,
|
||||||
|
MENU_MULTIPLAYER_FIND_GAME = 30,
|
||||||
|
MENU_MULTIPLAYER_MODE = 31,
|
||||||
|
MENU_MULTIPLAYER_CREATE = 32,
|
||||||
|
MENU_MULTIPLAYER_START = 33,
|
||||||
|
MENU_SKIN_SELECT_OLD = 34,
|
||||||
|
MENU_CONTROLLER_PC = 35,
|
||||||
|
MENU_CONTROLLER_PC_OLD1 = 36,
|
||||||
|
MENU_CONTROLLER_PC_OLD2 = 37,
|
||||||
|
MENU_CONTROLLER_PC_OLD3 = 38,
|
||||||
|
MENU_CONTROLLER_PC_OLD4 = 39,
|
||||||
|
MENU_CONTROLLER_DEBUG = 40,
|
||||||
|
MENU_OPTIONS = 41,
|
||||||
|
MENU_EXIT = 42,
|
||||||
|
MENU_SAVING_IN_PROGRESS = 43,
|
||||||
|
MENU_SAVE_SUCCESSFUL = 44,
|
||||||
|
MENU_DELETING = 45,
|
||||||
|
MENU_DELETE_SUCCESS = 46,
|
||||||
|
MENU_SAVE_FAILED = 47,
|
||||||
|
MENU_LOAD_FAILED = 48,
|
||||||
|
MENU_LOAD_FAILED_2 = 49,
|
||||||
|
MENU_FILTER_GAME = 50,
|
||||||
|
MENU_START_MENU = 51,
|
||||||
|
MENU_PAUSE_MENU = 52,
|
||||||
|
MENU_CHOOSE_MODE = 53,
|
||||||
|
MENU_SKIN_SELECT = 54,
|
||||||
|
MENU_KEYBOARD_CONTROLS = 55,
|
||||||
|
MENU_MOUSE_CONTROLS = 56,
|
||||||
|
MENU_57 = 57,
|
||||||
|
MENU_58 = 58,
|
||||||
|
};
|
||||||
|
|
||||||
struct tSkinInfo
|
struct tSkinInfo
|
||||||
{
|
{
|
||||||
int field_0;
|
int field_0;
|
||||||
|
@ -83,15 +145,29 @@ public:
|
||||||
int m_nCurrSaveSlot;
|
int m_nCurrSaveSlot;
|
||||||
int m_nScreenChangeDelayTimer;
|
int m_nScreenChangeDelayTimer;
|
||||||
|
|
||||||
static int &OS_Language;
|
static int32 &OS_Language;
|
||||||
static int &m_PrefsBrightness;
|
static int8 &m_PrefsUseVibration;
|
||||||
static int &m_PrefsLanguage;
|
static int8 &m_DisplayControllerOnFoot;
|
||||||
static bool &m_PrefsUseWideScreen;
|
static int8 &m_PrefsUseWideScreen;
|
||||||
static Bool &m_PrefsVsync;
|
static int8 &m_PrefsRadioStation;
|
||||||
|
static int8 &m_PrefsVsync;
|
||||||
|
static int8 &m_PrefsVsyncDisp;
|
||||||
|
static int8 &m_PrefsFrameLimiter;
|
||||||
|
static int8 &BlurOn;
|
||||||
|
static int8 &m_PrefsShowSubtitles;
|
||||||
|
static int8 &m_PrefsSpeakers;
|
||||||
|
static int8 &m_ControlMethod;
|
||||||
|
static int8 &m_PrefsDMA;
|
||||||
|
static int8 &m_PrefsLanguage;
|
||||||
|
static int8 &m_bDisableMouseSteering;
|
||||||
|
static int32 &m_PrefsBrightness;
|
||||||
|
static Float &m_PrefsLOD;
|
||||||
|
static int8 &m_bFrontEnd_ReloadObrTxtGxt;
|
||||||
|
static int32 &m_PrefsMusicVolume;
|
||||||
|
static int32 &m_PrefsSfxVolume;
|
||||||
|
|
||||||
static Bool &m_PrefsAllowNastyGame;
|
static Bool &m_PrefsAllowNastyGame;
|
||||||
static Bool &m_bStartUpFrontEndRequested;
|
static Bool &m_bStartUpFrontEndRequested;
|
||||||
static Bool &m_PrefsFrameLimiter;
|
|
||||||
static Bool &m_PrefsUseVibration;
|
|
||||||
|
|
||||||
void Process(void);
|
void Process(void);
|
||||||
void DrawFrontEnd(void);
|
void DrawFrontEnd(void);
|
||||||
|
@ -99,7 +175,9 @@ public:
|
||||||
void LoadAllTextures(void);
|
void LoadAllTextures(void);
|
||||||
void LoadSettings(void);
|
void LoadSettings(void);
|
||||||
void WaitForUserCD(void);
|
void WaitForUserCD(void);
|
||||||
|
int FadeIn(int alpha);
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
||||||
|
|
||||||
extern CMenuManager &FrontEndMenuManager;
|
extern CMenuManager &FrontEndMenuManager;
|
||||||
|
|
|
@ -4,3 +4,12 @@
|
||||||
|
|
||||||
WRAPPER void CMessages::Display(void) { EAXJMP(0x529800); }
|
WRAPPER void CMessages::Display(void) { EAXJMP(0x529800); }
|
||||||
WRAPPER void CMessages::ClearAllMessagesDisplayedByGame(void) { EAXJMP(0x52B670); }
|
WRAPPER void CMessages::ClearAllMessagesDisplayedByGame(void) { EAXJMP(0x52B670); }
|
||||||
|
WRAPPER int CMessages::WideStringCopy(wchar* dst, wchar* src, unsigned short size) { EAXJMP(0x5294B0); }
|
||||||
|
WRAPPER char CMessages::WideStringCompare(wchar* str1, wchar* str2, unsigned short size) { EAXJMP(0x529510); }
|
||||||
|
WRAPPER void CMessages::InsertNumberInString(wchar* src, int n1, int n2, int n3, int n4, int n5, int n6, wchar* dst) { EAXJMP(0x52A1A0); }
|
||||||
|
WRAPPER void CMessages::InsertPlayerControlKeysInString(wchar* src) { EAXJMP(0x52A490); }
|
||||||
|
WRAPPER int CMessages::GetWideStringLength(wchar* src) { EAXJMP(0x529490); }
|
||||||
|
|
||||||
|
tPreviousBrief *CMessages::PreviousBriefs = (tPreviousBrief *)0x713C08;
|
||||||
|
tMessage *CMessages::BriefMessages = (tMessage *)0x8786E0;
|
||||||
|
tBigMessage *CMessages::BIGMessages = (tBigMessage *)0x773628;
|
||||||
|
|
|
@ -1,8 +1,44 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class CMessages
|
struct tMessage
|
||||||
{
|
{
|
||||||
|
wchar *m_pText;
|
||||||
|
uint16 m_nFlag;
|
||||||
|
private:
|
||||||
|
int8 _pad6[2];
|
||||||
|
public:
|
||||||
|
uint32 m_nTime;
|
||||||
|
uint32 m_nStartTime;
|
||||||
|
int32 m_nNumber[6];
|
||||||
|
wchar *m_pString;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tBigMessage
|
||||||
|
{
|
||||||
|
tMessage m_Current;
|
||||||
|
tMessage m_Stack[3];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tPreviousBrief
|
||||||
|
{
|
||||||
|
wchar *m_pText;
|
||||||
|
int32 m_nNumber[6];
|
||||||
|
wchar *m_pString;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CMessages
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static tPreviousBrief *PreviousBriefs;
|
||||||
|
static tMessage *BriefMessages;
|
||||||
|
static tBigMessage *BIGMessages;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void Display(void);
|
static void Display(void);
|
||||||
static void ClearAllMessagesDisplayedByGame(void);
|
static void ClearAllMessagesDisplayedByGame(void);
|
||||||
|
static int WideStringCopy(wchar* dst, wchar* src, unsigned short size);
|
||||||
|
static char WideStringCompare(wchar* str1, wchar* str2, unsigned short size);
|
||||||
|
static void InsertNumberInString(wchar* src, int n1, int n2, int n3, int n4, int n5, int n6, wchar* dst);
|
||||||
|
static void InsertPlayerControlKeysInString(wchar* src);
|
||||||
|
static int GetWideStringLength(wchar *src);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,47 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "Radar.h"
|
#include "Radar.h"
|
||||||
|
#include "Camera.h"
|
||||||
|
#include "Hud.h"
|
||||||
|
#include "World.h"
|
||||||
|
#include "Frontend.h"
|
||||||
|
|
||||||
WRAPPER void CRadar::ClearBlipForEntity(eBlipType type, int32 id) { EAXJMP(0x4A56C0); }
|
WRAPPER void CRadar::ClearBlipForEntity(eBlipType type, int32 id) { EAXJMP(0x4A56C0); }
|
||||||
|
WRAPPER void CRadar::Draw3dMarkers() { EAXJMP(0x4A4C70); }
|
||||||
|
//WRAPPER void CRadar::DrawMap () { EAXJMP(0x4A4200); }
|
||||||
|
WRAPPER void CRadar::DrawBlips() { EAXJMP(0x4A42F0); }
|
||||||
|
WRAPPER void CRadar::DrawRadarMap() { EAXJMP(0x4A6C20); }
|
||||||
|
|
||||||
|
Float &CRadar::m_RadarRange = *(Float*)0x8E281C;
|
||||||
|
CVector2D &CRadar::vec2DRadarOrigin = *(CVector2D*)0x6299B8;
|
||||||
|
|
||||||
|
void CRadar::DrawMap() {
|
||||||
|
if (!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud) {
|
||||||
|
if (FindPlayerVehicle()) {
|
||||||
|
if (FindPlayerVehicle()->GetSpeed().Magnitude() > 0.3f) {
|
||||||
|
if (FindPlayerVehicle()->GetSpeed().Magnitude() > 0.9f)
|
||||||
|
CRadar::m_RadarRange = 350.0f;
|
||||||
|
else
|
||||||
|
CRadar::m_RadarRange = (FindPlayerVehicle()->GetSpeed().Magnitude() + 0.3f) * 200.0f;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CRadar::m_RadarRange = 120.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CRadar::m_RadarRange = 120.0f;
|
||||||
|
}
|
||||||
|
vec2DRadarOrigin.x = FindPlayerCentreOfWorld_NoSniperShift().x;
|
||||||
|
vec2DRadarOrigin.y = FindPlayerCentreOfWorld_NoSniperShift().y;
|
||||||
|
CRadar::DrawRadarMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CRadar::TransformRadarPointToScreenSpace(CVector2D *out, CVector2D *in) {
|
||||||
|
out->x = in->x * SCREEN_STRETCH_X(47.0f) + SCREEN_STRETCH_X(47.0f + 20.0f);
|
||||||
|
out->y = (SCREEN_STRETCH_Y(76.0f)) * 0.5f + RsGlobal.height - (SCREEN_STRETCH_Y(123.0f)) - in->y * (SCREEN_STRETCH_Y(76.0f)) * 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
STARTPATCHES
|
||||||
|
InjectHook(0x4A5040, CRadar::TransformRadarPointToScreenSpace, PATCH_JUMP);
|
||||||
|
ENDPATCHES
|
10
src/Radar.h
10
src/Radar.h
|
@ -1,4 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "Sprite2d.h"
|
||||||
|
|
||||||
enum eBlipType
|
enum eBlipType
|
||||||
{
|
{
|
||||||
|
@ -12,6 +13,15 @@ enum eBlipType
|
||||||
|
|
||||||
class CRadar
|
class CRadar
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
static Float &m_RadarRange;
|
||||||
|
static CVector2D &vec2DRadarOrigin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void ClearBlipForEntity(eBlipType type, int32 id);
|
static void ClearBlipForEntity(eBlipType type, int32 id);
|
||||||
|
static void Draw3dMarkers();
|
||||||
|
static void DrawMap();
|
||||||
|
static void TransformRadarPointToScreenSpace(CVector2D * out, CVector2D * in);
|
||||||
|
static void DrawBlips();
|
||||||
|
static void DrawRadarMap();
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,6 +20,7 @@ public:
|
||||||
static uint32 GetTimeInMilliseconds(void) { return m_snTimeInMilliseconds; }
|
static uint32 GetTimeInMilliseconds(void) { return m_snTimeInMilliseconds; }
|
||||||
|
|
||||||
static inline Bool GetIsPaused() { return m_UserPause || m_CodePause; }
|
static inline Bool GetIsPaused() { return m_UserPause || m_CodePause; }
|
||||||
|
static inline Bool GetIsUserPaused() { return m_UserPause; }
|
||||||
static inline void SetTimeScale(Float ts) { ms_fTimeScale = ts; }
|
static inline void SetTimeScale(Float ts) { ms_fTimeScale = ts; }
|
||||||
|
|
||||||
static void Initialise(void);
|
static void Initialise(void);
|
||||||
|
|
3
src/Wanted.cpp
Normal file
3
src/Wanted.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#include "common.h"
|
||||||
|
#include "patcher.h"
|
||||||
|
#include "Wanted.h"
|
83
src/Wanted.h
Normal file
83
src/Wanted.h
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
#pragma once
|
||||||
|
#include "Entity.h"
|
||||||
|
#include "math/Vector.h"
|
||||||
|
|
||||||
|
enum eCrimeType {
|
||||||
|
CRIME_NONE,
|
||||||
|
CRIME_SHOT_FIRED,
|
||||||
|
CRIME_PED_FIGHT,
|
||||||
|
CRIME_COP_FIGHT,
|
||||||
|
CRIME_DAMAGED_PED,
|
||||||
|
CRIME_DAMAGED_COP,
|
||||||
|
CRIME_CAR_THEFT,
|
||||||
|
CRIME_CRIME7,
|
||||||
|
CRIME_COP_EVASIVE_DIVE,
|
||||||
|
CRIME_COP_EVASIVE_DIVE2,
|
||||||
|
CRIME_PED_RUN_OVER,
|
||||||
|
CRIME_COP_RUN_OVER,
|
||||||
|
CRIME_DESTROYED_HELI,
|
||||||
|
CRIME_PED_BURNED,
|
||||||
|
CRIME_COP_BURNED,
|
||||||
|
CRIME_VEHICLE_BURNED,
|
||||||
|
CRIME_DESTROYED_CESSNA,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum eCopType {
|
||||||
|
COP_STREET = 0,
|
||||||
|
COP_FBI = 1,
|
||||||
|
COP_SWAT = 2,
|
||||||
|
COP_ARMY = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCrime {
|
||||||
|
public:
|
||||||
|
eCrimeType m_eCrimeType;
|
||||||
|
CEntity *m_pVictim;
|
||||||
|
int32 m_nCrimeTime;
|
||||||
|
CVector m_vecCrimePos;
|
||||||
|
int8 m_bReported;
|
||||||
|
int8 m_bMultiplier;
|
||||||
|
int8 pad_20[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCopPed {
|
||||||
|
public:
|
||||||
|
int16 m_wRoadblockNode;
|
||||||
|
int8 field_1342;
|
||||||
|
int8 field_1343;
|
||||||
|
Float m_fDistanceToTarget;
|
||||||
|
int8 m_bIsInPursuit;
|
||||||
|
int8 m_bIsDisabledCop;
|
||||||
|
int8 field_1350;
|
||||||
|
int8 field_1351;
|
||||||
|
int8 m_bZoneDisabledButClose;
|
||||||
|
int8 m_bZoneDisabled;
|
||||||
|
int8 field_1354;
|
||||||
|
int8 field_1355;
|
||||||
|
int32 field_1356;
|
||||||
|
eCopType m_nCopType;
|
||||||
|
int8 field_1364;
|
||||||
|
int8 field_1365;
|
||||||
|
int8 field_1366;
|
||||||
|
int8 field_1367;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CWanted {
|
||||||
|
public:
|
||||||
|
int32 m_nChaos;
|
||||||
|
int32 m_nLastUpdateTime;
|
||||||
|
int32 m_nLastWantedLevelChange;
|
||||||
|
Float m_fCrimeSensitivity;
|
||||||
|
uint8 m_bCurrentCops;
|
||||||
|
uint8 m_bMaxCops;
|
||||||
|
uint8 m_bMaximumLawEnforcerVehicles;
|
||||||
|
int8 field_19;
|
||||||
|
int16 m_wRoadblockDensity;
|
||||||
|
uint8 m_bFlags;
|
||||||
|
int8 field_23;
|
||||||
|
int32 m_nWantedLevel;
|
||||||
|
CCrime m_sCrimes[16];
|
||||||
|
CCopPed *m_pCops[10];
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(CWanted) == 0x204, "CWanted: error");
|
|
@ -12,6 +12,8 @@ CPtrList &CWorld::ms_listMovingEntityPtrs = *(CPtrList*)0x8F433C;
|
||||||
CSector (*CWorld::ms_aSectors)[NUMSECTORS_X] = (CSector (*)[NUMSECTORS_Y])0x665608;
|
CSector (*CWorld::ms_aSectors)[NUMSECTORS_X] = (CSector (*)[NUMSECTORS_Y])0x665608;
|
||||||
uint16 &CWorld::ms_nCurrentScanCode = *(uint16*)0x95CC64;
|
uint16 &CWorld::ms_nCurrentScanCode = *(uint16*)0x95CC64;
|
||||||
|
|
||||||
|
uint8 &CWorld::PlayerInFocus = *(uint8 *)0x95CD61;
|
||||||
|
CPlayerInfo *CWorld::Players = (CPlayerInfo *)0x9412F0;
|
||||||
bool &CWorld::bNoMoreCollisionTorque = *(bool*)0x95CDCC;
|
bool &CWorld::bNoMoreCollisionTorque = *(bool*)0x95CDCC;
|
||||||
CEntity *&CWorld::pIgnoreEntity = *(CEntity**)0x8F6494;
|
CEntity *&CWorld::pIgnoreEntity = *(CEntity**)0x8F6494;
|
||||||
bool &CWorld::bIncludeDeadPeds = *(bool*)0x95CD8F;
|
bool &CWorld::bIncludeDeadPeds = *(bool*)0x95CD8F;
|
||||||
|
@ -588,3 +590,6 @@ WRAPPER CPed *FindPlayerPed(void) { EAXJMP(0x4A1150); }
|
||||||
WRAPPER CVector &FindPlayerCoors(CVector &v) { EAXJMP(0x4A1030); }
|
WRAPPER CVector &FindPlayerCoors(CVector &v) { EAXJMP(0x4A1030); }
|
||||||
WRAPPER CVehicle *FindPlayerVehicle(void) { EAXJMP(0x4A10C0); }
|
WRAPPER CVehicle *FindPlayerVehicle(void) { EAXJMP(0x4A10C0); }
|
||||||
WRAPPER CVehicle *FindPlayerTrain(void) { EAXJMP(0x4A1120); }
|
WRAPPER CVehicle *FindPlayerTrain(void) { EAXJMP(0x4A1120); }
|
||||||
|
WRAPPER CVector FindPlayerSpeed(void) { EAXJMP(0x4A1090); }
|
||||||
|
WRAPPER CVector FindPlayerCentreOfWorld_NoSniperShift(void) { EAXJMP(0x4A11C0); }
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Lists.h"
|
#include "Lists.h"
|
||||||
|
#include "PlayerInfo.h"
|
||||||
|
|
||||||
/* Sectors span from -2000 to 2000 in x and y.
|
/* Sectors span from -2000 to 2000 in x and y.
|
||||||
* With 100x100 sectors, each is 40x40 units. */
|
* With 100x100 sectors, each is 40x40 units. */
|
||||||
|
@ -45,6 +46,8 @@ class CWorld
|
||||||
static uint16 &ms_nCurrentScanCode;
|
static uint16 &ms_nCurrentScanCode;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static uint8 &PlayerInFocus;
|
||||||
|
static CPlayerInfo *Players;
|
||||||
static CEntity *&pIgnoreEntity;
|
static CEntity *&pIgnoreEntity;
|
||||||
static bool &bIncludeDeadPeds;
|
static bool &bIncludeDeadPeds;
|
||||||
static bool &bNoMoreCollisionTorque;
|
static bool &bNoMoreCollisionTorque;
|
||||||
|
@ -95,3 +98,5 @@ CPed *FindPlayerPed(void);
|
||||||
CVector &FindPlayerCoors(CVector &v);
|
CVector &FindPlayerCoors(CVector &v);
|
||||||
CVehicle *FindPlayerVehicle(void);
|
CVehicle *FindPlayerVehicle(void);
|
||||||
CVehicle *FindPlayerTrain(void);
|
CVehicle *FindPlayerTrain(void);
|
||||||
|
CVector FindPlayerSpeed(void);
|
||||||
|
CVector FindPlayerCentreOfWorld_NoSniperShift(void);
|
|
@ -1,5 +1,176 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
enum eSound {
|
||||||
|
SOUND_CAR_DOOR_CLOSE_BONNET = 0,
|
||||||
|
SOUND_CAR_DOOR_CLOSE_BUMPER = 1,
|
||||||
|
SOUND_CAR_DOOR_CLOSE_FRONT_LEFT = 2,
|
||||||
|
SOUND_CAR_DOOR_CLOSE_FRONT_RIGHT = 3,
|
||||||
|
SOUND_CAR_DOOR_CLOSE_BACK_LEFT = 4,
|
||||||
|
SOUND_CAR_DOOR_CLOSE_BACK_RIGHT = 5,
|
||||||
|
SOUND_CAR_DOOR_OPEN_BONNET = 6,
|
||||||
|
SOUND_CAR_DOOR_OPEN_BUMPER = 7,
|
||||||
|
SOUND_CAR_DOOR_OPEN_FRONT_LEFT = 8,
|
||||||
|
SOUND_CAR_DOOR_OPEN_FRONT_RIGHT = 9,
|
||||||
|
SOUND_CAR_DOOR_OPEN_BACK_LEFT = 10,
|
||||||
|
SOUND_CAR_DOOR_OPEN_BACK_RIGHT = 11,
|
||||||
|
SOUND_CAR_WINDSHIELD_CRACK = 12,
|
||||||
|
SOUND_CAR_JUMP = 13,
|
||||||
|
SOUND_E = 14,
|
||||||
|
SOUND_F = 15,
|
||||||
|
SOUND_CAR_ENGINE_START = 16,
|
||||||
|
SOUND_CAR_LIGHT_BREAK = 17,
|
||||||
|
SOUND_CAR_HYDRALIC_1 = 18,
|
||||||
|
SOUND_CAR_HYDRALIC_2 = 19,
|
||||||
|
SOUND_CAR_HYDRALIC_3 = 20,
|
||||||
|
SOUND_CAR_JERK = 21,
|
||||||
|
SOUND_CAR_SPLASH = 22,
|
||||||
|
SOUND_17 = 23,
|
||||||
|
SOUND_18 = 24,
|
||||||
|
SOUND_19 = 25,
|
||||||
|
SOUND_CAR_TANK_TURRET_ROTATE = 26,
|
||||||
|
SOUND_CAR_BOMB_TICK = 27,
|
||||||
|
SOUND_PLANE_ON_GROUND = 28,
|
||||||
|
SOUND_STEP_START = 29,
|
||||||
|
SOUND_STEP_END = 30,
|
||||||
|
SOUND_FALL_LAND = 31,
|
||||||
|
SOUND_FALL_COLLAPSE = 32,
|
||||||
|
SOUND_21 = 33,
|
||||||
|
SOUND_22 = 34,
|
||||||
|
SOUND_23 = 35,
|
||||||
|
SOUND_24 = 36,
|
||||||
|
SOUND_25 = 37,
|
||||||
|
SOUND_26 = 38,
|
||||||
|
SOUND_WEAPON_PUNCH_ATTACK = 39,
|
||||||
|
SOUND_28 = 40,
|
||||||
|
SOUND_29 = 41,
|
||||||
|
SOUND_2A = 42,
|
||||||
|
SOUND_2B = 43,
|
||||||
|
SOUND_2C = 44,
|
||||||
|
SOUND_2D = 45,
|
||||||
|
SOUND_WEAPON_BAT_ATTACK = 46,
|
||||||
|
SOUND_WEAPON_SHOT_FIRED = 47,
|
||||||
|
SOUND_WEAPON_RELOAD = 48,
|
||||||
|
SOUND_31 = 49,
|
||||||
|
SOUND_32 = 50,
|
||||||
|
SOUND_33 = 51,
|
||||||
|
SOUND_WEAPON_FLAMETHROWER_FIRE = 52,
|
||||||
|
SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM = 53,
|
||||||
|
SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM = 54,
|
||||||
|
SOUND_WEAPON_HIT_PED = 55,
|
||||||
|
SOUND_WEAPON_HIT_VEHICLE = 56,
|
||||||
|
SOUND_GARAGE_NO_MONEY = 57,
|
||||||
|
SOUND_GARAGE_BAD_VEHICLE = 58,
|
||||||
|
SOUND_GARAGE_OPENING = 59,
|
||||||
|
SOUND_3C = 60,
|
||||||
|
SOUND_GARAGE_BOMB1_SET = 61,
|
||||||
|
SOUND_GARAGE_BOMB2_SET = 62,
|
||||||
|
SOUND_GARAGE_BOMB3_SET = 63,
|
||||||
|
SOUND_40 = 64,
|
||||||
|
SOUND_41 = 65,
|
||||||
|
SOUND_GARAGE_VEHICLE_DECLINED = 66,
|
||||||
|
SOUND_GARAGE_VEHICLE_ACCEPTED = 67,
|
||||||
|
SOUND_GARAGE_DOOR_CLOSED = 68,
|
||||||
|
SOUND_GARAGE_DOOR_OPENED = 69,
|
||||||
|
SOUND_CRANE_PICKUP = 70,
|
||||||
|
SOUND_PICKUP_WEAPON_BOUGHT = 71,
|
||||||
|
SOUND_PICKUP_WEAPON = 72,
|
||||||
|
SOUND_PICKUP_HEALTH = 73,
|
||||||
|
SOUND_4A = 74,
|
||||||
|
SOUND_4B = 75,
|
||||||
|
SOUND_PICKUP_ADRENALINE = 76,
|
||||||
|
SOUND_PICKUP_ARMOUR = 77,
|
||||||
|
SOUND_PICKUP_BONUS = 78,
|
||||||
|
SOUND_PICKUP_MONEY = 79,
|
||||||
|
SOUND_PICKUP_HIDDEN_PACKAGE = 80,
|
||||||
|
SOUND_PICKUP_PACMAN_PILL = 81,
|
||||||
|
SOUND_PICKUP_PACMAN_PACKAGE = 82,
|
||||||
|
SOUND_PICKUP_FLOAT_PACKAGE = 83,
|
||||||
|
SOUND_BOMB_TIMED_ACTIVATED = 84,
|
||||||
|
SOUND_55 = 85,
|
||||||
|
SOUND_BOMB_ONIGNITION_ACTIVATED = 86,
|
||||||
|
SOUND_BOMB_TICK = 87,
|
||||||
|
SOUND_RAMPAGE_START = 88,
|
||||||
|
SOUND_RAMPAGE_ONGOING = 89,
|
||||||
|
SOUND_RAMPAGE_PASSED = 90,
|
||||||
|
SOUND_RAMPAGE_FAILED = 91,
|
||||||
|
SOUND_RAMPAGE_KILL = 92,
|
||||||
|
SOUND_RAMPAGE_CAR_BLOWN = 93,
|
||||||
|
SOUND_EVIDENCE_PICKUP = 94,
|
||||||
|
SOUND_UNLOAD_GOLD = 95,
|
||||||
|
SOUND_PAGER = 96,
|
||||||
|
SOUND_PED_DEATH = 97,
|
||||||
|
SOUND_PED_DAMAGE = 98,
|
||||||
|
SOUND_PED_63 = 99,
|
||||||
|
SOUND_PED_LAND = 100,
|
||||||
|
SOUND_PED_BULLET_HIT = 101,
|
||||||
|
SOUND_PED_BOMBER = 102,
|
||||||
|
SOUND_PED_BURNING = 103,
|
||||||
|
SOUND_PED_ARREST_FBI = 104,
|
||||||
|
SOUND_PED_ARREST_SWAT = 105,
|
||||||
|
SOUND_PED_ARREST_COP = 106,
|
||||||
|
SOUND_PED_HELI_PLAYER_FOUND = 107,
|
||||||
|
SOUND_PED_HANDS_UP = 108,
|
||||||
|
SOUND_PED_HANDS_COWER = 109,
|
||||||
|
SOUND_PED_FLEE_SPRINT = 110,
|
||||||
|
SOUND_PED_CAR_JACKING = 111,
|
||||||
|
SOUND_PED_MUGGING = 112,
|
||||||
|
SOUND_PED_CAR_JACKED = 113,
|
||||||
|
SOUND_PED_ROBBED = 114,
|
||||||
|
SOUND_PED_TAXI_WAIT = 115,
|
||||||
|
SOUND_PED_ATTACK = 116,
|
||||||
|
SOUND_PED_DEFEND = 117,
|
||||||
|
SOUND_PED_PURSUIT_ARMY = 118,
|
||||||
|
SOUND_PED_PURSUIT_FBI = 119,
|
||||||
|
SOUND_PED_PURSUIT_SWAT = 120,
|
||||||
|
SOUND_PED_PURSUIT_COP = 121,
|
||||||
|
SOUND_PED_HEALING = 122,
|
||||||
|
SOUND_PED_7B = 123,
|
||||||
|
SOUND_PED_LEAVE_VEHICLE = 124,
|
||||||
|
SOUND_PED_EVADE = 125,
|
||||||
|
SOUND_PED_FLEE_RUN = 126,
|
||||||
|
SOUND_PED_CAR_COLLISION = 127,
|
||||||
|
SOUND_PED_SOLICIT = 128,
|
||||||
|
SOUND_PED_EXTINGUISHING_FIRE = 129,
|
||||||
|
SOUND_PED_WAIT_DOUBLEBACK = 130,
|
||||||
|
SOUND_PED_CHAT_SEXY = 131,
|
||||||
|
SOUND_PED_CHAT_EVENT = 132,
|
||||||
|
SOUND_PED_CHAT = 133,
|
||||||
|
SOUND_PED_BODYCAST_HIT = 134,
|
||||||
|
SOUND_PED_TAXI_CALL = 135,
|
||||||
|
SOUND_INJURED_PED_MALE_OUCH = 136,
|
||||||
|
SOUND_INJURED_PED_FEMALE = 137,
|
||||||
|
SOUND_8A = 138,
|
||||||
|
SOUND_RACE_START_3 = 139,
|
||||||
|
SOUND_RACE_START_2 = 140,
|
||||||
|
SOUND_RACE_START_1 = 141,
|
||||||
|
SOUND_RACE_START_GO = 142,
|
||||||
|
SOUND_SPLASH = 143,
|
||||||
|
SOUND_WATER_FALL = 144,
|
||||||
|
SOUND_SPLATTER = 145,
|
||||||
|
SOUND_CAR_PED_COLLISION = 146,
|
||||||
|
SOUND_CLOCK_TICK = 147,
|
||||||
|
SOUND_PART_MISSION_COMPLETE = 148,
|
||||||
|
SOUND_FRONTEND_MENU_STARTING = 149,
|
||||||
|
SOUND_FRONTEND_MENU_COMPLETED = 150,
|
||||||
|
SOUND_FRONTEND_MENU_DENIED = 151,
|
||||||
|
SOUND_FRONTEND_MENU_SUCCESS = 152,
|
||||||
|
SOUND_FRONTEND_EXIT = 153,
|
||||||
|
SOUND_9A = 154,
|
||||||
|
SOUND_9B = 155,
|
||||||
|
SOUND_FRONTEND_AUDIO_TEST = 156,
|
||||||
|
SOUND_FRONTEND_FAIL = 157,
|
||||||
|
SOUND_FRONTEND_NO_RADIO = 158,
|
||||||
|
SOUND_FRONTEND_RADIO_CHANGE = 159,
|
||||||
|
SOUND_A0 = 160,
|
||||||
|
SOUND_AMMUNATION_WELCOME_1 = 161,
|
||||||
|
SOUND_AMMUNATION_WELCOME_2 = 162,
|
||||||
|
SOUND_AMMUNATION_WELCOME_3 = 163,
|
||||||
|
SOUND_LIGHTNING = 164,
|
||||||
|
SOUND_A5 = 165,
|
||||||
|
SOUND_TOTAL_SOUNDS = 166,
|
||||||
|
SOUND_TOTAL_PED_SOUNDS = 167,
|
||||||
|
};
|
||||||
|
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
class cDMAudio
|
class cDMAudio
|
||||||
|
|
|
@ -67,7 +67,7 @@ extern void **rwengine;
|
||||||
#define DEFAULT_SCREEN_HEIGHT (448)
|
#define DEFAULT_SCREEN_HEIGHT (448)
|
||||||
#define SCREEN_WIDTH Float(RsGlobal.width)
|
#define SCREEN_WIDTH Float(RsGlobal.width)
|
||||||
#define SCREEN_HEIGHT Float(RsGlobal.height)
|
#define SCREEN_HEIGHT Float(RsGlobal.height)
|
||||||
#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH)))
|
#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH))) * Float(1.33334f / (CMenuManager::m_PrefsUseWideScreen ? 16.0f / 9.0f : 4.0f / 3.0f))
|
||||||
#define SCREEN_STRETCH_Y(a) Float((a) * (SCREEN_HEIGHT / Float(DEFAULT_SCREEN_HEIGHT)))
|
#define SCREEN_STRETCH_Y(a) Float((a) * (SCREEN_HEIGHT / Float(DEFAULT_SCREEN_HEIGHT)))
|
||||||
#define SCREEN_FROM_RIGHT(a) Float(SCREEN_WIDTH - SCREEN_STRETCH_X(a))
|
#define SCREEN_FROM_RIGHT(a) Float(SCREEN_WIDTH - SCREEN_STRETCH_X(a))
|
||||||
#define SCREEN_FROM_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a))
|
#define SCREEN_FROM_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a))
|
||||||
|
|
|
@ -3,3 +3,9 @@
|
||||||
#include "Darkel.h"
|
#include "Darkel.h"
|
||||||
|
|
||||||
WRAPPER void CDarkel::DrawMessages(void) { EAXJMP(0x420920); }
|
WRAPPER void CDarkel::DrawMessages(void) { EAXJMP(0x420920); }
|
||||||
|
|
||||||
|
bool CDarkel::Status = *(bool*)0x95CCB4;
|
||||||
|
|
||||||
|
bool CDarkel::FrenzyOnGoing() {
|
||||||
|
return Status;
|
||||||
|
}
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
class CDarkel
|
class CDarkel
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
static bool Status;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void DrawMessages(void);
|
static void DrawMessages(void);
|
||||||
|
static bool FrenzyOnGoing();
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
class CReplay
|
class CReplay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void Display(void);
|
|
||||||
enum {
|
enum {
|
||||||
MODE_1 = 1
|
MODE_1 = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8 &Mode;
|
static uint8 &Mode;
|
||||||
static Bool &bPlayingBackFromFile;
|
static Bool &bPlayingBackFromFile;
|
||||||
|
|
||||||
|
static void Display(void);
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,3 +4,6 @@
|
||||||
#include "Script.h"
|
#include "Script.h"
|
||||||
|
|
||||||
uint8 *CTheScripts::ScriptSpace = (uint8*)0x74B248;
|
uint8 *CTheScripts::ScriptSpace = (uint8*)0x74B248;
|
||||||
|
CTextLine* CTheScripts::IntroTextLines = (CTextLine*)0x70EA74;
|
||||||
|
CScriptRectangle* CTheScripts::IntroRectangles = (CScriptRectangle*)0x72D109;
|
||||||
|
CSprite2d* CTheScripts::ScriptSprites = (CSprite2d*)0x72B090;
|
||||||
|
|
|
@ -1,7 +1,42 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "Sprite2d.h"
|
||||||
|
|
||||||
|
struct CScriptRectangle
|
||||||
|
{
|
||||||
|
Bool m_bIsUsed;
|
||||||
|
Bool m_bIsAntialiased;
|
||||||
|
uint16 m_wTextureId;
|
||||||
|
CRect m_sRect;
|
||||||
|
CRGBA m_sColor;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CTextLine
|
||||||
|
{
|
||||||
|
Float m_fScaleX;
|
||||||
|
Float m_fScaleY;
|
||||||
|
CRGBA m_sColor;
|
||||||
|
Bool m_bJustify;
|
||||||
|
Bool m_bCentered;
|
||||||
|
Bool m_bBackground;
|
||||||
|
Bool m_bBackgroundOnly;
|
||||||
|
Float m_fWrapX;
|
||||||
|
Float m_fCenterSize;
|
||||||
|
CRGBA m_sBackgroundColor;
|
||||||
|
Bool m_bTextProportional;
|
||||||
|
int32 field_29;
|
||||||
|
Bool m_bRightJustify;
|
||||||
|
int32 field_31;
|
||||||
|
int32 m_nFont;
|
||||||
|
Float field_36;
|
||||||
|
Float field_40;
|
||||||
|
wchar m_awText[500];
|
||||||
|
};
|
||||||
|
|
||||||
class CTheScripts
|
class CTheScripts
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static uint8 *ScriptSpace;//[160*1024]
|
static uint8 *ScriptSpace;//[160*1024]
|
||||||
|
static CTextLine* IntroTextLines;
|
||||||
|
static CScriptRectangle* IntroRectangles;
|
||||||
|
static CSprite2d* ScriptSprites;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
Bool &CPed::bNastyLimbsCheat = *(Bool*)0x95CD44;
|
Bool &CPed::bNastyLimbsCheat = *(Bool*)0x95CD44;
|
||||||
Bool &CPed::bPedCheat2 = *(Bool*)0x95CD5A;
|
Bool &CPed::bPedCheat2 = *(Bool*)0x95CD5A;
|
||||||
Bool &CPed::bPedCheat3 = *(Bool*)0x95CD59;
|
Bool &CPed::bPedCheat3 = *(Bool*)0x95CD59;
|
||||||
|
|
||||||
void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); }
|
void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); }
|
||||||
void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); }
|
void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); }
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "Physical.h"
|
#include "Physical.h"
|
||||||
#include "Weapon.h"
|
#include "Weapon.h"
|
||||||
|
#include "PathFind.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PED_MAX_WEAPONS = 13
|
PED_MAX_WEAPONS = 13
|
||||||
|
@ -163,13 +164,30 @@ public:
|
||||||
int32 m_nPedState;
|
int32 m_nPedState;
|
||||||
int32 m_nLastPedState;
|
int32 m_nLastPedState;
|
||||||
int32 m_nMoveState;
|
int32 m_nMoveState;
|
||||||
uint8 stuff2[188];
|
int32 m_nStoredActionState;
|
||||||
|
int32 m_nPrevActionState;
|
||||||
|
int32 m_nWaitState;
|
||||||
|
int32 m_nWaitTimer;
|
||||||
|
private:
|
||||||
|
uint32 stuff0[28];
|
||||||
|
public:
|
||||||
|
uint16 m_nPathNodes;
|
||||||
|
uint8 m_nCurPathNode;
|
||||||
|
int8 m_nPathState;
|
||||||
|
private:
|
||||||
|
int8 _pad2B5[3];
|
||||||
|
public:
|
||||||
|
CPathNode *m_pNextPathNode;
|
||||||
|
CPathNode *m_pLastPathNode;
|
||||||
|
Float m_fHealth;
|
||||||
|
Float m_fArmour;
|
||||||
|
uint8 stuff2[34];
|
||||||
CEntity *m_pCurrentPhysSurface;
|
CEntity *m_pCurrentPhysSurface;
|
||||||
CVector m_vecOffsetFromPhysSurface;
|
CVector m_vecOffsetFromPhysSurface;
|
||||||
CEntity *m_pCurSurface;
|
CEntity *m_pCurSurface;
|
||||||
uint8 stuff3[16];
|
uint8 stuff3[16];
|
||||||
CVehicle *m_pMyVehicle;
|
CVehicle *m_pMyVehicle;
|
||||||
bool bInVehicle;
|
Bool bInVehicle;
|
||||||
uint8 stuff4[23];
|
uint8 stuff4[23];
|
||||||
int32 m_nPedType;
|
int32 m_nPedType;
|
||||||
|
|
||||||
|
@ -188,7 +206,7 @@ public:
|
||||||
bool UseGroundColModel(void);
|
bool UseGroundColModel(void);
|
||||||
void KillPedWithCar(CVehicle *veh, float impulse);
|
void KillPedWithCar(CVehicle *veh, float impulse);
|
||||||
CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
|
CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
|
||||||
|
|
||||||
static Bool &bNastyLimbsCheat;
|
static Bool &bNastyLimbsCheat;
|
||||||
static Bool &bPedCheat2;
|
static Bool &bPedCheat2;
|
||||||
static Bool &bPedCheat3;
|
static Bool &bPedCheat3;
|
||||||
|
|
3
src/entities/PlayerInfo.cpp
Normal file
3
src/entities/PlayerInfo.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#include "common.h"
|
||||||
|
#include "patcher.h"
|
||||||
|
#include "PlayerInfo.h"
|
71
src/entities/PlayerInfo.h
Normal file
71
src/entities/PlayerInfo.h
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
#pragma once
|
||||||
|
#include "Automobile.h"
|
||||||
|
#include "PlayerPed.h"
|
||||||
|
|
||||||
|
enum eWastedBustedState {
|
||||||
|
WBSTATE_PLAYING = 0x0,
|
||||||
|
WBSTATE_WASTED = 0x1,
|
||||||
|
WBSTATE_BUSTED = 0x2,
|
||||||
|
WBSTATE_FAILED_CRITICAL_MISSION = 0x3,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct CCivilianPed {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class CPlayerInfo {
|
||||||
|
public:
|
||||||
|
CPlayerPed *m_pPed;
|
||||||
|
CVehicle *m_pRemoteVehicle;
|
||||||
|
CColModel m_ColModel;
|
||||||
|
CVehicle *m_pVehicleEx;
|
||||||
|
char m_aszPlayerName[70];
|
||||||
|
private:
|
||||||
|
int8 _pad0[2];
|
||||||
|
public:
|
||||||
|
int32 m_nMoney;
|
||||||
|
int32 m_nVisibleMoney;
|
||||||
|
int32 m_nCollectedPackages;
|
||||||
|
int32 m_nTotalPackages;
|
||||||
|
int32 field_188;
|
||||||
|
int32 m_nSwitchTaxiTime;
|
||||||
|
Bool m_bSwitchTaxi;
|
||||||
|
int8 field_197;
|
||||||
|
int8 field_198;
|
||||||
|
int8 field_199;
|
||||||
|
int32 m_nNextSexFrequencyUpdateTime;
|
||||||
|
int32 m_nNextSexMoneyUpdateTime;
|
||||||
|
int32 m_nSexFrequency;
|
||||||
|
CCivilianPed *m_pHooker;
|
||||||
|
int8 m_bWBState; // eWastedBustedState
|
||||||
|
int8 field_217;
|
||||||
|
int8 field_218;
|
||||||
|
int8 field_219;
|
||||||
|
int32 m_nWBTime;
|
||||||
|
Bool m_bInRemoteMode;
|
||||||
|
int8 field_225;
|
||||||
|
int8 field_226;
|
||||||
|
int8 field_227;
|
||||||
|
int32 m_nTimeLostRemoteCar;
|
||||||
|
int32 m_nTimeLastHealthLoss;
|
||||||
|
int32 m_nTimeLastArmourLoss;
|
||||||
|
int32 field_240;
|
||||||
|
int32 m_nUpsideDownCounter;
|
||||||
|
int32 field_248;
|
||||||
|
int16 m_nTrafficMultiplier;
|
||||||
|
int8 field_254;
|
||||||
|
int8 field_255;
|
||||||
|
Float m_fRoadDensity;
|
||||||
|
int32 m_nPreviousTimeRewardedForExplosion;
|
||||||
|
int32 m_nExplosionsSinceLastReward;
|
||||||
|
int32 field_268;
|
||||||
|
int32 field_272;
|
||||||
|
Bool m_bInfiniteSprint;
|
||||||
|
Bool m_bFastReload;
|
||||||
|
Bool m_bGetOutOfJailFree;
|
||||||
|
Bool m_bGetOutOfHospitalFree;
|
||||||
|
uint8 m_aSkinName[32];
|
||||||
|
RwTexture *m_pSkinTexture;
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(CPlayerInfo) == 0x13C, "CPlayerPed: error");
|
|
@ -1,11 +1,42 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
|
||||||
class CPlayerPed : public CPed
|
class CPlayerPed : public CPed {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
// 0x53C
|
CWanted *m_pWanted;
|
||||||
uint8 stuff[180];
|
CCopPed *m_pArrestingCop;
|
||||||
|
Float m_fMoveSpeed;
|
||||||
|
Float m_fCurrentStamina;
|
||||||
|
Float m_fMaxStamina;
|
||||||
|
Float m_fStaminaProgress;
|
||||||
|
Bool m_bWeaponSlot;
|
||||||
|
Bool m_bSpeedTimerFlag;
|
||||||
|
Bool m_bShouldEvade;
|
||||||
|
int8 field_1367;
|
||||||
|
int32 m_nSpeedTimer;
|
||||||
|
int32 m_nShotDelay;
|
||||||
|
Float field_1376;
|
||||||
|
int8 field_1380;
|
||||||
|
int8 field_1381;
|
||||||
|
int8 field_1382;
|
||||||
|
int8 field_1383;
|
||||||
|
CEntity *m_pEvadingFrom;
|
||||||
|
int32 m_nTargettableObjects[4];
|
||||||
|
Bool m_bAdrenalineActive;
|
||||||
|
Bool m_bHasLockOnTarget;
|
||||||
|
int8 field_1406;
|
||||||
|
int8 field_1407;
|
||||||
|
Bool m_bAdrenalineTime;
|
||||||
|
Bool m_bCanBeDamaged;
|
||||||
|
int8 field_1413;
|
||||||
|
int8 field_1414;
|
||||||
|
int8 field_1415;
|
||||||
|
CVector field_1416[6];
|
||||||
|
int32 field_1488[6];
|
||||||
|
Float field_1512;
|
||||||
|
Float m_fFPSMoveHeading;
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error");
|
static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error");
|
||||||
|
|
|
@ -36,4 +36,7 @@ CDraw::SetFOV(float fov)
|
||||||
|
|
||||||
STARTPATCHES
|
STARTPATCHES
|
||||||
InjectHook(0x4FE7B0, CDraw::SetFOV, PATCH_JUMP);
|
InjectHook(0x4FE7B0, CDraw::SetFOV, PATCH_JUMP);
|
||||||
|
|
||||||
|
Nop(0x46B618, 2);
|
||||||
|
Patch<float>(0x5F0A64, 1.3333334f);
|
||||||
ENDPATCHES
|
ENDPATCHES
|
||||||
|
|
1296
src/render/Hud.cpp
1296
src/render/Hud.cpp
File diff suppressed because it is too large
Load diff
|
@ -1,10 +1,87 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "Sprite2d.h"
|
||||||
|
|
||||||
class CHud
|
enum eSprites {
|
||||||
{
|
HUD_FIST,
|
||||||
public:
|
HUD_BAT,
|
||||||
static void Draw(void);
|
HUD_PISTOL,
|
||||||
static void DrawAfterFade(void);
|
HUD_UZI,
|
||||||
|
HUD_SHOTGUN,
|
||||||
static bool &m_Wants_To_Draw_Hud;
|
HUD_AK47,
|
||||||
|
HUD_M16,
|
||||||
|
HUD_SNIPER,
|
||||||
|
HUD_ROCKET,
|
||||||
|
HUD_FLAME,
|
||||||
|
HUD_MOLOTOV,
|
||||||
|
HUD_GRENADE,
|
||||||
|
HUD_DETONATOR,
|
||||||
|
HUD_RADARDISC = 15,
|
||||||
|
HUD_PAGER = 16,
|
||||||
|
HUD_SITESNIPER = 20,
|
||||||
|
HUD_SITEM16 = 21
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CHud {
|
||||||
|
public:
|
||||||
|
static CSprite2d *Sprites;
|
||||||
|
|
||||||
|
static wchar *m_HelpMessage;
|
||||||
|
static wchar *m_LastHelpMessage;
|
||||||
|
static int32 &m_HelpMessageState;
|
||||||
|
static int32 &m_HelpMessageTimer;
|
||||||
|
static int32 &m_HelpMessageFadeTimer;
|
||||||
|
static wchar *m_HelpMessageToPrint;
|
||||||
|
static Float &m_HelpMessageDisplayTime;
|
||||||
|
static Float &m_fTextBoxNumLines;
|
||||||
|
static Float &m_fHelpMessageTime;
|
||||||
|
static Bool &m_bHelpMessageQuick;
|
||||||
|
static int32 m_ZoneState;
|
||||||
|
static int32 m_ZoneFadeTimer;
|
||||||
|
static int32 m_ZoneNameTimer;
|
||||||
|
static wchar* &m_pZoneName;
|
||||||
|
static wchar* m_pLastZoneName;
|
||||||
|
static wchar* m_ZoneToPrint;
|
||||||
|
static wchar* &m_pVehicleName;
|
||||||
|
static wchar* m_pLastVehicleName;
|
||||||
|
static wchar* m_pVehicleNameToPrint;
|
||||||
|
static int32 m_VehicleState;
|
||||||
|
static int32 m_VehicleFadeTimer;
|
||||||
|
static int32 m_VehicleNameTimer;
|
||||||
|
static wchar* m_Message;
|
||||||
|
static wchar* m_PagerMessage;
|
||||||
|
static Bool &m_bRetuneInProgress;
|
||||||
|
static Bool &m_Wants_To_Draw_Hud;
|
||||||
|
static Bool &m_Wants_To_Draw_3dMarkers;
|
||||||
|
static wchar(*m_BigMessage)[128];
|
||||||
|
static Float* BigMessageInUse;
|
||||||
|
static Float* BigMessageAlpha;
|
||||||
|
static Float* BigMessageX;
|
||||||
|
static Float &OddJob2OffTimer;
|
||||||
|
static int8 &CounterOnLastFrame;
|
||||||
|
static Float &OddJob2XOffset;
|
||||||
|
static int16 &CounterFlashTimer;
|
||||||
|
static int16 &OddJob2Timer;
|
||||||
|
static int8 &TimerOnLastFrame;
|
||||||
|
static int16 &OddJob2On;
|
||||||
|
static int16 &TimerFlashTimer;
|
||||||
|
static int16 &PagerSoundPlayed;
|
||||||
|
static int32 &SpriteBrightness;
|
||||||
|
static Float &PagerXOffset;
|
||||||
|
static int32 m_ItemToFlash;
|
||||||
|
static int16 &PagerTimer;
|
||||||
|
static int16 &PagerOn;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void Initialise();
|
||||||
|
static void Shutdown();
|
||||||
|
static void ReInitialise();
|
||||||
|
static void GetRidOfAllHudMessages();
|
||||||
|
static void SetZoneName(wchar* name);
|
||||||
|
static void SetHelpMessage(wchar* message, bool quick);
|
||||||
|
static void SetVehicleName(wchar* name);
|
||||||
|
static void Draw();
|
||||||
|
static void DrawAfterFade();
|
||||||
|
static void SetMessage(wchar* message);
|
||||||
|
static void SetBigMessage(wchar* message, int16 style);
|
||||||
|
static void SetPagerMessage(wchar* message);
|
||||||
|
};
|
Loading…
Reference in a new issue