Refactoring
This commit is contained in:
parent
6362ceeff3
commit
45ead4d0bf
@ -329,7 +329,8 @@ CCutsceneMgr::CreateCutsceneObject(int modelId)
|
|||||||
void
|
void
|
||||||
CCutsceneMgr::DeleteCutsceneData(void)
|
CCutsceneMgr::DeleteCutsceneData(void)
|
||||||
{
|
{
|
||||||
if (ms_loaded) {
|
if (!ms_loaded) return;
|
||||||
|
|
||||||
ms_cutsceneProcessing = false;
|
ms_cutsceneProcessing = false;
|
||||||
ms_useLodMultiplier = false;
|
ms_useLodMultiplier = false;
|
||||||
|
|
||||||
@ -363,7 +364,6 @@ CCutsceneMgr::DeleteCutsceneData(void)
|
|||||||
//TheCamera.GetScreenFadeStatus() == 2; // what for??
|
//TheCamera.GetScreenFadeStatus() == 2; // what for??
|
||||||
CGame::DrasticTidyUpMemory();
|
CGame::DrasticTidyUpMemory();
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -395,7 +395,8 @@ CCutsceneMgr::Update(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ms_running) {
|
if (!ms_running) return;
|
||||||
|
|
||||||
ms_cutsceneTimer += CTimer::GetTimeStepNonClipped() * 0.02;
|
ms_cutsceneTimer += CTimer::GetTimeStepNonClipped() * 0.02;
|
||||||
if (strcmpi(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
|
if (strcmpi(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
|
||||||
if (CPad::GetPad(0)->GetCrossJustDown()
|
if (CPad::GetPad(0)->GetCrossJustDown()
|
||||||
@ -405,10 +406,9 @@ CCutsceneMgr::Update(void)
|
|||||||
|| CPad::GetPad(0)->GetCharJustDown(VK_SPACE))
|
|| CPad::GetPad(0)->GetCharJustDown(VK_SPACE))
|
||||||
FinishCutscene();
|
FinishCutscene();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CCutsceneMgr::HasCutsceneFinished() { return TheCamera.GetPositionAlongSpline() == 1.0; }
|
bool CCutsceneMgr::HasCutsceneFinished(void) { return TheCamera.GetPositionAlongSpline() == 1.0; }
|
||||||
|
|
||||||
STARTPATCHES
|
STARTPATCHES
|
||||||
InjectHook(0x4045D0, &CCutsceneMgr::Initialise, PATCH_JUMP);
|
InjectHook(0x4045D0, &CCutsceneMgr::Initialise, PATCH_JUMP);
|
||||||
|
@ -27,7 +27,7 @@ public:
|
|||||||
static bool IsRunning(void) { return ms_running; }
|
static bool IsRunning(void) { return ms_running; }
|
||||||
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
|
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
|
||||||
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
|
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
|
||||||
static int GetCutsceneTimeInMilleseconds() { return 1000.0f * ms_cutsceneTimer; }
|
static int GetCutsceneTimeInMilleseconds(void) { return 1000.0f * ms_cutsceneTimer; }
|
||||||
static char *GetCutsceneName(void) { return ms_cutsceneName; }
|
static char *GetCutsceneName(void) { return ms_cutsceneName; }
|
||||||
static bool HasCutsceneFinished(void);
|
static bool HasCutsceneFinished(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user