00001 // ///////////////////////////////////////////////////////////////////////////// 00002 // 00003 // Name: processors.cpp 00004 // Author: Michael Bartsch (ZCCdark203) 00005 // 00006 // Desc : Implements global functions regarding AssetProcessors. 00007 // 00008 // License: Copyright (C) 2009 Michael Bartsch and Contributors 00009 // 00010 // This program is free software: you can redistribute it 00011 // and/or modify it under the terms of the zlib/libpng License. 00012 // See main.cpp for conditions of distribution and use. 00013 // 00014 // ///////////////////////////////////////////////////////////////////////////// 00015 00016 // Include files 00017 #include "processors.h" 00018 #include "../core/GameManager.h" 00019 00020 // Registers all available AssetProcessor factories. 00021 void registerProcessorFactories() 00022 { 00023 // Get pointer to the AssetManager. 00024 AssetManager *pAssetMgr = GameManager::Instance()->getAssetManager(); 00025 00026 // Register factories. 00027 pAssetMgr->registerProcessorFactory("heightmaps", HeightmapProcessor::createProcessor); 00028 pAssetMgr->registerProcessorFactory("meshes", MeshProcessor::createProcessor); 00029 pAssetMgr->registerProcessorFactory("textures", TextureProcessor::createProcessor); 00030 00031 #ifdef __COMPILE_WITH_ANGELSCRIPT__ 00032 pAssetMgr->registerProcessorFactory("scripts", ScriptProcessor::createProcessor); 00033 #endif // __COMPILE_WITH_ANGELSCRIPT__ 00034 00035 #ifdef __COMPILE_WITH_SFML_AUDIO__ 00036 pAssetMgr->registerProcessorFactory("sounds", SoundProcessor::createProcessor); 00037 #endif // __COMPILE_WITH_SFML_AUDIO__ 00038 00039 pAssetMgr->registerProcessorFactory("entities", EntityProcessor::createProcessor); 00040 } 00041 00042 // End of File