summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/render/Skidmarks.cpp10
-rw-r--r--src/render/Skidmarks.h6
2 files changed, 9 insertions, 7 deletions
diff --git a/src/render/Skidmarks.cpp b/src/render/Skidmarks.cpp
index 87881fb9..41ee5d1d 100644
--- a/src/render/Skidmarks.cpp
+++ b/src/render/Skidmarks.cpp
@@ -8,8 +8,8 @@
CSkidmark CSkidmarks::aSkidmarks[NUMSKIDMARKS];
-RwImVertexIndex SkidmarkIndexList[16 * 6];
-RwIm3DVertex SkidmarkVertices[16 * 2];
+RwImVertexIndex SkidmarkIndexList[SKIDMARK_LENGTH * 6];
+RwIm3DVertex SkidmarkVertices[SKIDMARK_LENGTH * 2];
RwTexture *gpSkidTex;
RwTexture *gpSkidBloodTex;
RwTexture *gpSkidMudTex;
@@ -32,7 +32,7 @@ CSkidmarks::Init(void)
}
ix = 0;
- for(i = 0; i < 16; i++){
+ for(i = 0; i < SKIDMARK_LENGTH; i++){
SkidmarkIndexList[i*6+0] = ix+0;
SkidmarkIndexList[i*6+1] = ix+2;
SkidmarkIndexList[i*6+2] = ix+1;
@@ -42,7 +42,7 @@ CSkidmarks::Init(void)
ix += 2;
}
- for(i = 0; i < 16; i++){
+ for(i = 0; i < SKIDMARK_LENGTH; i++){
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 0], 0.0f);
RwIm3DVertexSetV(&SkidmarkVertices[i*2 + 0], i*5.01f);
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 1], 1.0f);
@@ -201,7 +201,7 @@ CSkidmarks::RegisterOne(uintptr id, CVector pos, float fwdX, float fwdY, bool *i
}
aSkidmarks[i].m_lastUpdate = CTimer::GetTimeInMilliseconds();
- if(aSkidmarks[i].m_last >= 15){
+ if(aSkidmarks[i].m_last >= SKIDMARK_LENGTH-1){
// No space to continue, end it
aSkidmarks[i].m_state = 2;
aSkidmarks[i].m_fadeStart = CTimer::GetTimeInMilliseconds() + 10000;
diff --git a/src/render/Skidmarks.h b/src/render/Skidmarks.h
index 5387d8f4..085b4c6d 100644
--- a/src/render/Skidmarks.h
+++ b/src/render/Skidmarks.h
@@ -1,5 +1,7 @@
#pragma once
+enum { SKIDMARK_LENGTH = 16 };
+
class CSkidmark
{
public:
@@ -12,8 +14,8 @@ public:
uint32 m_lastUpdate;;
uint32 m_fadeStart;
uint32 m_fadeEnd;
- CVector m_pos[16];
- CVector m_side[16];
+ CVector m_pos[SKIDMARK_LENGTH];
+ CVector m_side[SKIDMARK_LENGTH];
};
class CSkidmarks