summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-10-18 18:45:11 +0200
committerGitHub <noreply@github.com>2020-10-18 18:45:11 +0200
commit70f9832e14ff452e81ae580a1a15b9d6f4bd63b6 (patch)
treec2a222cfdbb5d7ebcd9acf27920b7fa6da6918d1 /src/render
parenttypo fixes (diff)
parentMerge pull request #772 from Nick007J/miami (diff)
downloadre3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar
re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.gz
re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.bz2
re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.lz
re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.xz
re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.zst
re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.zip
Diffstat (limited to '')
-rw-r--r--src/render/2dEffect.h4
-rw-r--r--src/render/Fluff.cpp4
-rw-r--r--src/render/Fluff.h3
-rw-r--r--src/render/Glass.cpp4
-rw-r--r--src/render/Hud.cpp2
-rw-r--r--src/render/SpecialFX.cpp8
-rw-r--r--src/render/WaterCannon.cpp22
7 files changed, 28 insertions, 19 deletions
diff --git a/src/render/2dEffect.h b/src/render/2dEffect.h
index baf07342..8ad2b946 100644
--- a/src/render/2dEffect.h
+++ b/src/render/2dEffect.h
@@ -88,14 +88,10 @@ public:
if(type == EFFECT_LIGHT){
if(light.corona)
RwTextureDestroy(light.corona);
-#ifdef GTA3_1_1_PATCH
light.corona = nil;
-#endif
if(light.shadow)
RwTextureDestroy(light.shadow);
-#ifdef GTA3_1_1_PATCH
light.shadow = nil;
-#endif
}
}
};
diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp
index 773561f3..19a172fb 100644
--- a/src/render/Fluff.cpp
+++ b/src/render/Fluff.cpp
@@ -386,6 +386,8 @@ CMovingThing CMovingThings::StartCloseList;
CMovingThing CMovingThings::EndCloseList;
int16 CMovingThings::Num;
CMovingThing CMovingThings::aMovingThings[NUMMOVINGTHINGS];
+
+int32 CScrollBar::TonightsEvent;
void CMovingThings::Init()
{
@@ -1603,7 +1605,7 @@ void CScriptPath::Update(void) {
void CScriptPath::Clear(void) {
if (m_pNode)
- delete m_pNode;
+ delete[] m_pNode;
m_pNode = nil;
m_numNodes = 0;
for (int i = 0; i < 6; i++)
diff --git a/src/render/Fluff.h b/src/render/Fluff.h
index a6a28cb7..f61da350 100644
--- a/src/render/Fluff.h
+++ b/src/render/Fluff.h
@@ -170,6 +170,9 @@ private:
float m_fScale;
public:
+ static int TonightsEvent;
+
+public:
void SetVisibility(bool visible) { m_bVisible = visible; }
bool IsVisible() { return m_bVisible; }
diff --git a/src/render/Glass.cpp b/src/render/Glass.cpp
index c52d49bd..aabb6e52 100644
--- a/src/render/Glass.cpp
+++ b/src/render/Glass.cpp
@@ -393,9 +393,9 @@ void
CGlass::AskForObjectToBeRenderedInGlass(CEntity *entity)
{
#ifdef FIX_BUGS
- if ( NumGlassEntities < NUM_GLASSPANES )
+ if ( NumGlassEntities < NUM_GLASSENTITIES )
#else
- if ( NumGlassEntities < NUM_GLASSPANES-1 )
+ if ( NumGlassEntities < NUM_GLASSENTITIES-1 )
#endif
{
apEntitiesToBeRendered[NumGlassEntities++] = entity;
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 3ea756fa..753bb42b 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -583,7 +583,7 @@ void CHud::Draw()
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f), SCREEN_SCALE_Y(65.0f), sPrint);
- if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || CTimer::GetFrameCounter() & 1) {
+ if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || CTimer::GetFrameCounter() & 4) {
// CFont::SetColor(ARMOUR_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f + 52.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon);
}
diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp
index 9af4c9e4..7864b0f0 100644
--- a/src/render/SpecialFX.cpp
+++ b/src/render/SpecialFX.cpp
@@ -306,7 +306,7 @@ CMotionBlurStreaks::Update(void)
{
int i;
for(i = 0; i < NUMMBLURSTREAKS; i++)
- if(aStreaks[i].m_id)
+ if(aStreaks[i].m_id != 0)
aStreaks[i].Update();
}
@@ -351,7 +351,7 @@ CMotionBlurStreaks::Render(void)
bool setRenderStates = false;
int i;
for(i = 0; i < NUMMBLURSTREAKS; i++)
- if(aStreaks[i].m_id != nil){
+ if(aStreaks[i].m_id != 0){
if(!setRenderStates){
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
@@ -1150,8 +1150,8 @@ CBrightLights::Render(void)
case BRIGHTLIGHT_SIREN:
for(j = 0; j < 6; j++){
- pos = SirenLightsSide[j]*TheCamera.GetRight() +
- SirenLightsUp[j]* TheCamera.GetUp() +
+ pos = SirenLightsSide[j] * TheCamera.GetRight() +
+ SirenLightsUp[j] * TheCamera.GetUp() +
aBrightLights[i].m_pos;
RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored+j], r, g, b, a);
RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored+j], pos.x, pos.y, pos.z);
diff --git a/src/render/WaterCannon.cpp b/src/render/WaterCannon.cpp
index bd2b9a68..91304be3 100644
--- a/src/render/WaterCannon.cpp
+++ b/src/render/WaterCannon.cpp
@@ -11,6 +11,9 @@
#include "Fire.h"
#include "WaterLevel.h"
#include "Camera.h"
+#include "Particle.h"
+
+// --MIAMI: file done
#define WATERCANNONVERTS 4
#define WATERCANNONINDEXES 12
@@ -64,7 +67,7 @@ void CWaterCannon::Update_OncePerFrame(int16 index)
if (CTimer::GetTimeInMilliseconds() > m_nTimeCreated + WATERCANNON_LIFETIME )
{
- m_nCur = (m_nCur + 1) % -NUM_SEGMENTPOINTS;
+ m_nCur = (m_nCur + 1) % NUM_SEGMENTPOINTS;
m_abUsed[m_nCur] = false;
}
@@ -128,7 +131,7 @@ void CWaterCannon::Render(void)
RwIm3DVertexSetV(&WaterCannonVertices[2], v);
RwIm3DVertexSetV(&WaterCannonVertices[3], v);
- int16 pointA = m_nCur % -NUM_SEGMENTPOINTS;
+ int16 pointA = m_nCur % NUM_SEGMENTPOINTS;
int16 pointB = pointA - 1;
if ( (pointA - 1) < 0 )
@@ -235,11 +238,16 @@ void CWaterCannon::PushPeds(void)
ped->m_vecMoveSpeed.x = (0.6f * m_avecVelocity[j].x + ped->m_vecMoveSpeed.x) * 0.5f;
ped->m_vecMoveSpeed.y = (0.6f * m_avecVelocity[j].y + ped->m_vecMoveSpeed.y) * 0.5f;
- ped->SetFall(2000, AnimationId(ANIM_KO_SKID_FRONT + localDir), 0);
-
- CFire *fire = ped->m_pFire;
- if ( fire )
- fire->Extinguish();
+ float pedSpeed2D = ped->m_vecMoveSpeed.Magnitude2D();
+
+ if ( pedSpeed2D > 0.2f ) {
+ ped->m_vecMoveSpeed.x *= (0.2f / pedSpeed2D);
+ ped->m_vecMoveSpeed.y *= (0.2f / pedSpeed2D);
+ }
+ ped->SetFall(2000, (AnimationId)(localDir + ANIM_KO_SKID_FRONT), 0);
+ CParticle::AddParticle(PARTICLE_STEAM_NY_SLOWMOTION, ped->GetPosition(), ped->m_vecMoveSpeed * 0.3f, 0, 0.5f);
+ CParticle::AddParticle(PARTICLE_CAR_SPLASH, ped->GetPosition(), ped->m_vecMoveSpeed * -0.3f + CVector(0.f, 0.f, 0.5f), 0, 0.5f,
+ CGeneral::GetRandomNumberInRange(0.f, 10.f), CGeneral::GetRandomNumberInRange(0.f, 90.f), 1);
j = NUM_SEGMENTPOINTS;
}