summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-03-29 15:32:11 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2020-03-29 15:32:11 +0200
commitd53c151ffcdfdc526069f261afd42d863f87af67 (patch)
tree2d9a925854036427a37dc8b8f317df3753022521 /src
parentCWeaponEffects(autoaim crosshair) done, CGame done. restored some original R* names (diff)
downloadre3-d53c151ffcdfdc526069f261afd42d863f87af67.tar
re3-d53c151ffcdfdc526069f261afd42d863f87af67.tar.gz
re3-d53c151ffcdfdc526069f261afd42d863f87af67.tar.bz2
re3-d53c151ffcdfdc526069f261afd42d863f87af67.tar.lz
re3-d53c151ffcdfdc526069f261afd42d863f87af67.tar.xz
re3-d53c151ffcdfdc526069f261afd42d863f87af67.tar.zst
re3-d53c151ffcdfdc526069f261afd42d863f87af67.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/Game.cpp28
-rw-r--r--src/render/WeaponEffects.cpp36
2 files changed, 32 insertions, 32 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 57683893..8dd90d94 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -121,29 +121,29 @@ CGame::InitialiseRenderWare(void)
/* Create camera */
Scene.camera = CameraCreate(RsGlobal.width, RsGlobal.height, TRUE);
- ASSERT(Scene.camera != NULL);
+ ASSERT(Scene.camera != nil);
if (!Scene.camera)
{
return (false);
}
- RwCameraSetFarClipPlane(Scene.camera, (RwReal) (2000.0));
- RwCameraSetNearClipPlane(Scene.camera, (RwReal) (0.9));
+ RwCameraSetFarClipPlane(Scene.camera, 2000.0f);
+ RwCameraSetNearClipPlane(Scene.camera, 0.9f);
- CameraSize(Scene.camera, NULL, DEFAULT_VIEWWINDOW, DEFAULT_ASPECT_RATIO);
+ CameraSize(Scene.camera, nil, DEFAULT_VIEWWINDOW, DEFAULT_ASPECT_RATIO);
/* Create a world */
RwBBox bbox;
- bbox.sup.x = bbox.sup.y = bbox.sup.z = (RwReal)(10000.0);
- bbox.inf.x = bbox.inf.y = bbox.inf.z = (RwReal)(-10000.0);
+ bbox.sup.x = bbox.sup.y = bbox.sup.z = 10000.0f;
+ bbox.inf.x = bbox.inf.y = bbox.inf.z = -10000.0f;
Scene.world = RpWorldCreate(&bbox);
- ASSERT(Scene.world != NULL);
+ ASSERT(Scene.world != nil);
if (!Scene.world)
{
CameraDestroy(Scene.camera);
- Scene.camera = NULL;
+ Scene.camera = nil;
return (false);
}
@@ -182,8 +182,8 @@ void CGame::ShutdownRenderWare(void)
/* destroy camera */
CameraDestroy(Scene.camera);
- Scene.world = NULL;
- Scene.camera = NULL;
+ Scene.world = nil;
+ Scene.camera = nil;
CVisibilityPlugins::Shutdown();
@@ -233,7 +233,7 @@ bool CGame::InitialiseOnceAfterRW(void)
DMAudio.SetEffectsFadeVol(127);
DMAudio.SetMusicFadeVol(127);
CWorld::Players[0].SetPlayerSkin(CMenuManager::m_PrefsSkinFile);
-
+
return true;
}
@@ -411,7 +411,7 @@ bool CGame::ShutDown(void)
{
CWorld::Remove(CWorld::Players[i].m_pPed);
delete CWorld::Players[i].m_pPed;
- CWorld::Players[i].m_pPed = NULL;
+ CWorld::Players[i].m_pPed = nil;
}
CWorld::Players[i].Clear();
@@ -490,7 +490,7 @@ void CGame::ReInitGameObjectVariables(void)
CWaterCannons::Init();
CParticle::ReloadConfig();
CCullZones::ResolveVisibilities();
-
+
if ( !FrontEndMenuManager.m_bLoadingSavedGame )
{
CCranes::InitCranes();
@@ -535,7 +535,7 @@ void CGame::ShutDownForRestart(void)
for (int i = 0; i < NUMPLAYERS; i++)
CWorld::Players[i].Clear();
-
+
CGarages::SetAllDoorsBackToOriginalHeight();
CTheScripts::UndoBuildingSwaps();
CTheScripts::UndoEntityInvisibilitySettings();
diff --git a/src/render/WeaponEffects.cpp b/src/render/WeaponEffects.cpp
index 1c29caf8..cbab25a5 100644
--- a/src/render/WeaponEffects.cpp
+++ b/src/render/WeaponEffects.cpp
@@ -22,24 +22,24 @@ CWeaponEffects::~CWeaponEffects()
void
CWeaponEffects::Init(void)
{
- gCrossHair.m_bActive = false;
- gCrossHair.m_vecPos = CVector(0.0f, 0.0f, 0.0f);
- gCrossHair.m_nRed = 0;
- gCrossHair.m_nGreen = 0;
- gCrossHair.m_nBlue = 0;
- gCrossHair.m_nAlpha = 255;
- gCrossHair.m_fSize = 1.0f;
- gCrossHair.m_fRotation = 0.0f;
+ gCrossHair.m_bActive = false;
+ gCrossHair.m_vecPos = CVector(0.0f, 0.0f, 0.0f);
+ gCrossHair.m_nRed = 0;
+ gCrossHair.m_nGreen = 0;
+ gCrossHair.m_nBlue = 0;
+ gCrossHair.m_nAlpha = 255;
+ gCrossHair.m_fSize = 1.0f;
+ gCrossHair.m_fRotation = 0.0f;
CTxdStore::PushCurrentTxd();
- int32 slut = CTxdStore::FindTxdSlot("particle");
- CTxdStore::SetCurrentTxd(slut);
+ int32 slot = CTxdStore::FindTxdSlot("particle");
+ CTxdStore::SetCurrentTxd(slot);
gpCrossHairTex = RwTextureRead("crosshair", NULL);
gpCrossHairRaster = RwTextureGetRaster(gpCrossHairTex);
- CTxdStore::PopCurrentTxd();
+ CTxdStore::PopCurrentTxd();
}
void
@@ -51,13 +51,13 @@ CWeaponEffects::Shutdown(void)
void
CWeaponEffects::MarkTarget(CVector pos, uint8 red, uint8 green, uint8 blue, uint8 alpha, float size)
{
- gCrossHair.m_bActive = true;
- gCrossHair.m_vecPos = pos;
- gCrossHair.m_nRed = red;
- gCrossHair.m_nGreen = green;
- gCrossHair.m_nBlue = blue;
- gCrossHair.m_nAlpha = alpha;
- gCrossHair.m_fSize = size;
+ gCrossHair.m_bActive = true;
+ gCrossHair.m_vecPos = pos;
+ gCrossHair.m_nRed = red;
+ gCrossHair.m_nGreen = green;
+ gCrossHair.m_nBlue = blue;
+ gCrossHair.m_nAlpha = alpha;
+ gCrossHair.m_fSize = size;
}
void