Some refs removed, little fixes and teleport

This commit is contained in:
eray orçunus 2020-04-16 22:19:56 +03:00
parent 83cbe4e39e
commit 2c2da558ca
18 changed files with 167 additions and 142 deletions

View File

@ -10,12 +10,12 @@
#include "AnimBlendAssocGroup.h" #include "AnimBlendAssocGroup.h"
#include "AnimManager.h" #include "AnimManager.h"
CAnimBlock *CAnimManager::ms_aAnimBlocks = (CAnimBlock*)0x6F01A0; CAnimBlock CAnimManager::ms_aAnimBlocks[2];
CAnimBlendHierarchy *CAnimManager::ms_aAnimations = (CAnimBlendHierarchy*)0x70F430; CAnimBlendHierarchy CAnimManager::ms_aAnimations[250];
int32 &CAnimManager::ms_numAnimBlocks = *(int32*)0x885AF8; int32 CAnimManager::ms_numAnimBlocks;
int32 &CAnimManager::ms_numAnimations = *(int32*)0x8E2DD4; int32 CAnimManager::ms_numAnimations;
CAnimBlendAssocGroup *&CAnimManager::ms_aAnimAssocGroups = *(CAnimBlendAssocGroup**)0x8F583C; CAnimBlendAssocGroup *CAnimManager::ms_aAnimAssocGroups;
CLinkList<CAnimBlendHierarchy*> &CAnimManager::ms_animCache = *(CLinkList<CAnimBlendHierarchy*>*)0x9414DC; CLinkList<CAnimBlendHierarchy*> CAnimManager::ms_animCache;
AnimAssocDesc aStdAnimDescs[] = { AnimAssocDesc aStdAnimDescs[] = {
{ ANIM_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_FLAG80 }, { ANIM_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_FLAG80 },

View File

@ -242,12 +242,12 @@ struct AnimAssocDefinition
class CAnimManager class CAnimManager
{ {
static const AnimAssocDefinition ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS]; static const AnimAssocDefinition ms_aAnimAssocDefinitions[NUM_ANIM_ASSOC_GROUPS];
static CAnimBlock *ms_aAnimBlocks; //[2] static CAnimBlock ms_aAnimBlocks[2];
static CAnimBlendHierarchy *ms_aAnimations; //[250] static CAnimBlendHierarchy ms_aAnimations[250];
static int32 &ms_numAnimBlocks; static int32 ms_numAnimBlocks;
static int32 &ms_numAnimations; static int32 ms_numAnimations;
static CAnimBlendAssocGroup *&ms_aAnimAssocGroups; static CAnimBlendAssocGroup *ms_aAnimAssocGroups;
static CLinkList<CAnimBlendHierarchy*> &ms_animCache; static CLinkList<CAnimBlendHierarchy*> ms_animCache;
public: public:
static void Initialise(void); static void Initialise(void);

View File

@ -117,19 +117,19 @@ FindCutsceneAudioTrackId(const char *szCutsceneName)
return -1; return -1;
} }
bool &CCutsceneMgr::ms_running = *(bool*)0x95CCF5; bool CCutsceneMgr::ms_running;
bool &CCutsceneMgr::ms_cutsceneProcessing = *(bool*)0x95CD9F; bool CCutsceneMgr::ms_cutsceneProcessing;
CDirectory *&CCutsceneMgr::ms_pCutsceneDir = *(CDirectory**)0x8F5F88; CDirectory *CCutsceneMgr::ms_pCutsceneDir;
CCutsceneObject *(&CCutsceneMgr::ms_pCutsceneObjects)[NUMCUTSCENEOBJECTS] = *(CCutsceneObject*(*)[NUMCUTSCENEOBJECTS]) *(uintptr*) 0x862170; CCutsceneObject *CCutsceneMgr::ms_pCutsceneObjects[NUMCUTSCENEOBJECTS];
int32 &CCutsceneMgr::ms_numCutsceneObjs = *(int32*)0x942FA4; int32 CCutsceneMgr::ms_numCutsceneObjs;
bool &CCutsceneMgr::ms_loaded = *(bool*)0x95CD95; bool CCutsceneMgr::ms_loaded;
bool &CCutsceneMgr::ms_animLoaded = *(bool*)0x95CDA0; bool CCutsceneMgr::ms_animLoaded;
bool &CCutsceneMgr::ms_useLodMultiplier = *(bool*)0x95CD74; bool CCutsceneMgr::ms_useLodMultiplier;
char(&CCutsceneMgr::ms_cutsceneName)[CUTSCENENAMESIZE] = *(char(*)[CUTSCENENAMESIZE]) *(uintptr*)0x70D9D0; char CCutsceneMgr::ms_cutsceneName[CUTSCENENAMESIZE];
CAnimBlendAssocGroup &CCutsceneMgr::ms_cutsceneAssociations = *(CAnimBlendAssocGroup*)0x709C58; CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations;
CVector &CCutsceneMgr::ms_cutsceneOffset = *(CVector*)0x8F2C0C; CVector CCutsceneMgr::ms_cutsceneOffset;
float &CCutsceneMgr::ms_cutsceneTimer = *(float*)0x941548; float CCutsceneMgr::ms_cutsceneTimer;
uint32 &CCutsceneMgr::ms_cutsceneLoadStatus = *(uint32*)0x95CB40; uint32 CCutsceneMgr::ms_cutsceneLoadStatus;
RpAtomic * RpAtomic *
CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data) CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data)

View File

@ -9,22 +9,22 @@ class CCutsceneHead;
class CCutsceneMgr class CCutsceneMgr
{ {
static bool &ms_running; static bool ms_running;
static CCutsceneObject *(&ms_pCutsceneObjects)[NUMCUTSCENEOBJECTS]; static CCutsceneObject *ms_pCutsceneObjects[NUMCUTSCENEOBJECTS];
static int32 &ms_numCutsceneObjs; static int32 ms_numCutsceneObjs;
static bool &ms_loaded; static bool ms_loaded;
static bool &ms_animLoaded; static bool ms_animLoaded;
static bool &ms_useLodMultiplier; static bool ms_useLodMultiplier;
static char(&ms_cutsceneName)[CUTSCENENAMESIZE]; static char ms_cutsceneName[CUTSCENENAMESIZE];
static CAnimBlendAssocGroup &ms_cutsceneAssociations; static CAnimBlendAssocGroup ms_cutsceneAssociations;
static CVector &ms_cutsceneOffset; static CVector ms_cutsceneOffset;
static float &ms_cutsceneTimer; static float ms_cutsceneTimer;
static bool &ms_cutsceneProcessing; static bool ms_cutsceneProcessing;
public: public:
static CDirectory *&ms_pCutsceneDir; static CDirectory *ms_pCutsceneDir;
static uint32 &ms_cutsceneLoadStatus; static uint32 ms_cutsceneLoadStatus;
static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; } static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; }
static bool IsRunning(void) { return ms_running; } static bool IsRunning(void) { return ms_running; }

View File

@ -2221,6 +2221,9 @@ cSampleManager::InitialiseSampleBanks(void)
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ ) for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
{ {
#ifdef FIX_BUGS
if (nBank >= MAX_SAMPLEBANKS) break;
#endif
if ( BankStartOffset[nBank] == BankStartOffset[SAMPLEBANK_MAIN] + i ) if ( BankStartOffset[nBank] == BankStartOffset[SAMPLEBANK_MAIN] + i )
{ {
nSampleBankDiscStartOffset[nBank] = m_aSamples[i].nOffset; nSampleBankDiscStartOffset[nBank] = m_aSamples[i].nOffset;

View File

@ -6,20 +6,20 @@
#include "PathFind.h" #include "PathFind.h"
#include "Stats.h" #include "Stats.h"
CEntity*& CBridge::pLiftRoad = *(CEntity**)0x8E2C8C; CEntity *CBridge::pLiftRoad;
CEntity*& CBridge::pLiftPart = *(CEntity**)0x8E2C94; CEntity *CBridge::pLiftPart;
CEntity*& CBridge::pWeight = *(CEntity**)0x8E28BC; CEntity *CBridge::pWeight;
int& CBridge::State = *(int*)0x8F2A1C; int CBridge::State;
int& CBridge::OldState = *(int*)0x8F2A20; int CBridge::OldState;
float& CBridge::DefaultZLiftPart = *(float*)0x941430; float CBridge::DefaultZLiftPart;
float& CBridge::DefaultZLiftRoad = *(float*)0x941438; float CBridge::DefaultZLiftRoad;
float& CBridge::DefaultZLiftWeight = *(float*)0x8F1A44; float CBridge::DefaultZLiftWeight;
float& CBridge::OldLift = *(float*)0x8F6254; float CBridge::OldLift;
uint32& CBridge::TimeOfBridgeBecomingOperational = *(uint32*)0x8F2BC0; uint32 CBridge::TimeOfBridgeBecomingOperational;
void CBridge::Init() void CBridge::Init()
{ {

View File

@ -14,11 +14,11 @@ enum bridgeStates {
class CBridge class CBridge
{ {
public: public:
static CEntity *&pLiftRoad, *&pLiftPart, *&pWeight; static CEntity *pLiftRoad, *pLiftPart, *pWeight;
static int &State, &OldState; static int State, OldState;
static float &DefaultZLiftPart, &DefaultZLiftRoad, &DefaultZLiftWeight; static float DefaultZLiftPart, DefaultZLiftRoad, DefaultZLiftWeight;
static float &OldLift; static float OldLift;
static uint32 &TimeOfBridgeBecomingOperational; static uint32 TimeOfBridgeBecomingOperational;
static void Init(); static void Init();
static void Update(); static void Update();

View File

@ -17,29 +17,29 @@
#define FRENZY_ANY_PED -1 #define FRENZY_ANY_PED -1
#define FRENZY_ANY_CAR -2 #define FRENZY_ANY_CAR -2
int32 &CDarkel::TimeLimit = *(int32*)0x885BAC; int32 CDarkel::TimeLimit;
int32 &CDarkel::PreviousTime = *(int32*)0x885B00; int32 CDarkel::PreviousTime;
int32 &CDarkel::TimeOfFrenzyStart = *(int32*)0x9430D8; int32 CDarkel::TimeOfFrenzyStart;
int32 &CDarkel::WeaponType = *(int32*)0x9430F0; int32 CDarkel::WeaponType;
int32 &CDarkel::AmmoInterruptedWeapon = *(int32*)0x8E29C8; int32 CDarkel::AmmoInterruptedWeapon;
int32 &CDarkel::KillsNeeded = *(int32*)0x8F1AB8; int32 CDarkel::KillsNeeded;
int8 &CDarkel::InterruptedWeapon = *(int8*)0x95CD60; int8 CDarkel::InterruptedWeapon;
/* /*
* bStandardSoundAndMessages is a completely beta thing, * bStandardSoundAndMessages is a completely beta thing,
* makes game handle sounds & messages instead of SCM (just like in GTA2) * makes game handle sounds & messages instead of SCM (just like in GTA2)
* but it's never been used in the game. Has unused sliding text when frenzy completed etc. * but it's never been used in the game. Has unused sliding text when frenzy completed etc.
*/ */
int8 &CDarkel::bStandardSoundAndMessages = *(int8*)0x95CDB6; int8 CDarkel::bStandardSoundAndMessages;
int8 &CDarkel::bNeedHeadShot = *(int8*)0x95CDCA; int8 CDarkel::bNeedHeadShot;
int8 &CDarkel::bProperKillFrenzy = *(int8*)0x95CD98; int8 CDarkel::bProperKillFrenzy;
uint16 &CDarkel::Status = *(uint16*)0x95CCB4; uint16 CDarkel::Status;
uint16 (&CDarkel::RegisteredKills)[NUM_DEFAULT_MODELS] = *(uint16(*)[NUM_DEFAULT_MODELS]) * (uintptr*)0x6EDBE0; uint16 CDarkel::RegisteredKills[NUM_DEFAULT_MODELS];
int32 &CDarkel::ModelToKill = *(int32*)0x8F2C78; int32 CDarkel::ModelToKill;
int32 &CDarkel::ModelToKill2 = *(int32*)0x885B40; int32 CDarkel::ModelToKill2;
int32 &CDarkel::ModelToKill3 = *(int32*)0x885B3C; int32 CDarkel::ModelToKill3;
int32 &CDarkel::ModelToKill4 = *(int32*)0x885B34; int32 CDarkel::ModelToKill4;
wchar *CDarkel::pStartMessage = (wchar*)0x8F2C08; wchar *CDarkel::pStartMessage;
uint8 uint8
CDarkel::CalcFade(uint32 time, uint32 start, uint32 end) CDarkel::CalcFade(uint32 time, uint32 start, uint32 end)
@ -262,10 +262,10 @@ CDarkel::StartFrenzy(eWeaponType weaponType, int32 time, uint16 kill, int32 mode
pStartMessage = text; pStartMessage = text;
if (text == TheText.Get("PAGE_00")) { if (text == TheText.Get("PAGE_00")) {
CDarkel::bProperKillFrenzy = 1; CDarkel::bProperKillFrenzy = true;
CDarkel::pStartMessage = 0; CDarkel::pStartMessage = nil;
} else } else
bProperKillFrenzy = 0; bProperKillFrenzy = false;
bStandardSoundAndMessages = standardSound; bStandardSoundAndMessages = standardSound;
bNeedHeadShot = needHeadShot; bNeedHeadShot = needHeadShot;

View File

@ -16,22 +16,22 @@ enum
class CDarkel class CDarkel
{ {
private: private:
static int32 &TimeLimit; static int32 TimeLimit;
static int32 &PreviousTime; static int32 PreviousTime;
static int32 &TimeOfFrenzyStart; static int32 TimeOfFrenzyStart;
static int32 &WeaponType; static int32 WeaponType;
static int32 &AmmoInterruptedWeapon; static int32 AmmoInterruptedWeapon;
static int32 &KillsNeeded; static int32 KillsNeeded;
static int8 &InterruptedWeapon; static int8 InterruptedWeapon;
static int8 &bStandardSoundAndMessages; static int8 bStandardSoundAndMessages;
static int8 &bNeedHeadShot; static int8 bNeedHeadShot;
static int8 &bProperKillFrenzy; static int8 bProperKillFrenzy;
static uint16 &Status; static uint16 Status;
static uint16 (&RegisteredKills)[NUM_DEFAULT_MODELS]; static uint16 RegisteredKills[NUM_DEFAULT_MODELS];
static int32 &ModelToKill; static int32 ModelToKill;
static int32 &ModelToKill2; static int32 ModelToKill2;
static int32 &ModelToKill3; static int32 ModelToKill3;
static int32 &ModelToKill4; static int32 ModelToKill4;
static wchar *pStartMessage; static wchar *pStartMessage;
public: public:

View File

@ -111,27 +111,27 @@ const int32 gaCarsToCollectInCraigsGarages[TOTAL_COLLECTCARS_GARAGES][TOTAL_COLL
{ MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_CHEETAH, MI_TAXI, MI_ESPERANT, MI_SENTINEL, MI_IDAHO } { MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_LANDSTAL, MI_CHEETAH, MI_TAXI, MI_ESPERANT, MI_SENTINEL, MI_IDAHO }
}; };
int32& CGarages::BankVansCollected = *(int32*)0x8F1B34; int32 CGarages::BankVansCollected;
bool& CGarages::BombsAreFree = *(bool*)0x95CD7A; bool CGarages::BombsAreFree;
bool& CGarages::RespraysAreFree = *(bool*)0x95CD1D; bool CGarages::RespraysAreFree;
int32& CGarages::CarsCollected = *(int32*)0x880E18; int32 CGarages::CarsCollected;
int32(&CGarages::CarTypesCollected)[TOTAL_COLLECTCARS_GARAGES] = *(int32(*)[TOTAL_COLLECTCARS_GARAGES]) * (uintptr*)0x8E286C; int32 CGarages::CarTypesCollected[TOTAL_COLLECTCARS_GARAGES];
int32& CGarages::CrushedCarId = *(int32*)0x943060; int32 CGarages::CrushedCarId;
uint32& CGarages::LastTimeHelpMessage = *(uint32*)0x8F1B58; uint32 CGarages::LastTimeHelpMessage;
int32& CGarages::MessageNumberInString = *(int32*)0x885BA8; int32 CGarages::MessageNumberInString;
char(&CGarages::MessageIDString)[MESSAGE_LENGTH] = *(char(*)[MESSAGE_LENGTH]) * (uintptr*)0x878358; char CGarages::MessageIDString[MESSAGE_LENGTH];
int32& CGarages::MessageNumberInString2 = *(int32*)0x8E2C14; int32 CGarages::MessageNumberInString2;
uint32& CGarages::MessageStartTime = *(uint32*)0x8F2530; uint32 CGarages::MessageStartTime;
uint32& CGarages::MessageEndTime = *(uint32*)0x8F597C; uint32 CGarages::MessageEndTime;
uint32& CGarages::NumGarages = *(uint32*)0x8F29F4; uint32 CGarages::NumGarages;
bool& CGarages::PlayerInGarage = *(bool*)0x95CD83; bool CGarages::PlayerInGarage;
int32& CGarages::PoliceCarsCollected = *(int32*)0x941444; int32 CGarages::PoliceCarsCollected;
CStoredCar(&CGarages::aCarsInSafeHouse1)[NUM_GARAGE_STORED_CARS] = *(CStoredCar(*)[NUM_GARAGE_STORED_CARS]) * (uintptr*)0x6FA210; CStoredCar CGarages::aCarsInSafeHouse1[NUM_GARAGE_STORED_CARS];
CStoredCar(&CGarages::aCarsInSafeHouse2)[NUM_GARAGE_STORED_CARS] = *(CStoredCar(*)[NUM_GARAGE_STORED_CARS]) * (uintptr*)0x6FA300; CStoredCar CGarages::aCarsInSafeHouse2[NUM_GARAGE_STORED_CARS];
CStoredCar(&CGarages::aCarsInSafeHouse3)[NUM_GARAGE_STORED_CARS] = *(CStoredCar(*)[NUM_GARAGE_STORED_CARS]) * (uintptr*)0x6FA3F0; CStoredCar CGarages::aCarsInSafeHouse3[NUM_GARAGE_STORED_CARS];
int32& CGarages::AudioEntity = *(int32*)0x5ECEA8; int32 CGarages::AudioEntity = AEHANDLE_NONE;
CGarage(&CGarages::aGarages)[NUM_GARAGES] = *(CGarage(*)[NUM_GARAGES]) * (uintptr*)0x72BCD0; CGarage CGarages::aGarages[NUM_GARAGES];
bool& CGarages::bCamShouldBeOutisde = *(bool*)0x95CDB2; bool CGarages::bCamShouldBeOutisde;
void CGarages::Init(void) void CGarages::Init(void)
{ {
@ -2256,7 +2256,7 @@ void CGarages::Save(uint8 * buf, uint32 * size)
#endif #endif
} }
CStoredCar::CStoredCar(const CStoredCar & other) const CStoredCar &CStoredCar::operator=(const CStoredCar & other)
{ {
m_nModelIndex = other.m_nModelIndex; m_nModelIndex = other.m_nModelIndex;
m_vecPos = other.m_vecPos; m_vecPos = other.m_vecPos;
@ -2272,6 +2272,7 @@ CStoredCar::CStoredCar(const CStoredCar & other)
m_nVariationA = other.m_nVariationA; m_nVariationA = other.m_nVariationA;
m_nVariationB = other.m_nVariationB; m_nVariationB = other.m_nVariationB;
m_nCarBombType = other.m_nCarBombType; m_nCarBombType = other.m_nCarBombType;
return *this;
} }
void CGarages::Load(uint8* buf, uint32 size) void CGarages::Load(uint8* buf, uint32 size)

View File

@ -70,7 +70,7 @@ public:
void Init() { m_nModelIndex = 0; } void Init() { m_nModelIndex = 0; }
void Clear() { m_nModelIndex = 0; } void Clear() { m_nModelIndex = 0; }
bool HasCar() { return m_nModelIndex != 0; } bool HasCar() { return m_nModelIndex != 0; }
CStoredCar(const CStoredCar& other); const CStoredCar &operator=(const CStoredCar& other);
void StoreCar(CVehicle*); void StoreCar(CVehicle*);
CVehicle* RestoreCar(); CVehicle* RestoreCar();
}; };
@ -179,27 +179,27 @@ class CGarages
enum { enum {
MESSAGE_LENGTH = 8 MESSAGE_LENGTH = 8
}; };
static int32 &BankVansCollected; static int32 BankVansCollected;
static bool &BombsAreFree; static bool BombsAreFree;
static bool &RespraysAreFree; static bool RespraysAreFree;
static int32 &CarsCollected; static int32 CarsCollected;
static int32 (&CarTypesCollected)[TOTAL_COLLECTCARS_GARAGES]; static int32 CarTypesCollected[TOTAL_COLLECTCARS_GARAGES];
static int32 &CrushedCarId; static int32 CrushedCarId;
static uint32 &LastTimeHelpMessage; static uint32 LastTimeHelpMessage;
static int32 &MessageNumberInString; static int32 MessageNumberInString;
static char(&MessageIDString)[MESSAGE_LENGTH]; static char MessageIDString[MESSAGE_LENGTH];
static int32 &MessageNumberInString2; static int32 MessageNumberInString2;
static uint32 &MessageStartTime; static uint32 MessageStartTime;
static uint32 &MessageEndTime; static uint32 MessageEndTime;
static uint32 &NumGarages; static uint32 NumGarages;
static bool &PlayerInGarage; static bool PlayerInGarage;
static int32 &PoliceCarsCollected; static int32 PoliceCarsCollected;
static CGarage(&aGarages)[NUM_GARAGES]; static CGarage aGarages[NUM_GARAGES];
static CStoredCar(&aCarsInSafeHouse1)[NUM_GARAGE_STORED_CARS]; static CStoredCar aCarsInSafeHouse1[NUM_GARAGE_STORED_CARS];
static CStoredCar(&aCarsInSafeHouse2)[NUM_GARAGE_STORED_CARS]; static CStoredCar aCarsInSafeHouse2[NUM_GARAGE_STORED_CARS];
static CStoredCar(&aCarsInSafeHouse3)[NUM_GARAGE_STORED_CARS]; static CStoredCar aCarsInSafeHouse3[NUM_GARAGE_STORED_CARS];
static int32 &AudioEntity; static int32 AudioEntity;
static bool &bCamShouldBeOutisde; static bool bCamShouldBeOutisde;
public: public:
static void Init(void); static void Init(void);

View File

@ -32,7 +32,7 @@ const CMenuScreen aScreens[] = {
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
}, },
// MENU_CONTROLLER_SETTINGS = 4 // MENUPAGE_CONTROLLER_SETTINGS = 4
{ "FET_CON", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0, { "FET_CON", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 0, 0,
MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS,
MENUACTION_CTRLDISPLAY, "FEC_CDP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, MENUACTION_CTRLDISPLAY, "FEC_CDP", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS,

View File

@ -16,9 +16,9 @@
#include "Streaming.h" #include "Streaming.h"
#include "SpecialFX.h" #include "SpecialFX.h"
float &CRadar::m_radarRange = *(float*)0x8E281C; float CRadar::m_radarRange;
sRadarTrace (&CRadar::ms_RadarTrace)[NUMRADARBLIPS] = *(sRadarTrace(*)[NUMRADARBLIPS]) * (uintptr*)0x6ED5E0; sRadarTrace CRadar::ms_RadarTrace[NUMRADARBLIPS];
CVector2D &vec2DRadarOrigin = *(CVector2D*)0x6299B8; CVector2D vec2DRadarOrigin;
int32 gRadarTxdIds[64];// = (int*)0x6299C0; int32 gRadarTxdIds[64];// = (int*)0x6299C0;
CSprite2d CRadar::AsukaSprite;// = *(CSprite2d*)0x8F1A40; CSprite2d CRadar::AsukaSprite;// = *(CSprite2d*)0x8F1A40;
@ -81,6 +81,7 @@ CRGBA CRadar::ArrowBlipColour2;
uint16 CRadar::MapLegendCounter; uint16 CRadar::MapLegendCounter;
uint16 CRadar::MapLegendList[NUM_MAP_LEGENDS]; uint16 CRadar::MapLegendList[NUM_MAP_LEGENDS];
int CRadar::TargetMarkerId = -1; int CRadar::TargetMarkerId = -1;
CVector CRadar::TargetMarkerPos;
#endif #endif
// taken from VC // taken from VC
@ -1442,6 +1443,7 @@ CRadar::ToggleTargetMarker(float x, float y)
ms_RadarTrace[nextBlip].m_bInUse = 1; ms_RadarTrace[nextBlip].m_bInUse = 1;
ms_RadarTrace[nextBlip].m_Radius = 1.0f; ms_RadarTrace[nextBlip].m_Radius = 1.0f;
CVector pos(x, y, CWorld::FindGroundZForCoord(x,y)); CVector pos(x, y, CWorld::FindGroundZForCoord(x,y));
TargetMarkerPos = pos;
ms_RadarTrace[nextBlip].m_vec2DPos = pos; ms_RadarTrace[nextBlip].m_vec2DPos = pos;
ms_RadarTrace[nextBlip].m_vecPos = pos; ms_RadarTrace[nextBlip].m_vecPos = pos;
ms_RadarTrace[nextBlip].m_nEntityHandle = 0; ms_RadarTrace[nextBlip].m_nEntityHandle = 0;

View File

@ -82,8 +82,8 @@ static_assert(sizeof(sRadarTrace) == 0x30, "sRadarTrace: error");
class CRadar class CRadar
{ {
public: public:
static float &m_radarRange; static float m_radarRange;
static sRadarTrace (&ms_RadarTrace)[NUMRADARBLIPS]; static sRadarTrace ms_RadarTrace[NUMRADARBLIPS];
static CSprite2d AsukaSprite; static CSprite2d AsukaSprite;
static CSprite2d BombSprite; static CSprite2d BombSprite;
static CSprite2d CatSprite; static CSprite2d CatSprite;
@ -114,6 +114,7 @@ public:
static uint16 MapLegendList[NUM_MAP_LEGENDS]; static uint16 MapLegendList[NUM_MAP_LEGENDS];
static uint16 MapLegendCounter; static uint16 MapLegendCounter;
static int TargetMarkerId; static int TargetMarkerId;
static CVector TargetMarkerPos;
static void InitFrontEndMap(); static void InitFrontEndMap();
static void DrawYouAreHereSprite(float, float); static void DrawYouAreHereSprite(float, float);

View File

@ -24,6 +24,8 @@
#include "Hud.h" #include "Hud.h"
#include "SceneEdit.h" #include "SceneEdit.h"
#include "Pad.h" #include "Pad.h"
#include "PlayerPed.h"
#include "Radar.h"
#include <list> #include <list>
@ -164,6 +166,19 @@ FixCar(void)
((CAutomobile*)veh)->Fix(); ((CAutomobile*)veh)->Fix();
} }
#ifdef MENU_MAP
static void
TeleportToWaypoint(void)
{
if (FindPlayerVehicle()) {
if (CRadar::TargetMarkerId != -1)
FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FindPlayerVehicle()->GetColModel()->boundingSphere.center.z));
} else
if(CRadar::TargetMarkerId != -1)
FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FEET_OFFSET));
}
#endif
static int engineStatus; static int engineStatus;
static void static void
SetEngineStatus(void) SetEngineStatus(void)
@ -359,6 +374,9 @@ DebugMenuPopulate(void)
DebugMenuAddVarBool8("Debug", "Don't render Peds", (int8*)&gbDontRenderPeds, nil); DebugMenuAddVarBool8("Debug", "Don't render Peds", (int8*)&gbDontRenderPeds, nil);
DebugMenuAddVarBool8("Debug", "Don't render Vehicles", (int8*)&gbDontRenderVehicles, nil); DebugMenuAddVarBool8("Debug", "Don't render Vehicles", (int8*)&gbDontRenderVehicles, nil);
DebugMenuAddVarBool8("Debug", "Don't render Objects", (int8*)&gbDontRenderObjects, nil); DebugMenuAddVarBool8("Debug", "Don't render Objects", (int8*)&gbDontRenderObjects, nil);
#ifdef MENU_MAP
DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint);
#endif
#ifdef TOGGLEABLE_BETA_FEATURES #ifdef TOGGLEABLE_BETA_FEATURES
DebugMenuAddVarBool8("Debug", "Toggle banned particles", (int8*)&CParticle::bEnableBannedParticles, nil); DebugMenuAddVarBool8("Debug", "Toggle banned particles", (int8*)&CParticle::bEnableBannedParticles, nil);
DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, nil); DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", (int8*)&CPed::bPopHeadsOnHeadshot, nil);

View File

@ -5,7 +5,7 @@
#include "Camera.h" #include "Camera.h"
#include "Sprite2d.h" #include "Sprite2d.h"
RwIm2DVertex CSprite2d::maVertices[4]; RwIm2DVertex CSprite2d::maVertices[8];
float CSprite2d::RecipNearClip; float CSprite2d::RecipNearClip;
int32 CSprite2d::mCurrentBank; int32 CSprite2d::mCurrentBank;
RwTexture *CSprite2d::mpBankTextures[10]; RwTexture *CSprite2d::mpBankTextures[10];

View File

@ -8,7 +8,7 @@ class CSprite2d
static int32 mCurrentSprite[10]; static int32 mCurrentSprite[10];
static int32 mBankStart[10]; static int32 mBankStart[10];
static RwIm2DVertex maBankVertices[500]; static RwIm2DVertex maBankVertices[500];
static RwIm2DVertex maVertices[4]; static RwIm2DVertex maVertices[8];
public: public:
RwTexture *m_pTexture; RwTexture *m_pTexture;

View File

@ -108,7 +108,7 @@ LightsCreate(RpWorld *world)
pDirect = RpLightCreate(rpLIGHTDIRECTIONAL); pDirect = RpLightCreate(rpLIGHTDIRECTIONAL);
RpLightSetFlags(pDirect, rpLIGHTLIGHTATOMICS); RpLightSetFlags(pDirect, rpLIGHTLIGHTATOMICS);
color.red = 1.0f; color.red = 1.0f;
color.green = 0.84f; color.green = 0.85f;
color.blue = 0.45f; color.blue = 0.45f;
RpLightSetColor(pDirect, &color); RpLightSetColor(pDirect, &color);
RpLightSetRadius(pDirect, 2.0f); RpLightSetRadius(pDirect, 2.0f);