From 1207c2ce6face0d9f00666196b85739e7783f8d8 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 12:33:14 +0200 Subject: implemented CShinyTexts --- src/render/SpecialFX.h | 141 ++++++++++++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 55 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index fc155a53..22ee502e 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -57,27 +57,27 @@ enum class C3dMarker -{ -public: - CMatrix m_Matrix; - RpAtomic *m_pAtomic; - RpMaterial *m_pMaterial; - uint16 m_nType; - bool m_bIsUsed; - uint32 m_nIdentifier; - RwRGBA m_Color; - uint16 m_nPulsePeriod; - int16 m_nRotateRate; - uint32 m_nStartTime; - float m_fPulseFraction; - float m_fStdSize; - float m_fSize; - 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(); +{ +public: + CMatrix m_Matrix; + RpAtomic *m_pAtomic; + RpMaterial *m_pMaterial; + uint16 m_nType; + bool m_bIsUsed; + uint32 m_nIdentifier; + RwRGBA m_Color; + uint16 m_nPulsePeriod; + int16 m_nRotateRate; + uint32 m_nStartTime; + float m_fPulseFraction; + float m_fStdSize; + float m_fSize; + 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(); }; class C3dMarkers @@ -87,42 +87,73 @@ public: 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 Render(); static void Update(); static C3dMarker(&m_aMarkerArray)[NUM3DMARKERS]; static int32 &NumActiveMarkers; static RpClump* (&m_pRpClumpArray)[NUMMARKERTYPES]; -}; - -class CMoneyMessage -{ - friend class CMoneyMessages; - - uint32 m_nTimeRegistered; - CVector m_vecPosition; - wchar m_aText[16]; - CRGBA m_Colour; - float m_fSize; - float m_fOpacity; -public: - void Render(); -}; - -class CMoneyMessages -{ - static CMoneyMessage aMoneyMessages[NUMMONEYMESSAGES]; -public: - static void Init(); - static void Render(); - static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); -}; - -class CSpecialParticleStuff -{ - static uint32 BoatFromStart; -public: - static void CreateFoamAroundObject(CMatrix*, float, float, float, int32); - static void StartBoatFoamAnimation(); - static void UpdateBoatFoamAnimation(CMatrix*); -}; +}; + +enum +{ + SHINYTEXT_WALK = 1, + SHINYTEXT_FLAT +}; + +class CShinyText +{ +public: + CVector m_verts[4]; + CVector2D m_texCoords[4]; + float m_camDist; + uint8 m_type; + uint8 m_red; + uint8 m_green; + uint8 m_blue; +}; + +class CShinyTexts +{ + static int NumShinyTexts; + static CShinyText aShinyTexts[NUMSHINYTEXTS]; +public: + 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); + static void Render(void); + static void RenderOutGeometryBuffer(void); +}; + +class CMoneyMessage +{ + friend class CMoneyMessages; + + uint32 m_nTimeRegistered; + CVector m_vecPosition; + wchar m_aText[16]; + CRGBA m_Colour; + float m_fSize; + float m_fOpacity; +public: + void Render(); +}; + +class CMoneyMessages +{ + static CMoneyMessage aMoneyMessages[NUMMONEYMESSAGES]; +public: + static void Init(); + static void Render(); + static void RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8 bGreen, uint8 bBlue, float fSize, float fOpacity); +}; + +class CSpecialParticleStuff +{ + static uint32 BoatFromStart; +public: + static void CreateFoamAroundObject(CMatrix*, float, float, float, int32); + static void StartBoatFoamAnimation(); + static void UpdateBoatFoamAnimation(CMatrix*); +}; -- cgit v1.2.3 From 51512db0063385bfb823edee150e3cc59eae7b1b Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 16:48:49 +0200 Subject: implemented CRubbish --- src/render/SpecialFX.h | 58 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 6 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 22ee502e..1cff55b3 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -37,12 +37,6 @@ public: static void Update(void); }; -class CBrightLights -{ -public: - static void RegisterOne(CVector pos, CVector up, CVector right, CVector fwd, uint8 type, uint8 unk1 = 0, uint8 unk2 = 0, uint8 unk3 = 0); -}; - enum { MARKERTYPE_0 = 0, @@ -95,6 +89,58 @@ public: static RpClump* (&m_pRpClumpArray)[NUMMARKERTYPES]; }; +enum +{ + BRIGHTLIGHT_INVALID, + BRIGHTLIGHT_TRAFFIC_GREEN, + BRIGHTLIGHT_TRAFFIC_YELLOW, + BRIGHTLIGHT_TRAFFIC_RED, + + // white + BRIGHTLIGHT_FRONT_LONG, + BRIGHTLIGHT_FRONT_SMALL, + BRIGHTLIGHT_FRONT_BIG, + BRIGHTLIGHT_FRONT_TALL, + + // red + BRIGHTLIGHT_REAR_LONG, + BRIGHTLIGHT_REAR_SMALL, + BRIGHTLIGHT_REAR_BIG, + BRIGHTLIGHT_REAR_TALL, + + BRIGHTLIGHT_SIREN, // unused + + BRIGHTLIGHT_FRONT = BRIGHTLIGHT_FRONT_LONG, + BRIGHTLIGHT_REAR = BRIGHTLIGHT_REAR_LONG, +}; + +class CBrightLight +{ +public: + CVector m_pos; + CVector m_up; + CVector m_side; + CVector m_front; + float m_camDist; + uint8 m_type; + uint8 m_red; + uint8 m_green; + uint8 m_blue; +}; + +class CBrightLights +{ + static int NumBrightLights; + static CBrightLight aBrightLights[NUMBRIGHTLIGHTS]; +public: + 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); + static void Render(void); + static void RenderOutGeometryBuffer(void); +}; + + enum { SHINYTEXT_WALK = 1, -- cgit v1.2.3 From daaf443cfaa0532aad8a0ede0cad826c66650593 Mon Sep 17 00:00:00 2001 From: aap Date: Tue, 7 Apr 2020 22:26:01 +0200 Subject: finished CMotionBlurStreaks, CSpecialFX --- src/render/SpecialFX.h | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'src/render/SpecialFX.h') diff --git a/src/render/SpecialFX.h b/src/render/SpecialFX.h index 1cff55b3..8519ae79 100644 --- a/src/render/SpecialFX.h +++ b/src/render/SpecialFX.h @@ -9,10 +9,29 @@ public: static void Shutdown(void); }; +class CRegisteredMotionBlurStreak +{ +public: + uintptr m_id; + uint8 m_red; + uint8 m_green; + uint8 m_blue; + CVector m_pos1[3]; + CVector m_pos2[3]; + bool m_isValid[3]; + + void Update(void); + void Render(void); +}; + class CMotionBlurStreaks { + static CRegisteredMotionBlurStreak aStreaks[NUMMBLURSTREAKS]; public: - static void RegisterStreak(int32 id, uint8 r, uint8 g, uint8 b, CVector p1, CVector p2); + 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); }; struct CBulletTrace @@ -29,7 +48,7 @@ struct CBulletTrace class CBulletTraces { public: - static CBulletTrace (&aTraces)[NUMBULLETTRACES]; + static CBulletTrace aTraces[NUMBULLETTRACES]; static void Init(void); static void AddTrace(CVector*, CVector*); @@ -84,9 +103,9 @@ public: static void Render(); static void Update(); - static C3dMarker(&m_aMarkerArray)[NUM3DMARKERS]; - static int32 &NumActiveMarkers; - static RpClump* (&m_pRpClumpArray)[NUMMARKERTYPES]; + static C3dMarker m_aMarkerArray[NUM3DMARKERS]; + static int32 NumActiveMarkers; + static RpClump* m_pRpClumpArray[NUMMARKERTYPES]; }; enum -- cgit v1.2.3