diff options
author | aap <aap@papnet.eu> | 2020-04-03 11:49:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 11:49:08 +0200 |
commit | f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293 (patch) | |
tree | 44f04c33f37de926b4be77138978c2a2502bc67c /src/render/Glass.h | |
parent | Merge pull request #376 from Nick007J/master (diff) | |
parent | Glass cosmetic fixes (diff) | |
download | re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.tar re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.tar.gz re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.tar.bz2 re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.tar.lz re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.tar.xz re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.tar.zst re3-f56909d8b7df667aaf9c3dfa9bb2b4745b9f2293.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Glass.h | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/src/render/Glass.h b/src/render/Glass.h index ad4d50f2..dccd9d3d 100644 --- a/src/render/Glass.h +++ b/src/render/Glass.h @@ -2,13 +2,52 @@ class CEntity; +class CFallingGlassPane : public CMatrix +{ +public: + CVector m_vecMoveSpeed; + CVector m_vecTurn; + uint32 m_nTimer; + float m_fGroundZ; + float m_fStep; + uint8 m_nTriIndex; + bool m_bActive; + bool m_bShattered; + char _pad0[1]; + + CFallingGlassPane() { } + ~CFallingGlassPane() { } + + void Update(void); + void Render(void); +}; + +VALIDATE_SIZE(CFallingGlassPane, 0x70); + +enum +{ + NUM_GLASSTRIANGLES = 5, +}; + class CGlass { + static uint32 NumGlassEntities; + static CEntity *apEntitiesToBeRendered[NUM_GLASSENTITIES]; + static CFallingGlassPane aGlassPanes[NUM_GLASSPANES]; public: - static void AskForObjectToBeRenderedInGlass(CEntity *ent); - static void WindowRespondsToCollision(CEntity *ent, float amount, CVector speed, CVector point, bool foo); - static void WindowRespondsToSoftCollision(CEntity *ent, float amount); - static void Render(void); - static void Update(void); static void Init(void); -}; + static void Update(void); + static void Render(void); + static CFallingGlassPane *FindFreePane(void); + static void GeneratePanesForWindow(uint32 type, CVector pos, CVector up, CVector right, CVector speed, CVector point, float moveSpeed, bool cracked, bool explosion); + static void AskForObjectToBeRenderedInGlass(CEntity *entity); + static void RenderEntityInGlass(CEntity *entity); + static int32 CalcAlphaWithNormal(CVector *normal); + static void RenderHiLightPolys(void); + static void RenderShatteredPolys(void); + static void RenderReflectionPolys(void); + static void WindowRespondsToCollision(CEntity *entity, float amount, CVector speed, CVector point, bool explosion); + static void WindowRespondsToSoftCollision(CEntity *entity, float amount); + static void WasGlassHitByBullet(CEntity *entity, CVector point); + static void WindowRespondsToExplosion(CEntity *entity, CVector point); +};
\ No newline at end of file |