// DarkRadiant module entry point extern "C" void DARKRADIANT_DLLEXPORT RegisterModule(IModuleRegistry& registry) { pico_initialise(); const picoModule_t** modules = PicoModuleList( 0 ); while (*modules != 0) { const picoModule_t* module = *modules++; if (module->canload && module->load) { for (char*const* ext = module->defaultExts; *ext != 0; ++ext) { // greebo: File extension is expected to be UPPERCASE std::string extension(*ext); boost::algorithm::to_upper(extension); registry.registerModule( model::PicoModelLoaderPtr(new model::PicoModelLoader(module, extension)) ); } } } // Initialise the streams using the given application context module::initialiseStreams(registry.getApplicationContext()); // Remember the reference to the ModuleRegistry module::RegistryReference::Instance().setRegistry(registry); // Set up the assertion handler GlobalErrorHandler() = registry.getApplicationContext().getErrorHandlingFunction(); }
extern "C" void DARKRADIANT_DLLEXPORT RegisterModule(IModuleRegistry& registry) { registry.registerModule(sound::SoundManagerPtr(new sound::SoundManager)); // Initialise the streams using the given application context module::initialiseStreams(registry.getApplicationContext()); // Remember the reference to the ModuleRegistry module::RegistryReference::Instance().setRegistry(registry); // Set up the assertion handler GlobalErrorHandler() = registry.getApplicationContext().getErrorHandlingFunction(); }
extern "C" void DARKRADIANT_DLLEXPORT RegisterModule(IModuleRegistry& registry) { module::performDefaultInitialisation(registry); registry.registerModule(ObjectivesEditorModulePtr(new ObjectivesEditorModule)); }