/
MapModules.cpp
28 lines (24 loc) · 972 Bytes
/
MapModules.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "format/portable/PortableMapFormat.h"
#include "format/Doom3MapFormat.h"
#include "format/Doom3PrefabFormat.h"
#include "format/Quake4MapFormat.h"
#include "format/Quake3MapFormat.h"
#include "aas/Doom3AasFileLoader.h"
#include "imapformat.h"
#include "module/StaticModule.h"
#include "Map.h"
// Static module instances
module::StaticModule<map::format::PortableMapFormat> portableMapModule;
module::StaticModule<map::Doom3MapFormat> d3MapModule;
module::StaticModule<map::Quake4MapFormat> q4MapModule;
module::StaticModule<map::Doom3PrefabFormat> d3PrefabModule;
module::StaticModule<map::Quake3MapFormat> q3MapModule;
module::StaticModule<map::Doom3AasFileLoader> d3AasModule;
// Creates the static module instance
module::StaticModule<map::Map> staticMapModule;
// Accessor method containing the singleton Map instance
map::Map& GlobalMap()
{
return *std::static_pointer_cast<map::Map>(
module::GlobalModuleRegistry().getModule(MODULE_MAP));
}