From 5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3 Mon Sep 17 00:00:00 2001 From: erihel Date: Sun, 12 Aug 2012 15:00:37 +0200 Subject: * New CPluginManager class for managing plugins based on colobot.ini * Moved sound plugin into sound dir * Minor changes in logger and profile --- src/plugins/test/manager_test.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/plugins/test/manager_test.cpp (limited to 'src/plugins/test/manager_test.cpp') diff --git a/src/plugins/test/manager_test.cpp b/src/plugins/test/manager_test.cpp new file mode 100644 index 0000000..9b3f472 --- /dev/null +++ b/src/plugins/test/manager_test.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +#include +#include + + +int main() { + new CLogger(); + new CProfile(); + new CInstanceManager(); + CPluginManager *mgr = new CPluginManager(); + + if (!GetProfile()->InitCurrentDirectory()) { + GetLogger()->Error("Config not found!\n"); + return 1; + } + mgr->LoadFromProfile(); + CSoundInterface *sound = static_cast(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND)); + sound->Create(true); + mgr->UnloadAllPlugins(); + + return 0; +} -- cgit v1.2.3-1-g7c22