added WITHOUT_ODE testing to some sources to build without ODE support

git-svn-id: svn://anubis/dwscr/trunk@124 5bef9df8-b654-44bb-925b-0ff18baa8f8c
This commit is contained in:
josh 2010-10-26 20:22:28 +00:00
parent 639e4c9f23
commit 8d759e4fd7
4 changed files with 13 additions and 0 deletions

View File

@ -12,7 +12,9 @@
#include <string> #include <string>
#include <SDL.h> #include <SDL.h>
#include <SDL_syswm.h> #include <SDL_syswm.h>
#ifndef WITHOUT_ODE
#include <ode/ode.h> #include <ode/ode.h>
#endif
#include "displayinfo.h" #include "displayinfo.h"
#include "ss/SSMain.h" #include "ss/SSMain.h"
using namespace std; using namespace std;
@ -110,7 +112,9 @@ int main(int argc, char * argv[])
SDL_ShowCursor(SDL_DISABLE); SDL_ShowCursor(SDL_DISABLE);
} }
#ifndef WITHOUT_ODE
dInitODE(); dInitODE();
#endif
/* after our window is created and SDL and OpenGL are initialized, /* after our window is created and SDL and OpenGL are initialized,
* start the main screensaver functionality */ * start the main screensaver functionality */
@ -118,7 +122,9 @@ int main(int argc, char * argv[])
SSMain ss(width, height, num_monitors, sdlSurface); SSMain ss(width, height, num_monitors, sdlSurface);
ss.run(); ss.run();
#ifndef WITHOUT_ODE
dCloseODE(); dCloseODE();
#endif
SDL_Quit(); SDL_Quit();
return 0; return 0;
} }

View File

@ -14,6 +14,7 @@
#include "../wfobj/WFObj.h" #include "../wfobj/WFObj.h"
#include "LogoBox.h" #include "LogoBox.h"
#include "../LoadFile/LoadFile.h" #include "../LoadFile/LoadFile.h"
#include <string.h> /* memcpy() */
#include <iostream> #include <iostream>
using namespace std; using namespace std;

View File

@ -25,6 +25,7 @@ void SSMode::update()
m_elapsed = ticks - m_startTick; m_elapsed = ticks - m_startTick;
} }
#ifndef WITHOUT_ODE
/* push an OpenGL matrix onto the matrix stack for a given /* push an OpenGL matrix onto the matrix stack for a given
* ODE body position and rotation */ * ODE body position and rotation */
void SSMode::pushTransform(const dReal pos[3], const dReal R[12]) void SSMode::pushTransform(const dReal pos[3], const dReal R[12])
@ -49,3 +50,4 @@ void SSMode::pushTransform(const dReal pos[3], const dReal R[12])
glPushMatrix(); glPushMatrix();
glMultMatrixf(matrix); glMultMatrixf(matrix);
} }
#endif

View File

@ -9,7 +9,9 @@
#include <SDL.h> #include <SDL.h>
#include <GL/gl.h> #include <GL/gl.h>
#ifndef WITHOUT_ODE
#include <ode/ode.h> #include <ode/ode.h>
#endif
class SSMain; class SSMain;
@ -21,7 +23,9 @@ public:
SSMode(SSMain * _SSMain); SSMode(SSMain * _SSMain);
virtual ~SSMode(); virtual ~SSMode();
virtual void update(); virtual void update();
#ifndef WITHOUT_ODE
void pushTransform(const dReal pos[3], const dReal R[12]); void pushTransform(const dReal pos[3], const dReal R[12]);
#endif
protected: protected:
SSMain * m_SSMain; SSMain * m_SSMain;