1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-18 06:07:45 +00:00
re3/src/render/Fluff.h

205 lines
4.2 KiB
C
Raw Normal View History

#pragma once
2019-07-10 09:36:47 +00:00
#include "common.h"
2019-08-16 18:17:15 +00:00
#include "Vector.h"
2020-07-30 03:47:24 +00:00
#include "Object.h"
2020-08-19 18:11:19 +00:00
#include "Plane.h"
enum {
SCRIPT_PATH_DISABLED = 0,
SCRIPT_PATH_INITIALIZED,
SCRIPT_PATH_ACTIVE
};
2020-07-18 22:37:44 +00:00
class CScriptPath
{
public:
2020-08-19 18:11:19 +00:00
int32 m_numNodes;
CPlaneNode *m_pNode;
float m_fTotalLength;
float m_fSpeed;
float m_fPosition;
float m_fObjectLength;
int32 m_state;
CObject *m_pObjects[6];
void Clear(void);
void Update(void);
2020-08-30 20:47:12 +00:00
void InitialiseOne(int32 numNodes, float length);
2020-08-19 18:11:19 +00:00
void FindCoorsFromDistanceOnPath(float t, float *pX, float *pY, float *pZ);
void SetObjectToControl(CObject *pObj);
2020-07-18 22:37:44 +00:00
};
class CScriptPaths
{
public:
2020-08-19 18:11:19 +00:00
static CScriptPath aArray[3];
static void Init(void);
static void Shutdown(void);
static void Update(void);
static bool IsOneActive(void);
static void Save(uint8 *buf, uint32 *size);
static void Load(uint8 *buf, uint32 size);
static void Save_ForReplay();
static void Load_ForReplay();
2020-07-18 22:37:44 +00:00
};
class CPlaneTrail
{
2020-07-20 17:31:59 +00:00
CVector m_pos[16];
int32 m_time[16];
2020-07-18 22:37:44 +00:00
public:
2020-07-20 17:31:59 +00:00
void Init(void);
void Render(float visibility);
void RegisterPoint(CVector pos);
2020-07-18 22:37:44 +00:00
};
class CPlaneTrails
{
2020-07-20 17:31:59 +00:00
static CPlaneTrail aArray[6]; // NB: 3 CPlanes and 3 hardcoded far away ones
2020-07-18 22:37:44 +00:00
public:
2020-07-20 17:31:59 +00:00
static void Init(void);
static void Update(void);
static void Render(void);
2020-07-18 22:37:44 +00:00
static void RegisterPoint(CVector pos, uint32 id);
};
class CPlaneBanner
{
2020-07-20 17:31:59 +00:00
CVector m_pos[8];
2020-07-18 22:37:44 +00:00
public:
2020-07-20 17:31:59 +00:00
void Init(void);
void Update(void);
void Render(void);
void RegisterPoint(CVector pos);
2020-07-18 22:37:44 +00:00
};
class CPlaneBanners
{
2020-07-20 17:31:59 +00:00
static CPlaneBanner aArray[5];
2020-07-18 22:37:44 +00:00
public:
2020-07-20 17:31:59 +00:00
static void Init(void);
static void Update(void);
static void Render(void);
2020-07-18 22:37:44 +00:00
static void RegisterPoint(CVector pos, uint32 id);
};
2020-07-30 03:47:24 +00:00
class CEscalator
2020-07-18 22:37:44 +00:00
{
2020-07-30 03:47:24 +00:00
CVector m_pos0;
CVector m_pos1;
CVector m_pos2;
CVector m_pos3;
CMatrix m_matrix;
bool m_bIsActive;
2020-07-30 03:47:24 +00:00
bool m_bIsMovingDown;
int32 m_stepsCount;
float m_lowerEnd;
float m_upperEnd;
CVector m_midPoint;
2020-07-30 03:47:24 +00:00
float m_radius;
CObject *m_pSteps[24];
2020-07-18 22:37:44 +00:00
public:
2020-07-30 03:47:24 +00:00
CEscalator();
void Update(void);
void SwitchOff(void);
void AddThisOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
2020-09-27 01:22:59 +00:00
bool IsActive() const { return m_bIsActive; };
const CVector& GetPosition() const { return m_midPoint; };
2020-07-18 22:37:44 +00:00
};
2020-07-30 03:47:24 +00:00
class CEscalators
2020-07-18 22:37:44 +00:00
{
static CEscalator aEscalators[NUM_ESCALATORS];
2020-07-18 22:37:44 +00:00
public:
2020-07-30 03:47:24 +00:00
static int32 NumEscalators;
static void Init(void);
static void Update(void);
static void AddOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
static void Shutdown(void);
2020-09-27 01:22:59 +00:00
static const CEscalator& GetEscalator(int ind) { return aEscalators[ind]; };
2020-07-18 22:37:44 +00:00
};
class CMovingThing
{
public:
CMovingThing *m_pNext;
CMovingThing *m_pPrev;
int16 m_nType;
2020-10-31 13:33:49 +00:00
int16 m_farAway;
CVector m_vecPosn;
CEntity* m_pEntity;
void Update();
void AddToList(CMovingThing *pThing);
void RemoveFromList();
int16 SizeList();
};
2020-10-20 23:03:41 +00:00
#define NUMMOVINGTHINGS 48
class CMovingThings
{
public:
static CMovingThing StartCloseList;
static CMovingThing EndCloseList;
static int16 Num;
static CMovingThing aMovingThings[NUMMOVINGTHINGS];
2019-07-10 09:36:47 +00:00
static void Init();
static void Shutdown();
static void Update();
static void Render();
2020-10-20 23:03:41 +00:00
static void PossiblyAddThisEntity(CEntity *pEnt);
2020-10-20 23:04:51 +00:00
static void RegisterOne(CEntity *pEnt, uint16 nType);
};
2019-07-10 09:36:47 +00:00
class CScrollBar
{
private:
uint8 m_Counter;
const char* m_pMessage;
CVector m_Position;
uint32 m_MessageCurrentChar;
uint32 m_MessageLength;
CVector m_Size;
float m_fIntensity;
uint8 m_MessageBar[40];
uint8 m_Type;
bool m_bVisible;
uint8 m_uRed;
uint8 m_uGreen;
uint8 m_uBlue;
float m_fScale;
2020-10-11 09:56:33 +00:00
public:
static int TonightsEvent;
2019-07-10 09:36:47 +00:00
public:
void SetVisibility(bool visible) { m_bVisible = visible; }
bool IsVisible() { return m_bVisible; }
2020-10-20 23:03:41 +00:00
void Init(CVector pos1, CVector pos2, uint8 type, uint8 red, uint8 green, uint8 blue, float scale);
2019-07-10 09:36:47 +00:00
void Update();
void Render();
};
class CSmokeTrail {
CVector m_pos[16];
2020-06-10 21:01:37 +00:00
float m_opacity[16];
int m_time[16];
char m_unused[536];
int m_seed;
public:
void Render(void);
void RegisterPoint(CVector position, float a);
void Init(int num);
};
class CSmokeTrails {
static CSmokeTrail aSmoke[3];
public:
static bool CigOn;
static void Update(void);
static void Render(void);
static void Init(void);
2019-07-10 09:36:47 +00:00
};