added WITHOUT_ODE make and compile flag
git-svn-id: svn://anubis/dwscr/trunk@87 5bef9df8-b654-44bb-925b-0ff18baa8f8c
This commit is contained in:
parent
ebb866d662
commit
c2d694aa73
13
Makefile
13
Makefile
@ -18,6 +18,9 @@ endif
|
|||||||
ifdef WINDOW_MODE
|
ifdef WINDOW_MODE
|
||||||
CPPFLAGS += -DWINDOW_MODE
|
CPPFLAGS += -DWINDOW_MODE
|
||||||
endif
|
endif
|
||||||
|
ifdef WITHOUT_ODE
|
||||||
|
CPPFLAGS += -DWITHOUT_ODE
|
||||||
|
endif
|
||||||
ifdef WIN32
|
ifdef WIN32
|
||||||
export CP := copy
|
export CP := copy
|
||||||
export MV := rename
|
export MV := rename
|
||||||
@ -25,8 +28,14 @@ export CC := mingw32-gcc
|
|||||||
export CXX := mingw32-g++
|
export CXX := mingw32-g++
|
||||||
SDL_BASE := C:\apps\SDL-1.2.13
|
SDL_BASE := C:\apps\SDL-1.2.13
|
||||||
ODE_BASE := C:\apps\ode-0.9
|
ODE_BASE := C:\apps\ode-0.9
|
||||||
export CPPFLAGS += -I$(SDL_BASE)\include -I$(ODE_BASE)\include -D_GNU_SOURCE=1 -Dmain=SDL_main
|
export CPPFLAGS += -I$(SDL_BASE)\include -D_GNU_SOURCE=1 -Dmain=SDL_main
|
||||||
LDFLAGS += -L$(SDL_BASE)\lib -L$(ODE_BASE)\lib\releasedll -lopengl32 -lglu32 -lmingw32 -mwindows -lSDLmain -lSDL -lode
|
ifndef WITHOUT_ODE
|
||||||
|
export CPPFLAGS += -i$(ODE_BASE)\include
|
||||||
|
endif
|
||||||
|
LDFLAGS += -L$(SDL_BASE)\lib -lopengl32 -lglu32 -lmingw32 -mwindows -lSDLmain -lSDL
|
||||||
|
ifndef WITHOUT_ODE
|
||||||
|
LDFLAGS += -L$(ODE_BASE)\lib\releasedll -lode
|
||||||
|
endif
|
||||||
TARGET := $(TARGET).exe
|
TARGET := $(TARGET).exe
|
||||||
SSNAME := dwscr.scr
|
SSNAME := dwscr.scr
|
||||||
INSTALLDIR := C:\WINDOWS
|
INSTALLDIR := C:\WINDOWS
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
#include <ode/ode.h>
|
#include <ode/ode.h>
|
||||||
|
#endif
|
||||||
#include "../wfobj/WFObj.hh"
|
#include "../wfobj/WFObj.hh"
|
||||||
#include "LogoBox.h"
|
#include "LogoBox.h"
|
||||||
#include "../LoadFile/LoadFile.h"
|
#include "../LoadFile/LoadFile.h"
|
||||||
@ -28,7 +30,11 @@ static GLuint _drawList;
|
|||||||
* initializes an ODE body and geometry for each
|
* initializes an ODE body and geometry for each
|
||||||
* constructed logo.
|
* constructed logo.
|
||||||
*/
|
*/
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
LogoBox::LogoBox(dWorldID world, dSpaceID space)
|
LogoBox::LogoBox(dWorldID world, dSpaceID space)
|
||||||
|
#else
|
||||||
|
LogoBox::LogoBox()
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (_logoList == 0)
|
if (_logoList == 0)
|
||||||
{
|
{
|
||||||
@ -52,6 +58,7 @@ LogoBox::LogoBox(dWorldID world, dSpaceID space)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
m_body = 0;
|
m_body = 0;
|
||||||
m_geom = 0;
|
m_geom = 0;
|
||||||
|
|
||||||
@ -69,11 +76,13 @@ LogoBox::LogoBox(dWorldID world, dSpaceID space)
|
|||||||
dGeomSetBody(m_geom, m_body);
|
dGeomSetBody(m_geom, m_body);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clean up ODE resources */
|
/* Clean up ODE resources */
|
||||||
LogoBox::~LogoBox()
|
LogoBox::~LogoBox()
|
||||||
{
|
{
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
if (m_geom)
|
if (m_geom)
|
||||||
{
|
{
|
||||||
dGeomDestroy(m_geom);
|
dGeomDestroy(m_geom);
|
||||||
@ -82,6 +91,7 @@ LogoBox::~LogoBox()
|
|||||||
{
|
{
|
||||||
dBodyDestroy(m_body);
|
dBodyDestroy(m_body);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogoBox::draw()
|
void LogoBox::draw()
|
||||||
|
@ -8,24 +8,32 @@
|
|||||||
#define LOGOBOX_H
|
#define LOGOBOX_H
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
#include <ode/ode.h>
|
#include <ode/ode.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class LogoBox
|
class LogoBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
LogoBox(dWorldID world = 0, dSpaceID space = 0);
|
LogoBox(dWorldID world = 0, dSpaceID space = 0);
|
||||||
|
#else
|
||||||
|
LogoBox();
|
||||||
|
#endif
|
||||||
~LogoBox();
|
~LogoBox();
|
||||||
void draw();
|
void draw();
|
||||||
const float * const getAABB() const;
|
const float * const getAABB() const;
|
||||||
float getWidth() const;
|
float getWidth() const;
|
||||||
float getHeight() const;
|
float getHeight() const;
|
||||||
float getDepth() const;
|
float getDepth() const;
|
||||||
|
#ifndef WITHOUT_ODE
|
||||||
dBodyID getBody() { return m_body; }
|
dBodyID getBody() { return m_body; }
|
||||||
dGeomID getGeom() { return m_geom; }
|
dGeomID getGeom() { return m_geom; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
dBodyID m_body;
|
dBodyID m_body;
|
||||||
dGeomID m_geom;
|
dGeomID m_geom;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,8 +3,10 @@ OBJS := SSMain.o
|
|||||||
OBJS += SSMode.o
|
OBJS += SSMode.o
|
||||||
OBJS += LogoBox.o
|
OBJS += LogoBox.o
|
||||||
OBJS += PlainSpin.o
|
OBJS += PlainSpin.o
|
||||||
|
ifndef WITHOUT_ODE
|
||||||
OBJS += TumblingLogos.o
|
OBJS += TumblingLogos.o
|
||||||
OBJS += Towers.o
|
OBJS += Towers.o
|
||||||
|
endif
|
||||||
AROBJS := $(foreach o,$(OBJS),ss.a($(o)))
|
AROBJS := $(foreach o,$(OBJS),ss.a($(o)))
|
||||||
|
|
||||||
all: ss.a
|
all: ss.a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user