diff options
author | aap <aap@papnet.eu> | 2020-11-19 19:07:32 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-11-19 19:07:32 +0100 |
commit | 07fe099b4e1fd877176f2b2947841ee82aa91ed0 (patch) | |
tree | b76756d54baef5a3ee506875c866cd8a5947242d /src/extras/screendroplets.h | |
parent | Merge branch 'miami' of github.com:GTAmodding/re3 into miami (diff) | |
download | re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.tar re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.tar.gz re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.tar.bz2 re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.tar.lz re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.tar.xz re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.tar.zst re3-07fe099b4e1fd877176f2b2947841ee82aa91ed0.zip |
Diffstat (limited to 'src/extras/screendroplets.h')
-rw-r--r-- | src/extras/screendroplets.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/src/extras/screendroplets.h b/src/extras/screendroplets.h new file mode 100644 index 00000000..090b1923 --- /dev/null +++ b/src/extras/screendroplets.h @@ -0,0 +1,78 @@ +#pragma once + +#ifdef SCREEN_DROPLETS + +class CParticleObject; + +class ScreenDroplets +{ +public: + enum { + MAXDROPS = 2000, + MAXDROPSMOVING = 700 + }; + + class ScreenDrop + { + public: + float x, y, time; // shorts on xbox (short float?) + float size, magnification, lifetime; // " + CRGBA color; + bool active; + bool fades; + + void Fade(void); + }; + + struct ScreenDropMoving + { + ScreenDrop *drop; + float dist; + }; + + static int ms_initialised; + static RwTexture *ms_maskTex; + static RwTexture *ms_screenTex; + + static bool ms_enabled; + static bool ms_movingEnabled; + + static ScreenDrop ms_drops[MAXDROPS]; + static int ms_numDrops; + static ScreenDropMoving ms_dropsMoving[MAXDROPSMOVING]; + static int ms_numDropsMoving; + + static CVector ms_prevCamUp; + static CVector ms_prevCamPos; + static CVector ms_camMoveDelta; + static float ms_camMoveDist; + static CVector ms_screenMoveDelta; + static float ms_screenMoveDist; + static float ms_camUpAngle; + + static int ms_splashDuration; + static CParticleObject *ms_splashObject; + + static void Initialise(void); + static void InitDraw(void); + static void Shutdown(void); + static void Process(void); + static void Render(void); + static void AddToRenderList(ScreenDrop *drop); + + static void Clear(void); + static ScreenDrop *NewDrop(float x, float y, float size, float lifetime, bool fades, int r = 255, int g = 255, int b = 255); + static void SetMoving(ScreenDroplets::ScreenDrop *drop); + static void FillScreen(int n); + static void FillScreenMoving(float amount, bool isBlood = false); + static void RegisterSplash(CParticleObject *pobj); + + static void ProcessCameraMovement(void); + static void SprayDrops(void); + static void NewTrace(ScreenDroplets::ScreenDropMoving *moving); + static void MoveDrop(ScreenDropMoving *moving); + static void ProcessMoving(void); + static void Fade(void); +}; + +#endif |