summaryrefslogtreecommitdiffstats
path: root/src/renderer/Skidmarks.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-17 23:03:57 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-17 23:03:57 +0200
commitc937bdbfea8f522d14d7a41f24372bddf5bdafcc (patch)
treeeb8f97f6cf9fac31d7ab90388af232d51cc9c137 /src/renderer/Skidmarks.h
parentMerge pull request #1219 from withmorten/miami-ini (diff)
downloadre3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar
re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.gz
re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.bz2
re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.lz
re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.xz
re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.tar.zst
re3-c937bdbfea8f522d14d7a41f24372bddf5bdafcc.zip
Diffstat (limited to 'src/renderer/Skidmarks.h')
-rw-r--r--src/renderer/Skidmarks.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/renderer/Skidmarks.h b/src/renderer/Skidmarks.h
new file mode 100644
index 00000000..28082f08
--- /dev/null
+++ b/src/renderer/Skidmarks.h
@@ -0,0 +1,41 @@
+#pragma once
+
+enum { SKIDMARK_LENGTH = 16 };
+
+enum eSkidmarkType
+{
+ SKIDMARK_NORMAL,
+ SKIDMARK_MUDDY,
+ SKIDMARK_SANDY,
+ SKIDMARK_BLOODY
+};
+
+class CSkidmark
+{
+public:
+ CVector m_pos[SKIDMARK_LENGTH];
+ float m_sideX[SKIDMARK_LENGTH];
+ float m_sideY[SKIDMARK_LENGTH];
+ uintptr m_id;
+ uint32 m_lastUpdate;
+ uint32 m_fadeStart;
+ uint32 m_fadeEnd;
+ uint32 m_type;
+ int16 m_last;
+ uint8 m_state;
+ bool m_wasUpdated;
+};
+
+class CSkidmarks
+{
+ static CSkidmark aSkidmarks[NUMSKIDMARKS];
+public:
+
+ static void Init(void);
+ static void Shutdown(void);
+ static void Clear(void);
+ static void Update(void);
+ static void Render(void);
+ static void RegisterOne(uintptr id, const CVector &pos, float fwdX, float fwdY, eSkidmarkType type, bool *isBloody);
+ static void RegisterOne(uintptr id, const CVector &pos, float fwdX, float fwdY, bool *isMuddy, bool *isBloody);
+};