iw4x-client/iw4/Components/Loader.cpp

56 lines
1.4 KiB
C++
Raw Normal View History

2015-12-23 08:45:53 -05:00
#include "..\STDInclude.hpp"
namespace Components
{
std::vector<Component*> Loader::Components;
void Loader::Initialize()
{
2015-12-27 14:05:43 -05:00
Loader::Register(new Dedicated());
2015-12-23 08:45:53 -05:00
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-28 08:08:46 -05:00
Loader::Register(new UIFeeder());
Loader::Register(new UIScript());
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-27 14:05:43 -05:00
Loader::Register(new Singleton());
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-27 22:02:30 -05:00
Loader::Register(new ServerList());
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);
}
}
}