summaryrefslogtreecommitdiffstats
path: root/src/plugins/test/manager_test.cpp
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2012-08-12 15:00:37 +0200
committererihel <erihel@gmail.com>2012-08-12 15:00:37 +0200
commit5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3 (patch)
treed0e4c7bb68a6b07019574b5621fb086e8a07557c /src/plugins/test/manager_test.cpp
parent9946459c0cd65c3b66719a2aefc42c7ab2a29c04 (diff)
downloadcolobot-5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3.tar.gz
colobot-5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3.tar.bz2
colobot-5e271e550dbb88f0bbea5f46aad9f0fd1d750eb3.zip
* New CPluginManager class for managing plugins based on colobot.ini
* Moved sound plugin into sound dir * Minor changes in logger and profile
Diffstat (limited to 'src/plugins/test/manager_test.cpp')
-rw-r--r--src/plugins/test/manager_test.cpp24
1 files changed, 24 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..9b3f472
--- /dev/null
+++ b/src/plugins/test/manager_test.cpp
@@ -0,0 +1,24 @@
+#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));
+ sound->Create(true);
+ mgr->UnloadAllPlugins();
+
+ return 0;
+}