summaryrefslogtreecommitdiffstats
path: root/src/animation/CutsceneMgr.h
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2021-01-12 22:11:15 +0100
committerFire-Head <Fire-Head@users.noreply.github.com>2021-01-12 22:11:15 +0100
commit3e6016dc6ee40372a06b74d24cae2f97428358f2 (patch)
treeff2420d56a8cc4ab1b9c0f43f720e6f6fbb8bc11 /src/animation/CutsceneMgr.h
parentrem gMakeResources (diff)
parentMerge remote-tracking branch 'origin/miami' into lcs (diff)
downloadre3-3e6016dc6ee40372a06b74d24cae2f97428358f2.tar
re3-3e6016dc6ee40372a06b74d24cae2f97428358f2.tar.gz
re3-3e6016dc6ee40372a06b74d24cae2f97428358f2.tar.bz2
re3-3e6016dc6ee40372a06b74d24cae2f97428358f2.tar.lz
re3-3e6016dc6ee40372a06b74d24cae2f97428358f2.tar.xz
re3-3e6016dc6ee40372a06b74d24cae2f97428358f2.tar.zst
re3-3e6016dc6ee40372a06b74d24cae2f97428358f2.zip
Diffstat (limited to 'src/animation/CutsceneMgr.h')
-rw-r--r--src/animation/CutsceneMgr.h128
1 files changed, 123 insertions, 5 deletions
diff --git a/src/animation/CutsceneMgr.h b/src/animation/CutsceneMgr.h
index 51ef6c04..7c749d4b 100644
--- a/src/animation/CutsceneMgr.h
+++ b/src/animation/CutsceneMgr.h
@@ -1,14 +1,69 @@
#pragma once
#include "CutsceneObject.h"
-#define CUTSCENENAMESIZE 8
class CDirectory;
class CAnimBlendAssocGroup;
class CCutsceneHead;
+enum {
+ CUTSCENE_NOT_LOADED = 0,
+ CUTSCENE_LOADING,
+ CUTSCENE_LOADED,
+};
+
+enum {
+ CUTSCENE_PLAYING_0 = 0,
+ CUTSCENE_STARTED,
+ CUTSCENE_PLAYING_2,
+ CUTSCENE_PLAYING_3,
+ CUTSCENE_PLAYING_4,
+};
+
+enum
+{
+ NAMELENGTH = 32,
+ NUM_CUTS_PARTICLE_EFFECTS = 8,
+ NUM_CUTS_MAX_TEXTS = 64,
+ NUM_CUTS_UNCOMPRESSED_ANIMS = 8,
+ TEXT_KEY_SIZE = 8,
+ CUTSCENENAMESIZE = 8
+};
+
+struct sToHideItem
+{
+ float x, y, z;
+ char name[NAMELENGTH];
+};
+
+// TODO: figure out from SA
+// this is unused in LCS anyway
+struct sParticleEffect
+{
+ char name[NAMELENGTH];
+ bool bPlayed; // ??
+ int iTime;
+ int unk1;
+ int unk2;
+ char name2[NAMELENGTH];
+ float x;
+ float y;
+ float z;
+ float unkX;
+ float unkY;
+ float unkZ;
+ bool unk10;
+ bool unk11;
+};
+
+struct sAttachInfo
+{
+ int attachToId, objectId, boneId;
+};
+
class CCutsceneMgr
{
+
static bool ms_running;
static CCutsceneObject *ms_pCutsceneObjects[NUMCUTSCENEOBJECTS];
@@ -24,10 +79,55 @@ class CCutsceneMgr
static bool ms_wasCutsceneSkipped;
static bool ms_cutsceneProcessing;
static bool ms_useCutsceneShadows;
+ static bool ms_hasFileInfo;
+ static int ms_numLoadObjectNames;
+
+ static char ms_cAppendAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH];
+ static char ms_cAppendObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH];
+ static int ms_numAppendObjectNames;
public:
static CDirectory *ms_pCutsceneDir;
static uint32 ms_cutsceneLoadStatus;
+ static bool mCutsceneSkipFading;
+ static int mCutsceneSkipFadeTime;
+
+ static float m_fPrevCarDensity;
+ static float m_fPrevPedDensity;
+
+ static bool m_PrevExtraColourOn;
+ static uint32 m_PrevExtraColour;
+
+ static uint32 ms_iNumParticleEffects;
+ static sParticleEffect ms_pParticleEffects[NUM_CUTS_PARTICLE_EFFECTS];
+
+ static sToHideItem ms_crToHideItems[NUMCUTSCENEOBJECTS];
+ static uint32 ms_iNumHiddenEntities;
+ static CEntity *ms_pHiddenEntities[NUMCUTSCENEOBJECTS];
+
+ static int ms_numAttachObjectToBones;
+ static bool ms_bRepeatObject[NUMCUTSCENEOBJECTS];
+
+ static sAttachInfo ms_iAttachObjectToBone[NUMCUTSCENEOBJECTS];
+
+ static uint32 ms_numUncompressedCutsceneAnims;
+
+ static char ms_aUncompressedCutsceneAnims[NUM_CUTS_UNCOMPRESSED_ANIMS][NAMELENGTH];
+
+ static uint32 ms_iTextDuration[NUM_CUTS_MAX_TEXTS];
+ static uint32 ms_iTextStartTime[NUM_CUTS_MAX_TEXTS];
+ static char ms_cTextOutput[NUM_CUTS_MAX_TEXTS][TEXT_KEY_SIZE];
+
+ static uint32 ms_currTextOutput;
+ static uint32 ms_numTextOutput;
+ static uint32 ms_iModelIndex[NUMCUTSCENEOBJECTS];
+
+ static char ms_cLoadAnimName[NUMCUTSCENEOBJECTS][NAMELENGTH];
+ static char ms_cLoadObjectName[NUMCUTSCENEOBJECTS][NAMELENGTH];
+
+ static uint32 ms_cutscenePlayStatus;
+
+ static void StartCutscene();
static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; }
static bool IsRunning(void) { return ms_running; }
static bool HasLoaded(void) { return ms_loaded; }
@@ -35,19 +135,19 @@ public:
static bool WasCutsceneSkipped(void) { return ms_wasCutsceneSkipped; }
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
- static int GetCutsceneTimeInMilleseconds(void) { return 1000.0f * ms_cutsceneTimer; }
+ static uint32 GetCutsceneTimeInMilleseconds(void);
static char *GetCutsceneName(void) { return ms_cutsceneName; }
static void SetCutsceneOffset(const CVector& vec) { ms_cutsceneOffset = vec; }
static bool HasCutsceneFinished(void);
- static void Initialise(void);
+ static void Initialise(void *dir = nil);
static void Shutdown(void);
static void LoadCutsceneData(const char *szCutsceneName);
static void FinishCutscene(void);
static void SetupCutsceneToStart(void);
static void SetCutsceneAnim(const char *animName, CObject *pObject);
static void SetCutsceneAnimToLoop(const char *animName);
- static CCutsceneHead *AddCutsceneHead(CObject *pObject, int modelId);
+ static CCutsceneHead *SetHeadAnim(const char*, CObject *pObject);
static CCutsceneObject *CreateCutsceneObject(int modelId);
static void DeleteCutsceneData(void);
static void LoadAnimationUncompressed(char const*);
@@ -56,6 +156,24 @@ public:
static void AttachObjectToParent(CObject *pObject, CEntity *pAttachTo);
static void AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame);
static void AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int frame);
- static void RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver();
+ static void RemoveEverythingBecauseCutsceneDoesntFitInMemory();
+ static void LoadEverythingBecauseCutsceneDeletedAllOfIt();
static void DisableCutsceneShadows() { ms_useCutsceneShadows = false; }
+
+
+ static void LoadCutsceneData_overlay(const char* szCutsceneName);
+ static bool LoadCutsceneData_postload(bool b = false);
+ static void Update_overlay(void);
+ static void DeleteCutsceneData_overlay(void);
+
+ static bool IsCutsceneSkipButtonBeingPressed();
+ static void AppendToNextCutscene(const char *object, const char *anim);
+
+ static void LoadCutsceneData_preload();
+ static void LoadCutsceneData_loading();
+ static void HideRequestedObjects();
+
+ static bool PresubBodge();
+
+ static void Write(base::cRelocatableChunkWriter& writer);
};