svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20849:20855
authorCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jun 2009 14:07:38 +0000 (14:07 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 13 Jun 2009 14:07:38 +0000 (14:07 +0000)
to get the BGE building with py3k and no sdl

source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp

index a70790ef2a00fa3ffbe777df4ac941e1cb8fd1f0..a1df562192209099421dc3e862dd7097e854c275 100644 (file)
@@ -115,7 +115,6 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
                                                                 struct ARegion *ar,
                                                                 char* scenename,
                                                                 struct Main* maggie1,
-                                                                struct SpaceIpo *sipo,
                                                                 int always_use_expand_framing)
 {
        int exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
@@ -342,7 +341,7 @@ extern "C" void StartKetsjiShell(struct ScrArea *area,
                        }
                        
                        // create a scene converter, create and convert the startingscene
-                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata,sipo, ketsjiengine);
+                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(blenderdata, ketsjiengine);
                        ketsjiengine->SetSceneConverter(sceneconverter);
                        sceneconverter->addInitFromFrame=false;
                        if (always_use_expand_framing)
@@ -562,7 +561,6 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
                                                                 struct ARegion *ar,
                                                                 char* scenename,
                                                                 struct Main* maggie,
-                                                                struct SpaceIpo *sipo,
                                                                 int always_use_expand_framing)
 {
     int exitrequested = KX_EXIT_REQUEST_NO_REQUEST;
@@ -661,7 +659,7 @@ extern "C" void StartKetsjiShellSimulation(struct ScrArea *area,
                if (exitrequested != KX_EXIT_REQUEST_QUIT_GAME)
                {
                        // create a scene converter, create and convert the startingscene
-                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(maggie,sipo, ketsjiengine);
+                       KX_ISceneConverter* sceneconverter = new KX_BlenderSceneConverter(maggie, ketsjiengine);
                        ketsjiengine->SetSceneConverter(sceneconverter);
                        sceneconverter->addInitFromFrame=true;
                        
index b13e3f7cadb8000b4d19c7896528e87c6d23f53c..d5c93758f9409d75116eca2efb24429b175736c9 100644 (file)
@@ -94,11 +94,9 @@ extern "C"
 
 KX_BlenderSceneConverter::KX_BlenderSceneConverter(
                                                        struct Main* maggie,
-                                                       struct SpaceIpo*        sipo,
                                                        class KX_KetsjiEngine* engine
                                                        )
                                                        : m_maggie(maggie),
-                                                       m_sipo(sipo),
                                                        m_ketsjiEngine(engine),
                                                        m_alwaysUseExpandFraming(false),
                                                        m_usemat(false),
@@ -641,14 +639,14 @@ void KX_BlenderSceneConverter::RegisterWorldInfo(
  * When deleting an IPO curve from Python, check if the IPO is being
  * edited and if so clear the pointer to the old curve.
  */
-void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu ,struct SpaceIpo*    sipo)
+void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu )
 {
-       if (!sipo)
+#if 0 //XXX
+       if (!G.sipo)
                return;
 
        int i;
-#if 0 //XXX
-       EditIpo *ei= (EditIpo *)sipo->editipo;
+       EditIpo *ei= (EditIpo *)G.sipo->editipo;
        if (!ei) return;
 
        for(i=0; i<G.sipo->totipo; i++, ei++) {
@@ -753,7 +751,7 @@ void        KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
                                                                if( tmpicu->bezt )
                                                                        MEM_freeN( tmpicu->bezt );
                                                                MEM_freeN( tmpicu );
-                                                               localDel_ipoCurve( tmpicu ,m_sipo);
+                                                               localDel_ipoCurve( tmpicu );
                                                        }
                                                }
                                        } else
index f7c1a506457db0ff01e49d6ce14586d487bb71dd..cf8dd5b339ab900605f28c580f3994617515be29 100644 (file)
@@ -44,7 +44,6 @@ class BL_InterpolatorList;
 class BL_Material;
 struct IpoCurve;
 struct Main;
-struct SpaceIpo;
 struct Scene;
 
 class KX_BlenderSceneConverter : public KX_ISceneConverter
@@ -69,7 +68,6 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
        GEN_Map<CHashedPtr,BL_InterpolatorList*> m_map_blender_to_gameipolist;
        
        Main*                                   m_maggie;
-       SpaceIpo*                               m_sipo;
 
        STR_String                              m_newfilename;
        class KX_KetsjiEngine*  m_ketsjiEngine;
@@ -78,13 +76,12 @@ class KX_BlenderSceneConverter : public KX_ISceneConverter
        bool                                    m_usemat;
        bool                                    m_useglslmat;
 
-       void localDel_ipoCurve ( IpoCurve * icu ,struct SpaceIpo*       sipo);
+       void localDel_ipoCurve ( IpoCurve * icu );
 //     struct Ipo* findIpoForName(char* objName);
 
 public:
        KX_BlenderSceneConverter(
                Main* maggie,
-               SpaceIpo *sipo,
                class KX_KetsjiEngine* engine
        );
 
index d83179d4f80a8be4445b7694f7a24e1b30496a83..6140702534c2b24b883bfd45b12782f5bf80b19b 100644 (file)
@@ -158,12 +158,13 @@ bool SCA_Joystick::aAxisIsPositive(int axis_single)
 
 bool SCA_Joystick::aAnyButtonPressIsPositive(void)
 {
+#ifndef DISABLE_SDL
        /* this is needed for the "all events" option
         * so we know if there are no buttons pressed */
        for (int i=0; i<m_buttonmax; i++)
                if (SDL_JoystickGetButton(m_private->m_joystick, i))
                        return true;
-               
+#endif
        return false;
 }
 
index bdee8a78cfebe520404a56c0b6d756316b00ef59..e5932180fe1aff68dbeab0259212701b876ff1a2 100644 (file)
@@ -663,7 +663,7 @@ bool GPG_Application::startEngine(void)
        */
        
        // create a scene converter, create and convert the stratingscene
-       m_sceneconverter = new KX_BlenderSceneConverter(m_maggie,0, m_ketsjiengine);
+       m_sceneconverter = new KX_BlenderSceneConverter(m_maggie, m_ketsjiengine);
        if (m_sceneconverter)
        {
                STR_String startscenename = m_startSceneName.Ptr();
index cc8021fc2e4e2b9acb036efb615d711f9252bed2..f2bc4671f4e21ccf08cce5736cd82cab1ce939f3 100644 (file)
@@ -313,7 +313,11 @@ PyTypeObject KX_PythonSeq_Type = {
        NULL,                       /* printfunc tp_print; */
        NULL,                       /* getattrfunc tp_getattr; */
        NULL,                       /* setattrfunc tp_setattr; */
+#if PY_VERSION_HEX >= 0x03000000 // TODO - richcmp
+       NULL,
+#else
        ( cmpfunc ) KX_PythonSeq_compare, /* cmpfunc tp_compare; */
+#endif
        ( reprfunc ) KX_PythonSeq_repr,   /* reprfunc tp_repr; */
 
        /* Method suites for standard classes */