summaryrefslogtreecommitdiffstats
path: root/src/animation/CutsceneMgr.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-08 16:06:25 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-08 16:06:25 +0200
commit756e4dd068e27b25c651e85781871295131b7ada (patch)
treef2975fd92f2bf57b07f924ff244b5a9ffd6cd4b2 /src/animation/CutsceneMgr.cpp
parentfix (diff)
parentmost of animation system done; little stuff here and there (diff)
downloadre3-756e4dd068e27b25c651e85781871295131b7ada.tar
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.gz
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.bz2
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.lz
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.xz
re3-756e4dd068e27b25c651e85781871295131b7ada.tar.zst
re3-756e4dd068e27b25c651e85781871295131b7ada.zip
Diffstat (limited to 'src/animation/CutsceneMgr.cpp')
-rw-r--r--src/animation/CutsceneMgr.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/animation/CutsceneMgr.cpp b/src/animation/CutsceneMgr.cpp
index 0db54c4b..3cd66697 100644
--- a/src/animation/CutsceneMgr.cpp
+++ b/src/animation/CutsceneMgr.cpp
@@ -185,23 +185,28 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
CGame::DrasticTidyUpMemory(true);
strcpy(ms_cutsceneName, szCutsceneName);
- file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb");
+
+ RwStream *stream;
+ stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "ANIM\\CUTS.IMG");
+ assert(stream);
// Load animations
sprintf(gString, "%s.IFP", szCutsceneName);
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
CStreaming::MakeSpaceFor(size << 11);
CStreaming::ImGonnaUseStreamingMemory();
- CFileMgr::Seek(file, offset << 11, SEEK_SET);
- CAnimManager::LoadAnimFile(file, false);
+ RwStreamSkip(stream, offset << 11);
+ CAnimManager::LoadAnimFile(stream, false);
ms_cutsceneAssociations.CreateAssociations(szCutsceneName);
CStreaming::IHaveUsedStreamingMemory();
ms_animLoaded = true;
} else {
ms_animLoaded = false;
}
+ RwStreamClose(stream, nil);
// Load camera data
+ file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb");
sprintf(gString, "%s.DAT", szCutsceneName);
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
CFileMgr::Seek(file, offset << 11, SEEK_SET);