mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
refactor: use asset_type_t for ZoneDefinition
This commit is contained in:
26
src/Linker/ZoneCreation/ZoneCreator.cpp
Normal file
26
src/Linker/ZoneCreation/ZoneCreator.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "ZoneCreator.h"
|
||||
|
||||
#include "Game/IW3/ZoneCreatorIW3.h"
|
||||
#include "Game/IW4/ZoneCreatorIW4.h"
|
||||
#include "Game/IW5/ZoneCreatorIW5.h"
|
||||
#include "Game/T5/ZoneCreatorT5.h"
|
||||
#include "Game/T6/ZoneCreatorT6.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
const IZoneCreator* IZoneCreator::GetCreatorForGame(GameId game)
|
||||
{
|
||||
static const IZoneCreator* zoneCreators[static_cast<unsigned>(GameId::COUNT)]{
|
||||
new IW3::ZoneCreator(),
|
||||
new IW4::ZoneCreator(),
|
||||
new IW5::ZoneCreator(),
|
||||
new T5::ZoneCreator(),
|
||||
new T6::ZoneCreator(),
|
||||
};
|
||||
|
||||
assert(static_cast<unsigned>(game) < static_cast<unsigned>(GameId::COUNT));
|
||||
const auto* result = zoneCreators[static_cast<unsigned>(game)];
|
||||
assert(result);
|
||||
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user