Bugfix: the game player did not initialize tiff and quicktime, so loading
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Sep 2008 14:54:21 +0000 (14:54 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Sep 2008 14:54:21 +0000 (14:54 +0000)
those file formats did not work. Also made sure G.order is initialized as
otherwise some reading tiff goes wrong.

source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 4cd5184fee11be83863a613799fb852763260fb9..a9196a1a5e36c14bf80374eac41476f2d0cfb164 100644 (file)
@@ -57,6 +57,7 @@ extern "C"
 #include "BLO_readfile.h"
 #include "BKE_global.h"
 #include "BKE_main.h"
+#include "IMB_imbuf.h"
 #include "DNA_scene_types.h"
 #ifdef __cplusplus
 }
@@ -754,8 +755,6 @@ void GPG_Application::stopEngine()
 
 void GPG_Application::exitEngine()
 {
-       GPU_extensions_exit();
-
        if (m_ketsjiengine)
        {
                stopEngine();
@@ -803,6 +802,12 @@ void GPG_Application::exitEngine()
                m_canvas = 0;
        }
 
+       libtiff_exit();
+#ifdef WITH_QUICKTIME
+       quicktime_exit();
+#endif
+       GPU_extensions_exit();
+
        m_exitRequested = 0;
        m_engineInitialized = false;
 }
index 4dfbbab7cd329b5a8c38ddafc6dfe4416bb65b37..9700e6387f270d665affdee80037987dbd1a5ce6 100644 (file)
@@ -53,6 +53,7 @@ extern "C"
 {
 #endif  // __cplusplus
 #include "MEM_guardedalloc.h"
+#include "BKE_blender.h"       
 #include "BKE_global.h"        
 #include "BKE_icons.h" 
 #include "BKE_node.h"  
@@ -60,6 +61,7 @@ extern "C"
 #include "DNA_scene_types.h"
 #include "BLO_readfile.h"
 #include "BLO_readblenfile.h"
+#include "IMB_imbuf.h"
        
        int GHOST_HACK_getFirstFile(char buf[]);
        
@@ -335,7 +337,15 @@ int main(int argc, char** argv)
 
        init_nodesystem();
        
+       initglobals();
+
        GEN_init_messaging_system();
+
+#ifdef WITH_QUICKTIME
+       quicktime_init();
+#endif
+
+       libtiff_init();
  
        // Parse command line options
 #ifndef NDEBUG