soc-2008-mxcurioni: merged changes to revision 23516
[blender.git] / source / gameengine / Ketsji / KX_KetsjiEngine.h
index cc9b9198db7851363ab831b69919b4a345bc5c9d..373e8bf218c459e5e5a07bd68631e3f5b918bab5 100644 (file)
@@ -70,7 +70,6 @@ private:
        class RAS_IRenderTools*                         m_rendertools;
        class KX_ISceneConverter*                       m_sceneconverter;
        class NG_NetworkDeviceInterface*                m_networkdevice;
-       class SND_IAudioDevice*                         m_audiodevice;
        PyObject*                                       m_pythondictionary;
        class SCA_IInputDevice*                         m_keyboarddevice;
        class SCA_IInputDevice*                         m_mousedevice;
@@ -104,6 +103,7 @@ private:
        double                          m_remainingTime;
 
        static int                              m_maxLogicFrame;        /* maximum number of consecutive logic frame */
+       static int                              m_maxPhysicsFrame;      /* maximum number of consecutive physics frame */
        static double                   m_ticrate;
        static double                   m_anim_framerate; /* for animation playback only - ipo and action */
 
@@ -128,6 +128,7 @@ private:
        MT_CmMatrix4x4  m_overrideCamViewMat;
        float                   m_overrideCamNear;
        float                   m_overrideCamFar;
+       float                   m_overrideCamLens;
 
        bool m_stereo;
        int m_curreye;
@@ -189,7 +190,6 @@ private:
        void                                    DoSound(KX_Scene* scene);
 
 public:
-
        KX_KetsjiEngine(class KX_ISystem* system);
        virtual ~KX_KetsjiEngine();
 
@@ -198,7 +198,6 @@ public:
        void                    SetKeyboardDevice(SCA_IInputDevice* keyboarddevice);
        void                    SetMouseDevice(SCA_IInputDevice* mousedevice);
        void                    SetNetworkDevice(NG_NetworkDeviceInterface* networkdevice);
-       void                    SetAudioDevice(SND_IAudioDevice* audiodevice);
        void                    SetCanvas(RAS_ICanvas* canvas);
        void                    SetRenderTools(RAS_IRenderTools* rendertools);
        void                    SetRasterizer(RAS_IRasterizer* rasterizer);
@@ -252,6 +251,7 @@ public:
        void SetCameraOverrideProjectionMatrix(const MT_CmMatrix4x4& mat);
        void SetCameraOverrideViewMatrix(const MT_CmMatrix4x4& mat);
        void SetCameraOverrideClipping(float near, float far);
+       void SetCameraOverrideLens(float lens);
        
        /**
         * Sets display of all frames.
@@ -269,7 +269,12 @@ public:
         * Returns current render frame clock time
         */
        double GetClockTime(void) const;
+       /**
+        * Returns current logic frame clock time
+        */
+       double GetFrameTime(void) const;
 
+       double GetRealTime(void) const;
        /**
         * Returns the difference between the local time of the scene (when it
         * was running and not suspended) and the "curtime"
@@ -292,6 +297,14 @@ public:
         * Sets the maximum number of logic frame before render frame
         */
        static void SetMaxLogicFrame(int frame);
+       /**
+        * Gets the maximum number of physics frame before render frame
+        */
+       static int GetMaxPhysicsFrame();
+       /**
+        * Sets the maximum number of physics frame before render frame
+        */
+       static void SetMaxPhysicsFrame(int frame);
 
        /**
         * Gets the framerate for playing animations. (actions and ipos)
@@ -386,6 +399,13 @@ protected:
        bool                    BeginFrame();
        void                    ClearFrame();
        void                    EndFrame();
+       
+       
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+       void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_KetsjiEngine"); }
+       void operator delete( void *mem ) { MEM_freeN(mem); }
+#endif
 };
 
 #endif //__KX_KETSJI_ENGINE