Set up CStateManagerContainer pointers

This commit is contained in:
Jack Andersen 2016-08-13 17:05:50 -10:00
parent 2a425b5a73
commit 91b5b3ed73
2 changed files with 10 additions and 2 deletions

View File

@ -35,7 +35,15 @@ CStateManager::CStateManager(const std::weak_ptr<CRelayTracker>&,
x83c_aiWaypointObjs(new CAiWaypointList()), x83c_aiWaypointObjs(new CAiWaypointList()),
x844_platformAndDoorObjs(new CPlatformAndDoorList()) x844_platformAndDoorObjs(new CPlatformAndDoorList())
{ {
x86c_stateManagerContainer.emplace(); x86c_stateManagerContainer.reset(new CStateManagerContainer);
x870_cameraManager = &x86c_stateManagerContainer->x0_cameraManager;
x874_sortedListManager = &x86c_stateManagerContainer->x3c0_sortedListManager;
x878_weaponManager = &x86c_stateManagerContainer->xe3d8_weaponManager;
x87c_fluidPlaneManager = &x86c_stateManagerContainer->xe3ec_fluidPlaneManager;
x880_envFxManager = &x86c_stateManagerContainer->xe510_envFxManager;
x884_actorModelParticles = &x86c_stateManagerContainer->xf168_actorModelParticles;
x88c_rumbleManager = &x86c_stateManagerContainer->xf250_rumbleManager;
x904_loaderFuncs[int(EScriptObjectType::Actor)] = ScriptLoader::LoadActor; x904_loaderFuncs[int(EScriptObjectType::Actor)] = ScriptLoader::LoadActor;
x904_loaderFuncs[int(EScriptObjectType::Waypoint)] = ScriptLoader::LoadWaypoint; x904_loaderFuncs[int(EScriptObjectType::Waypoint)] = ScriptLoader::LoadWaypoint;
x904_loaderFuncs[int(EScriptObjectType::Door)] = ScriptLoader::LoadDoor; x904_loaderFuncs[int(EScriptObjectType::Door)] = ScriptLoader::LoadDoor;

View File

@ -83,7 +83,7 @@ class CStateManager
u32 xf370_ = 0; u32 xf370_ = 0;
u32 xf39c_ = 0; u32 xf39c_ = 0;
}; };
std::experimental::optional<CStateManagerContainer> x86c_stateManagerContainer; std::unique_ptr<CStateManagerContainer> x86c_stateManagerContainer;
CCameraManager* x870_cameraManager = nullptr; CCameraManager* x870_cameraManager = nullptr;
CSortedListManager* x874_sortedListManager = nullptr; CSortedListManager* x874_sortedListManager = nullptr;
CWeaponMgr* x878_weaponManager = nullptr; CWeaponMgr* x878_weaponManager = nullptr;