summaryrefslogtreecommitdiffstats
path: root/src/plugins/test/manager_test.cpp
diff options
context:
space:
mode:
authorPiotr Dziwiński <piotrdz@gmail.com>2012-08-12 10:15:19 -0700
committerPiotr Dziwiński <piotrdz@gmail.com>2012-08-12 10:15:19 -0700
commit50deedb6cbc927f6c7d6c3c5e9134d11c20782ae (patch)
tree8eb3fbd914cfea11660534b296bfddcffcc5f7b4 /src/plugins/test/manager_test.cpp
parentbc24b9f9e516e657fcc0034808e010287fc2e393 (diff)
parent62b545128f37746c343760e464872655b5523c6f (diff)
downloadcolobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.tar.gz
colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.tar.bz2
colobot-50deedb6cbc927f6c7d6c3c5e9134d11c20782ae.zip
Merge pull request #36 from Erihel/dev
Merge of new features: plugins and INI profile, changes from dev-graphics
Diffstat (limited to 'src/plugins/test/manager_test.cpp')
-rw-r--r--src/plugins/test/manager_test.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/plugins/test/manager_test.cpp b/src/plugins/test/manager_test.cpp
new file mode 100644
index 0000000..d921c1d
--- /dev/null
+++ b/src/plugins/test/manager_test.cpp
@@ -0,0 +1,31 @@
+#include <common/logger.h>
+#include <common/profile.h>
+#include <common/iman.h>
+#include <plugins/pluginmanager.h>
+#include <sound/sound.h>
+
+
+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<CSoundInterface*>(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND));
+
+ if (!sound) {
+ GetLogger()->Error("Sound not loaded!\n");
+ return 2;
+ }
+
+ sound->Create(true);
+ mgr->UnloadAllPlugins();
+
+ return 0;
+}