summaryrefslogtreecommitdiffstats
path: root/src/extras/screendroplets.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-19 16:23:52 +0100
committeraap <aap@papnet.eu>2020-11-19 16:23:52 +0100
commit02c7f8381b81732645ed92fda0c5a66d0f1db265 (patch)
treed87d414e03af11fdaae5f197378a1906833edbab /src/extras/screendroplets.h
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-02c7f8381b81732645ed92fda0c5a66d0f1db265.tar
re3-02c7f8381b81732645ed92fda0c5a66d0f1db265.tar.gz
re3-02c7f8381b81732645ed92fda0c5a66d0f1db265.tar.bz2
re3-02c7f8381b81732645ed92fda0c5a66d0f1db265.tar.lz
re3-02c7f8381b81732645ed92fda0c5a66d0f1db265.tar.xz
re3-02c7f8381b81732645ed92fda0c5a66d0f1db265.tar.zst
re3-02c7f8381b81732645ed92fda0c5a66d0f1db265.zip
Diffstat (limited to 'src/extras/screendroplets.h')
-rw-r--r--src/extras/screendroplets.h78
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