summaryrefslogtreecommitdiffstats
path: root/src/render/Coronas.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-01 01:58:19 +0200
committeraap <aap@papnet.eu>2019-06-01 01:58:19 +0200
commit0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4 (patch)
treecff2857719651063516878e83a9a472b7f900fed /src/render/Coronas.h
parentMerge pull request #4 from Fire-Head/master (diff)
downloadre3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.tar
re3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.tar.gz
re3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.tar.bz2
re3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.tar.lz
re3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.tar.xz
re3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.tar.zst
re3-0476a41883ed1ec1db0e9d34ac9d4a1d4420f4d4.zip
Diffstat (limited to 'src/render/Coronas.h')
-rw-r--r--src/render/Coronas.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/render/Coronas.h b/src/render/Coronas.h
index 796983bd..ed69b1e6 100644
--- a/src/render/Coronas.h
+++ b/src/render/Coronas.h
@@ -2,15 +2,99 @@
extern RwTexture **gpCoronaTexture; //[9]
+struct CRegisteredCorona
+{
+ uint32 id;
+ uint32 lastLOScheck;
+ RwTexture *texture;
+ uint8 red;
+ uint8 green;
+ uint8 blue;
+ uint8 alpha; // alpha when fully visible
+ uint8 fadeAlpha; // actual value used for rendering, faded
+ CVector coors;
+ float size;
+ float someAngle;
+ bool registeredThisFrame;
+ float drawDist;
+ int8 flareType;
+ int8 reflection;
+
+ uint8 LOScheck : 1;
+ uint8 offScreen : 1;
+ uint8 firstUpdate : 1;
+ uint8 drawStreak : 1;
+ uint8 sightClear : 1;
+
+ bool renderReflection;
+ float heightAboveRoad;
+
+ float prevX[6];
+ float prevY[6];
+ uint8 prevRed[6];
+ uint8 prevGreen[6];
+ uint8 prevBlue[6];
+ bool hasValue[6];
+
+ void Update(void);
+};
+static_assert(sizeof(CRegisteredCorona) == 0x80, "CRegisteredCorona: error");
+
class CCoronas
{
+ static CRegisteredCorona *aCoronas; //[NUMCORONAS];
public:
+ enum {
+ SUN_CORE = 1,
+ SUN_CORONA
+ };
+ enum {
+ TYPE_STAR,
+ TYPE_NORMAL,
+ TYPE_MOON,
+ TYPE_REFLECT,
+ TYPE_HEADLIGHT,
+ TYPE_HEX,
+ TYPE_CIRCLE,
+ TYPE_RING,
+ TYPE_STREAK,
+ };
+ enum {
+ FLARE_NONE,
+ FLARE_SUN,
+ FLARE_HEADLIGHTS
+ };
+ enum {
+ REFLECTION_OFF,
+ REFLECTION_ON,
+ };
+ enum {
+ LOSCHECK_OFF,
+ LOSCHECK_ON,
+ };
+ enum {
+ STREAK_OFF,
+ STREAK_ON,
+ };
+
static float &LightsMult;
static float &SunScreenY;
static float &SunScreenX;
static bool &bSmallMoon;
static bool &SunBlockedByClouds;
+ static int &bChangeBrightnessImmediately;
+ static void Init(void);
+ static void Shutdown(void);
+ static void Update(void);
+ static void RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha,
+ const CVector &coors, float size, float drawDist, RwTexture *tex,
+ int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle);
+ static void RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha,
+ const CVector &coors, float size, float drawDist, uint8 type,
+ int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle);
+ static void UpdateCoronaCoors(int id, const CVector &coors, float drawDist, float someAngle);
static void Render(void);
static void RenderReflections(void);
+ static void DoSunAndMoon(void);
};