summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-17 00:16:38 +0200
committeraap <aap@papnet.eu>2019-06-17 00:23:19 +0200
commit0add48abf589330ae6fe11e304c111d9f52ce009 (patch)
treee9f4374bf520a2fdfb9f3d66cd4ed0aa822a020b /src
parentupdated guidelines (diff)
downloadre3-0add48abf589330ae6fe11e304c111d9f52ce009.tar
re3-0add48abf589330ae6fe11e304c111d9f52ce009.tar.gz
re3-0add48abf589330ae6fe11e304c111d9f52ce009.tar.bz2
re3-0add48abf589330ae6fe11e304c111d9f52ce009.tar.lz
re3-0add48abf589330ae6fe11e304c111d9f52ce009.tar.xz
re3-0add48abf589330ae6fe11e304c111d9f52ce009.tar.zst
re3-0add48abf589330ae6fe11e304c111d9f52ce009.zip
Diffstat (limited to '')
-rw-r--r--src/Camera.cpp2
-rw-r--r--src/Camera.h2
-rw-r--r--src/Clock.cpp2
-rw-r--r--src/ControllerConfig.cpp10
-rw-r--r--src/ControllerConfig.h16
-rw-r--r--src/Frontend.cpp6
-rw-r--r--src/Frontend.h6
-rw-r--r--src/Game.cpp6
-rw-r--r--src/Game.h6
-rw-r--r--src/General.h2
-rw-r--r--src/PCSave.cpp2
-rw-r--r--src/PCSave.h2
-rw-r--r--src/Pad.cpp232
-rw-r--r--src/Pad.h368
-rw-r--r--src/Radar.cpp2
-rw-r--r--src/Radar.h2
-rw-r--r--src/Stats.cpp4
-rw-r--r--src/Stats.h4
-rw-r--r--src/Timer.cpp36
-rw-r--r--src/Timer.h12
-rw-r--r--src/Wanted.h4
-rw-r--r--src/audio/AudioScriptObject.cpp4
-rw-r--r--src/audio/AudioScriptObject.h2
-rw-r--r--src/audio/DMAudio.cpp10
-rw-r--r--src/audio/DMAudio.h10
-rw-r--r--src/audio/MusicManager.h14
-rw-r--r--src/common.h39
-rw-r--r--src/control/Population.cpp2
-rw-r--r--src/control/Population.h2
-rw-r--r--src/control/Record.cpp4
-rw-r--r--src/control/Record.h4
-rw-r--r--src/control/Replay.cpp2
-rw-r--r--src/control/Replay.h2
-rw-r--r--src/control/Script.h28
-rw-r--r--src/entities/Ped.cpp6
-rw-r--r--src/entities/Ped.h12
-rw-r--r--src/entities/PlayerInfo.h14
-rw-r--r--src/entities/PlayerPed.h28
-rw-r--r--src/entities/Vehicle.cpp10
-rw-r--r--src/entities/Vehicle.h10
-rw-r--r--src/render/Hud.cpp46
-rw-r--r--src/render/Hud.h24
-rw-r--r--src/render/Particle.cpp206
-rw-r--r--src/render/Particle.h54
-rw-r--r--src/render/ParticleMgr.cpp20
-rw-r--r--src/render/ParticleMgr.h64
-rw-r--r--src/skel/events.cpp18
-rw-r--r--src/skel/win/win.cpp46
48 files changed, 701 insertions, 706 deletions
diff --git a/src/Camera.cpp b/src/Camera.cpp
index ebe08f09..7bd4aac9 100644
--- a/src/Camera.cpp
+++ b/src/Camera.cpp
@@ -14,7 +14,7 @@
const float DefaultFOV = 80.0f; // actually 70.0f
CCamera &TheCamera = *(CCamera*)0x6FACF8;
-Bool &CCamera::m_bUseMouse3rdPerson = *(Bool *)0x5F03D8;
+bool &CCamera::m_bUseMouse3rdPerson = *(bool *)0x5F03D8;
WRAPPER void CCamera::DrawBordersForWideScreen(void) { EAXJMP(0x46B430); }
diff --git a/src/Camera.h b/src/Camera.h
index 0f3a1128..1f9a287c 100644
--- a/src/Camera.h
+++ b/src/Camera.h
@@ -439,7 +439,7 @@ int m_iModeObbeCamIsInForCar;
uint32 m_uiFadeTimeStarted;
uint32 m_uiFadeTimeStartedMusic;
- static Bool &m_bUseMouse3rdPerson;
+ static bool &m_bUseMouse3rdPerson;
CMatrix &GetCameraMatrix(void) { return m_cameraMatrix; }
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
diff --git a/src/Clock.cpp b/src/Clock.cpp
index dd7b99fe..707b0e57 100644
--- a/src/Clock.cpp
+++ b/src/Clock.cpp
@@ -6,7 +6,7 @@
#include "Stats.h"
_TODO("gbFastTime");
-Bool &gbFastTime = *(Bool*)0x95CDBB;
+bool &gbFastTime = *(bool*)0x95CDBB;
uint8 &CClock::ms_nGameClockHours = *(uint8*)0x95CDA6;
uint8 &CClock::ms_nGameClockMinutes = *(uint8*)0x95CDC8;
diff --git a/src/ControllerConfig.cpp b/src/ControllerConfig.cpp
index cd38049e..a401e093 100644
--- a/src/ControllerConfig.cpp
+++ b/src/ControllerConfig.cpp
@@ -16,19 +16,19 @@ WRAPPER void CControllerConfigManager::AffectControllerStateOn_ButtonUp(int butt
WRAPPER void CControllerConfigManager::MakeControllerActionsBlank() { EAXJMP(0x58B7A0); }
WRAPPER void CControllerConfigManager::InitDefaultControlConfiguration() { EAXJMP(0x58B930); }
WRAPPER void CControllerConfigManager::InitDefaultControlConfigMouse(CMouseControllerState const &mousestate) { EAXJMP(0x58BD00); }
-WRAPPER Int32 CControllerConfigManager::GetJoyButtonJustDown() { EAXJMP(0x58B7D0); }
+WRAPPER int32 CControllerConfigManager::GetJoyButtonJustDown() { EAXJMP(0x58B7D0); }
WRAPPER void CControllerConfigManager::InitDefaultControlConfigJoyPad(unsigned int buttons) { EAXJMP(0x58BD90); }
WRAPPER void CControllerConfigManager::ClearSimButtonPressCheckers() { EAXJMP(0x58D220); }
WRAPPER void CControllerConfigManager::AffectPadFromKeyBoard() { EAXJMP(0x58D0C0); }
WRAPPER void CControllerConfigManager::AffectPadFromMouse() { EAXJMP(0x58D1A0); }
-void CControllerConfigManager::LoadSettings(Int32 file)
+void CControllerConfigManager::LoadSettings(int32 file)
{
- Bool bValid = true;
+ bool bValid = true;
if ( file )
{
- Char buff[29];
+ char buff[29];
CFileMgr::Read(file, buff, sizeof(buff));
if ( !strncmp(buff, "THIS FILE IS NOT VALID YET", sizeof(buff) - 3) )
@@ -45,7 +45,7 @@ void CControllerConfigManager::LoadSettings(Int32 file)
{
for ( int j = 0; j < 41; j++ )
{
- CFileMgr::Read(file, (Char *)&ControlsManager.m_aSettings[j][i], sizeof(tControllerConfigBind));
+ CFileMgr::Read(file, (char *)&ControlsManager.m_aSettings[j][i], sizeof(tControllerConfigBind));
}
}
}
diff --git a/src/ControllerConfig.h b/src/ControllerConfig.h
index 01d34b3c..00cab82e 100644
--- a/src/ControllerConfig.h
+++ b/src/ControllerConfig.h
@@ -19,19 +19,19 @@ public:
struct tControllerConfigBind
{
RsKeyCodes m_Key;
- Int32 m_ContSetOrder;
+ int32 m_ContSetOrder;
};
- Bool field_0;
+ bool field_0;
char _pad0[3];
DIJOYSTATE2 m_OldState;
DIJOYSTATE2 m_NewState;
- WChar m_aActionNames[41][40];
- Bool m_aButtonStates[17];
+ wchar m_aActionNames[41][40];
+ bool m_aButtonStates[17];
char _pad1[3];
tControllerConfigBind m_aSettings[41][4];
- UInt8 m_aSimCheckers[4][4];
- Bool m_bMouseAssociated;
+ uint8 m_aSimCheckers[4][4];
+ bool m_bMouseAssociated;
char _pad2[3];
void UpdateJoyButtonState(int padnumber);
@@ -40,8 +40,8 @@ public:
void UpdateJoyInConfigMenus_ButtonUp(int button, int padnumber);
void AffectControllerStateOn_ButtonUp(int button, int padnumber);
- Int32 GetJoyButtonJustDown();
- void LoadSettings(Int32 file);
+ int32 GetJoyButtonJustDown();
+ void LoadSettings(int32 file);
void MakeControllerActionsBlank();
void InitDefaultControlConfiguration();
void InitDefaultControlConfigMouse(CMouseControllerState const &mousestate);
diff --git a/src/Frontend.cpp b/src/Frontend.cpp
index 22e28cab..5613a2eb 100644
--- a/src/Frontend.cpp
+++ b/src/Frontend.cpp
@@ -15,14 +15,14 @@ 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_bStartUpFrontEndRequested = *(Bool*)0x95CCF4;
+bool &CMenuManager::m_PrefsAllowNastyGame = *(bool*)0x5F2E64;
+bool &CMenuManager::m_bStartUpFrontEndRequested = *(bool*)0x95CCF4;
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;
+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;
diff --git a/src/Frontend.h b/src/Frontend.h
index 6e781834..2e95d582 100644
--- a/src/Frontend.h
+++ b/src/Frontend.h
@@ -161,13 +161,13 @@ public:
static int8 &m_PrefsLanguage;
static int8 &m_bDisableMouseSteering;
static int32 &m_PrefsBrightness;
- static Float &m_PrefsLOD;
+ static float &m_PrefsLOD;
static int8 &m_bFrontEnd_ReloadObrTxtGxt;
static int32 &m_PrefsMusicVolume;
static int32 &m_PrefsSfxVolume;
- static Bool &m_PrefsAllowNastyGame;
- static Bool &m_bStartUpFrontEndRequested;
+ static bool &m_PrefsAllowNastyGame;
+ static bool &m_bStartUpFrontEndRequested;
void Process(void);
void DrawFrontEnd(void);
diff --git a/src/Game.cpp b/src/Game.cpp
index 9da2dab7..5073eed1 100644
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -11,11 +11,11 @@ bool &CGame::noProstitutes = *(bool*)0x95CDCF;
bool &CGame::playingIntro = *(bool*)0x95CDC2;
WRAPPER void CGame::Process(void) { EAXJMP(0x48C850); }
-WRAPPER Bool CGame::InitialiseOnceBeforeRW(void) { EAXJMP(0x48BB80); }
-WRAPPER Bool CGame::InitialiseRenderWare(void) { EAXJMP(0x48BBA0); }
+WRAPPER bool CGame::InitialiseOnceBeforeRW(void) { EAXJMP(0x48BB80); }
+WRAPPER bool CGame::InitialiseRenderWare(void) { EAXJMP(0x48BBA0); }
WRAPPER void CGame::ShutdownRenderWare(void) { EAXJMP(0x48BCB0); }
WRAPPER void CGame::FinalShutdown(void) { EAXJMP(0x48BEC0); }
WRAPPER void CGame::ShutDown(void) { EAXJMP(0x48C3A0); }
WRAPPER void CGame::ShutDownForRestart(void) { EAXJMP(0x48C6B0); }
WRAPPER void CGame::InitialiseWhenRestarting(void) { EAXJMP(0x48C740); }
-WRAPPER Bool CGame::InitialiseOnceAfterRW(void) { EAXJMP(0x48BD50); }
+WRAPPER bool CGame::InitialiseOnceAfterRW(void) { EAXJMP(0x48BD50); }
diff --git a/src/Game.h b/src/Game.h
index 279c3807..ab881484 100644
--- a/src/Game.h
+++ b/src/Game.h
@@ -20,12 +20,12 @@ public:
static bool &playingIntro;
static void Process(void);
- static Bool InitialiseOnceBeforeRW(void);
- static Bool InitialiseRenderWare(void);
+ static bool InitialiseOnceBeforeRW(void);
+ static bool InitialiseRenderWare(void);
static void ShutdownRenderWare(void);
static void FinalShutdown(void);
static void ShutDown(void);
static void ShutDownForRestart(void);
static void InitialiseWhenRestarting(void);
- static Bool InitialiseOnceAfterRW(void);
+ static bool InitialiseOnceAfterRW(void);
};
diff --git a/src/General.h b/src/General.h
index f957ab2f..41bdf5d7 100644
--- a/src/General.h
+++ b/src/General.h
@@ -47,6 +47,6 @@ public:
static float GetRandomNumberInRange(float low, float high)
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
- static Int32 GetRandomNumberInRange(Int32 low, Int32 high)
+ static int32 GetRandomNumberInRange(int32 low, int32 high)
{ return low + (high - low)*(GetRandomNumber()/float(MYRAND_MAX + 1)); }
};
diff --git a/src/PCSave.cpp b/src/PCSave.cpp
index 8ca48437..2d49b23f 100644
--- a/src/PCSave.cpp
+++ b/src/PCSave.cpp
@@ -3,5 +3,5 @@
#include "Frontend.h"
#include "PCSave.h"
-WRAPPER void C_PcSave::SetSaveDirectory(const Char *path) { EAXJMP(0x591EA0); }
+WRAPPER void C_PcSave::SetSaveDirectory(const char *path) { EAXJMP(0x591EA0); }
diff --git a/src/PCSave.h b/src/PCSave.h
index c653fab0..324a3421 100644
--- a/src/PCSave.h
+++ b/src/PCSave.h
@@ -3,5 +3,5 @@
class C_PcSave
{
public:
- static void SetSaveDirectory(const Char *path);
+ static void SetSaveDirectory(const char *path);
}; \ No newline at end of file
diff --git a/src/Pad.cpp b/src/Pad.cpp
index a9f67b5e..1615b0cd 100644
--- a/src/Pad.cpp
+++ b/src/Pad.cpp
@@ -28,22 +28,22 @@
CPad *Pads = (CPad*)0x6F0360; // [2]
CMousePointerStateHelper &MousePointerStateHelper = *(CMousePointerStateHelper*)0x95CC8C;
-Bool &CPad::bDisplayNoControllerMessage = *(Bool *)0x95CD52;
-Bool &CPad::bObsoleteControllerMessage = *(Bool *)0x95CDB8;
-Bool &CPad::m_bMapPadOneToPadTwo = *(Bool *)0x95CD48;
+bool &CPad::bDisplayNoControllerMessage = *(bool *)0x95CD52;
+bool &CPad::bObsoleteControllerMessage = *(bool *)0x95CDB8;
+bool &CPad::m_bMapPadOneToPadTwo = *(bool *)0x95CD48;
CKeyboardState &CPad::OldKeyState = *(CKeyboardState*)0x6F1E70;
CKeyboardState &CPad::NewKeyState = *(CKeyboardState*)0x6E60D0;
CKeyboardState &CPad::TempKeyState = *(CKeyboardState*)0x774DE8;
-Char CPad::KeyBoardCheatString[18];
+char CPad::KeyBoardCheatString[18];
CMouseControllerState &CPad::OldMouseControllerState = *(CMouseControllerState*)0x8472A0;
CMouseControllerState &CPad::NewMouseControllerState = *(CMouseControllerState*)0x8809F0;
CMouseControllerState &CPad::PCTempMouseControllerState = *(CMouseControllerState*)0x6F1E60;
_TODO("gbFastTime");
-extern Bool &gbFastTime;
+extern bool &gbFastTime;
WRAPPER void WeaponCheat() { EAXJMP(0x490D90); }
WRAPPER void HealthCheat() { EAXJMP(0x490E70); }
@@ -84,10 +84,10 @@ CControllerState::Clear(void)
void CKeyboardState::Clear()
{
- for ( Int32 i = 0; i < 12; i++ )
+ for ( int32 i = 0; i < 12; i++ )
F[i] = 0;
- for ( Int32 i = 0; i < 256; i++ )
+ for ( int32 i = 0; i < 256; i++ )
VK_KEYS[i] = 0;
ESC = INS = DEL = HOME = END = PGUP = PGDN = 0;
@@ -111,7 +111,7 @@ void CKeyboardState::Clear()
LWIN = RWIN = APPS = 0;
}
-void CPad::Clear(Bool bResetPlayerControls)
+void CPad::Clear(bool bResetPlayerControls)
{
NewState.Clear();
OldState.Clear();
@@ -138,12 +138,12 @@ void CPad::Clear(Bool bResetPlayerControls)
bApplyBrakes = false;
- for ( Int32 i = 0; i < _TODOCONST(5); i++ )
+ for ( int32 i = 0; i < _TODOCONST(5); i++ )
bHornHistory[i] = false;
iCurrHornHistory = 0;
- for ( Int32 i = 0; i < _TODOCONST(12); i++ )
+ for ( int32 i = 0; i < _TODOCONST(12); i++ )
_unk[i] = ' ';
LastTimeTouched = CTimer::GetTimeInMilliseconds();
@@ -235,8 +235,8 @@ void CPad::UpdateMouse()
if ( PSGLOBAL(mouse) != NULL && SUCCEEDED(_InputGetMouseState(&state)) )
{
- Int32 signX = 1;
- Int32 signy = 1;
+ int32 signX = 1;
+ int32 signy = 1;
if ( !FrontEndMenuManager.m_bMenuActive )
{
@@ -248,8 +248,8 @@ void CPad::UpdateMouse()
PCTempMouseControllerState.Clear();
- PCTempMouseControllerState.x = (Float)(signX * state.lX);
- PCTempMouseControllerState.y = (Float)(signy * state.lY);
+ PCTempMouseControllerState.x = (float)(signX * state.lX);
+ PCTempMouseControllerState.y = (float)(signy * state.lY);
PCTempMouseControllerState.LMB = state.rgbButtons[0] & 128;
PCTempMouseControllerState.RMB = state.rgbButtons[1] & 128;
PCTempMouseControllerState.MMB = state.rgbButtons[2] & 128;
@@ -329,7 +329,7 @@ CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &Stat
#undef _FIX_RECON_DIR
}
-void CPad::StartShake(Int16 nDur, UInt8 nFreq)
+void CPad::StartShake(int16 nDur, uint8 nFreq)
{
if ( !CMenuManager::m_PrefsUseVibration )
return;
@@ -351,7 +351,7 @@ void CPad::StartShake(Int16 nDur, UInt8 nFreq)
}
}
-void CPad::StartShake_Distance(Int16 nDur, UInt8 nFreq, Float fX, Float fY, Float fZ)
+void CPad::StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, float fZ)
{
if ( !CMenuManager::m_PrefsUseVibration )
return;
@@ -359,7 +359,7 @@ void CPad::StartShake_Distance(Int16 nDur, UInt8 nFreq, Float fX, Float fY, Floa
if ( CCutsceneMgr::IsRunning() || CGame::playingIntro )
return;
- Float fDist = ( TheCamera.GetPosition() - CVector(fX, fY, fZ) ).Magnitude();
+ float fDist = ( TheCamera.GetPosition() - CVector(fX, fY, fZ) ).Magnitude();
if ( fDist < 70.0f )
{
@@ -378,7 +378,7 @@ void CPad::StartShake_Distance(Int16 nDur, UInt8 nFreq, Float fX, Float fY, Floa
}
}
-void CPad::StartShake_Train(Float fX, Float fY)
+void CPad::StartShake_Train(float fX, float fY)
{
if ( !CMenuManager::m_PrefsUseVibration )
return;
@@ -389,11 +389,11 @@ void CPad::StartShake_Train(Float fX, Float fY)
if (FindPlayerVehicle() != NULL && FindPlayerVehicle()->IsTrain() )
return;
- Float fDist = ( TheCamera.GetPosition() - CVector(fX, fY, 0.0f) ).Magnitude2D();
+ float fDist = ( TheCamera.GetPosition() - CVector(fX, fY, 0.0f) ).Magnitude2D();
if ( fDist < 70.0f )
{
- Int32 freq = (Int32)((70.0f - fDist) * 70.0f / 70.0f + 30.0f);
+ int32 freq = (int32)((70.0f - fDist) * 70.0f / 70.0f + 30.0f);
if ( ShakeDur < 100 )
{
@@ -403,9 +403,9 @@ void CPad::StartShake_Train(Float fX, Float fY)
}
}
-void CPad::AddToPCCheatString(Char c)
+void CPad::AddToPCCheatString(char c)
{
- for ( Int32 i = ARRAY_SIZE(KeyBoardCheatString); i >= 0; i-- )
+ for ( int32 i = ARRAY_SIZE(KeyBoardCheatString); i >= 0; i-- )
KeyBoardCheatString[i + 1] = KeyBoardCheatString[i];
KeyBoardCheatString[0] = c;
@@ -515,7 +515,7 @@ void CPad::AddToPCCheatString(Char c)
void CPad::UpdatePads(void)
{
- Bool bUpdate = true;
+ bool bUpdate = true;
GetPad(0)->UpdateMouse();
CapturePad(0);
@@ -545,7 +545,7 @@ void CPad::ProcessPCSpecificStuff(void)
;
}
-void CPad::Update(Int16 unk)
+void CPad::Update(int16 unk)
{
OldState = NewState;
@@ -573,7 +573,7 @@ void CPad::DoCheats(void)
GetPad(0)->DoCheats(0);
}
-void CPad::DoCheats(Int16 unk)
+void CPad::DoCheats(int16 unk)
{
#ifdef PS2
if ( GetTriangleJustDown() )
@@ -619,17 +619,17 @@ void CPad::StopPadsShaking(void)
GetPad(0)->StopShaking(0);
}
-void CPad::StopShaking(Int16 unk)
+void CPad::StopShaking(int16 unk)
{
;
}
-CPad *CPad::GetPad(Int32 pad)
+CPad *CPad::GetPad(int32 pad)
{
return &Pads[pad];
}
-Int16 CPad::GetSteeringLeftRight(void)
+int16 CPad::GetSteeringLeftRight(void)
{
if ( DisablePlayerControls )
return 0;
@@ -639,8 +639,8 @@ Int16 CPad::GetSteeringLeftRight(void)
case 0:
case 2:
{
- Int16 axis = NewState.LeftStickX;
- Int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
+ int16 axis = NewState.LeftStickX;
+ int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -662,7 +662,7 @@ Int16 CPad::GetSteeringLeftRight(void)
return 0;
}
-Int16 CPad::GetSteeringUpDown(void)
+int16 CPad::GetSteeringUpDown(void)
{
if ( DisablePlayerControls )
return 0;
@@ -672,8 +672,8 @@ Int16 CPad::GetSteeringUpDown(void)
case 0:
case 2:
{
- Int16 axis = NewState.LeftStickY;
- Int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
+ int16 axis = NewState.LeftStickY;
+ int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -695,7 +695,7 @@ Int16 CPad::GetSteeringUpDown(void)
return 0;
}
-Int16 CPad::GetCarGunUpDown(void)
+int16 CPad::GetCarGunUpDown(void)
{
if ( DisablePlayerControls )
return 0;
@@ -722,7 +722,7 @@ Int16 CPad::GetCarGunUpDown(void)
return 0;
}
-Int16 CPad::GetCarGunLeftRight(void)
+int16 CPad::GetCarGunLeftRight(void)
{
if ( DisablePlayerControls )
return 0;
@@ -749,7 +749,7 @@ Int16 CPad::GetCarGunLeftRight(void)
return 0;
}
-Int16 CPad::GetPedWalkLeftRight(void)
+int16 CPad::GetPedWalkLeftRight(void)
{
if ( DisablePlayerControls )
return 0;
@@ -759,8 +759,8 @@ Int16 CPad::GetPedWalkLeftRight(void)
case 0:
case 2:
{
- Int16 axis = NewState.LeftStickX;
- Int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
+ int16 axis = NewState.LeftStickX;
+ int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -783,7 +783,7 @@ Int16 CPad::GetPedWalkLeftRight(void)
}
-Int16 CPad::GetPedWalkUpDown(void)
+int16 CPad::GetPedWalkUpDown(void)
{
if ( DisablePlayerControls )
return 0;
@@ -793,8 +793,8 @@ Int16 CPad::GetPedWalkUpDown(void)
case 0:
case 2:
{
- Int16 axis = NewState.LeftStickY;
- Int16 dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
+ int16 axis = NewState.LeftStickY;
+ int16 dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -816,15 +816,15 @@ Int16 CPad::GetPedWalkUpDown(void)
return 0;
}
-Int16 CPad::GetAnalogueUpDown(void)
+int16 CPad::GetAnalogueUpDown(void)
{
switch ( Mode )
{
case 0:
case 2:
{
- Int16 axis = NewState.LeftStickY;
- Int16 dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
+ int16 axis = NewState.LeftStickY;
+ int16 dpad = (NewState.DPadDown - NewState.DPadUp) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -846,7 +846,7 @@ Int16 CPad::GetAnalogueUpDown(void)
return 0;
}
-Bool CPad::GetLookLeft(void)
+bool CPad::GetLookLeft(void)
{
if ( DisablePlayerControls )
return false;
@@ -854,7 +854,7 @@ Bool CPad::GetLookLeft(void)
return !!(NewState.LeftShoulder2 && !NewState.RightShoulder2);
}
-Bool CPad::GetLookRight(void)
+bool CPad::GetLookRight(void)
{
if ( DisablePlayerControls )
return false;
@@ -863,7 +863,7 @@ Bool CPad::GetLookRight(void)
}
-Bool CPad::GetLookBehindForCar(void)
+bool CPad::GetLookBehindForCar(void)
{
if ( DisablePlayerControls )
return false;
@@ -871,7 +871,7 @@ Bool CPad::GetLookBehindForCar(void)
return !!(NewState.RightShoulder2 && NewState.LeftShoulder2);
}
-Bool CPad::GetLookBehindForPed(void)
+bool CPad::GetLookBehindForPed(void)
{
if ( DisablePlayerControls )
return false;
@@ -879,7 +879,7 @@ Bool CPad::GetLookBehindForPed(void)
return !!NewState.RightShock;
}
-Bool CPad::GetHorn(void)
+bool CPad::GetHorn(void)
{
if ( DisablePlayerControls )
return false;
@@ -918,7 +918,7 @@ Bool CPad::GetHorn(void)
return false;
}
-Bool CPad::HornJustDown(void)
+bool CPad::HornJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -958,7 +958,7 @@ Bool CPad::HornJustDown(void)
}
-Bool CPad::GetCarGunFired(void)
+bool CPad::GetCarGunFired(void)
{
if ( DisablePlayerControls )
return false;
@@ -985,7 +985,7 @@ Bool CPad::GetCarGunFired(void)
return false;
}
-Bool CPad::CarGunJustDown(void)
+bool CPad::CarGunJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1012,7 +1012,7 @@ Bool CPad::CarGunJustDown(void)
return false;
}
-Int16 CPad::GetHandBrake(void)
+int16 CPad::GetHandBrake(void)
{
if ( DisablePlayerControls )
return 0;
@@ -1045,7 +1045,7 @@ Int16 CPad::GetHandBrake(void)
return 0;
}
-Int16 CPad::GetBrake(void)
+int16 CPad::GetBrake(void)
{
if ( DisablePlayerControls )
return 0;
@@ -1069,7 +1069,7 @@ Int16 CPad::GetBrake(void)
case 3:
{
- Int16 axis = 2 * NewState.RightStickY;
+ int16 axis = 2 * NewState.RightStickY;
if ( axis < 0 )
return 0;
@@ -1083,7 +1083,7 @@ Int16 CPad::GetBrake(void)
return 0;
}
-Bool CPad::GetExitVehicle(void)
+bool CPad::GetExitVehicle(void)
{
if ( DisablePlayerControls )
return false;
@@ -1110,7 +1110,7 @@ Bool CPad::GetExitVehicle(void)
return false;
}
-Bool CPad::ExitVehicleJustDown(void)
+bool CPad::ExitVehicleJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1137,7 +1137,7 @@ Bool CPad::ExitVehicleJustDown(void)
return false;
}
-Int32 CPad::GetWeapon(void)
+int32 CPad::GetWeapon(void)
{
if ( DisablePlayerControls )
return false;
@@ -1170,7 +1170,7 @@ Int32 CPad::GetWeapon(void)
return false;
}
-Bool CPad::WeaponJustDown(void)
+bool CPad::WeaponJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1203,7 +1203,7 @@ Bool CPad::WeaponJustDown(void)
return false;
}
-Int16 CPad::GetAccelerate(void)
+int16 CPad::GetAccelerate(void)
{
if ( DisablePlayerControls )
return 0;
@@ -1227,7 +1227,7 @@ Int16 CPad::GetAccelerate(void)
case 3:
{
- Int16 axis = -2 * NewState.RightStickY;
+ int16 axis = -2 * NewState.RightStickY;
if ( axis < 0 )
return 0;
@@ -1241,7 +1241,7 @@ Int16 CPad::GetAccelerate(void)
return 0;
}
-Bool CPad::CycleCameraModeUpJustDown(void)
+bool CPad::CycleCameraModeUpJustDown(void)
{
switch ( Mode )
{
@@ -1265,7 +1265,7 @@ Bool CPad::CycleCameraModeUpJustDown(void)
return false;
}
-Bool CPad::CycleCameraModeDownJustDown(void)
+bool CPad::CycleCameraModeDownJustDown(void)
{
switch ( Mode )
{
@@ -1289,7 +1289,7 @@ Bool CPad::CycleCameraModeDownJustDown(void)
return false;
}
-Bool CPad::ChangeStationJustDown(void)
+bool CPad::ChangeStationJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1329,7 +1329,7 @@ Bool CPad::ChangeStationJustDown(void)
}
-Bool CPad::CycleWeaponLeftJustDown(void)
+bool CPad::CycleWeaponLeftJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1337,7 +1337,7 @@ Bool CPad::CycleWeaponLeftJustDown(void)
return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2);
}
-Bool CPad::CycleWeaponRightJustDown(void)
+bool CPad::CycleWeaponRightJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1345,7 +1345,7 @@ Bool CPad::CycleWeaponRightJustDown(void)
return !!(NewState.RightShoulder2 && !OldState.RightShoulder2);
}
-Bool CPad::GetTarget(void)
+bool CPad::GetTarget(void)
{
if ( DisablePlayerControls )
return false;
@@ -1372,7 +1372,7 @@ Bool CPad::GetTarget(void)
return false;
}
-Bool CPad::TargetJustDown(void)
+bool CPad::TargetJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1399,7 +1399,7 @@ Bool CPad::TargetJustDown(void)
return false;
}
-Bool CPad::JumpJustDown(void)
+bool CPad::JumpJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1407,7 +1407,7 @@ Bool CPad::JumpJustDown(void)
return !!(NewState.Square && !OldState.Square);
}
-Bool CPad::GetSprint(void)
+bool CPad::GetSprint(void)
{
if ( DisablePlayerControls )
return false;
@@ -1434,7 +1434,7 @@ Bool CPad::GetSprint(void)
return false;
}
-Bool CPad::ShiftTargetLeftJustDown(void)
+bool CPad::ShiftTargetLeftJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1442,7 +1442,7 @@ Bool CPad::ShiftTargetLeftJustDown(void)
return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2);
}
-Bool CPad::ShiftTargetRightJustDown(void)
+bool CPad::ShiftTargetRightJustDown(void)
{
if ( DisablePlayerControls )
return false;
@@ -1450,11 +1450,11 @@ Bool CPad::ShiftTargetRightJustDown(void)
return !!(NewState.RightShoulder2 && !OldState.RightShoulder2);
}
-Bool CPad::GetAnaloguePadUp(void)
+bool CPad::GetAnaloguePadUp(void)
{
- static Int16 oldfStickY = 0;
+ static int16 oldfStickY = 0;
- Int16 Y = CPad::GetPad(0)->GetAnalogueUpDown();
+ int16 Y = CPad::GetPad(0)->GetAnalogueUpDown();
if ( Y < 0 && oldfStickY >= 0 )
{
@@ -1468,11 +1468,11 @@ Bool CPad::GetAnaloguePadUp(void)
}
}
-Bool CPad::GetAnaloguePadDown(void)
+bool CPad::GetAnaloguePadDown(void)
{
- static Int16 oldfStickY = 0;
+ static int16 oldfStickY = 0;
- Int16 Y = CPad::GetPad(0)->GetAnalogueUpDown();
+ int16 Y = CPad::GetPad(0)->GetAnalogueUpDown();
if ( Y > 0 && oldfStickY <= 0 )
{
@@ -1486,11 +1486,11 @@ Bool CPad::GetAnaloguePadDown(void)
}
}
-Bool CPad::GetAnaloguePadLeft(void)
+bool CPad::GetAnaloguePadLeft(void)
{
- static Int16 oldfStickX = 0;
+ static int16 oldfStickX = 0;
- Int16 X = CPad::GetPad(0)->GetPedWalkLeftRight();
+ int16 X = CPad::GetPad(0)->GetPedWalkLeftRight();
if ( X < 0 && oldfStickX >= 0 )
{
@@ -1504,11 +1504,11 @@ Bool CPad::GetAnaloguePadLeft(void)
}
}
-Bool CPad::GetAnaloguePadRight(void)
+bool CPad::GetAnaloguePadRight(void)
{
- static Int16 oldfStickX = 0;
+ static int16 oldfStickX = 0;
- Int16 X = CPad::GetPad(0)->GetPedWalkLeftRight();
+ int16 X = CPad::GetPad(0)->GetPedWalkLeftRight();
if ( X > 0 && oldfStickX <= 0 )
{
@@ -1522,11 +1522,11 @@ Bool CPad::GetAnaloguePadRight(void)
}
}
-Bool CPad::GetAnaloguePadLeftJustUp(void)
+bool CPad::GetAnaloguePadLeftJustUp(void)
{
- static Int16 oldfStickX = 0;
+ static int16 oldfStickX = 0;
- Int16 X = GetPad(0)->GetPedWalkLeftRight();
+ int16 X = GetPad(0)->GetPedWalkLeftRight();
if ( X == 0 && oldfStickX < 0 )
{
@@ -1542,11 +1542,11 @@ Bool CPad::GetAnaloguePadLeftJustUp(void)
}
}
-Bool CPad::GetAnaloguePadRightJustUp(void)
+bool CPad::GetAnaloguePadRightJustUp(void)
{
- static Int16 oldfStickX = 0;
+ static int16 oldfStickX = 0;
- Int16 X = GetPad(0)->GetPedWalkLeftRight();
+ int16 X = GetPad(0)->GetPedWalkLeftRight();
if ( X == 0 && oldfStickX > 0 )
{
@@ -1562,7 +1562,7 @@ Bool CPad::GetAnaloguePadRightJustUp(void)
}
}
-Bool CPad::ForceCameraBehindPlayer(void)
+bool CPad::ForceCameraBehindPlayer(void)
{
if ( DisablePlayerControls )
return false;
@@ -1595,7 +1595,7 @@ Bool CPad::ForceCameraBehindPlayer(void)
return false;
}
-Bool CPad::SniperZoomIn(void)
+bool CPad::SniperZoomIn(void)
{
if ( DisablePlayerControls )
return false;
@@ -1622,7 +1622,7 @@ Bool CPad::SniperZoomIn(void)
return false;
}
-Bool CPad::SniperZoomOut(void)
+bool CPad::SniperZoomOut(void)
{
if ( DisablePlayerControls )
return false;
@@ -1650,10 +1650,10 @@ Bool CPad::SniperZoomOut(void)
}
-Int16 CPad::SniperModeLookLeftRight(void)
+int16 CPad::SniperModeLookLeftRight(void)
{
- Int16 axis = NewState.LeftStickX;
- Int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
+ int16 axis = NewState.LeftStickX;
+ int16 dpad = (NewState.DPadRight - NewState.DPadLeft) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -1661,10 +1661,10 @@ Int16 CPad::SniperModeLookLeftRight(void)
return dpad;
}
-Int16 CPad::SniperModeLookUpDown(void)
+int16 CPad::SniperModeLookUpDown(void)
{
- Int16 axis = NewState.LeftStickY;
- Int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
+ int16 axis = NewState.LeftStickY;
+ int16 dpad = (NewState.DPadUp - NewState.DPadDown) / 2;
if ( abs(axis) > abs(dpad) )
return axis;
@@ -1672,31 +1672,31 @@ Int16 CPad::SniperModeLookUpDown(void)
return dpad;
}
-Int16 CPad::LookAroundLeftRight(void)
+int16 CPad::LookAroundLeftRight(void)
{
- Float axis = GetPad(0)->NewState.RightStickX;
+ float axis = GetPad(0)->NewState.RightStickX;
if ( fabs(axis) > 85 && !GetLookBehindForPed() )
- return (Int16) ( (axis + ( axis > 0 ) ? -85 : 85)
+ return (int16) ( (axis + ( axis > 0 ) ? -85 : 85)
* (127.0f / 32.0f) ); // 3.96875f
else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && fabs(axis) > 10 )
- return (Int16) ( (axis + ( axis > 0 ) ? -10 : 10)
+ return (int16) ( (axis + ( axis > 0 ) ? -10 : 10)
* (127.0f / 64.0f) ); // 1.984375f
return 0;
}
-Int16 CPad::LookAroundUpDown(void)
+int16 CPad::LookAroundUpDown(void)
{
- Int16 axis = GetPad(0)->NewState.RightStickY;
+ int16 axis = GetPad(0)->NewState.RightStickY;
if ( abs(axis) > 85 && !GetLookBehindForPed() )
- return (Int16) ( (axis + ( axis > 0 ) ? -85 : 85)
+ return (int16) ( (axis + ( axis > 0 ) ? -85 : 85)
* (127.0f / 32.0f) ); // 3.96875f
else if ( TheCamera.Cams[0].Using3rdPersonMouseCam() && abs(axis) > 40 )
- return (Int16) ( (axis + ( axis > 0 ) ? -40 : 40)
+ return (int16) ( (axis + ( axis > 0 ) ? -40 : 40)
* (127.0f / 64.0f) ); // 1.984375f
return 0;
@@ -1750,7 +1750,7 @@ void CPad::PrintErrorMessage(void)
void LittleTest(void)
{
- static Int32 Cunt = 0;
+ static int32 Cunt = 0;
Cunt++; // ???
}
@@ -1775,12 +1775,12 @@ void CPad::ResetCheats(void)
CTimer::SetTimeScale(1.0f);
}
-Char *CPad::EditString(Char *pStr, Int32 nSize)
+char *CPad::EditString(char *pStr, int32 nSize)
{
- Int32 pos = strlen(pStr);
+ int32 pos = strlen(pStr);
// letters
- for ( Int32 i = 0; i < ('Z' - 'A' + 1); i++ )
+ for ( int32 i = 0; i < ('Z' - 'A' + 1); i++ )
{
if ( GetPad(0)->GetCharJustDown(i + 'A') && pos < nSize - 1 )
{
@@ -1796,7 +1796,7 @@ Char *CPad::EditString(Char *pStr, Int32 nSize)
}
// numbers
- for ( Int32 i = 0; i < ('0' - '9' + 1); i++ )
+ for ( int32 i = 0; i < ('0' - '9' + 1); i++ )
{
if ( GetPad(0)->GetCharJustDown(i + '0') && pos < nSize - 1 )
{
@@ -1827,17 +1827,17 @@ Char *CPad::EditString(Char *pStr, Int32 nSize)
return pStr;
}
-Int32 *CPad::EditCodesForControls(Int32 *pRsKeys, Int32 nSize)
+int32 *CPad::EditCodesForControls(int32 *pRsKeys, int32 nSize)
{
*pRsKeys = rsNULL;
- for ( Int32 i = 0; i < 255; i++ )
+ for ( int32 i = 0; i < 255; i++ )
{
if ( GetPad(0)->GetCharJustDown(i) )
*pRsKeys = i;
}
- for ( Int32 i = 0; i < 255; i++ )
+ for ( int32 i = 0; i < 255; i++ )
{
if ( GetPad(0)->GetFJustDown(i) )
*pRsKeys = i + rsF1;
@@ -1996,7 +1996,7 @@ STARTPATCHES
InjectHook(0x492C60, &CPad::ProcessPCSpecificStuff, PATCH_JUMP);
InjectHook(0x492C70, &CPad::Update, PATCH_JUMP);
InjectHook(0x492F00, (void (*)())CPad::DoCheats, PATCH_JUMP);
- InjectHook(0x492F20, (void (CPad::*)(Int16))&CPad::DoCheats, PATCH_JUMP);
+ InjectHook(0x492F20, (void (CPad::*)(int16))&CPad::DoCheats, PATCH_JUMP);
InjectHook(0x492F30, CPad::StopPadsShaking, PATCH_JUMP);
InjectHook(0x492F50, &CPad::StopShaking, PATCH_JUMP);
InjectHook(0x492F60, CPad::GetPad, PATCH_JUMP);
diff --git a/src/Pad.h b/src/Pad.h
index 446007c2..9180be26 100644
--- a/src/Pad.h
+++ b/src/Pad.h
@@ -78,16 +78,16 @@ class CMouseControllerState
public:
//uint32 btns; // bit 0-2 button 1-3
- Bool LMB;
- Bool RMB;
- Bool MMB;
- Bool WHEELUP;
- Bool WHEELDN;
- Bool MXB1;
- Bool MXB2;
+ bool LMB;
+ bool RMB;
+ bool MMB;
+ bool WHEELUP;
+ bool WHEELDN;
+ bool MXB1;
+ bool MXB2;
char _pad0;
- Float x, y;
+ float x, y;
CMouseControllerState();
void Clear();
@@ -98,8 +98,8 @@ VALIDATE_SIZE(CMouseControllerState, 0x10);
class CMousePointerStateHelper
{
public:
- Bool bInvertHorizontally;
- Bool bInvertVertically;
+ bool bInvertHorizontally;
+ bool bInvertVertically;
CMouseControllerState GetMouseSetUp();
};
@@ -112,52 +112,52 @@ extern CMousePointerStateHelper &MousePointerStateHelper;
class CKeyboardState
{
public:
- Int16 F[12];
- Int16 VK_KEYS[256];
- Int16 ESC;
- Int16 INS;
- Int16 DEL;
- Int16 HOME;
- Int16 END;
- Int16 PGUP;
- Int16 PGDN;
- Int16 UP;
- Int16 DOWN;
- Int16 LEFT;
- Int16 RIGHT;
- Int16 SCROLLLOCK;
- Int16 PAUSE;
- Int16 NUMLOCK;
- Int16 DIV;
- Int16 MUL;
- Int16 SUB;
- Int16 ADD;
- Int16 ENTER;
- Int16 DECIMAL;
- Int16 NUM1;
- Int16 NUM2;
- Int16 NUM3;
- Int16 NUM4;
- Int16 NUM5;
- Int16 NUM6;
- Int16 NUM7;
- Int16 NUM8;
- Int16 NUM9;
- Int16 NUM0;
- Int16 BACKSP;
- Int16 TAB;
- Int16 CAPSLOCK;
- Int16 EXTENTER;
- Int16 LSHIFT;
- Int16 RSHIFT;
- Int16 SHIFT;
- Int16 LCTRL;
- Int16 RCTRL;
- Int16 LALT;
- Int16 RALT;
- Int16 LWIN;
- Int16 RWIN;
- Int16 APPS;
+ int16 F[12];
+ int16 VK_KEYS[256];
+ int16 ESC;
+ int16 INS;
+ int16 DEL;
+ int16 HOME;
+ int16 END;
+ int16 PGUP;
+ int16 PGDN;
+ int16 UP;
+ int16 DOWN;
+ int16 LEFT;
+ int16 RIGHT;
+ int16 SCROLLLOCK;
+ int16 PAUSE;
+ int16 NUMLOCK;
+ int16 DIV;
+ int16 MUL;
+ int16 SUB;
+ int16 ADD;
+ int16 ENTER;
+ int16 DECIMAL;
+ int16 NUM1;
+ int16 NUM2;
+ int16 NUM3;
+ int16 NUM4;
+ int16 NUM5;
+ int16 NUM6;
+ int16 NUM7;
+ int16 NUM8;
+ int16 NUM9;
+ int16 NUM0;
+ int16 BACKSP;
+ int16 TAB;
+ int16 CAPSLOCK;
+ int16 EXTENTER;
+ int16 LSHIFT;
+ int16 RSHIFT;
+ int16 SHIFT;
+ int16 LCTRL;
+ int16 RCTRL;
+ int16 LALT;
+ int16 RALT;
+ int16 LWIN;
+ int16 RWIN;
+ int16 APPS;
void Clear();
};
@@ -185,12 +185,12 @@ public:
int16 Phase;
int16 Mode;
int16 ShakeDur;
- UInt8 ShakeFreq;
+ uint8 ShakeFreq;
int8 bHornHistory[5];
- UInt8 iCurrHornHistory;
- Bool DisablePlayerControls;
+ uint8 iCurrHornHistory;
+ bool DisablePlayerControls;
int8 bApplyBrakes;
- Char _unk[12]; //int32 unk[3];
+ char _unk[12]; //int32 unk[3];
char _pad0[3];
int32 LastTimeTouched;
int32 AverageWeapon;
@@ -199,14 +199,14 @@ public:
CPad() { }
~CPad() { }
- static Bool &bDisplayNoControllerMessage;
- static Bool &bObsoleteControllerMessage;
- static Bool &m_bMapPadOneToPadTwo;
+ static bool &bDisplayNoControllerMessage;
+ static bool &bObsoleteControllerMessage;
+ static bool &m_bMapPadOneToPadTwo;
static CKeyboardState &OldKeyState;
static CKeyboardState &NewKeyState;
static CKeyboardState &TempKeyState;
- static Char KeyBoardCheatString[18];
+ static char KeyBoardCheatString[18];
static CMouseControllerState &OldMouseControllerState;
static CMouseControllerState &NewMouseControllerState;
static CMouseControllerState &PCTempMouseControllerState;
@@ -214,150 +214,150 @@ public:
- void Clear(Bool bResetPlayerControls);
+ void Clear(bool bResetPlayerControls);
void ClearMouseHistory();
void UpdateMouse();
CControllerState ReconcileTwoControllersInput(CControllerState const &State1, CControllerState const &State2);
- void StartShake(Int16 nDur, UInt8 nFreq);
- void StartShake_Distance(Int16 nDur, UInt8 nFreq, Float fX, Float fY, Float fz);
- void StartShake_Train(Float fX, Float fY);
- void AddToPCCheatString(Char c);
+ void StartShake(int16 nDur, uint8 nFreq);
+ void StartShake_Distance(int16 nDur, uint8 nFreq, float fX, float fY, float fz);
+ void StartShake_Train(float fX, float fY);
+ void AddToPCCheatString(char c);
static void UpdatePads(void);
void ProcessPCSpecificStuff(void);
- void Update(Int16 unk);
+ void Update(int16 unk);
static void DoCheats(void);
- void DoCheats(Int16 unk);
+ void DoCheats(int16 unk);
static void StopPadsShaking(void);
- void StopShaking(Int16 unk);
+ void StopShaking(int16 unk);
- static CPad *GetPad(Int32 pad);
+ static CPad *GetPad(int32 pad);
- Int16 GetSteeringLeftRight(void);
- Int16 GetSteeringUpDown(void);
- Int16 GetCarGunUpDown(void);
- Int16 GetCarGunLeftRight(void);
- Int16 GetPedWalkLeftRight(void);
- Int16 GetPedWalkUpDown(void);
- Int16 GetAnalogueUpDown(void);
- Bool GetLookLeft(void);
- Bool GetLookRight(void);
- Bool GetLookBehindForCar(void);
- Bool GetLookBehindForPed(void);
- Bool GetHorn(void);
- Bool HornJustDown(void);
- Bool GetCarGunFired(void);
- Bool CarGunJustDown(void);
- Int16 GetHandBrake(void);
- Int16 GetBrake(void);
- Bool GetExitVehicle(void);
- Bool ExitVehicleJustDown(void);
- Int32 GetWeapon(void);
- Bool WeaponJustDown(void);
- Int16 GetAccelerate(void);
- Bool CycleCameraModeUpJustDown(void);
- Bool CycleCameraModeDownJustDown(void);
- Bool ChangeStationJustDown(void);
- Bool CycleWeaponLeftJustDown(void);
- Bool CycleWeaponRightJustDown(void);
- Bool GetTarget(void);
- Bool TargetJustDown(void);
- Bool JumpJustDown(void);
- Bool GetSprint(void);
- Bool ShiftTargetLeftJustDown(void);
- Bool ShiftTargetRightJustDown(void);
- Bool GetAnaloguePadUp(void);
- Bool GetAnaloguePadDown(void);
- Bool GetAnaloguePadLeft(void);
- Bool GetAnaloguePadRight(void);
- Bool GetAnaloguePadLeftJustUp(void);
- Bool GetAnaloguePadRightJustUp(void);
- Bool ForceCameraBehindPlayer(void);
- Bool SniperZoomIn(void);
- Bool SniperZoomOut(void);
- Int16 SniperModeLookLeftRight(void);
- Int16 SniperModeLookUpDown(void);
- Int16 LookAroundLeftRight(void);
- Int16 LookAroundUpDown(void);
+ int16 GetSteeringLeftRight(void);
+ int16 GetSteeringUpDown(void);
+ int16 GetCarGunUpDown(void);
+ int16 GetCarGunLeftRight(void);
+ int16 GetPedWalkLeftRight(void);
+ int16 GetPedWalkUpDown(void);
+ int16 GetAnalogueUpDown(void);
+ bool GetLookLeft(void);
+ bool GetLookRight(void);
+ bool GetLookBehindForCar(void);
+ bool GetLookBehindForPed(void);
+ bool GetHorn(void);
+ bool HornJustDown(void);
+ bool GetCarGunFired(void);
+ bool CarGunJustDown(void);
+ int16 GetHandBrake(void);
+ int16 GetBrake(void);
+ bool GetExitVehicle(void);
+ bool ExitVehicleJustDown(void);
+ int32 GetWeapon(void);
+ bool WeaponJustDown(void);
+ int16 GetAccelerate(void);
+ bool CycleCameraModeUpJustDown(void);
+ bool CycleCameraModeDownJustDown(void);
+ bool ChangeStationJustDown(void);
+ bool CycleWeaponLeftJustDown(void);
+ bool CycleWeaponRightJustDown(void);
+ bool GetTarget(void);
+ bool TargetJustDown(void);
+ bool JumpJustDown(void);
+ bool GetSprint(void);
+ bool ShiftTargetLeftJustDown(void);
+ bool ShiftTargetRightJustDown(void);
+ bool GetAnaloguePadUp(void);
+ bool GetAnaloguePadDown(void);
+ bool GetAnaloguePadLeft(void);
+ bool GetAnaloguePadRight(void);
+ bool GetAnaloguePadLeftJustUp(void);
+ bool GetAnaloguePadRightJustUp(void);
+ bool ForceCameraBehindPlayer(void);
+ bool SniperZoomIn(void);
+ bool SniperZoomOut(void);
+ int16 SniperModeLookLeftRight(void);
+ int16 SniperModeLookUpDown(void);
+ int16 LookAroundLeftRight(void);
+ int16 LookAroundUpDown(void);
void ResetAverageWeapon(void);
static void PrintErrorMessage(void);
static void ResetCheats(void);
- static Char *EditString(Char *pStr, Int32 nSize);
- static Int32 *EditCodesForControls(Int32 *pRsKeys, Int32 nSize);
+ static char *EditString(char *pStr, int32 nSize);
+ static int32 *EditCodesForControls(int32 *pRsKeys, int32 nSize);
// mouse
- inline Bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); }
+ inline bool GetLeftMouseJustDown() { return !!(NewMouseControllerState.LMB && !OldMouseControllerState.LMB); }
// keyboard
- inline Bool GetCharJustDown(Char c) { return !!(NewKeyState.VK_KEYS[c] && !OldKeyState.VK_KEYS[c]); }
- inline Bool GetFJustDown(Int32 n) { return !!(NewKeyState.F[n] && !OldKeyState.F[n]); }
- inline Bool GetEscapeJustDown() { return !!(NewKeyState.ESC && !OldKeyState.ESC); }
- inline Bool GetInsertJustDown() { return !!(NewKeyState.INS && !OldKeyState.INS); }
- inline Bool GetDeleteJustDown() { return !!(NewKeyState.DEL && !OldKeyState.DEL); }
- inline Bool GetHomeJustDown() { return !!(NewKeyState.HOME && !OldKeyState.HOME); }
- inline Bool GetEndJustDown() { return !!(NewKeyState.END && !OldKeyState.END); }
- inline Bool GetPageUpJustDown() { return !!(NewKeyState.PGUP && !OldKeyState.PGUP); }
- inline Bool GetPageDownJustDown() { return !!(NewKeyState.PGDN && !OldKeyState.PGDN); }
- inline Bool GetUpJustDown() { return !!(NewKeyState.UP && !OldKeyState.UP); }
- inline Bool GetDownJustDown() { return !!(NewKeyState.DOWN && !OldKeyState.DOWN); }
- inline Bool GetLeftJustDown() { return !!(NewKeyState.LEFT && !OldKeyState.LEFT); }
- inline Bool GetRightJustDown() { return !!(NewKeyState.RIGHT && !OldKeyState.RIGHT); }
- inline Bool GetScrollLockJustDown() { return !!(NewKeyState.SCROLLLOCK && !OldKeyState.SCROLLLOCK); }
- inline Bool GetPauseJustDown() { return !!(NewKeyState.PAUSE && !OldKeyState.PAUSE); }
- inline Bool GetNumLockJustDown() { return !!(NewKeyState.NUMLOCK && !OldKeyState.NUMLOCK); }
- inline Bool GetDivideJustDown() { return !!(NewKeyState.DIV && !OldKeyState.DIV); }
- inline Bool GetTimesJustDown() { return !!(NewKeyState.MUL && !OldKeyState.MUL); }
- inline Bool GetMinusJustDown() { return !!(NewKeyState.SUB && !OldKeyState.SUB); }
- inline Bool GetPlusJustDown() { return !!(NewKeyState.ADD && !OldKeyState.ADD); }
- inline Bool GetPadEnterJustDown() { return !!(NewKeyState.ENTER && !OldKeyState.ENTER); } // GetEnterJustDown
- inline Bool GetPadDelJustDown() { return !!(NewKeyState.DECIMAL && !OldKeyState.DECIMAL); }
- inline Bool GetPad1JustDown() { return !!(NewKeyState.NUM1 && !OldKeyState.NUM1); }
- inline Bool GetPad2JustDown() { return !!(NewKeyState.NUM2 && !OldKeyState.NUM2); }
- inline Bool GetPad3JustDown() { return !!(NewKeyState.NUM3 && !OldKeyState.NUM3); }
- inline Bool GetPad4JustDown() { return !!(NewKeyState.NUM4 && !OldKeyState.NUM4); }
- inline Bool GetPad5JustDown() { return !!(NewKeyState.NUM5 && !OldKeyState.NUM5); }
- inline Bool GetPad6JustDown() { return !!(NewKeyState.NUM6 && !OldKeyState.NUM6); }
- inline Bool GetPad7JustDown() { return !!(NewKeyState.NUM7 && !OldKeyState.NUM7); }
- inline Bool GetPad8JustDown() { return !!(NewKeyState.NUM8 && !OldKeyState.NUM8); }
- inline Bool GetPad9JustDown() { return !!(NewKeyState.NUM9 && !OldKeyState.NUM9); }
- inline Bool GetPad0JustDown() { return !!(NewKeyState.NUM0 && !OldKeyState.NUM0); }
- inline Bool GetBackspaceJustDown() { return !!(NewKeyState.BACKSP && !OldKeyState.BACKSP); }
- inline Bool GetTabJustDown() { return !!(NewKeyState.TAB && !OldKeyState.TAB); }
- inline Bool GetCapsLockJustDown() { return !!(NewKeyState.CAPSLOCK && !OldKeyState.CAPSLOCK); }
- inline Bool GetEnterJustDown() { return !!(NewKeyState.EXTENTER && !OldKeyState.EXTENTER); }
- inline Bool GetLeftShiftJustDown() { return !!(NewKeyState.LSHIFT && !OldKeyState.LSHIFT); }
- inline Bool GetShiftJustDown() { return !!(NewKeyState.SHIFT && !OldKeyState.SHIFT); }
- inline Bool GetRightShiftJustDown() { return !!(NewKeyState.RSHIFT && !OldKeyState.RSHIFT); }
- inline Bool GetLeftCtrlJustDown() { return !!(NewKeyState.LCTRL && !OldKeyState.LCTRL); }
- inline Bool GetRightCtrlJustDown() { return !!(NewKeyState.RCTRL && !OldKeyState.RCTRL); }
- inline Bool GetLeftAltJustDown() { return !!(NewKeyState.LALT && !OldKeyState.LALT); }
- inline Bool GetRightAltJustDown() { return !!(NewKeyState.RALT && !OldKeyState.RALT); }
- inline Bool GetLeftWinJustDown() { return !!(NewKeyState.LWIN && !OldKeyState.LWIN); }
- inline Bool GetRightWinJustDown() { return !!(NewKeyState.RWIN && !OldKeyState.RWIN); }
- inline Bool GetAppsJustDown() { return !!(NewKeyState.APPS && !OldKeyState.APPS); }
+ inline bool GetCharJustDown(char c) { return !!(NewKeyState.VK_KEYS[c] && !OldKeyState.VK_KEYS[c]); }
+ inline bool GetFJustDown(int32 n) { return !!(NewKeyState.F[n] && !OldKeyState.F[n]); }
+ inline bool GetEscapeJustDown() { return !!(NewKeyState.ESC && !OldKeyState.ESC); }
+ inline bool GetInsertJustDown() { return !!(NewKeyState.INS && !OldKeyState.INS); }
+ inline bool GetDeleteJustDown() { return !!(NewKeyState.DEL && !OldKeyState.DEL); }
+ inline bool GetHomeJustDown() { return !!(NewKeyState.HOME && !OldKeyState.HOME); }
+ inline bool GetEndJustDown() { return !!(NewKeyState.END && !OldKeyState.END); }
+ inline bool GetPageUpJustDown() { return !!(NewKeyState.PGUP && !OldKeyState.PGUP); }
+ inline bool GetPageDownJustDown() { return !!(NewKeyState.PGDN && !OldKeyState.PGDN); }
+ inline bool GetUpJustDown() { return !!(NewKeyState.UP && !OldKeyState.UP); }
+ inline bool GetDownJustDown() { return !!(NewKeyState.DOWN && !OldKeyState.DOWN); }
+ inline bool GetLeftJustDown() { return !!(NewKeyState.LEFT && !OldKeyState.LEFT); }
+ inline bool GetRightJustDown() { return !!(NewKeyState.RIGHT && !OldKeyState.RIGHT); }
+ inline bool GetScrollLockJustDown() { return !!(NewKeyState.SCROLLLOCK && !OldKeyState.SCROLLLOCK); }
+ inline bool GetPauseJustDown() { return !!(NewKeyState.PAUSE && !OldKeyState.PAUSE); }
+ inline bool GetNumLockJustDown() { return !!(NewKeyState.NUMLOCK && !OldKeyState.NUMLOCK); }
+ inline bool GetDivideJustDown() { return !!(NewKeyState.DIV && !OldKeyState.DIV); }
+ inline bool GetTimesJustDown() { return !!(NewKeyState.MUL && !OldKeyState.MUL); }
+ inline bool GetMinusJustDown() { return !!(NewKeyState.SUB && !OldKeyState.SUB); }
+ inline bool GetPlusJustDown() { return !!(NewKeyState.ADD && !OldKeyState.ADD); }
+ inline bool GetPadEnterJustDown() { return !!(NewKeyState.ENTER && !OldKeyState.ENTER); } // GetEnterJustDown
+ inline bool GetPadDelJustDown() { return !!(NewKeyState.DECIMAL && !OldKeyState.DECIMAL); }
+ inline bool GetPad1JustDown() { return !!(NewKeyState.NUM1 && !OldKeyState.NUM1); }
+ inline bool GetPad2JustDown() { return !!(NewKeyState.NUM2 && !OldKeyState.NUM2); }
+ inline bool GetPad3JustDown() { return !!(NewKeyState.NUM3 && !OldKeyState.NUM3); }
+ inline bool GetPad4JustDown() { return !!(NewKeyState.NUM4 && !OldKeyState.NUM4); }
+ inline bool GetPad5JustDown() { return !!(NewKeyState.NUM5 && !OldKeyState.NUM5); }
+ inline bool GetPad6JustDown() { return !!(NewKeyState.NUM6 && !OldKeyState.NUM6); }
+ inline bool GetPad7JustDown() { return !!(NewKeyState.NUM7 && !OldKeyState.NUM7); }
+ inline bool GetPad8JustDown() { return !!(NewKeyState.NUM8 && !OldKeyState.NUM8); }
+ inline bool GetPad9JustDown() { return !!(NewKeyState.NUM9 && !OldKeyState.NUM9); }
+ inline bool GetPad0JustDown() { return !!(NewKeyState.NUM0 && !OldKeyState.NUM0); }
+ inline bool GetBackspaceJustDown() { return !!(NewKeyState.BACKSP && !OldKeyState.BACKSP); }
+ inline bool GetTabJustDown() { return !!(NewKeyState.TAB && !OldKeyState.TAB); }
+ inline bool GetCapsLockJustDown() { return !!(NewKeyState.CAPSLOCK && !OldKeyState.CAPSLOCK); }
+ inline bool GetEnterJustDown() { return !!(NewKeyState.EXTENTER && !OldKeyState.EXTENTER); }
+ inline bool GetLeftShiftJustDown() { return !!(NewKeyState.LSHIFT && !OldKeyState.LSHIFT); }
+ inline bool GetShiftJustDown() { return !!(NewKeyState.SHIFT && !OldKeyState.SHIFT); }
+ inline bool GetRightShiftJustDown() { return !!(NewKeyState.RSHIFT && !OldKeyState.RSHIFT); }
+ inline bool GetLeftCtrlJustDown() { return !!(NewKeyState.LCTRL && !OldKeyState.LCTRL); }
+ inline bool GetRightCtrlJustDown() { return !!(NewKeyState.RCTRL && !OldKeyState.RCTRL); }
+ inline bool GetLeftAltJustDown() { return !!(NewKeyState.LALT && !OldKeyState.LALT); }
+ inline bool GetRightAltJustDown() { return !!(NewKeyState.RALT && !OldKeyState.RALT); }
+ inline bool GetLeftWinJustDown() { return !!(NewKeyState.LWIN && !OldKeyState.LWIN); }
+ inline bool GetRightWinJustDown() { return !!(NewKeyState.RWIN && !OldKeyState.RWIN); }
+ inline bool GetAppsJustDown() { return !!(NewKeyState.APPS && !OldKeyState.APPS); }
// pad
- inline Bool GetTriangleJustDown() { return !!(NewState.Triangle && !OldState.Triangle); }
- inline Bool GetCircleJustDown() { return !!(NewState.Circle && !OldState.Circle); }
- inline Bool GetCrossJustDown() { return !!(NewState.Cross && !OldState.Cross); }
- inline Bool GetSquareJustDown() { return !!(NewState.Square && !OldState.Square); }
- inline Bool GetDPadUpJustDown() { return !!(NewState.DPadUp && !OldState.DPadUp); }
- inline Bool GetDPadDownJustDown() { return !!(NewState.DPadDown && !OldState.DPadDown); }
- inline Bool GetDPadLeftJustDown() { return !!(NewState.DPadLeft && !OldState.DPadLeft); }
- inline Bool GetDPadRightJustDown() { return !!(NewState.DPadRight && !OldState.DPadRight); }
- inline Bool GetLeftShoulder1JustDown() { return !!(NewState.LeftShoulder1 && !OldState.LeftShoulder1); }
- inline Bool GetLeftShoulder2JustDown() { return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2); }
- inline Bool GetRightShoulder1JustDown() { return !!(NewState.RightShoulder1 && !OldState.RightShoulder1); }
- inline Bool GetRightShoulder2JustDown() { return !!(NewState.RightShoulder2 && !OldState.RightShoulder2); }
+ inline bool GetTriangleJustDown() { return !!(NewState.Triangle && !OldState.Triangle); }
+ inline bool GetCircleJustDown() { return !!(NewState.Circle && !OldState.Circle); }
+ inline bool GetCrossJustDown() { return !!(NewState.Cross && !OldState.Cross); }
+ inline bool GetSquareJustDown() { return !!(NewState.Square && !OldState.Square); }
+ inline bool GetDPadUpJustDown() { return !!(NewState.DPadUp && !OldState.DPadUp); }
+ inline bool GetDPadDownJustDown() { return !!(NewState.DPadDown && !OldState.DPadDown); }
+ inline bool GetDPadLeftJustDown() { return !!(NewState.DPadLeft && !OldState.DPadLeft); }
+ inline bool GetDPadRightJustDown() { return !!(NewState.DPadRight && !OldState.DPadRight); }
+ inline bool GetLeftShoulder1JustDown() { return !!(NewState.LeftShoulder1 && !OldState.LeftShoulder1); }
+ inline bool GetLeftShoulder2JustDown() { return !!(NewState.LeftShoulder2 && !OldState.LeftShoulder2); }
+ inline bool GetRightShoulder1JustDown() { return !!(NewState.RightShoulder1 && !OldState.RightShoulder1); }
+ inline bool GetRightShoulder2JustDown() { return !!(NewState.RightShoulder2 && !OldState.RightShoulder2); }
- inline Int32 GetLeftShoulder1(void) { return NewState.LeftShoulder1; }
- inline Int32 GetLeftShoulder2(void) { return NewState.LeftShoulder2; }
- inline Int32 GetRightShoulder1(void) { return NewState.RightShoulder1; }
- inline Int32 GetRightShoulder2(void) { return NewState.RightShoulder2; }
+ inline int32 GetLeftShoulder1(void) { return NewState.LeftShoulder1; }
+ inline int32 GetLeftShoulder2(void) { return NewState.LeftShoulder2; }
+ inline int32 GetRightShoulder1(void) { return NewState.RightShoulder1; }
+ inline int32 GetRightShoulder2(void) { return NewState.RightShoulder2; }
};
VALIDATE_SIZE(CPad, 0xFC);
diff --git a/src/Radar.cpp b/src/Radar.cpp
index 63a84680..1c0b0d65 100644
--- a/src/Radar.cpp
+++ b/src/Radar.cpp
@@ -12,7 +12,7 @@ WRAPPER void CRadar::Draw3dMarkers() { EAXJMP(0x4A4C70); }
WRAPPER void CRadar::DrawBlips() { EAXJMP(0x4A42F0); }
WRAPPER void CRadar::DrawRadarMap() { EAXJMP(0x4A6C20); }
-Float &CRadar::m_RadarRange = *(Float*)0x8E281C;
+float &CRadar::m_RadarRange = *(float*)0x8E281C;
CVector2D &CRadar::vec2DRadarOrigin = *(CVector2D*)0x6299B8;
void CRadar::DrawMap() {
diff --git a/src/Radar.h b/src/Radar.h
index f5afcd6e..52d8a883 100644
--- a/src/Radar.h
+++ b/src/Radar.h
@@ -14,7 +14,7 @@ enum eBlipType
class CRadar
{
public:
- static Float &m_RadarRange;
+ static float &m_RadarRange;
static CVector2D &vec2DRadarOrigin;
public:
diff --git a/src/Stats.cpp b/src/Stats.cpp
index 8537137e..5256b0cf 100644
--- a/src/Stats.cpp
+++ b/src/Stats.cpp
@@ -1,5 +1,5 @@
#include "common.h"
#include "Stats.h"
-Int32 &CStats::DaysPassed = *(Int32*)0x8F2BB8;
-Int32 &CStats::HeadShots = *(Int32*)0x8F647C; \ No newline at end of file
+int32 &CStats::DaysPassed = *(int32*)0x8F2BB8;
+int32 &CStats::HeadShots = *(int32*)0x8F647C; \ No newline at end of file
diff --git a/src/Stats.h b/src/Stats.h
index 398999dc..4508e8a8 100644
--- a/src/Stats.h
+++ b/src/Stats.h
@@ -3,6 +3,6 @@
class CStats
{
public:
- static Int32 &DaysPassed;
- static Int32 &HeadShots;
+ static int32 &DaysPassed;
+ static int32 &HeadShots;
}; \ No newline at end of file
diff --git a/src/Timer.cpp b/src/Timer.cpp
index 3a49d9df..62f1ed55 100644
--- a/src/Timer.cpp
+++ b/src/Timer.cpp
@@ -17,13 +17,13 @@ bool &CTimer::m_UserPause = *(bool*)0x95CD7C;
bool &CTimer::m_CodePause = *(bool*)0x95CDB1;
//UInt32 oldPcTimer;
-UInt32 &oldPcTimer = *(UInt32*)0x9434F4;
+uint32 &oldPcTimer = *(uint32*)0x9434F4;
//UInt32 suspendPcTimer;
-UInt32 &suspendPcTimer = *(UInt32*)0x62A308;
+uint32 &suspendPcTimer = *(uint32*)0x62A308;
//UInt32 _nCyclesPerMS = 1;
-UInt32 &_nCyclesPerMS = *(UInt32*)0x5F7610;
+uint32 &_nCyclesPerMS = *(uint32*)0x5F7610;
//LARGE_INTEGER _oldPerfCounter;
LARGE_INTEGER &_oldPerfCounter = *(LARGE_INTEGER*)0x62A310;
@@ -32,7 +32,7 @@ LARGE_INTEGER &_oldPerfCounter = *(LARGE_INTEGER*)0x62A310;
LARGE_INTEGER &perfSuspendCounter = *(LARGE_INTEGER*)0x62A318;
//UInt32 suspendDepth;
-UInt32 &suspendDepth = *(UInt32*)0x62A320;
+uint32 &suspendDepth = *(uint32*)0x62A320;
void CTimer::Initialise(void)
{
@@ -51,7 +51,7 @@ void CTimer::Initialise(void)
if ( QueryPerformanceFrequency(&perfFreq) )
{
OutputDebugString("Performance counter available\n");
- _nCyclesPerMS = UInt32(perfFreq.QuadPart / 1000);
+ _nCyclesPerMS = uint32(perfFreq.QuadPart / 1000);
QueryPerformanceCounter(&_oldPerfCounter);
}
else
@@ -82,18 +82,18 @@ void CTimer::Update(void)
{
m_snPreviousTimeInMilliseconds = m_snTimeInMilliseconds;
- if ( (Double)_nCyclesPerMS != 0.0 )
+ if ( (double)_nCyclesPerMS != 0.0 )
{
LARGE_INTEGER pc;
QueryPerformanceCounter(&pc);
- Int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart) & 0x7FFFFFFF;
+ int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart) & 0x7FFFFFFF;
_oldPerfCounter = pc;
- Double updInCyclesScaled = (Double)updInCycles * ms_fTimeScale;
+ double updInCyclesScaled = (double)updInCycles * ms_fTimeScale;
- Double upd = updInCyclesScaled / (Double)_nCyclesPerMS;
+ double upd = updInCyclesScaled / (double)_nCyclesPerMS;
m_snTimeInMillisecondsPauseMode = (Int64)(m_snTimeInMillisecondsPauseMode + upd);
@@ -103,16 +103,16 @@ void CTimer::Update(void)
{
m_snTimeInMilliseconds = (Int64)(m_snTimeInMilliseconds + upd);
m_snTimeInMillisecondsNonClipped = (Int64)(m_snTimeInMillisecondsNonClipped + upd);
- ms_fTimeStep = updInCyclesScaled / (Double)_nCyclesPerMS / 20.0;
+ ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0;
}
}
else
{
- UInt32 timer = RsTimer();
+ uint32 timer = RsTimer();
- UInt32 updInMs = timer - oldPcTimer;
+ uint32 updInMs = timer - oldPcTimer;
- Double upd = (Double)updInMs * ms_fTimeScale;
+ double upd = (double)updInMs * ms_fTimeScale;
oldPcTimer = timer;
@@ -156,7 +156,7 @@ void CTimer::Suspend(void)
if ( ++suspendDepth > 1 )
return;
- if ( (Double)_nCyclesPerMS != 0.0 )
+ if ( (double)_nCyclesPerMS != 0.0 )
QueryPerformanceCounter(&perfSuspendCounter);
else
suspendPcTimer = RsTimer();
@@ -167,7 +167,7 @@ void CTimer::Resume(void)
if ( --suspendDepth != 0 )
return;
- if ( (Double)_nCyclesPerMS != 0.0 )
+ if ( (double)_nCyclesPerMS != 0.0 )
{
LARGE_INTEGER pc;
QueryPerformanceCounter(&pc);
@@ -178,7 +178,7 @@ void CTimer::Resume(void)
oldPcTimer += RsTimer() - suspendPcTimer;
}
-UInt32 CTimer::GetCyclesPerMillisecond(void)
+uint32 CTimer::GetCyclesPerMillisecond(void)
{
if (_nCyclesPerMS != 0)
return _nCyclesPerMS;
@@ -186,7 +186,7 @@ UInt32 CTimer::GetCyclesPerMillisecond(void)
return 1;
}
-UInt32 CTimer::GetCurrentTimeInCycles(void)
+uint32 CTimer::GetCurrentTimeInCycles(void)
{
if ( _nCyclesPerMS != 0 )
{
@@ -198,7 +198,7 @@ UInt32 CTimer::GetCurrentTimeInCycles(void)
return RsTimer() - oldPcTimer;
}
-Bool CTimer::GetIsSlowMotionActive(void)
+bool CTimer::GetIsSlowMotionActive(void)
{
return ms_fTimeScale < 1.0f;
}
diff --git a/src/Timer.h b/src/Timer.h
index c369777a..10bb5d84 100644
--- a/src/Timer.h
+++ b/src/Timer.h
@@ -19,18 +19,18 @@ public:
static uint32 GetFrameCounter(void) { return m_FrameCounter; }
static uint32 GetTimeInMilliseconds(void) { return m_snTimeInMilliseconds; }
- 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 bool GetIsPaused() { return m_UserPause || m_CodePause; }
+ static inline bool GetIsUserPaused() { return m_UserPause; }
+ static inline void SetTimeScale(float ts) { ms_fTimeScale = ts; }
static void Initialise(void);
static void Shutdown(void);
static void Update(void);
static void Suspend(void);
static void Resume(void);
- static UInt32 GetCyclesPerMillisecond(void);
- static UInt32 GetCurrentTimeInCycles(void);
- static Bool GetIsSlowMotionActive(void);
+ static uint32 GetCyclesPerMillisecond(void);
+ static uint32 GetCurrentTimeInCycles(void);
+ static bool GetIsSlowMotionActive(void);
static void Stop(void);
static void StartUserPause(void);
static void EndUserPause(void);
diff --git a/src/Wanted.h b/src/Wanted.h
index cf24d5a5..f7ea66f3 100644
--- a/src/Wanted.h
+++ b/src/Wanted.h
@@ -45,7 +45,7 @@ public:
int16 m_wRoadblockNode;
int8 field_1342;
int8 field_1343;
- Float m_fDistanceToTarget;
+ float m_fDistanceToTarget;
int8 m_bIsInPursuit;
int8 m_bIsDisabledCop;
int8 field_1350;
@@ -67,7 +67,7 @@ public:
int32 m_nChaos;
int32 m_nLastUpdateTime;
int32 m_nLastWantedLevelChange;
- Float m_fCrimeSensitivity;
+ float m_fCrimeSensitivity;
uint8 m_bCurrentCops;
uint8 m_bMaxCops;
uint8 m_bMaximumLawEnforcerVehicles;
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp
index 7cb81f7a..a8c645d4 100644
--- a/src/audio/AudioScriptObject.cpp
+++ b/src/audio/AudioScriptObject.cpp
@@ -1,7 +1,7 @@
#include "common.h"
#include "AudioScriptObject.h"
-void PlayOneShotScriptObject(UInt8 id, CVector const &pos)
+void PlayOneShotScriptObject(uint8 id, CVector const &pos)
{
- ((void (__cdecl *)(UInt8, CVector const &))0x57C5F0)(id, pos);
+ ((void (__cdecl *)(uint8, CVector const &))0x57C5F0)(id, pos);
} \ No newline at end of file
diff --git a/src/audio/AudioScriptObject.h b/src/audio/AudioScriptObject.h
index a30af679..c325ce27 100644
--- a/src/audio/AudioScriptObject.h
+++ b/src/audio/AudioScriptObject.h
@@ -128,4 +128,4 @@ enum /*eSounds*/
_SOUND_BULLET_SHELL_HIT_GROUND_2 = 123,
};
-extern void PlayOneShotScriptObject(UInt8 id, CVector const &pos); \ No newline at end of file
+extern void PlayOneShotScriptObject(uint8 id, CVector const &pos); \ No newline at end of file
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index dcfdc81b..7f74fd8a 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -10,10 +10,10 @@ WRAPPER void cDMAudio::ReacquireDigitalHandle(void) { EAXJMP(0x57CA30); }
WRAPPER void cDMAudio::Service(void) { EAXJMP(0x57C7A0); }
WRAPPER void cDMAudio::ReportCollision(CEntity *A, CEntity *B, uint8 surfA, uint8 surfB, float impulse, float speed) { EAXJMP(0x57CBE0); }
-WRAPPER void cDMAudio::ResetTimers(UInt32 timerval) { EAXJMP(0x57CCD0); }
-WRAPPER Bool cDMAudio::IsAudioInitialised() { EAXJMP(0x57CAB0); }
-WRAPPER Char cDMAudio::GetCDAudioDriveLetter() { EAXJMP(0x57CA90); }
-WRAPPER Bool cDMAudio::CheckForAnAudioFileOnCD() { EAXJMP(0x57CA70); }
-WRAPPER void cDMAudio::ChangeMusicMode(UInt8 mode) { EAXJMP(0x57CCF0); }
+WRAPPER void cDMAudio::ResetTimers(uint32 timerval) { EAXJMP(0x57CCD0); }
+WRAPPER bool cDMAudio::IsAudioInitialised() { EAXJMP(0x57CAB0); }
+WRAPPER char cDMAudio::GetCDAudioDriveLetter() { EAXJMP(0x57CA90); }
+WRAPPER bool cDMAudio::CheckForAnAudioFileOnCD() { EAXJMP(0x57CA70); }
+WRAPPER void cDMAudio::ChangeMusicMode(uint8 mode) { EAXJMP(0x57CCF0); }
WRAPPER void cDMAudio::PlayFrontEndSound(uint32, uint32) { EAXJMP(0x57CC20); }
diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h
index b9e60b60..9006d248 100644
--- a/src/audio/DMAudio.h
+++ b/src/audio/DMAudio.h
@@ -182,11 +182,11 @@ public:
void ReacquireDigitalHandle(void);
void Service(void);
void ReportCollision(CEntity* A, CEntity* B, uint8 surfA, uint8 surfB, float impulse, float speed);
- void ResetTimers(UInt32 timerval);
- Bool IsAudioInitialised(void);
- Char GetCDAudioDriveLetter(void);
- Bool CheckForAnAudioFileOnCD(void);
- void ChangeMusicMode(UInt8 mode);
+ void ResetTimers(uint32 timerval);
+ bool IsAudioInitialised(void);
+ char GetCDAudioDriveLetter(void);
+ bool CheckForAnAudioFileOnCD(void);
+ void ChangeMusicMode(uint8 mode);
void PlayFrontEndSound(uint32, uint32);
};
extern cDMAudio &DMAudio;
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h
index 7932ca31..48df60ba 100644
--- a/src/audio/MusicManager.h
+++ b/src/audio/MusicManager.h
@@ -226,7 +226,7 @@ public:
class cMusicManager
{
public:
- Bool m_bIsInitialised;
+ bool m_bIsInitialised;
uint8 field_1;
uint8 m_nMusicMode;
uint8 m_nCurrentStreamedSound;
@@ -234,10 +234,10 @@ public:
uint8 field_5;
uint8 field_6;
uint8 field_7;
- Bool m_bAnnouncement;
- Bool m_bPreviousPlayerInCar;
- Bool m_bPlayerInCar;
- Bool m_bAnnouncementInProgress;
+ bool m_bAnnouncement;
+ bool m_bPreviousPlayerInCar;
+ bool m_bPlayerInCar;
+ bool m_bAnnouncementInProgress;
tMP3Sample m_asMP3Samples[196];
uint8 field_2364;
uint8 field_2365;
@@ -249,13 +249,13 @@ public:
uint8 field_2380;
uint8 field_2381;
uint8 field_2382;
- Bool m_bRadioSetByScript;
+ bool m_bRadioSetByScript;
uint8 m_nRadioStation;
uint8 field_2385;
uint8 field_2386;
uint8 field_2387;
uint32 m_nRadioPosition;
- Bool m_bRadioInCar;
+ bool m_bRadioInCar;
uint8 field_2393;
uint8 field_2394;
uint8 field_2395;
diff --git a/src/common.h b/src/common.h
index a9055391..7d7e223c 100644
--- a/src/common.h
+++ b/src/common.h
@@ -31,22 +31,17 @@
#undef near
#endif
-typedef uint8_t uint8, UInt8;
-typedef int8_t int8, Int8;
-typedef uint16_t uint16, UInt16;
-typedef int16_t int16, Int16;
-typedef uint32_t uint32, UInt32;
-typedef int32_t int32, Int32;
+typedef uint8_t uint8;
+typedef int8_t int8;
+typedef uint16_t uint16;
+typedef int16_t int16;
+typedef uint32_t uint32;
+typedef int32_t int32;
typedef uintptr_t uintptr;
-typedef uint64_t uint64, UInt64;
-typedef int64_t int64, Int64;
+typedef uint64_t uint64;
+typedef int64_t int64;
// hardcode ucs-2
-typedef uint16_t wchar, WChar;
-
-typedef float Float;
-typedef double Double;
-typedef bool Bool;
-typedef char Char;
+typedef uint16_t wchar;
#define nil NULL
@@ -68,13 +63,13 @@ extern void **rwengine;
#define DEFAULT_SCREEN_WIDTH (640)
#define DEFAULT_SCREEN_HEIGHT (448)
-#define SCREEN_WIDTH Float(RsGlobal.width)
-#define SCREEN_HEIGHT Float(RsGlobal.height)
-#define SCREEN_STRETCH_X(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH)))
-#define SCREEN_STRETCH_X_AR(a) Float((a) * (SCREEN_WIDTH / Float(DEFAULT_SCREEN_WIDTH)) * (4.0/3.0f)/SCREEN_ASPECT_RATIO)
-#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_BOTTOM(a) Float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a))
+#define SCREEN_WIDTH float(RsGlobal.width)
+#define SCREEN_HEIGHT float(RsGlobal.height)
+#define SCREEN_STRETCH_X(a) float((a) * (SCREEN_WIDTH / float(DEFAULT_SCREEN_WIDTH)))
+#define SCREEN_STRETCH_X_AR(a) float((a) * (SCREEN_WIDTH / float(DEFAULT_SCREEN_WIDTH)) * (4.0/3.0f)/SCREEN_ASPECT_RATIO)
+#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_BOTTOM(a) float(SCREEN_HEIGHT - SCREEN_STRETCH_Y(a))
#define HUD_STRETCH_X SCREEN_STRETCH_X_AR
#define HUD_STRETCH_Y SCREEN_STRETCH_Y
@@ -163,6 +158,6 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
-#define PERCENT(x, p) ((Float(x) * (Float(p) / 100.0f)))
+#define PERCENT(x, p) ((float(x) * (float(p) / 100.0f)))
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
#define BIT(num) (1<<(num))
diff --git a/src/control/Population.cpp b/src/control/Population.cpp
index 3626381d..9327452b 100644
--- a/src/control/Population.cpp
+++ b/src/control/Population.cpp
@@ -1,4 +1,4 @@
#include "common.h"
#include "Population.h"
-Bool &CPopulation::ms_bGivePedsWeapons = *(Bool*)0x95CCF6; \ No newline at end of file
+bool &CPopulation::ms_bGivePedsWeapons = *(bool*)0x95CCF6; \ No newline at end of file
diff --git a/src/control/Population.h b/src/control/Population.h
index e01d2712..ce27657a 100644
--- a/src/control/Population.h
+++ b/src/control/Population.h
@@ -3,5 +3,5 @@
class CPopulation
{
public:
- static Bool &ms_bGivePedsWeapons;
+ static bool &ms_bGivePedsWeapons;
}; \ No newline at end of file
diff --git a/src/control/Record.cpp b/src/control/Record.cpp
index 8949da5e..4cc2dccd 100644
--- a/src/control/Record.cpp
+++ b/src/control/Record.cpp
@@ -1,6 +1,6 @@
#include "common.h"
#include "Record.h"
-UInt16 &CRecordDataForGame::RecordingState = *(UInt16*)0x95CC24;
+uint16 &CRecordDataForGame::RecordingState = *(uint16*)0x95CC24;
-UInt8 &CRecordDataForChase::Status = *(UInt8*)0x95CDCE;
+uint8 &CRecordDataForChase::Status = *(uint8*)0x95CDCE;
diff --git a/src/control/Record.h b/src/control/Record.h
index 97a9663d..2b904d1d 100644
--- a/src/control/Record.h
+++ b/src/control/Record.h
@@ -3,11 +3,11 @@
class CRecordDataForGame
{
public:
- static UInt16 &RecordingState;
+ static uint16 &RecordingState;
};
class CRecordDataForChase
{
public:
- static UInt8 &Status;
+ static uint8 &Status;
};
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index b1bdc1bf..80edf097 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -3,6 +3,6 @@
#include "Replay.h"
uint8 &CReplay::Mode = *(uint8*)0x95CD5B;
-Bool &CReplay::bPlayingBackFromFile = *(Bool*)0x95CD58;
+bool &CReplay::bPlayingBackFromFile = *(bool*)0x95CD58;
WRAPPER void CReplay::Display(void) { EAXJMP(0x595EE0); }
diff --git a/src/control/Replay.h b/src/control/Replay.h
index 2fe2f272..70835596 100644
--- a/src/control/Replay.h
+++ b/src/control/Replay.h
@@ -8,7 +8,7 @@ public:
};
static uint8 &Mode;
- static Bool &bPlayingBackFromFile;
+ static bool &bPlayingBackFromFile;
static void Display(void);
};
diff --git a/src/control/Script.h b/src/control/Script.h
index 0fe35fd2..cdc33e97 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -3,8 +3,8 @@
struct CScriptRectangle
{
- Bool m_bIsUsed;
- Bool m_bIsAntialiased;
+ bool m_bIsUsed;
+ bool m_bIsAntialiased;
uint16 m_wTextureId;
CRect m_sRect;
CRGBA m_sColor;
@@ -12,23 +12,23 @@ struct CScriptRectangle
struct CTextLine
{
- Float m_fScaleX;
- Float m_fScaleY;
+ 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;
+ bool m_bJustify;
+ bool m_bCentered;
+ bool m_bBackground;
+ bool m_bBackgroundOnly;
+ float m_fWrapX;
+ float m_fCenterSize;
CRGBA m_sBackgroundColor;
- Bool m_bTextProportional;
+ bool m_bTextProportional;
int32 field_29;
- Bool m_bRightJustify;
+ bool m_bRightJustify;
int32 field_31;
int32 m_nFont;
- Float field_36;
- Float field_40;
+ float field_36;
+ float field_40;
wchar m_awText[500];
};
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index 8d51c1f2..ccb07d46 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -8,9 +8,9 @@
#include "DMaudio.h"
#include "Ped.h"
-Bool &CPed::bNastyLimbsCheat = *(Bool*)0x95CD44;
-Bool &CPed::bPedCheat2 = *(Bool*)0x95CD5A;
-Bool &CPed::bPedCheat3 = *(Bool*)0x95CD59;
+bool &CPed::bNastyLimbsCheat = *(bool*)0x95CD44;
+bool &CPed::bPedCheat2 = *(bool*)0x95CD5A;
+bool &CPed::bPedCheat3 = *(bool*)0x95CD59;
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); }
diff --git a/src/entities/Ped.h b/src/entities/Ped.h
index 6a2f8ef1..0b0a5562 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -196,8 +196,8 @@ private:
public:
CPathNode *m_pNextPathNode;
CPathNode *m_pLastPathNode;
- Float m_fHealth;
- Float m_fArmour;
+ float m_fHealth;
+ float m_fArmour;
uint8 stuff2[34];
CEntity *m_pCurrentPhysSurface;
CVector m_vecOffsetFromPhysSurface;
@@ -205,7 +205,7 @@ public:
uint8 stuff3[12];
CPed* m_pSeekTarget;
CVehicle *m_pMyVehicle;
- Bool bInVehicle;
+ bool bInVehicle;
uint8 stuff4[23];
int32 m_nPedType;
PedStat *m_pedStats;
@@ -255,9 +255,9 @@ public:
CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
RwFrame *GetNodeFrame(int nodeId) { return m_pFrames[nodeId]->frame; }
- static Bool &bNastyLimbsCheat;
- static Bool &bPedCheat2;
- static Bool &bPedCheat3;
+ static bool &bNastyLimbsCheat;
+ static bool &bPedCheat2;
+ static bool &bPedCheat3;
};
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
static_assert(offsetof(CPed, m_pCurSurface) == 0x2FC, "CPed: error");
diff --git a/src/entities/PlayerInfo.h b/src/entities/PlayerInfo.h
index eb15f53f..bcbaf4ac 100644
--- a/src/entities/PlayerInfo.h
+++ b/src/entities/PlayerInfo.h
@@ -29,7 +29,7 @@ public:
int32 m_nTotalPackages;
int32 field_188;
int32 m_nSwitchTaxiTime;
- Bool m_bSwitchTaxi;
+ bool m_bSwitchTaxi;
int8 field_197;
int8 field_198;
int8 field_199;
@@ -42,7 +42,7 @@ public:
int8 field_218;
int8 field_219;
int32 m_nWBTime;
- Bool m_bInRemoteMode;
+ bool m_bInRemoteMode;
int8 field_225;
int8 field_226;
int8 field_227;
@@ -55,15 +55,15 @@ public:
int16 m_nTrafficMultiplier;
int8 field_254;
int8 field_255;
- Float m_fRoadDensity;
+ 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;
+ bool m_bInfiniteSprint;
+ bool m_bFastReload;
+ bool m_bGetOutOfJailFree;
+ bool m_bGetOutOfHospitalFree;
uint8 m_aSkinName[32];
RwTexture *m_pSkinTexture;
};
diff --git a/src/entities/PlayerPed.h b/src/entities/PlayerPed.h
index 6721f975..ee4f57b3 100644
--- a/src/entities/PlayerPed.h
+++ b/src/entities/PlayerPed.h
@@ -7,36 +7,36 @@ class CPlayerPed : public CPed {
public:
CWanted *m_pWanted;
CCopPed *m_pArrestingCop;
- Float m_fMoveSpeed;
- Float m_fCurrentStamina;
- Float m_fMaxStamina;
- Float m_fStaminaProgress;
- Bool m_bWeaponSlot;
- Bool m_bSpeedTimerFlag;
- Bool m_bShouldEvade;
+ 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;
+ 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;
+ bool m_bAdrenalineActive;
+ bool m_bHasLockOnTarget;
int8 field_1406;
int8 field_1407;
- Bool m_bAdrenalineTime;
- Bool m_bCanBeDamaged;
+ 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;
+ float field_1512;
+ float m_fFPSMoveHeading;
};
static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error");
diff --git a/src/entities/Vehicle.cpp b/src/entities/Vehicle.cpp
index ebd7ae68..bac05f7b 100644
--- a/src/entities/Vehicle.cpp
+++ b/src/entities/Vehicle.cpp
@@ -3,11 +3,11 @@
#include "Vehicle.h"
#include "Pools.h"
-Bool &CVehicle::bWheelsOnlyCheat = *(Bool *)0x95CD78;
-Bool &CVehicle::bAllDodosCheat = *(Bool *)0x95CD75;
-Bool &CVehicle::bCheat3 = *(Bool *)0x95CD66;
-Bool &CVehicle::bCheat4 = *(Bool *)0x95CD65;
-Bool &CVehicle::bCheat5 = *(Bool *)0x95CD64;
+bool &CVehicle::bWheelsOnlyCheat = *(bool *)0x95CD78;
+bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75;
+bool &CVehicle::bCheat3 = *(bool *)0x95CD66;
+bool &CVehicle::bCheat4 = *(bool *)0x95CD65;
+bool &CVehicle::bCheat5 = *(bool *)0x95CD64;
void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); }
void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); }
diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h
index 00126c31..e5d1cfb3 100644
--- a/src/entities/Vehicle.h
+++ b/src/entities/Vehicle.h
@@ -63,11 +63,11 @@ uint8 m_extra2;
bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; }
bool IsPlane(void) { return m_vehType == VEHICLE_TYPE_PLANE; }
- static Bool &bWheelsOnlyCheat;
- static Bool &bAllDodosCheat;
- static Bool &bCheat3;
- static Bool &bCheat4;
- static Bool &bCheat5;
+ static bool &bWheelsOnlyCheat;
+ static bool &bAllDodosCheat;
+ static bool &bCheat3;
+ static bool &bCheat4;
+ static bool &bCheat5;
};
static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error");
static_assert(offsetof(CVehicle, m_pCurSurface) == 0x1E0, "CVehicle: error");
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 5f39c6c6..d9c86209 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -35,10 +35,10 @@ int32 &CHud::m_HelpMessageState = *(int32*)0x880E1C;
int32 &CHud::m_HelpMessageTimer = *(int32*)0x880FA4;
int32 &CHud::m_HelpMessageFadeTimer = *(int32*)0x8F6258;
wchar *CHud::m_HelpMessageToPrint = (wchar*)0x664480;
-Float &CHud::m_HelpMessageDisplayTime = *(Float*)0x8E2C28;
-Float &CHud::m_fTextBoxNumLines = *(Float*)0x8E2C28;
-Float &CHud::m_fHelpMessageTime = *(Float *)0x8E2C28;
-Bool &CHud::m_bHelpMessageQuick = *(Bool *)0x95CCF7;
+float &CHud::m_HelpMessageDisplayTime = *(float*)0x8E2C28;
+float &CHud::m_fTextBoxNumLines = *(float*)0x8E2C28;
+float &CHud::m_fHelpMessageTime = *(float *)0x8E2C28;
+bool &CHud::m_bHelpMessageQuick = *(bool *)0x95CCF7;
int32 CHud::m_ZoneState = *(int32*)0x8F29AC;
int32 CHud::m_ZoneFadeTimer;
int32 CHud::m_ZoneNameTimer = *(int32*)0x8F1A50;
@@ -53,16 +53,16 @@ wchar* CHud::m_pLastVehicleName = *(wchar **)0x8E2DD8;
wchar* CHud::m_pVehicleNameToPrint;
wchar* CHud::m_Message = (wchar*)0x72E318;
wchar* CHud::m_PagerMessage = (wchar*)0x878840;
-Bool &CHud::m_Wants_To_Draw_Hud = *(Bool*)0x95CD89;
-Bool &CHud::m_Wants_To_Draw_3dMarkers = *(Bool*)0x95CD62;
+bool &CHud::m_Wants_To_Draw_Hud = *(bool*)0x95CD89;
+bool &CHud::m_Wants_To_Draw_3dMarkers = *(bool*)0x95CD62;
wchar(*CHud::m_BigMessage)[128] = (wchar(*)[128])0x664CE0;
-Float *CHud::BigMessageInUse = (Float*)0x862140;
-Float *CHud::BigMessageAlpha = (Float*)0x862108;
-Float *CHud::BigMessageX = (Float*)0x773248;
+float *CHud::BigMessageInUse = (float*)0x862140;
+float *CHud::BigMessageAlpha = (float*)0x862108;
+float *CHud::BigMessageX = (float*)0x773248;
-Float &CHud::OddJob2OffTimer = *(Float*)0x942FA0;
+float &CHud::OddJob2OffTimer = *(float*)0x942FA0;
int8 &CHud::CounterOnLastFrame = *(int8*)0x95CD67;
-Float &CHud::OddJob2XOffset = *(Float*)0x8F1B5C;
+float &CHud::OddJob2XOffset = *(float*)0x8F1B5C;
int16 &CHud::CounterFlashTimer = *(int16*)0x95CC20;
int16 &CHud::OddJob2Timer = *(int16*)0x95CC52;
int8 &CHud::TimerOnLastFrame = *(int8*)0x95CDA7;
@@ -70,7 +70,7 @@ int16 &CHud::OddJob2On = *(int16*)0x95CC78;
int16 &CHud::TimerFlashTimer = *(int16*)0x95CC6C;
int16 &CHud::PagerSoundPlayed = *(int16*)0x95CC4A;
int32 &CHud::SpriteBrightness = *(int32*)0x95CC54;
-Float &CHud::PagerXOffset = *(Float*)0x941590;
+float &CHud::PagerXOffset = *(float*)0x941590;
int32 CHud::m_ItemToFlash = *(int32*)0x95CC82;
int16 &CHud::PagerTimer = *(int16*)0x95CC3A;
int16 &CHud::PagerOn = *(int16*)0x95CCA0;
@@ -182,8 +182,8 @@ void CHud::Draw() {
if (CReplay::Mode != 1) {
if (m_Wants_To_Draw_Hud && !TheCamera.m_WideScreenOn) {
- Bool Mode_RunAround = 0;
- Bool Mode_FirstPerson = 0;
+ bool Mode_RunAround = 0;
+ bool Mode_FirstPerson = 0;
int32 WeaponType = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_weapons[CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_currentWeapon].m_eWeaponType;
int32 Mode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
@@ -217,8 +217,8 @@ void CHud::Draw() {
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
- Float fStep = sin((CTimer::GetTimeInMilliseconds() & 1023) * 0.0061328127);
- Float fMultBright = CHud::SpriteBrightness * 0.033333335f * (0.25f * fStep + 0.75f);
+ float fStep = sin((CTimer::GetTimeInMilliseconds() & 1023) * 0.0061328127);
+ float fMultBright = CHud::SpriteBrightness * 0.033333335f * (0.25f * fStep + 0.75f);
CRect rect;
float fWidescreenOffset[2] = { 0.0f, 0.0f };
@@ -229,8 +229,8 @@ void CHud::Draw() {
}
if (Mode_RunAround && TheCamera.Cams->Using3rdPersonMouseCam()) {
- Float f3rdX = SCREENW * TheCamera.m_f3rdPersonCHairMultX + fWidescreenOffset[0];
- Float f3rdY = SCREENH * TheCamera.m_f3rdPersonCHairMultY - fWidescreenOffset[1];
+ float f3rdX = SCREENW * TheCamera.m_f3rdPersonCHairMultX + fWidescreenOffset[0];
+ float f3rdY = SCREENH * TheCamera.m_f3rdPersonCHairMultY - fWidescreenOffset[1];
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed && WeaponType == WEAPONTYPE_M16) {
rect.left = f3rdX - HUD_STRETCH_X(32.0f * 0.6f);
@@ -503,7 +503,7 @@ void CHud::Draw() {
DrawZoneName
*/
if (CHud::m_pZoneName) {
- Float fZoneAlpha = 0.0f;
+ float fZoneAlpha = 0.0f;
if (CHud::m_pZoneName != CHud::m_pLastZoneName) {
switch (CHud::m_ZoneState) {
@@ -599,7 +599,7 @@ void CHud::Draw() {
DrawVehicleName
*/
if (CHud::m_pVehicleName) {
- Float fVehicleAlpha = 0.0f;
+ float fVehicleAlpha = 0.0f;
if (CHud::m_pVehicleName != CHud::m_pLastVehicleName) {
switch (CHud::m_VehicleState) {
@@ -807,7 +807,7 @@ void CHud::Draw() {
}
if (PagerOn == 1) {
if (PagerXOffset > 0.0f) {
- Float fStep = PagerXOffset * 0.05f;
+ float fStep = PagerXOffset * 0.05f;
if (fStep > 10.0f)
fStep = 10.0f;
PagerXOffset -= fStep * CTimer::GetTimeStep();
@@ -818,7 +818,7 @@ void CHud::Draw() {
}
}
else if (PagerOn == 2) {
- Float fStep = PagerXOffset * 0.05f;
+ float fStep = PagerXOffset * 0.05f;
if (fStep < 2.0f)
fStep = 2.0f;
PagerXOffset += fStep * CTimer::GetTimeStep();
@@ -995,7 +995,7 @@ void CHud::Draw() {
}
}
else {
- Float fStep = (CTimer::GetTimeStep()
+ float fStep = (CTimer::GetTimeStep()
* 0.02f
* 1000.0f)
* 0.30000001f;
diff --git a/src/render/Hud.h b/src/render/Hud.h
index 04795981..7c06f9e5 100644
--- a/src/render/Hud.h
+++ b/src/render/Hud.h
@@ -31,10 +31,10 @@ public:
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 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;
@@ -49,15 +49,15 @@ public:
static int32 m_VehicleNameTimer;
static wchar* m_Message;
static wchar* m_PagerMessage;
- static Bool &m_Wants_To_Draw_Hud;
- static Bool &m_Wants_To_Draw_3dMarkers;
+ 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 float* BigMessageInUse;
+ static float* BigMessageAlpha;
+ static float* BigMessageX;
+ static float &OddJob2OffTimer;
static int8 &CounterOnLastFrame;
- static Float &OddJob2XOffset;
+ static float &OddJob2XOffset;
static int16 &CounterFlashTimer;
static int16 &OddJob2Timer;
static int8 &TimerOnLastFrame;
@@ -65,7 +65,7 @@ public:
static int16 &TimerFlashTimer;
static int16 &PagerSoundPlayed;
static int32 &SpriteBrightness;
- static Float &PagerXOffset;
+ static float &PagerXOffset;
static int32 m_ItemToFlash;
static int16 &PagerTimer;
static int16 &PagerOn;
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index b7c14f1b..1ff3bced 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -44,7 +44,7 @@
-const Char SmokeFiles[][6+1] =
+const char SmokeFiles[][6+1] =
{
"smoke1",
"smoke2",
@@ -54,7 +54,7 @@ const Char SmokeFiles[][6+1] =
};
-const Char Smoke2Files[][9+1] =
+const char Smoke2Files[][9+1] =
{
"smokeII_1",
"smokeII_2",
@@ -63,7 +63,7 @@ const Char Smoke2Files[][9+1] =
"smokeII_5"
};
-const Char RubberFiles[][7+1] =
+const char RubberFiles[][7+1] =
{
"rubber1",
"rubber2",
@@ -72,7 +72,7 @@ const Char RubberFiles[][7+1] =
"rubber5"
};
-const Char RainSplashFiles[][7+1] =
+const char RainSplashFiles[][7+1] =
{
"splash1",
"splash2",
@@ -81,14 +81,14 @@ const Char RainSplashFiles[][7+1] =
"splash5"
};
-const Char WatersprayFiles[][11+1] =
+const char WatersprayFiles[][11+1] =
{
"waterspray1",
"waterspray2",
"waterspray3"
};
-const Char ExplosionMediumFiles[][7+1] =
+const char ExplosionMediumFiles[][7+1] =
{
"explo01",
"explo02",
@@ -98,7 +98,7 @@ const Char ExplosionMediumFiles[][7+1] =
"explo06"
};
-const Char GunFlashFiles[][9+1] =
+const char GunFlashFiles[][9+1] =
{
"gunflash1",
"gunflash2",
@@ -106,7 +106,7 @@ const Char GunFlashFiles[][9+1] =
"gunflash4"
};
-const Char RaindropFiles[][9+1] =
+const char RaindropFiles[][9+1] =
{
"raindrop1",
"raindrop2",
@@ -114,13 +114,13 @@ const Char RaindropFiles[][9+1] =
"raindrop4"
};
-const Char RainSplashupFiles[][10+1] =
+const char RainSplashupFiles[][10+1] =
{
"splash_up1",
"splash_up2"
};
-const Char BirdfrontFiles[][8+1] =
+const char BirdfrontFiles[][8+1] =
{
"birdf_01",
"birdf_02",
@@ -128,7 +128,7 @@ const Char BirdfrontFiles[][8+1] =
"birdf_04"
};
-const Char CardebrisFiles[][12+1] =
+const char CardebrisFiles[][12+1] =
{
"cardebris_01",
"cardebris_02",
@@ -136,7 +136,7 @@ const Char CardebrisFiles[][12+1] =
"cardebris_04"
};
-const Char CarsplashFiles[][12+1] =
+const char CarsplashFiles[][12+1] =
{
"carsplash_01",
"carsplash_02",
@@ -210,7 +210,7 @@ RwTexture * (&gpRainDropTex)[MAX_RAINDROP_FILES] = *(RwTexture * (*)[MAX_RA
RwRaster *gpRainDropRaster[MAX_RAINDROP_FILES];
//Float CParticle::ms_afRandTable[CParticle::RAND_TABLE_SIZE]; //
-Float (&CParticle::ms_afRandTable)[CParticle::RAND_TABLE_SIZE] = *(Float (*)[CParticle::RAND_TABLE_SIZE])*(int *)0x6E98C8;
+float (&CParticle::ms_afRandTable)[CParticle::RAND_TABLE_SIZE] = *(float (*)[CParticle::RAND_TABLE_SIZE])*(int *)0x6E98C8;
CParticle *CParticle::m_pUnusedListHead;
@@ -218,13 +218,13 @@ CParticle *CParticle::m_pUnusedListHead;
//Float CParticle::m_SinTable[CParticle::SIN_COS_TABLE_SIZE]; //
//Float CParticle::m_CosTable[CParticle::SIN_COS_TABLE_SIZE]; /
-Float (&CParticle::m_SinTable)[CParticle::SIN_COS_TABLE_SIZE] = *(Float (*)[CParticle::SIN_COS_TABLE_SIZE])*(int *)0x877358;
-Float (&CParticle::m_CosTable)[CParticle::SIN_COS_TABLE_SIZE] = *(Float (*)[CParticle::SIN_COS_TABLE_SIZE])*(int *)0x70DA18;
+float (&CParticle::m_SinTable)[CParticle::SIN_COS_TABLE_SIZE] = *(float (*)[CParticle::SIN_COS_TABLE_SIZE])*(int *)0x877358;
+float (&CParticle::m_CosTable)[CParticle::SIN_COS_TABLE_SIZE] = *(float (*)[CParticle::SIN_COS_TABLE_SIZE])*(int *)0x70DA18;
-Int32 Randomizer;
+int32 Randomizer;
-Int32 nParticleCreationInterval = 1;
-Float fParticleScaleLimit = 0.5f;
+int32 nParticleCreationInterval = 1;
+float fParticleScaleLimit = 0.5f;
@@ -241,7 +241,7 @@ void CParticle::ReloadConfig()
m_pUnusedListHead = gParticleArray;
- for ( Int32 i = 0; i < MAX_PARTICLES_ON_SCREEN; i++ )
+ for ( int32 i = 0; i < MAX_PARTICLES_ON_SCREEN; i++ )
{
if ( i == MAX_PARTICLES_ON_SCREEN - 1 )
gParticleArray[i].m_pNext = NULL;
@@ -292,93 +292,93 @@ void CParticle::Initialise()
CParticleObject::Initialise();
- Float randVal = -1.0f;
- for ( Int32 i = 0; i < RAND_TABLE_SIZE; i++ )
+ float randVal = -1.0f;
+ for ( int32 i = 0; i < RAND_TABLE_SIZE; i++ )
{
ms_afRandTable[i] = randVal;
randVal += 0.1f;
}
- for ( Int32 i = 0; i < SIN_COS_TABLE_SIZE; i++ )
+ for ( int32 i = 0; i < SIN_COS_TABLE_SIZE; i++ )
{
- Float angle = DEGTORAD(Float(i) * Float(360.0f / SIN_COS_TABLE_SIZE));
+ float angle = DEGTORAD(float(i) * float(360.0f / SIN_COS_TABLE_SIZE));
m_SinTable[i] = sin(angle);
m_CosTable[i] = cos(angle);
}
- Int32 slot = CTxdStore::FindTxdSlot("particle");
+ int32 slot = CTxdStore::FindTxdSlot("particle");
CTxdStore::PushCurrentTxd();
CTxdStore::SetCurrentTxd(slot);
- for ( Int32 i = 0; i < MAX_SMOKE_FILES; i++ )
+ for ( int32 i = 0; i < MAX_SMOKE_FILES; i++ )
{
gpSmokeTex[i] = RwTextureRead(SmokeFiles[i], NULL);
gpSmokeRaster[i] = RwTextureGetRaster(gpSmokeTex[i]);
}
- for ( Int32 i = 0; i < MAX_SMOKE2_FILES; i++ )
+ for ( int32 i = 0; i < MAX_SMOKE2_FILES; i++ )
{
gpSmoke2Tex[i] = RwTextureRead(Smoke2Files[i], NULL);
gpSmoke2Raster[i] = RwTextureGetRaster(gpSmoke2Tex[i]);
}
- for ( Int32 i = 0; i < MAX_RUBBER_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RUBBER_FILES; i++ )
{
gpRubberTex[i] = RwTextureRead(RubberFiles[i], NULL);
gpRubberRaster[i] = RwTextureGetRaster(gpRubberTex[i]);
}
- for ( Int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ )
{
gpRainSplashTex[i] = RwTextureRead(RainSplashFiles[i], NULL);
gpRainSplashRaster[i] = RwTextureGetRaster(gpRainSplashTex[i]);
}
- for ( Int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ )
+ for ( int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ )
{
gpWatersprayTex[i] = RwTextureRead(WatersprayFiles[i], NULL);
gpWatersprayRaster[i] = RwTextureGetRaster(gpWatersprayTex[i]);
}
- for ( Int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ )
+ for ( int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ )
{
gpExplosionMediumTex[i] = RwTextureRead(ExplosionMediumFiles[i], NULL);
gpExplosionMediumRaster[i] = RwTextureGetRaster(gpExplosionMediumTex[i]);
}
- for ( Int32 i = 0; i < MAX_GUNFLASH_FILES; i++ )
+ for ( int32 i = 0; i < MAX_GUNFLASH_FILES; i++ )
{
gpGunFlashTex[i] = RwTextureRead(GunFlashFiles[i], NULL);
gpGunFlashRaster[i] = RwTextureGetRaster(gpGunFlashTex[i]);
}
- for ( Int32 i = 0; i < MAX_RAINDROP_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RAINDROP_FILES; i++ )
{
gpRainDropTex[i] = RwTextureRead(RaindropFiles[i], NULL);
gpRainDropRaster[i] = RwTextureGetRaster(gpRainDropTex[i]);
}
- for ( Int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ )
{
gpRainSplashupTex[i] = RwTextureRead(RainSplashupFiles[i], NULL);
gpRainSplashupRaster[i] = RwTextureGetRaster(gpRainSplashupTex[i]);
}
- for ( Int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ )
+ for ( int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ )
{
gpBirdfrontTex[i] = RwTextureRead(BirdfrontFiles[i], NULL);
gpBirdfrontRaster[i] = RwTextureGetRaster(gpBirdfrontTex[i]);
}
- for ( Int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ )
+ for ( int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ )
{
gpCarDebrisTex[i] = RwTextureRead(CardebrisFiles[i], NULL);
gpCarDebrisRaster[i] = RwTextureGetRaster(gpCarDebrisTex[i]);
}
- for ( Int32 i = 0; i < MAX_CARSPLASH_FILES; i++ )
+ for ( int32 i = 0; i < MAX_CARSPLASH_FILES; i++ )
{
gpCarSplashTex[i] = RwTextureRead(CarsplashFiles[i], NULL);
gpCarSplashRaster[i] = RwTextureGetRaster(gpCarSplashTex[i]);
@@ -429,7 +429,7 @@ void CParticle::Initialise()
CTxdStore::PopCurrentTxd();
- for ( Int32 i = 0; i < MAX_PARTICLES; i++ )
+ for ( int32 i = 0; i < MAX_PARTICLES; i++ )
{
tParticleSystemData *entry = &mod_ParticleSystemManager.m_aParticles[i];
@@ -584,7 +584,7 @@ void CParticle::Shutdown()
{
debug("Shutting down CParticle...");
- for ( Int32 i = 0; i < MAX_SMOKE_FILES; i++ )
+ for ( int32 i = 0; i < MAX_SMOKE_FILES; i++ )
{
RwTextureDestroy(gpSmokeTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -592,7 +592,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_SMOKE2_FILES; i++ )
+ for ( int32 i = 0; i < MAX_SMOKE2_FILES; i++ )
{
RwTextureDestroy(gpSmoke2Tex[i]);
#ifdef GTA3_1_1_PATCH
@@ -600,7 +600,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_RUBBER_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RUBBER_FILES; i++ )
{
RwTextureDestroy(gpRubberTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -608,7 +608,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ )
{
RwTextureDestroy(gpRainSplashTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -616,7 +616,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ )
+ for ( int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ )
{
RwTextureDestroy(gpWatersprayTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -624,7 +624,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ )
+ for ( int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ )
{
RwTextureDestroy(gpExplosionMediumTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -632,7 +632,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_GUNFLASH_FILES; i++ )
+ for ( int32 i = 0; i < MAX_GUNFLASH_FILES; i++ )
{
RwTextureDestroy(gpGunFlashTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -640,7 +640,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_RAINDROP_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RAINDROP_FILES; i++ )
{
RwTextureDestroy(gpRainDropTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -648,7 +648,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ )
+ for ( int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ )
{
RwTextureDestroy(gpRainSplashupTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -656,7 +656,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ )
+ for ( int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ )
{
RwTextureDestroy(gpBirdfrontTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -664,7 +664,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ )
+ for ( int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ )
{
RwTextureDestroy(gpCarDebrisTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -672,7 +672,7 @@ void CParticle::Shutdown()
#endif
}
- for ( Int32 i = 0; i < MAX_CARSPLASH_FILES; i++ )
+ for ( int32 i = 0; i < MAX_CARSPLASH_FILES; i++ )
{
RwTextureDestroy(gpCarSplashTex[i]);
#ifdef GTA3_1_1_PATCH
@@ -750,7 +750,7 @@ void CParticle::Shutdown()
gpPointlightTex = NULL;
#endif
- Int32 slot;
+ int32 slot;
slot = CTxdStore::FindTxdSlot("particle");
CTxdStore::RemoveTxdSlot(slot);
@@ -758,13 +758,13 @@ void CParticle::Shutdown()
debug("CParticle shut down");
}
-CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, Float fSize, Int32 nRotationSpeed, Int32 nRotation, Int32 nCurFrame, Int32 nLifeSpan)
+CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, float fSize, int32 nRotationSpeed, int32 nRotation, int32 nCurFrame, int32 nLifeSpan)
{
CRGBA color(0, 0, 0, 0);
return AddParticle(type, vecPos, vecDir, pEntity, fSize, color, nRotationSpeed, nRotation, nCurFrame, nLifeSpan);
}
-CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, Float fSize, RwRGBA const &color, Int32 nRotationSpeed, Int32 nRotation, Int32 nCurFrame, Int32 nLifeSpan)
+CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, float fSize, RwRGBA const &color, int32 nRotationSpeed, int32 nRotation, int32 nCurFrame, int32 nLifeSpan)
{
if ( CTimer::GetIsPaused() )
return NULL;
@@ -833,8 +833,8 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
if ( psystem->m_InitialColorVariation != 0 )
{
- Int32 ColorVariation = CGeneral::GetRandomNumberInRange(-psystem->m_InitialColorVariation, psystem->m_InitialColorVariation);
- //Float ColorVariation = CGeneral::GetRandomNumberInRange((Float)-psystem->m_InitialColorVariation, (Float)psystem->m_InitialColorVariation);
+ int32 ColorVariation = CGeneral::GetRandomNumberInRange(-psystem->m_InitialColorVariation, psystem->m_InitialColorVariation);
+ //Float ColorVariation = CGeneral::GetRandomNumberInRange((float)-psystem->m_InitialColorVariation, (float)psystem->m_InitialColorVariation);
pParticle->m_Color.red = clamp(pParticle->m_Color.red +
PERCENT(pParticle->m_Color.red, ColorVariation),
@@ -893,18 +893,18 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
if ( psystem->m_nLifeSpanErrorShape != 0 )
{
- Float randVal = ms_afRandTable[CGeneral::GetRandomNumber() % RAND_TABLE_SIZE];
+ float randVal = ms_afRandTable[CGeneral::GetRandomNumber() % RAND_TABLE_SIZE];
if ( randVal > 0.0f )
- pParticle->m_nTimeWhenWillBeDestroyed += Int32(Float(psystem->m_nLifeSpan) * randVal * Float(psystem->m_nLifeSpanErrorShape));
+ pParticle->m_nTimeWhenWillBeDestroyed += int32(float(psystem->m_nLifeSpan) * randVal * float(psystem->m_nLifeSpanErrorShape));
else
- pParticle->m_nTimeWhenWillBeDestroyed += Int32(Float(psystem->m_nLifeSpan) * randVal / Float(psystem->m_nLifeSpanErrorShape));
+ pParticle->m_nTimeWhenWillBeDestroyed += int32(float(psystem->m_nLifeSpan) * randVal / float(psystem->m_nLifeSpanErrorShape));
}
if ( psystem->Flags & ZCHECK_FIRST )
{
- static Bool bValidGroundFound = false;
+ static bool bValidGroundFound = false;
static CVector LastTestCoors;
- static Float LastTestGroundZ;
+ static float LastTestGroundZ;
if ( bValidGroundFound
&& vecPos.x == LastTestCoors.x
@@ -939,11 +939,11 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe
if ( psystem->Flags & ZCHECK_BUMP )
{
- static Float Z_Ground = 0.0f;
+ static float Z_Ground = 0.0f;
if ( psystem->Flags & ZCHECK_BUMP_FIRST )
{
- Bool bZFound = false;
+ bool bZFound = false;
Z_Ground = CWorld::FindGroundZFor3DCoord(vecPos.x, vecPos.y, vecPos.z, (bool *)&bZFound);
@@ -1000,21 +1000,21 @@ void CParticle::Update()
CRGBA color(0, 0, 0, 0);
- Float fFricDeccel50 = pow(0.50f, CTimer::GetTimeStep());
- Float fFricDeccel80 = pow(0.80f, CTimer::GetTimeStep());
- Float fFricDeccel90 = pow(0.90f, CTimer::GetTimeStep());
- Float fFricDeccel95 = pow(0.95f, CTimer::GetTimeStep());
- Float fFricDeccel96 = pow(0.96f, CTimer::GetTimeStep());
- Float fFricDeccel99 = pow(0.99f, CTimer::GetTimeStep());
+ float fFricDeccel50 = pow(0.50f, CTimer::GetTimeStep());
+ float fFricDeccel80 = pow(0.80f, CTimer::GetTimeStep());
+ float fFricDeccel90 = pow(0.90f, CTimer::GetTimeStep());
+ float fFricDeccel95 = pow(0.95f, CTimer::GetTimeStep());
+ float fFricDeccel96 = pow(0.96f, CTimer::GetTimeStep());
+ float fFricDeccel99 = pow(0.99f, CTimer::GetTimeStep());
CParticleObject::UpdateAll();
- for ( Int32 i = 0; i < MAX_PARTICLES; i++ )
+ for ( int32 i = 0; i < MAX_PARTICLES; i++ )
{
tParticleSystemData *psystem = &mod_ParticleSystemManager.m_aParticles[i];
CParticle *particle = psystem->m_pParticles;
CParticle *prevParticle = NULL;
- Bool bRemoveParticle;
+ bool bRemoveParticle;
if ( particle == NULL )
continue;
@@ -1035,18 +1035,18 @@ void CParticle::Update()
{
if ( particle->m_nTimeWhenColorWillBeChanged > CTimer::GetTimeInMilliseconds() )
{
- Float colorMul = 1.0f - Float(particle->m_nTimeWhenColorWillBeChanged - CTimer::GetTimeInMilliseconds()) / Float(psystem->m_ColorFadeTime);
+ float colorMul = 1.0f - float(particle->m_nTimeWhenColorWillBeChanged - CTimer::GetTimeInMilliseconds()) / float(psystem->m_ColorFadeTime);
particle->m_Color.red = clamp(
- psystem->m_RenderColouring.red + Int32(Float(psystem->m_FadeDestinationColor.red - psystem->m_RenderColouring.red) * colorMul),
+ psystem->m_RenderColouring.red + int32(float(psystem->m_FadeDestinationColor.red - psystem->m_RenderColouring.red) * colorMul),
0, 255);
particle->m_Color.green = clamp(
- psystem->m_RenderColouring.green + Int32(Float(psystem->m_FadeDestinationColor.green - psystem->m_RenderColouring.green) * colorMul),
+ psystem->m_RenderColouring.green + int32(float(psystem->m_FadeDestinationColor.green - psystem->m_RenderColouring.green) * colorMul),
0, 255);
particle->m_Color.blue = clamp(
- psystem->m_RenderColouring.blue + Int32(Float(psystem->m_FadeDestinationColor.blue - psystem->m_RenderColouring.blue) * colorMul),
+ psystem->m_RenderColouring.blue + int32(float(psystem->m_FadeDestinationColor.blue - psystem->m_RenderColouring.blue) * colorMul),
0, 255);
}
else
@@ -1063,7 +1063,7 @@ void CParticle::Update()
}
}
- Float size = particle->m_fSize + particle->m_fExpansionRate;
+ float size = particle->m_fSize + particle->m_fExpansionRate;
if ( size < 0.0f )
{
@@ -1147,7 +1147,7 @@ void CParticle::Update()
{
bRemoveParticle = true;
- Int32 randVal = Int32(CGeneral::GetRandomNumber());
+ int32 randVal = int32(CGeneral::GetRandomNumber());
if ( randVal & 1 )
{
@@ -1188,11 +1188,11 @@ void CParticle::Update()
vecPosn.z += 1.0f;
Randomizer++;
- Int32 randVal = Int32(Randomizer & 7);
+ int32 randVal = int32(Randomizer & 7);
if ( randVal == 5 )
{
- Int32 randTime = Int32(CGeneral::GetRandomNumber());
+ int32 randTime = int32(CGeneral::GetRandomNumber());
CShadows::AddPermanentShadow(1, gpBloodPoolTex, &vecPosn,
0.1f, 0.0f, 0.0f, -0.1f,
@@ -1202,7 +1202,7 @@ void CParticle::Update()
}
else if ( randVal == 2 )
{
- Int32 randTime = Int32(CGeneral::GetRandomNumber());
+ int32 randTime = int32(CGeneral::GetRandomNumber());
CShadows::AddPermanentShadow(1, gpBloodPoolTex, &vecPosn,
0.2f, 0.0f, 0.0f, -0.2f,
@@ -1414,12 +1414,12 @@ void CParticle::Update()
if ( particle->m_fCurrentZRadius != 0.0f )
{
- Int32 nSinCosIndex = particle->m_nCurrentZRotation % (SIN_COS_TABLE_SIZE - 1);
+ int32 nSinCosIndex = particle->m_nCurrentZRotation % (SIN_COS_TABLE_SIZE - 1);
- Float fX = (m_CosTable[nSinCosIndex] - m_SinTable[nSinCosIndex])
+ float fX = (m_CosTable[nSinCosIndex] - m_SinTable[nSinCosIndex])
* particle->m_fCurrentZRadius;
- Float fY = (m_SinTable[nSinCosIndex] + m_CosTable[nSinCosIndex])
+ float fY = (m_SinTable[nSinCosIndex] + m_CosTable[nSinCosIndex])
* particle->m_fCurrentZRadius;
moveStep -= particle->m_vecParticleMovementOffset;
@@ -1446,15 +1446,15 @@ void CParticle::Render()
CSprite::InitSpriteBuffer2D();
- UInt32 flags = DRAW_OPAQUE;
+ uint32 flags = DRAW_OPAQUE;
RwRaster *prevFrame = NULL;
- for ( Int32 i = 0; i < MAX_PARTICLES; i++ )
+ for ( int32 i = 0; i < MAX_PARTICLES; i++ )
{
tParticleSystemData *psystem = &mod_ParticleSystemManager.m_aParticles[i];
- Bool particleBanned = false;
+ bool particleBanned = false;
CParticle *particle = psystem->m_pParticles;
@@ -1513,7 +1513,7 @@ void CParticle::Render()
while ( particle != NULL )
{
- Bool canDraw = true;
+ bool canDraw = true;
if ( particle->m_nAlpha == 0 )
canDraw = false;
@@ -1540,7 +1540,7 @@ void CParticle::Render()
particle->m_fSize * 63.0f,
particle->m_Color,
particle->m_nColorIntensity,
- (Float)particle->m_nRotation,
+ (float)particle->m_nRotation,
particle->m_nAlpha);
}
else
@@ -1561,8 +1561,8 @@ void CParticle::Render()
if ( canDraw )
{
CVector coors;
- Float w;
- Float h;
+ float w;
+ float h;
if ( CSprite::CalcScreenCoors(particle->m_vecPosition, coors, &w, &h, true) )
{
@@ -1578,13 +1578,13 @@ void CParticle::Render()
particle->m_Color.blue,
particle->m_nColorIntensity,
1.0f / coors.z,
- Float(particle->m_nRotation),
+ float(particle->m_nRotation),
particle->m_nAlpha);
}
else if ( psystem->Flags & SCREEN_TRAIL )
{
- Float fRotation;
- Float fTrailLength;
+ float fRotation;
+ float fTrailLength;
if ( particle->m_vecScreenPosition.x == 0.0f )
{
@@ -1599,12 +1599,12 @@ void CParticle::Render()
coors.y - particle->m_vecScreenPosition.y
);
- Float fDist = vecDist.Magnitude();
+ float fDist = vecDist.Magnitude();
fTrailLength = fDist;
//Float fRot = atan2( vecDist.x / fDist, sqrtf(1.0f - vecDist.x / fDist * (vecDist.x / fDist)) );
- Float fRot = asinf(vecDist.x / fDist);
+ float fRot = asinf(vecDist.x / fDist);
fRotation = fRot;
@@ -1616,9 +1616,9 @@ void CParticle::Render()
if ( fRotation < 0.0f )
fRotation += 360.0f;
- Float fSpeed = particle->m_vecVelocity.Magnitude();
+ float fSpeed = particle->m_vecVelocity.Magnitude();
- Float fNewTrailLength = fSpeed * CTimer::GetTimeStep() * w * 2.0f;
+ float fNewTrailLength = fSpeed * CTimer::GetTimeStep() * w * 2.0f;
if ( fDist > fNewTrailLength )
fTrailLength = fNewTrailLength;
@@ -1640,8 +1640,8 @@ void CParticle::Render()
else if ( psystem->Flags & SPEED_TRAIL )
{
CVector vecPrevPos = particle->m_vecPosition - particle->m_vecVelocity;
- Float fRotation;
- Float fTrailLength;
+ float fRotation;
+ float fTrailLength;
if ( CSprite::CalcScreenCoors(vecPrevPos, particle->m_vecScreenPosition, &fTrailLength, &fRotation, true) )
{
@@ -1651,12 +1651,12 @@ void CParticle::Render()
coors.y - particle->m_vecScreenPosition.y
);
- Float fDist = vecDist.Magnitude();
+ float fDist = vecDist.Magnitude();
fTrailLength = fDist;
//Float fRot = atan2(vecDist.x / fDist, sqrt(1.0f - vecDist.x / fDist * (vecDist.x / fDist)));
- Float fRot = asinf(vecDist.x / fDist);
+ float fRot = asinf(vecDist.x / fDist);
fRotation = fRot;
@@ -1687,7 +1687,7 @@ void CParticle::Render()
}
else if ( psystem->Flags & VERT_TRAIL )
{
- Float fTrailLength = fabsf(particle->m_vecVelocity.z * 10.0f);
+ float fTrailLength = fabsf(particle->m_vecVelocity.z * 10.0f);
CSprite::RenderBufferedOneXLUSprite(coors.x, coors.y, coors.z,
particle->m_fSize * w,
@@ -1772,7 +1772,7 @@ void CParticle::RemoveParticle(CParticle *pParticle, CParticle *pPrevParticle, t
m_pUnusedListHead = pParticle;
}
-void CParticle::AddJetExplosion(CVector const &vecPos, Float fPower, Float fSize)
+void CParticle::AddJetExplosion(CVector const &vecPos, float fPower, float fSize)
{
CRGBA color(240, 240, 240, 255);
@@ -1790,7 +1790,7 @@ void CParticle::AddJetExplosion(CVector const &vecPos, Float fPower, Float fSize
CVector vecStepPos = vecPos;
- for ( Int32 i = 0; i < Int32(fPower * 4.0f); i++ )
+ for ( int32 i = 0; i < int32(fPower * 4.0f); i++ )
{
AddParticle(PARTICLE_EXPLOSION_MFAST,
vecStepPos,
@@ -1837,7 +1837,7 @@ void CParticle::AddYardieDoorSmoke(CVector const &vecPos, CMatrix const &matMatr
CVector vecBasePos = matMatrix * (invMat * vecPos + CVector(0.0f, -1.0f, 0.5f));
- for ( Int32 i = 0; i < 5; i++ )
+ for ( int32 i = 0; i < 5; i++ )
{
CVector pos = vecBasePos;
diff --git a/src/render/Particle.h b/src/render/Particle.h
index 68e01879..5db91727 100644
--- a/src/render/Particle.h
+++ b/src/render/Particle.h
@@ -16,25 +16,25 @@ public:
CVector m_vecPosition;
CVector m_vecVelocity;
CVector m_vecScreenPosition;
- UInt32 m_nTimeWhenWillBeDestroyed;
- UInt32 m_nTimeWhenColorWillBeChanged;
- Float m_fZGround;
+ uint32 m_nTimeWhenWillBeDestroyed;
+ uint32 m_nTimeWhenColorWillBeChanged;
+ float m_fZGround;
CVector m_vecParticleMovementOffset;
- Int16 m_nCurrentZRotation;
- UInt16 m_nZRotationTimer;
- Float m_fCurrentZRadius;
- UInt16 m_nZRadiusTimer;
+ int16 m_nCurrentZRotation;
+ uint16 m_nZRotationTimer;
+ float m_fCurrentZRadius;
+ uint16 m_nZRadiusTimer;
char _pad0[2];
- Float m_fSize;
- Float m_fExpansionRate;
- UInt16 m_nFadeToBlackTimer;
- UInt16 m_nFadeAlphaTimer;
- UInt8 m_nColorIntensity;
- UInt8 m_nAlpha;
- UInt16 m_nCurrentFrame;
- Int16 m_nAnimationSpeedTimer;
- Int16 m_nRotationStep;
- Int16 m_nRotation;
+ float m_fSize;
+ float m_fExpansionRate;
+ uint16 m_nFadeToBlackTimer;
+ uint16 m_nFadeAlphaTimer;
+ uint8 m_nColorIntensity;
+ uint8 m_nAlpha;
+ uint16 m_nCurrentFrame;
+ int16 m_nAnimationSpeedTimer;
+ int16 m_nRotationStep;
+ int16 m_nRotation;
RwRGBA m_Color;
char _pad1[2];
CParticle *m_pNext;
@@ -49,24 +49,24 @@ public:
;
}
- //static Float ms_afRandTable[RAND_TABLE_SIZE];
- static Float (&ms_afRandTable)[RAND_TABLE_SIZE];
+ //static float ms_afRandTable[RAND_TABLE_SIZE];
+ static float (&ms_afRandTable)[RAND_TABLE_SIZE];
static CParticle *m_pUnusedListHead;
/*
- static Float m_SinTable[SIN_COS_TABLE_SIZE];
- static Float m_CosTable[SIN_COS_TABLE_SIZE];
+ static float m_SinTable[SIN_COS_TABLE_SIZE];
+ static float m_CosTable[SIN_COS_TABLE_SIZE];
*/
- static Float (&m_SinTable)[SIN_COS_TABLE_SIZE];
- static Float (&m_CosTable)[SIN_COS_TABLE_SIZE];
+ static float (&m_SinTable)[SIN_COS_TABLE_SIZE];
+ static float (&m_CosTable)[SIN_COS_TABLE_SIZE];
static void ReloadConfig();
static void Initialise();
static void Shutdown();
- static CParticle *AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity = NULL, Float fSize = 0.0f, Int32 nRotationSpeed = 0, Int32 nRotation = 0, Int32 nCurFrame = 0, Int32 nLifeSpan = 0);
- static CParticle *AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, Float fSize, RwRGBA const &color, Int32 nRotationSpeed = 0, Int32 nRotation = 0, Int32 nCurFrame = 0, Int32 nLifeSpan = 0);
+ static CParticle *AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity = NULL, float fSize = 0.0f, int32 nRotationSpeed = 0, int32 nRotation = 0, int32 nCurFrame = 0, int32 nLifeSpan = 0);
+ static CParticle *AddParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, CEntity *pEntity, float fSize, RwRGBA const &color, int32 nRotationSpeed = 0, int32 nRotation = 0, int32 nCurFrame = 0, int32 nLifeSpan = 0);
static void Update();
static void Render();
@@ -74,7 +74,7 @@ public:
static void RemovePSystem(tParticleType type);
static void RemoveParticle(CParticle *pParticle, CParticle *pPrevParticle, tParticleSystemData *pPSystemData);
- static inline void _Next(CParticle *&pParticle, CParticle *&pPrevParticle, tParticleSystemData *pPSystemData, Bool bRemoveParticle)
+ static inline void _Next(CParticle *&pParticle, CParticle *&pPrevParticle, tParticleSystemData *pPSystemData, bool bRemoveParticle)
{
if ( bRemoveParticle )
{
@@ -92,7 +92,7 @@ public:
}
}
- static void AddJetExplosion(CVector const &vecPos, Float fPower, Float fSize);
+ static void AddJetExplosion(CVector const &vecPos, float fPower, float fSize);
static void AddYardieDoorSmoke(CVector const &vecPos, CMatrix const &matMatrix);
};
diff --git a/src/render/ParticleMgr.cpp b/src/render/ParticleMgr.cpp
index 9757a6ca..15370b47 100644
--- a/src/render/ParticleMgr.cpp
+++ b/src/render/ParticleMgr.cpp
@@ -5,7 +5,7 @@
cParticleSystemMgr mod_ParticleSystemManager;
-const Char *ParticleFilename = "PARTICLE.CFG";
+const char *ParticleFilename = "PARTICLE.CFG";
//cParticleSystemMgr::cParticleSystemMgr()
void cParticleSystemMgr::ctor()
@@ -17,7 +17,7 @@ void cParticleSystemMgr::Initialise()
{
LoadParticleData();
- for ( Int32 i = 0; i < MAX_PARTICLES; i++ )
+ for ( int32 i = 0; i < MAX_PARTICLES; i++ )
m_aParticles[i].m_pParticles = NULL;
}
@@ -28,13 +28,13 @@ void cParticleSystemMgr::LoadParticleData()
CFileMgr::SetDir("");
tParticleSystemData *entry = NULL;
- Int32 type = PARTICLE_FIRST;
+ int32 type = PARTICLE_FIRST;
- Char *lineStart = (Char *)work_buff;
- Char *lineEnd = lineStart + 1;
+ char *lineStart = (char *)work_buff;
+ char *lineEnd = lineStart + 1;
- Char line[500];
- Char delims[4];
+ char line[500];
+ char delims[4];
while ( true )
{
@@ -44,7 +44,7 @@ void cParticleSystemMgr::LoadParticleData()
while ( *lineEnd != '\n' )
++lineEnd;
- Int32 lineLength = lineEnd - lineStart;
+ int32 lineLength = lineEnd - lineStart;
ASSERT(lineLength < 500);
@@ -57,11 +57,11 @@ void cParticleSystemMgr::LoadParticleData()
if ( *line != ';' )
{
- Int32 param = CFG_PARAM_FIRST;
+ int32 param = CFG_PARAM_FIRST;
strcpy(delims, " \t");
- Char *value = strtok(line, delims);
+ char *value = strtok(line, delims);
ASSERT(value != NULL);
diff --git a/src/render/ParticleMgr.h b/src/render/ParticleMgr.h
index a2dcbdb5..5e8da1e4 100644
--- a/src/render/ParticleMgr.h
+++ b/src/render/ParticleMgr.h
@@ -100,42 +100,42 @@ enum
struct tParticleSystemData
{
tParticleType m_Type;
- Char m_aName[20];
- Float m_fCreateRange;
- Float m_fDefaultInitialRadius;
- Float m_fExpansionRate;
- UInt16 m_nZRotationInitialAngle;
- Int16 m_nZRotationAngleChangeAmount;
- UInt16 m_nZRotationChangeTime;
- UInt16 m_nZRadiusChangeTime;
- Float m_fInitialZRadius;
- Float m_fZRadiusChangeAmount;
- UInt16 m_nFadeToBlackTime;
- Int16 m_nFadeToBlackAmount;
- UInt8 m_nFadeToBlackInitialIntensity;
- UInt8 m_nFadeAlphaInitialIntensity;
- UInt16 m_nFadeAlphaTime;
- Int16 m_nFadeAlphaAmount;
- UInt16 m_nStartAnimationFrame;
- UInt16 m_nFinalAnimationFrame;
- UInt16 m_nAnimationSpeed;
- UInt16 m_nRotationSpeed;
+ char m_aName[20];
+ float m_fCreateRange;
+ float m_fDefaultInitialRadius;
+ float m_fExpansionRate;
+ uint16 m_nZRotationInitialAngle;
+ int16 m_nZRotationAngleChangeAmount;
+ uint16 m_nZRotationChangeTime;
+ uint16 m_nZRadiusChangeTime;
+ float m_fInitialZRadius;
+ float m_fZRadiusChangeAmount;
+ uint16 m_nFadeToBlackTime;
+ int16 m_nFadeToBlackAmount;
+ uint8 m_nFadeToBlackInitialIntensity;
+ uint8 m_nFadeAlphaInitialIntensity;
+ uint16 m_nFadeAlphaTime;
+ int16 m_nFadeAlphaAmount;
+ uint16 m_nStartAnimationFrame;
+ uint16 m_nFinalAnimationFrame;
+ uint16 m_nAnimationSpeed;
+ uint16 m_nRotationSpeed;
char _pad1[2];
- Float m_fGravitationalAcceleration;
- Int32 m_nFrictionDecceleration;
- Int32 m_nLifeSpan;
- Float m_fPositionRandomError;
- Float m_fVelocityRandomError;
- Float m_fExpansionRateError;
- Int32 m_nRotationRateError;
- UInt32 m_nLifeSpanErrorShape;
- Float m_fTrailLengthMultiplier;
- UInt32 Flags;
+ float m_fGravitationalAcceleration;
+ int32 m_nFrictionDecceleration;
+ int32 m_nLifeSpan;
+ float m_fPositionRandomError;
+ float m_fVelocityRandomError;
+ float m_fExpansionRateError;
+ int32 m_nRotationRateError;
+ uint32 m_nLifeSpanErrorShape;
+ float m_fTrailLengthMultiplier;
+ uint32 Flags;
RwRGBA m_RenderColouring;
- UInt8 m_InitialColorVariation;
+ uint8 m_InitialColorVariation;
RwRGBA m_FadeDestinationColor;
char _pad2[3];
- UInt32 m_ColorFadeTime;
+ uint32 m_ColorFadeTime;
RwRaster **m_ppRaster;
CParticle *m_pParticles;
diff --git a/src/skel/events.cpp b/src/skel/events.cpp
index 46488a04..877b969e 100644
--- a/src/skel/events.cpp
+++ b/src/skel/events.cpp
@@ -726,8 +726,8 @@ KeyboardHandler(RsEvent event, void *param)
static RsEventStatus
HandlePadButtonDown(RsPadButtonStatus *padButtonStatus)
{
- Bool bPadTwo = false;
- Int32 padNumber = padButtonStatus->padID;
+ bool bPadTwo = false;
+ int32 padNumber = padButtonStatus->padID;
CPad *pad = CPad::GetPad(padNumber);
@@ -739,7 +739,7 @@ HandlePadButtonDown(RsPadButtonStatus *padButtonStatus)
ControlsManager.UpdateJoyButtonState(padNumber);
- for ( Int32 i = 0; i < _TODOCONST(16); i++ )
+ for ( int32 i = 0; i < _TODOCONST(16); i++ )
{
RsPadButtons btn = rsPADNULL;
if ( ControlsManager.m_aButtonStates[i] == TRUE )
@@ -761,8 +761,8 @@ HandlePadButtonDown(RsPadButtonStatus *padButtonStatus)
static RsEventStatus
HandlePadButtonUp(RsPadButtonStatus *padButtonStatus)
{
- Bool bPadTwo = false;
- Int32 padNumber = padButtonStatus->padID;
+ bool bPadTwo = false;
+ int32 padNumber = padButtonStatus->padID;
CPad *pad = CPad::GetPad(padNumber);
@@ -772,14 +772,14 @@ HandlePadButtonUp(RsPadButtonStatus *padButtonStatus)
if ( padNumber == 1 )
bPadTwo = true;
- Bool bCam = false;
- Int16 mode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
+ bool bCam = false;
+ int16 mode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
if ( mode == CCam::MODE_FLYBY || mode == CCam::MODE_FIXED )
- Bool bCam = true;
+ bool bCam = true;
ControlsManager.UpdateJoyButtonState(padNumber);
- for ( Int32 i = 1; i < _TODOCONST(16); i++ )
+ for ( int32 i = 1; i < _TODOCONST(16); i++ )
{
RsPadButtons btn = rsPADNULL;
if ( ControlsManager.m_aButtonStates[i] == FALSE )
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 81fe109b..e1090f72 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -113,9 +113,9 @@ DWORD _dwMemAvailVideo;
DWORD &_dwOperatingSystemVersion = *(DWORD*)0x70F290;
RwUInt32 &gGameState = *(RwUInt32*)0x8F5838;
-WRAPPER Bool InitialiseGame(void) { EAXJMP(0x48E7E0); }
+WRAPPER bool InitialiseGame(void) { EAXJMP(0x48E7E0); }
-WRAPPER const Char *GetLevelSplashScreen(Int32 number) { EAXJMP(0x48D750); }
+WRAPPER const char *GetLevelSplashScreen(int32 number) { EAXJMP(0x48D750); }
//
void LoadingScreen(char const *msg1, char const *msg2, char const *screen);
@@ -130,12 +130,12 @@ enum eJoypadState
struct tJoy
{
eJoypadState m_State;
- Bool m_bInitialised;
- Bool m_bHasAxisZ;
- Bool m_bHasAxisR;
+ bool m_bInitialised;
+ bool m_bHasAxisZ;
+ bool m_bHasAxisR;
char _pad0;
- Int32 m_nVendorID;
- Int32 m_nProductID;
+ int32 m_nVendorID;
+ int32 m_nProductID;
};
class CJoySticks
@@ -1210,7 +1210,7 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
PDEV_BROADCAST_VOLUME pVol = (PDEV_BROADCAST_VOLUME)pDev;
if ( pVol->dbcv_flags & DBTF_MEDIA )
{
- Char c = DMAudio.GetCDAudioDriveLetter();
+ char c = DMAudio.GetCDAudioDriveLetter();
if ( c >= 'A' && pVol->dbcv_unitmask & (1 << (c - 'A')) )
{
@@ -1578,7 +1578,7 @@ void InitialiseLanguage()
|| subLayout == SUBLANG_ENGLISH_AUS )
CGame::noProstitutes = true;
- Int32 lang;
+ int32 lang;
switch ( primSystemLCID )
{
@@ -1910,7 +1910,7 @@ _WinMain(HINSTANCE instance,
{
CFileMgr::SetDirMyDocuments();
- Int32 gta3set = CFileMgr::OpenFile("gta3.set", "r");
+ int32 gta3set = CFileMgr::OpenFile("gta3.set", "r");
if ( gta3set )
{
@@ -2112,10 +2112,10 @@ _WinMain(HINSTANCE instance,
case GS_PLAYING_GAME:
{
- Float ms = (Float)CTimer::GetCurrentTimeInCycles() / (Float)CTimer::GetCyclesPerMillisecond();
+ float ms = (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond();
if ( RwInitialised )
{
- if (!CMenuManager::m_PrefsFrameLimiter || (1000.0f / (Float)RsGlobal.maxFPS) < ms)
+ if (!CMenuManager::m_PrefsFrameLimiter || (1000.0f / (float)RsGlobal.maxFPS) < ms)
RsEventHandler(rsIDLE, (void *)TRUE);
}
break;
@@ -2335,16 +2335,16 @@ HRESULT CapturePad(RwInt32 padID)
RsPadEventHandler(rsPADBUTTONUP, (void *)&bs);
- Bool deviceAvailable = pPad != NULL;
+ bool deviceAvailable = pPad != NULL;
if ( deviceAvailable )
{
- leftStickPos.x = (Float)js.lX / (Float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
- leftStickPos.y = (Float)js.lY / (Float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
+ leftStickPos.x = (float)js.lX / (float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
+ leftStickPos.y = (float)js.lY / (float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
if (LOWORD(js.rgdwPOV[0]) != -1)
{
- Float angle = DEGTORAD((Float)js.rgdwPOV[0] / 100.0f);
+ float angle = DEGTORAD((float)js.rgdwPOV[0] / 100.0f);
leftStickPos.x = sin(angle);
leftStickPos.y = -cos(angle);
@@ -2352,8 +2352,8 @@ HRESULT CapturePad(RwInt32 padID)
if ( AllValidWinJoys.m_aJoys[bs.padID].m_bHasAxisR && AllValidWinJoys.m_aJoys[bs.padID].m_bHasAxisZ )
{
- rightStickPos.x = (Float)js.lZ / (Float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
- rightStickPos.y = (Float)js.lRz / (Float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
+ rightStickPos.x = (float)js.lZ / (float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
+ rightStickPos.y = (float)js.lRz / (float)((DEVICE_AXIS_MAX - DEVICE_AXIS_MIN) / 2);
}
}
@@ -2372,16 +2372,16 @@ HRESULT CapturePad(RwInt32 padID)
CPad *pad = CPad::GetPad(bs.padID);
if ( fabs(leftStickPos.x) > 0.3f )
- pad->PCTempJoyState.LeftStickX = (Int32)(leftStickPos.x * 128.0f);
+ pad->PCTempJoyState.LeftStickX = (int32)(leftStickPos.x * 128.0f);
if ( fabs(leftStickPos.y) > 0.3f )
- pad->PCTempJoyState.LeftStickY = (Int32)(leftStickPos.y * 128.0f);
+ pad->PCTempJoyState.LeftStickY = (int32)(leftStickPos.y * 128.0f);
if ( fabs(rightStickPos.x) > 0.3f )
- pad->PCTempJoyState.RightStickX = (Int32)(rightStickPos.x * 128.0f);
+ pad->PCTempJoyState.RightStickX = (int32)(rightStickPos.x * 128.0f);
if ( fabs(rightStickPos.y) > 0.3f )
- pad->PCTempJoyState.RightStickY = (Int32)(rightStickPos.y * 128.0f);
+ pad->PCTempJoyState.RightStickY = (int32)(rightStickPos.y * 128.0f);
}
return S_OK;
@@ -2392,7 +2392,7 @@ void _InputInitialiseJoys()
DIPROPDWORD prop;
DIDEVCAPS devCaps;
- for ( Int32 i = 0; i < _TODOCONST(2); i++ )
+ for ( int32 i = 0; i < _TODOCONST(2); i++ )
AllValidWinJoys.ClearJoyInfo(i);
_InputAddJoys();