From 7a3e1ef19a67a16d75d22144a012b1780b400f78 Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sun, 11 Oct 2020 21:40:11 +0300 Subject: SpecialFX almost done --- src/render/SpecialFX.h | 81 +++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 3e989d1d..0284126c 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -1,5 +1,6 @@ #pragma once +//done class CSpecialFX { public: @@ -12,10 +13,11 @@ public: static void Update(void); //done static void Init(void); //done static void Shutdown(void); //done - static void AddWeaponStreak(int type); + static void AddWeaponStreak(int type); //done static void Render2DFXs(); //done }; +//done class CRegisteredMotionBlurStreak { public: @@ -28,19 +30,21 @@ public: bool m_isValid[3]; void Update(void); //done - void Render(void); + void Render(void); //done }; +//done class CMotionBlurStreaks { static CRegisteredMotionBlurStreak aStreaks[NUMMBLURSTREAKS]; public: - static void Init(void); + static void Init(void); //done static void Update(void); //done - static void RegisterStreak(uintptr id, uint8 r, uint8 g, uint8 b, CVector p1, CVector p2); - static void Render(void); + static void RegisterStreak(uintptr id, uint8 r, uint8 g, uint8 b, CVector p1, CVector p2); //done + static void Render(void); //done }; +//done struct CBulletTrace { CVector m_vecCurrentPos; @@ -48,31 +52,23 @@ struct CBulletTrace bool m_bInUse; uint32 m_nCreationTime; uint32 m_nLifeTime; - uint32 field_24; - uint8 field_28; - - uint8 m_framesInUse; - uint8 m_lifeTime; + float m_fThicknes; + uint8 m_fVisibility; void Update(void); //done }; +//done class CBulletTraces { public: static CBulletTrace aTraces[NUMBULLETTRACES]; - static void Init(void); - static void AddTrace(CVector*, CVector*); - static void Render(void); + static void Init(void); //done + static void Render(void); //done static void Update(void); //done - -//TODO(MIAMI) - static void AddTrace(CVector *, CVector *, float, unsigned int, unsigned char) {} - static void AddTrace(CVector *a, CVector *b, int32 weapontype, class CEntity *shooter) - { - AddTrace(a, b); //TODO: temp - } + static void AddTrace(CVector* start, CVector* end, float thickness, uint32 lifeTime, uint8 visibility); //done + static void AddTrace(CVector* start, CVector* end, int32 weaponType, class CEntity* shooter); //done }; enum @@ -87,7 +83,7 @@ enum MARKERTYPE_INVALID = 0x101 }; - +//done class C3dMarker { public: @@ -108,20 +104,20 @@ public: float m_fBrightness; float m_fCameraRange; - bool AddMarker(uint32 identifier, uint16 type, float fSize, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate); - void DeleteMarkerObject(); - void Render(); + bool AddMarker(uint32 identifier, uint16 type, float fSize, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate); //done + void DeleteMarkerObject(); //done + void Render(); //done }; class C3dMarkers { public: - static void Init(); - static void Shutdown(); + static void Init(); //done + static void Shutdown(); //done static C3dMarker *PlaceMarker(uint32 id, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate); - static void PlaceMarkerSet(uint32 id, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate); - static void Render(); - static void Update(); + static void PlaceMarkerSet(uint32 id, uint16 type, CVector &pos, float size, uint8 r, uint8 g, uint8 b, uint8 a, uint16 pulsePeriod, float pulseFraction, int16 rotateRate); //done + static void Render(); //done + static void Update(); //done static C3dMarker m_aMarkerArray[NUM3DMARKERS]; static int32 NumActiveMarkers; @@ -153,6 +149,7 @@ enum BRIGHTLIGHT_REAR = BRIGHTLIGHT_REAR_LONG, }; +//done class CBrightLight { public: @@ -172,11 +169,11 @@ class CBrightLights static int NumBrightLights; static CBrightLight aBrightLights[NUMBRIGHTLIGHTS]; public: - static void Init(void); + static void Init(void); //done static void RegisterOne(CVector pos, CVector up, CVector side, CVector front, - uint8 type, uint8 red = 0, uint8 green = 0, uint8 blue = 0); - static void Render(void); - static void RenderOutGeometryBuffer(void); + uint8 type, uint8 red = 0, uint8 green = 0, uint8 blue = 0); //done + static void Render(void); //looks similad but needs recheck + static void RenderOutGeometryBuffer(void); //done }; @@ -186,6 +183,7 @@ enum SHINYTEXT_FLAT }; +//done class CShinyText { public: @@ -198,19 +196,21 @@ public: uint8 m_blue; }; -class CShinyTexts +//done +class CShinyTexts { static int NumShinyTexts; static CShinyText aShinyTexts[NUMSHINYTEXTS]; public: - static void Init(void); + static void Init(void); //done static void RegisterOne(CVector p0, CVector p1, CVector p2, CVector p3, float u0, float v0, float u1, float v1, float u2, float v2, float u3, float v3, - uint8 type, uint8 red, uint8 green, uint8 blue, float maxDist); - static void Render(void); - static void RenderOutGeometryBuffer(void); + uint8 type, uint8 red, uint8 green, uint8 blue, float maxDist); //done, not used + static void Render(void); //done + static void RenderOutGeometryBuffer(void); //done }; +//done class CMoneyMessage { friend class CMoneyMessages; @@ -225,13 +225,14 @@ public: void Render(); //done }; +//done class CMoneyMessages { static CMoneyMessage aMoneyMessages[NUMMONEYMESSAGES]; public: - static void Init(); + static void Init(); //done static void Render(); //done - static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); + static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); //done }; class CSpecialParticleStuff -- cgit v1.2.3