Red code legacy MemoryManager, StreamEngine, ResourceManager, ImageHandler, AsyncPakManager, and more (#758)
Remove from CryCommon and CrySystem: - MemoryManager and all related classes/files - StreamEngine, ResourceManager, ImageHandler, and AsyncPakManager - Various other related interfaces/files/classes etc. that are all now unused
This commit is contained in:
@@ -62,46 +62,6 @@ AZ_POP_DISABLE_WARNING
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
struct CSystemEventListner_System
|
||||
: public ISystemEventListener
|
||||
{
|
||||
public:
|
||||
virtual void OnSystemEvent(ESystemEvent event, [[maybe_unused]] UINT_PTR wparam, [[maybe_unused]] UINT_PTR lparam)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case ESYSTEM_EVENT_LEVEL_LOAD_START:
|
||||
case ESYSTEM_EVENT_LEVEL_LOAD_END:
|
||||
{
|
||||
CryCleanup();
|
||||
break;
|
||||
}
|
||||
|
||||
case ESYSTEM_EVENT_LEVEL_POST_UNLOAD:
|
||||
{
|
||||
CryCleanup();
|
||||
STLALLOCATOR_CLEANUP;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static CSystemEventListner_System g_system_event_listener_system;
|
||||
|
||||
static AZ::EnvironmentVariable<IMemoryManager*> s_cryMemoryManager;
|
||||
|
||||
|
||||
// Force the CryMemoryManager into the AZ::Environment for exposure to other DLLs
|
||||
void ExportCryMemoryManager()
|
||||
{
|
||||
IMemoryManager* cryMemoryManager = nullptr;
|
||||
CryGetIMemoryManagerInterface((void**)&cryMemoryManager);
|
||||
AZ_Assert(cryMemoryManager, "Unable to resolve CryMemoryManager");
|
||||
s_cryMemoryManager = AZ::Environment::CreateVariable<IMemoryManager*>("CryIMemoryManagerInterface", cryMemoryManager);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupParams)
|
||||
@@ -113,8 +73,6 @@ CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupPar
|
||||
// Environment should have been attached via InjectEnvironment
|
||||
AZ_Assert(AZ::Environment::IsReady(), "Environment is not attached, must be attached before CreateSystemInterface can be called");
|
||||
|
||||
ExportCryMemoryManager();
|
||||
|
||||
pSystem = new CSystem(startupParams.pSharedEnvironment);
|
||||
ModuleInitISystem(pSystem, "CrySystem");
|
||||
|
||||
@@ -146,8 +104,6 @@ CRYSYSTEM_API ISystem* CreateSystemInterface(const SSystemInitParams& startupPar
|
||||
return 0;
|
||||
}
|
||||
|
||||
pSystem->GetISystemEventDispatcher()->RegisterListener(&g_system_event_listener_system);
|
||||
|
||||
return pSystem;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user