[General] Enable custom map code only in debug mode

This commit is contained in:
momo5502 2017-01-08 19:36:33 +01:00
parent f8b6adee91
commit 7a8176238f
4 changed files with 17 additions and 0 deletions

View File

@ -389,10 +389,14 @@ namespace Components
AssetHandler::RegisterInterface(new Assets::IRawFile());
AssetHandler::RegisterInterface(new Assets::IComWorld());
AssetHandler::RegisterInterface(new Assets::IGfxImage());
#ifdef ENABLE_EXPERIMENTAL_MAP_CODE
AssetHandler::RegisterInterface(new Assets::IGfxWorld());
#endif
AssetHandler::RegisterInterface(new Assets::ISndCurve());
AssetHandler::RegisterInterface(new Assets::IMaterial());
#ifdef ENABLE_EXPERIMENTAL_MAP_CODE
AssetHandler::RegisterInterface(new Assets::IclipMap_t());
#endif
AssetHandler::RegisterInterface(new Assets::IPhysPreset());
AssetHandler::RegisterInterface(new Assets::IXAnimParts());
AssetHandler::RegisterInterface(new Assets::IFxEffectDef());

View File

@ -2,6 +2,8 @@
#define IW4X_GFXMAP_VERSION 1
#ifdef ENABLE_EXPERIMENTAL_MAP_CODE
namespace Assets
{
void IGfxWorld::loadGfxWorldDpvsStatic(Game::GfxWorld* world, Game::GfxWorldDpvsStatic* asset, Components::ZoneBuilder::Zone* builder, Utils::Stream::Reader* reader)
@ -1321,3 +1323,5 @@ namespace Assets
SaveLogExit();
}
}
#endif

View File

@ -2,6 +2,8 @@
#define IW4X_CLIPMAP_VERSION 1
#ifdef ENABLE_EXPERIMENTAL_MAP_CODE
namespace Assets
{
void IclipMap_t::save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
@ -880,3 +882,5 @@ namespace Assets
header->clipMap = clipMap;
}
}
#endif

View File

@ -155,3 +155,8 @@ using namespace std::literals;
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
// Enables custom map code
#ifdef DEBUG
#define ENABLE_EXPERIMENTAL_MAP_CODE
#endif