summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/IniFile.cpp4
-rw-r--r--src/core/IniFile.h4
-rw-r--r--src/render/Instance.cpp (renamed from src/core/Instance.cpp)0
-rw-r--r--src/render/Instance.h (renamed from src/core/Instance.h)0
-rw-r--r--src/render/Sprite2d.cpp14
-rw-r--r--src/render/Sprite2d.h14
-rw-r--r--src/vehicles/Automobile.cpp2
-rw-r--r--src/vehicles/Automobile.h2
-rw-r--r--src/vehicles/Boat.cpp10
-rw-r--r--src/vehicles/Boat.h2
-rw-r--r--src/vehicles/Floater.cpp5
-rw-r--r--src/vehicles/Floater.h2
-rw-r--r--src/vehicles/HandlingMgr.cpp2
-rw-r--r--src/vehicles/HandlingMgr.h2
-rw-r--r--src/vehicles/Heli.cpp12
-rw-r--r--src/vehicles/Heli.h12
-rw-r--r--src/vehicles/Plane.cpp58
-rw-r--r--src/vehicles/Plane.h6
-rw-r--r--src/vehicles/Train.cpp30
19 files changed, 90 insertions, 91 deletions
diff --git a/src/core/IniFile.cpp b/src/core/IniFile.cpp
index 08b30876..744f4bd0 100644
--- a/src/core/IniFile.cpp
+++ b/src/core/IniFile.cpp
@@ -7,8 +7,8 @@
#include "main.h"
#include "Population.h"
-float &CIniFile::PedNumberMultiplier = *(float*)0x6182F4;
-float &CIniFile::CarNumberMultiplier = *(float*)0x6182F8;
+float CIniFile::PedNumberMultiplier = 1.0f;// = *(float*)0x6182F4;
+float CIniFile::CarNumberMultiplier = 1.0f;// = *(float*)0x6182F8;
void CIniFile::LoadIniFile()
{
diff --git a/src/core/IniFile.h b/src/core/IniFile.h
index 9a98151b..1e30c4de 100644
--- a/src/core/IniFile.h
+++ b/src/core/IniFile.h
@@ -5,6 +5,6 @@ class CIniFile
public:
static void LoadIniFile();
- static float& PedNumberMultiplier;
- static float& CarNumberMultiplier;
+ static float PedNumberMultiplier;
+ static float CarNumberMultiplier;
};
diff --git a/src/core/Instance.cpp b/src/render/Instance.cpp
index 775341be..775341be 100644
--- a/src/core/Instance.cpp
+++ b/src/render/Instance.cpp
diff --git a/src/core/Instance.h b/src/render/Instance.h
index 01dfb6a2..01dfb6a2 100644
--- a/src/core/Instance.h
+++ b/src/render/Instance.h
diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp
index 3f21516a..1fe70121 100644
--- a/src/render/Sprite2d.cpp
+++ b/src/render/Sprite2d.cpp
@@ -5,13 +5,13 @@
#include "Camera.h"
#include "Sprite2d.h"
-RwIm2DVertex *CSprite2d::maVertices = (RwIm2DVertex*)0x6E9168;
-float &CSprite2d::RecipNearClip = *(float*)0x880DB4;
-int32 &CSprite2d::mCurrentBank = *(int32*)0x8F1AF4;
-RwTexture **CSprite2d::mpBankTextures = (RwTexture**)0x774DC0;
-int32 *CSprite2d::mCurrentSprite = (int32*)0x6F4500;
-int32 *CSprite2d::mBankStart = (int32*)0x774BE8;
-RwIm2DVertex *CSprite2d::maBankVertices = (RwIm2DVertex*)0x8429F8;
+RwIm2DVertex CSprite2d::maVertices[4];
+float CSprite2d::RecipNearClip;
+int32 CSprite2d::mCurrentBank;
+RwTexture *CSprite2d::mpBankTextures[10];
+int32 CSprite2d::mCurrentSprite[10];
+int32 CSprite2d::mBankStart[10];
+RwIm2DVertex CSprite2d::maBankVertices[500];
void
CSprite2d::SetRecipNearClip(void)
diff --git a/src/render/Sprite2d.h b/src/render/Sprite2d.h
index 268c7d2b..0b073557 100644
--- a/src/render/Sprite2d.h
+++ b/src/render/Sprite2d.h
@@ -2,13 +2,13 @@
class CSprite2d
{
- static float &RecipNearClip;
- static int32 &mCurrentBank;
- static RwTexture **mpBankTextures; //[10];
- static int32 *mCurrentSprite; //[10];
- static int32 *mBankStart; //[10];
- static RwIm2DVertex *maBankVertices; //[500];
- static RwIm2DVertex *maVertices; //[4];
+ static float RecipNearClip;
+ static int32 mCurrentBank;
+ static RwTexture *mpBankTextures[10];
+ static int32 mCurrentSprite[10];
+ static int32 mBankStart[10];
+ static RwIm2DVertex maBankVertices[500];
+ static RwIm2DVertex maVertices[4];
public:
RwTexture *m_pTexture;
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 2a325b3d..12d4f589 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -49,7 +49,7 @@ bool bAllCarCheat; // unused
RwObject *GetCurrentAtomicObjectCB(RwObject *object, void *data);
-bool &CAutomobile::m_sAllTaxiLights = *(bool*)0x95CD21;
+bool CAutomobile::m_sAllTaxiLights;// = *(bool*)0x95CD21;
CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
: CVehicle(CreatedBy)
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h
index 561ab566..66774612 100644
--- a/src/vehicles/Automobile.h
+++ b/src/vehicles/Automobile.h
@@ -120,7 +120,7 @@ public:
float m_fGasPedalAudio;
tWheelState m_aWheelState[4];
- static bool &m_sAllTaxiLights;
+ static bool m_sAllTaxiLights;
CAutomobile(int32 id, uint8 CreatedBy);
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 0159d168..d694d8b0 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -21,16 +21,16 @@
#define INVALID_ORIENTATION (-9999.99f)
-float &fShapeLength = *(float*)0x600E78;
-float &fShapeTime = *(float*)0x600E7C;
-float &fRangeMult = *(float*)0x600E80; //0.6f; // 0.75f gta 3
-float &fTimeMult = *(float*)0x943008;
+float fShapeLength = 0.4f;// *(float*)0x600E78;
+float fShapeTime = 0.05f;// *(float*)0x600E7C;
+float fRangeMult = 0.75f; // = *(float*)0x600E80; //0.6f; // 0.75f gta 3
+float fTimeMult;// = *(float*)0x943008;
float MAX_WAKE_LENGTH = 50.0f;
float MIN_WAKE_INTERVAL = 1.0f;
float WAKE_LIFETIME = 400.0f;
-CBoat * (&CBoat::apFrameWakeGeneratingBoats)[4] = *(CBoat * (*)[4])*(uintptr*)0x8620E0;
+CBoat *CBoat::apFrameWakeGeneratingBoats[4];// = *(CBoat * (*)[4]) * (uintptr*)0x8620E0;
CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
{
diff --git a/src/vehicles/Boat.h b/src/vehicles/Boat.h
index f4c6a747..ba56e355 100644
--- a/src/vehicles/Boat.h
+++ b/src/vehicles/Boat.h
@@ -58,7 +58,7 @@ public:
void PruneWakeTrail(void);
void AddWakePoint(CVector point);
- static CBoat *(&apFrameWakeGeneratingBoats)[4];
+ static CBoat *apFrameWakeGeneratingBoats[4];
static bool IsSectorAffectedByWake(CVector2D sector, float fSize, CBoat **apBoats);
static float IsVertexAffectedByWake(CVector vecVertex, CBoat *pBoat);
diff --git a/src/vehicles/Floater.cpp b/src/vehicles/Floater.cpp
index 62d55925..ee4a1191 100644
--- a/src/vehicles/Floater.cpp
+++ b/src/vehicles/Floater.cpp
@@ -7,10 +7,9 @@
#include "Vehicle.h"
#include "Floater.h"
-cBuoyancy &mod_Buoyancy = *(cBuoyancy*)0x8F2674;
+cBuoyancy mod_Buoyancy;// = *(cBuoyancy*)0x8F2674;
-//static float fVolMultiplier = 1.0f;
-static float &fVolMultiplier = *(float*)0x601394;
+static float fVolMultiplier = 1.0f; // 0x601394;
// amount of boat volume in bounding box
// 1.0-volume is the empty space in the bbox
static float fBoatVolumeDistribution[9] = {
diff --git a/src/vehicles/Floater.h b/src/vehicles/Floater.h
index 4754a235..1cfb46fb 100644
--- a/src/vehicles/Floater.h
+++ b/src/vehicles/Floater.h
@@ -42,4 +42,4 @@ public:
void FindWaterLevel(const CVector &zpos, CVector *waterLevel, tWaterLevel *waterPosition);
bool CalcBuoyancyForce(CPhysical *phys, CVector *impulse, CVector *point);
};
-extern cBuoyancy &mod_Buoyancy;
+extern cBuoyancy mod_Buoyancy;
diff --git a/src/vehicles/HandlingMgr.cpp b/src/vehicles/HandlingMgr.cpp
index 0f16401e..40715887 100644
--- a/src/vehicles/HandlingMgr.cpp
+++ b/src/vehicles/HandlingMgr.cpp
@@ -4,7 +4,7 @@
#include "FileMgr.h"
#include "HandlingMgr.h"
-cHandlingDataMgr &mod_HandlingManager = *(cHandlingDataMgr*)0x728060;
+cHandlingDataMgr mod_HandlingManager;// = *(cHandlingDataMgr*)0x728060;
const char *HandlingFilename = "HANDLING.CFG";
diff --git a/src/vehicles/HandlingMgr.h b/src/vehicles/HandlingMgr.h
index 70f1c005..137925f3 100644
--- a/src/vehicles/HandlingMgr.h
+++ b/src/vehicles/HandlingMgr.h
@@ -140,4 +140,4 @@ public:
bool HasFrontWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
};
VALIDATE_SIZE(cHandlingDataMgr, 0x3030);
-extern cHandlingDataMgr &mod_HandlingManager;
+extern cHandlingDataMgr mod_HandlingManager;
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index c4cdcb02..61714133 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -34,13 +34,13 @@ enum
HELI_STATUS_HOVER2,
};
-CHeli **CHeli::pHelis = (CHeli**)0x72CF50;
-int16 &CHeli::NumRandomHelis = *(int16*)0x95CCAA;
-uint32 &CHeli::TestForNewRandomHelisTimer = *(uint32*)0x8F1A7C;
+CHeli *CHeli::pHelis[NUM_HELIS];// = (CHeli**)0x72CF50;
+int16 CHeli::NumRandomHelis;// = *(int16*)0x95CCAA;
+uint32 CHeli::TestForNewRandomHelisTimer;// = *(uint32*)0x8F1A7C;
int16 CHeli::NumScriptHelis; // unused
-bool &CHeli::CatalinaHeliOn = *(bool*)0x95CD85;
-bool &CHeli::CatalinaHasBeenShotDown = *(bool*)0x95CD56;
-bool &CHeli::ScriptHeliOn = *(bool*)0x95CD43;
+bool CHeli::CatalinaHeliOn;// = *(bool*)0x95CD85;
+bool CHeli::CatalinaHasBeenShotDown;// = *(bool*)0x95CD56;
+bool CHeli::ScriptHeliOn;// = *(bool*)0x95CD43;
CHeli::CHeli(int32 id, uint8 CreatedBy)
: CVehicle(CreatedBy)
diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h
index bb10345d..15dff7b1 100644
--- a/src/vehicles/Heli.h
+++ b/src/vehicles/Heli.h
@@ -61,13 +61,13 @@ public:
float m_fTargetOffset;
bool m_bTestRight;
- static CHeli **pHelis; //[NUM_HELIS]
- static int16 &NumRandomHelis;
- static uint32 &TestForNewRandomHelisTimer;
+ static CHeli *pHelis[NUM_HELIS];
+ static int16 NumRandomHelis;
+ static uint32 TestForNewRandomHelisTimer;
static int16 NumScriptHelis; // unused
- static bool &CatalinaHeliOn;
- static bool &CatalinaHasBeenShotDown;
- static bool &ScriptHeliOn;
+ static bool CatalinaHeliOn;
+ static bool CatalinaHasBeenShotDown;
+ static bool ScriptHeliOn;
CHeli(int32 id, uint8 CreatedBy);
CHeli* ctor(int, uint8);
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp
index c2b9e493..49f5d69d 100644
--- a/src/vehicles/Plane.cpp
+++ b/src/vehicles/Plane.cpp
@@ -16,35 +16,35 @@
#include "HandlingMgr.h"
#include "Plane.h"
-CPlaneNode *&pPathNodes = *(CPlaneNode**)0x8F1B68;
-CPlaneNode *&pPath2Nodes = *(CPlaneNode**)0x885B8C;
-CPlaneNode *&pPath3Nodes = *(CPlaneNode**)0x885B78;
-CPlaneNode *&pPath4Nodes = *(CPlaneNode**)0x885AD8;
-int32 &NumPathNodes = *(int32*)0x8F2BE4;
-int32 &NumPath2Nodes = *(int32*)0x941498;
-int32 &NumPath3Nodes = *(int32*)0x9414D8;
-int32 &NumPath4Nodes = *(int32*)0x9412C8;
-float &TotalLengthOfFlightPath = *(float*)0x8F2C6C;
-float &TotalLengthOfFlightPath2 = *(float*)0x64CFBC;
-float &TotalLengthOfFlightPath3 = *(float*)0x64CFD0;
-float &TotalLengthOfFlightPath4 = *(float*)0x64CFDC;
-float &TotalDurationOfFlightPath = *(float*)0x64CFB8;
-float &TotalDurationOfFlightPath2 = *(float*)0x64CFC0;
-float &TotalDurationOfFlightPath3 = *(float*)0x64CFD4;
-float &TotalDurationOfFlightPath4 = *(float*)0x64CFE0;
-float &LandingPoint = *(float*)0x8F2C7C;
-float &TakeOffPoint = *(float*)0x8E28A4;
-CPlaneInterpolationLine *aPlaneLineBits = (CPlaneInterpolationLine*)0x734168; //[6]
-
-float *PlanePathPosition = (float*)0x8F5FC8; //[3]
-float *OldPlanePathPosition = (float*)0x8F5FBC; //[3]
-float *PlanePathSpeed = (float*)0x941538; //[3]
-float *PlanePath2Position = (float*)0x64CFC4; //[3]
-float &PlanePath3Position = *(float*)0x64CFD8;
-float &PlanePath4Position = *(float*)0x64CFE4;
-float *PlanePath2Speed = (float*)0x8F1A54; //[3]
-float &PlanePath3Speed = *(float*)0x8F1A94;
-float &PlanePath4Speed = *(float*)0x8F1AFC;
+CPlaneNode *pPathNodes;// = *(CPlaneNode**)0x8F1B68;
+CPlaneNode *pPath2Nodes;// = *(CPlaneNode**)0x885B8C;
+CPlaneNode *pPath3Nodes;// = *(CPlaneNode**)0x885B78;
+CPlaneNode *pPath4Nodes;// = *(CPlaneNode**)0x885AD8;
+int32 NumPathNodes;// = *(int32*)0x8F2BE4;
+int32 NumPath2Nodes;// = *(int32*)0x941498;
+int32 NumPath3Nodes;// = *(int32*)0x9414D8;
+int32 NumPath4Nodes;// = *(int32*)0x9412C8;
+float TotalLengthOfFlightPath;// = *(float*)0x8F2C6C;
+float TotalLengthOfFlightPath2;// = *(float*)0x64CFBC;
+float TotalLengthOfFlightPath3;// = *(float*)0x64CFD0;
+float TotalLengthOfFlightPath4;// = *(float*)0x64CFDC;
+float TotalDurationOfFlightPath;// = *(float*)0x64CFB8;
+float TotalDurationOfFlightPath2;// = *(float*)0x64CFC0;
+float TotalDurationOfFlightPath3;// = *(float*)0x64CFD4;
+float TotalDurationOfFlightPath4;// = *(float*)0x64CFE0;
+float LandingPoint;// = *(float*)0x8F2C7C;
+float TakeOffPoint;// = *(float*)0x8E28A4;
+CPlaneInterpolationLine aPlaneLineBits[6]; // = (CPlaneInterpolationLine*)0x734168;
+
+float PlanePathPosition[3];// = (float*)0x8F5FC8; //[3]
+float OldPlanePathPosition[3];// = (float*)0x8F5FBC; //[3]
+float PlanePathSpeed[3];// = (float*)0x941538; //[3]
+float PlanePath2Position[3];// = (float*)0x64CFC4; //[3]
+float PlanePath3Position;// = *(float*)0x64CFD8;
+float PlanePath4Position;// = *(float*)0x64CFE4;
+float PlanePath2Speed[3];// = (float*)0x8F1A54; //[3]
+float PlanePath3Speed;// = *(float*)0x8F1A94;
+float PlanePath4Speed;// = *(float*)0x8F1AFC;
enum
diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h
index edca92ec..4c8e70aa 100644
--- a/src/vehicles/Plane.h
+++ b/src/vehicles/Plane.h
@@ -67,6 +67,6 @@ public:
};
static_assert(sizeof(CPlane) == 0x29C, "CPlane: error");
-extern float &LandingPoint;
-extern float &TakeOffPoint;
-extern float *PlanePathPosition; //[3]
+extern float LandingPoint;
+extern float TakeOffPoint;
+extern float PlanePathPosition[3];
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index 7d81fd57..25be193c 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -14,23 +14,23 @@
#include "HandlingMgr.h"
#include "Train.h"
-static CTrainNode *&pTrackNodes = *(CTrainNode**)0x8F4338;
-static int16 &NumTrackNodes = *(int16*)0x95CC5C;
+static CTrainNode* pTrackNodes;
+static int16 NumTrackNodes;
static float StationDist[3] = { 873.0f, 1522.0f, 2481.0f };
-static float &TotalLengthOfTrack = *(float*)0x64D000;
-static float &TotalDurationOfTrack = *(float*)0x64D004;
-static CTrainInterpolationLine *aLineBits = (CTrainInterpolationLine*)0x70D838; // [17]
-static float *EngineTrackPosition = (float*)0x64D008; //[2]
-static float *EngineTrackSpeed = (float*)0x880848; //[2]
-
-static CTrainNode *&pTrackNodes_S = *(CTrainNode**)0x8F2560;
-static int16 &NumTrackNodes_S = *(int16*)0x95CC6A;
+static float TotalLengthOfTrack;
+static float TotalDurationOfTrack;
+static CTrainInterpolationLine aLineBits[17];
+static float EngineTrackPosition[2];
+static float EngineTrackSpeed[2];
+
+static CTrainNode* pTrackNodes_S;
+static int16 NumTrackNodes_S;
static float StationDist_S[4] = { 55.0f, 1388.0f, 2337.0f, 3989.0f };
-static float &TotalLengthOfTrack_S = *(float*)0x64D010;
-static float &TotalDurationOfTrack_S = *(float*)0x64D014;
-static CTrainInterpolationLine *aLineBits_S = (CTrainInterpolationLine*)0x726600; // [18]
-static float *EngineTrackPosition_S = (float*)0x64D018; //[4]
-static float *EngineTrackSpeed_S = (float*)0x87C7C8; //[4]
+static float TotalLengthOfTrack_S;
+static float TotalDurationOfTrack_S;
+static CTrainInterpolationLine aLineBits_S[18];
+static float EngineTrackPosition_S[4];
+static float EngineTrackSpeed_S[4];
CVector CTrain::aStationCoors[3];
CVector CTrain::aStationCoors_S[4];