From 881db86895dd5427efd3962909214be06270e1ab Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Fri, 9 Oct 2020 20:29:38 +0300 Subject: CSpecialFX and some other classes --- src/render/SpecialFX.h | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 8bd0d5e1..3e989d1d 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -3,13 +3,17 @@ class CSpecialFX { public: + static bool bVideoCam; + static bool bLiftCam; static bool bSnapShotActive; static int32 SnapShotFrames; - static void Render(void); - static void Update(void); - static void Init(void); - static void Shutdown(void); + static void Render(void); //done + static void Update(void); //done + static void Init(void); //done + static void Shutdown(void); //done + static void AddWeaponStreak(int type); + static void Render2DFXs(); //done }; class CRegisteredMotionBlurStreak @@ -23,7 +27,7 @@ public: CVector m_pos2[3]; bool m_isValid[3]; - void Update(void); + void Update(void); //done void Render(void); }; @@ -32,7 +36,7 @@ class CMotionBlurStreaks static CRegisteredMotionBlurStreak aStreaks[NUMMBLURSTREAKS]; public: static void Init(void); - static void Update(void); + static void Update(void); //done static void RegisterStreak(uintptr id, uint8 r, uint8 g, uint8 b, CVector p1, CVector p2); static void Render(void); }; @@ -42,10 +46,15 @@ struct CBulletTrace CVector m_vecCurrentPos; CVector m_vecTargetPos; bool m_bInUse; + uint32 m_nCreationTime; + uint32 m_nLifeTime; + uint32 field_24; + uint8 field_28; + uint8 m_framesInUse; uint8 m_lifeTime; - void Update(void); + void Update(void); //done }; class CBulletTraces @@ -56,7 +65,7 @@ public: static void Init(void); static void AddTrace(CVector*, CVector*); static void Render(void); - static void Update(void); + static void Update(void); //done //TODO(MIAMI) static void AddTrace(CVector *, CVector *, float, unsigned int, unsigned char) {} @@ -213,7 +222,7 @@ class CMoneyMessage float m_fSize; float m_fOpacity; public: - void Render(); + void Render(); //done }; class CMoneyMessages @@ -221,7 +230,7 @@ class CMoneyMessages static CMoneyMessage aMoneyMessages[NUMMONEYMESSAGES]; public: static void Init(); - static void Render(); + static void Render(); //done static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); }; -- cgit v1.2.3 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 From ca1d899413d95c8c7ccf936d4e0ab8f02ec223f5 Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sun, 11 Oct 2020 22:29:49 +0300 Subject: final step --- src/render/SpecialFX.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 0284126c..897d8b92 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -109,12 +109,13 @@ public: void Render(); //done }; +//done class C3dMarkers { public: 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 C3dMarker *PlaceMarker(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 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 @@ -172,7 +173,7 @@ public: 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); //done - static void Render(void); //looks similad but needs recheck + static void Render(void); //looks similad but needs recheck !!!!!!!!!!!!!!!!! static void RenderOutGeometryBuffer(void); //done }; @@ -235,11 +236,12 @@ public: static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); //done }; +//done class CSpecialParticleStuff { static uint32 BoatFromStart; public: - static void CreateFoamAroundObject(CMatrix*, float, float, float, int32); - static void StartBoatFoamAnimation(); - static void UpdateBoatFoamAnimation(CMatrix*); + static void CreateFoamAroundObject(CMatrix*, float, float, float, int32); //done, not used + static void StartBoatFoamAnimation(); //done, not used + static void UpdateBoatFoamAnimation(CMatrix*); //done, not used }; -- cgit v1.2.3 From e6a1ea9d4ff72f31e1726a344b3810b4c3e8d747 Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Mon, 12 Oct 2020 13:28:06 +0300 Subject: CBrightLight::render --- src/render/SpecialFX.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 897d8b92..bf3197dc 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -165,6 +165,7 @@ public: uint8 m_blue; }; +//done class CBrightLights { static int NumBrightLights; @@ -173,7 +174,7 @@ public: 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); //done - static void Render(void); //looks similad but needs recheck !!!!!!!!!!!!!!!!! + static void Render(void); //done static void RenderOutGeometryBuffer(void); //done }; -- cgit v1.2.3 From 56bb7d721a13550cf940c58ff60a00b9b4ad0209 Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Mon, 12 Oct 2020 13:41:57 +0300 Subject: mark file and fix screen offset --- src/render/SpecialFX.h | 113 +++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 56 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index bf3197dc..e09d840f 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -1,6 +1,7 @@ #pragma once -//done +//file done + class CSpecialFX { public: @@ -9,15 +10,15 @@ public: static bool bSnapShotActive; static int32 SnapShotFrames; - static void Render(void); //done - static void Update(void); //done - static void Init(void); //done - static void Shutdown(void); //done - static void AddWeaponStreak(int type); //done - static void Render2DFXs(); //done + static void Render(void); + static void Update(void); + static void Init(void); + static void Shutdown(void); + static void AddWeaponStreak(int type); + static void Render2DFXs(); }; -//done + class CRegisteredMotionBlurStreak { public: @@ -29,22 +30,22 @@ public: CVector m_pos2[3]; bool m_isValid[3]; - void Update(void); //done - void Render(void); //done + void Update(void); + void Render(void); }; -//done + class CMotionBlurStreaks { static CRegisteredMotionBlurStreak aStreaks[NUMMBLURSTREAKS]; public: - 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); //done - static void Render(void); //done + static void Init(void); + static void Update(void); + static void RegisterStreak(uintptr id, uint8 r, uint8 g, uint8 b, CVector p1, CVector p2); + static void Render(void); }; -//done + struct CBulletTrace { CVector m_vecCurrentPos; @@ -55,20 +56,20 @@ struct CBulletTrace float m_fThicknes; uint8 m_fVisibility; - void Update(void); //done + void Update(void); }; -//done + class CBulletTraces { public: static CBulletTrace aTraces[NUMBULLETTRACES]; - static void Init(void); //done - static void Render(void); //done - static void Update(void); //done - 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 + static void Init(void); + static void Render(void); + static void Update(void); + static void AddTrace(CVector* start, CVector* end, float thickness, uint32 lifeTime, uint8 visibility); + static void AddTrace(CVector* start, CVector* end, int32 weaponType, class CEntity* shooter); }; enum @@ -83,7 +84,7 @@ enum MARKERTYPE_INVALID = 0x101 }; -//done + class C3dMarker { public: @@ -104,21 +105,21 @@ 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); //done - void DeleteMarkerObject(); //done - void Render(); //done + 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(); }; -//done + class C3dMarkers { public: - 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); //done - 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 void Init(); + static void Shutdown(); + 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 C3dMarker m_aMarkerArray[NUM3DMARKERS]; static int32 NumActiveMarkers; @@ -150,7 +151,7 @@ enum BRIGHTLIGHT_REAR = BRIGHTLIGHT_REAR_LONG, }; -//done + class CBrightLight { public: @@ -165,17 +166,17 @@ public: uint8 m_blue; }; -//done + class CBrightLights { static int NumBrightLights; static CBrightLight aBrightLights[NUMBRIGHTLIGHTS]; public: - static void Init(void); //done + static void Init(void); static void RegisterOne(CVector pos, CVector up, CVector side, CVector front, - uint8 type, uint8 red = 0, uint8 green = 0, uint8 blue = 0); //done - static void Render(void); //done - static void RenderOutGeometryBuffer(void); //done + uint8 type, uint8 red = 0, uint8 green = 0, uint8 blue = 0); + static void Render(void); + static void RenderOutGeometryBuffer(void); }; @@ -185,7 +186,7 @@ enum SHINYTEXT_FLAT }; -//done + class CShinyText { public: @@ -198,21 +199,21 @@ public: uint8 m_blue; }; -//done + class CShinyTexts { static int NumShinyTexts; static CShinyText aShinyTexts[NUMSHINYTEXTS]; public: - static void Init(void); //done + static void Init(void); 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); //done, not used - static void Render(void); //done - static void RenderOutGeometryBuffer(void); //done + uint8 type, uint8 red, uint8 green, uint8 blue, float maxDist); //not used + static void Render(void); + static void RenderOutGeometryBuffer(void); }; -//done + class CMoneyMessage { friend class CMoneyMessages; @@ -224,25 +225,25 @@ class CMoneyMessage float m_fSize; float m_fOpacity; public: - void Render(); //done + void Render(); }; -//done + class CMoneyMessages { static CMoneyMessage aMoneyMessages[NUMMONEYMESSAGES]; public: - 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); //done + static void Init(); + static void Render(); + static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); }; -//done + class CSpecialParticleStuff { static uint32 BoatFromStart; public: - static void CreateFoamAroundObject(CMatrix*, float, float, float, int32); //done, not used - static void StartBoatFoamAnimation(); //done, not used - static void UpdateBoatFoamAnimation(CMatrix*); //done, not used + static void CreateFoamAroundObject(CMatrix*, float, float, float, int32); //not used + static void StartBoatFoamAnimation(); //not used + static void UpdateBoatFoamAnimation(CMatrix*); //not used }; -- cgit v1.2.3 From 34b4efe242bc6304f2e340dfe32273062e0ed73e Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Thu, 15 Oct 2020 15:42:10 +0300 Subject: fix bullet traces rener and some renaming --- src/render/SpecialFX.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index e09d840f..3281eee1 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -48,8 +48,8 @@ public: struct CBulletTrace { - CVector m_vecCurrentPos; - CVector m_vecTargetPos; + CVector m_vecStartPos; + CVector m_vecEndPos; bool m_bInUse; uint32 m_nCreationTime; uint32 m_nLifeTime; -- cgit v1.2.3 From 3cbccd2ad343bf2581b68bff91ffaef249171d4e Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sat, 17 Oct 2020 19:05:41 +0300 Subject: typo fixes --- src/render/SpecialFX.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 3281eee1..f163d8ca 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -53,7 +53,7 @@ struct CBulletTrace bool m_bInUse; uint32 m_nCreationTime; uint32 m_nLifeTime; - float m_fThicknes; + float m_fThickness; uint8 m_fVisibility; void Update(void); -- cgit v1.2.3