2015-12-23 08:45:53 -05:00
|
|
|
#include "..\STDInclude.hpp"
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
std::vector<Component*> Loader::Components;
|
|
|
|
|
|
|
|
void Loader::Initialize()
|
|
|
|
{
|
|
|
|
Loader::Register(new Dvar());
|
2015-12-25 20:51:58 -05:00
|
|
|
Loader::Register(new Maps());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new Menus());
|
2015-12-25 15:42:35 -05:00
|
|
|
Loader::Register(new Party());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new Colors());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new Logger());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new Window());
|
|
|
|
Loader::Register(new Command());
|
|
|
|
Loader::Register(new Console());
|
2015-12-24 10:55:38 -05:00
|
|
|
Loader::Register(new Network());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new RawFiles());
|
2015-12-23 10:56:02 -05:00
|
|
|
Loader::Register(new Renderer());
|
2015-12-23 21:26:46 -05:00
|
|
|
Loader::Register(new FastFiles());
|
2015-12-23 10:56:02 -05:00
|
|
|
Loader::Register(new Materials());
|
2015-12-23 21:26:46 -05:00
|
|
|
Loader::Register(new FileSystem());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new QuickPatch());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new AssetHandler());
|
2015-12-25 17:17:29 -05:00
|
|
|
Loader::Register(new Localization());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new MusicalTalent());
|
2015-12-23 08:45:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void Loader::Uninitialize()
|
|
|
|
{
|
|
|
|
for (auto component : Loader::Components)
|
|
|
|
{
|
2015-12-23 16:21:03 -05:00
|
|
|
Logger::Print("Unregistering component: %s", component->GetName());
|
2015-12-23 08:45:53 -05:00
|
|
|
delete component;
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader::Components.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Loader::Register(Component* component)
|
|
|
|
{
|
|
|
|
if (component)
|
|
|
|
{
|
2015-12-23 16:21:03 -05:00
|
|
|
Logger::Print("Component registered: %s", component->GetName());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Components.push_back(component);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|