summaryrefslogtreecommitdiffstats
path: root/src/core/CutsceneMgr.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2019-11-09 16:06:20 +0100
committerGitHub <noreply@github.com>2019-11-09 16:06:20 +0100
commit0df15bb73dbdf352f92bc522c7b5c102f1e33ba5 (patch)
tree73c9bf00f83b91d7862f28296640860fa16291ab /src/core/CutsceneMgr.cpp
parentFix link to config.h in readme (diff)
parentImplemented faststrcmp, faststricmp, strcasecmp (diff)
downloadre3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.tar
re3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.tar.gz
re3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.tar.bz2
re3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.tar.lz
re3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.tar.xz
re3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.tar.zst
re3-0df15bb73dbdf352f92bc522c7b5c102f1e33ba5.zip
Diffstat (limited to 'src/core/CutsceneMgr.cpp')
-rw-r--r--src/core/CutsceneMgr.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/CutsceneMgr.cpp b/src/core/CutsceneMgr.cpp
index fa322242..2fbc5186 100644
--- a/src/core/CutsceneMgr.cpp
+++ b/src/core/CutsceneMgr.cpp
@@ -1,5 +1,6 @@
#include "common.h"
#include "patcher.h"
+#include "General.h"
#include "CutsceneMgr.h"
#include "Directory.h"
#include "Camera.h"
@@ -107,7 +108,7 @@ int
FindCutsceneAudioTrackId(const char *szCutsceneName)
{
for (int i = 0; musicNameIdAssoc[i].szTrackName; i++) {
- if (!strcmpi(musicNameIdAssoc[i].szTrackName, szCutsceneName))
+ if (!CGeneral::faststricmp(musicNameIdAssoc[i].szTrackName, szCutsceneName))
return musicNameIdAssoc[i].iTrackId;
}
return -1;
@@ -171,7 +172,7 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
CPlayerPed *pPlayerPed;
ms_cutsceneProcessing = true;
- if (!strcmpi(szCutsceneName, "jb"))
+ if (!strcasecmp(szCutsceneName, "jb"))
ms_useLodMultiplier = true;
CTimer::Stop();
@@ -207,7 +208,7 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
CFileMgr::CloseFile(file);
- if (strcmpi(ms_cutsceneName, "end")) {
+ if (CGeneral::faststricmp(ms_cutsceneName, "end")) {
DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE);
int trackId = FindCutsceneAudioTrackId(szCutsceneName);
if (trackId != -1) {
@@ -364,9 +365,9 @@ CCutsceneMgr::DeleteCutsceneData(void)
CPad::GetPad(0)->DisablePlayerControls &= ~PLAYERCONTROL_DISABLED_80;
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
- if (strcmpi(ms_cutsceneName, "end")) {
+ if (CGeneral::faststricmp(ms_cutsceneName, "end")) {
DMAudio.StopCutSceneMusic();
- if (strcmpi(ms_cutsceneName, "bet"))
+ if (CGeneral::faststricmp(ms_cutsceneName, "bet"))
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
}
CTimer::Stop();
@@ -389,7 +390,7 @@ CCutsceneMgr::Update(void)
switch (ms_cutsceneLoadStatus) {
case CUTSCENE_LOADING_AUDIO:
SetupCutsceneToStart();
- if (strcmpi(ms_cutsceneName, "end"))
+ if (CGeneral::faststricmp(ms_cutsceneName, "end"))
DMAudio.PlayPreloadedCutSceneMusic();
ms_cutsceneLoadStatus++;
break;
@@ -407,7 +408,7 @@ CCutsceneMgr::Update(void)
if (!ms_running) return;
ms_cutsceneTimer += CTimer::GetTimeStepNonClipped() * 0.02f;
- if (strcmpi(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
+ if (CGeneral::faststricmp(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
if (CPad::GetPad(0)->GetCrossJustDown()
|| (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown())
|| CPad::GetPad(0)->GetLeftMouseJustDown()