Fix missing CMoviePlayer::Initialize call

This commit is contained in:
Luke Street 2022-02-27 12:08:24 -05:00
parent ad1453ac08
commit 1583248896
3 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#pragma once
#include <compare>
#include <memory>
#include <vector>
@ -146,7 +147,7 @@ public:
[[nodiscard]] u32 GetUsedTextureSlots() const { return static_cast<u32>(GetFlags()) >> 16; }
[[nodiscard]] u32 GetTextureCount() const { return SBig(*reinterpret_cast<const u32*>(x0_data + 4)); }
[[nodiscard]] u32 GetVertexDesc() const {
return SBig(*reinterpret_cast<const u32*>(&x0_data + (GetTextureCount() * 4) + 8));
return SBig(*reinterpret_cast<const u32*>(x0_data + (GetTextureCount() * 4) + 8));
}
static void ResetCachedMaterials();

View File

@ -41,7 +41,10 @@ static float SfxVolume = 1.f;
void CMoviePlayer::Initialize() { TjHandle = tjInitDecompress(); }
void CMoviePlayer::Shutdown() { tjDestroy(TjHandle); }
void CMoviePlayer::Shutdown() {
tjDestroy(TjHandle);
TjHandle = nullptr;
}
void CMoviePlayer::THPHeader::swapBig() {
magic = SBig(magic);

View File

@ -378,6 +378,8 @@ void CMain::InitializeSubsystems() {
CDecalManager::Initialize();
CGBASupport::Initialize();
CPatterned::Initialize();
// Metaforce additions
CMoviePlayer::Initialize();
}
void CMain::MemoryCardInitializePump() {
@ -693,12 +695,13 @@ void CMain::Draw() {
}
void CMain::ShutdownSubsystems() {
CMoviePlayer::Shutdown();
CDecalManager::Shutdown();
CElementGen::Shutdown();
CAnimData::FreeCache();
CMemoryCardSys::Shutdown();
CMappableObject::Shutdown();
// Metaforce additions
CMoviePlayer::Shutdown();
}
void CMain::Shutdown() {