allow some existing demos to run in the TestFrameWork
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
SubDir TOP Examples TestBed Framework ;
|
||||
|
||||
BulletDemo FrameWork : [ Wildcard *.h *.cpp ] ;
|
||||
FrameWorkDemo FrameWork : [ Wildcard *.h *.cpp ] ;
|
||||
|
||||
@@ -3,7 +3,7 @@ SubDir TOP Examples TestBed ;
|
||||
if $(GLUT.AVAILABLE) = "yes"
|
||||
{
|
||||
# All demo apps have a lot in common, so use this rule to simply things
|
||||
rule BulletDemo
|
||||
rule FrameWorkDemo
|
||||
{
|
||||
Application $(<) : $(>) : noinstall console nomanifest ;
|
||||
LinkWith $(<) : Tests bulletdynamics bulletcollision bulletmath glui ;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
class CollisionProcessing : public Test
|
||||
{
|
||||
public:
|
||||
void Step(Settings* settings)
|
||||
void Step(const Settings* settings)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,63 @@
|
||||
#include "../FrameWork/Test.h"
|
||||
#include "CollisionProcessing.h"
|
||||
|
||||
TestEntry g_testEntries[] =
|
||||
#include "../../Demos/CcdPhysicsDemo/CcdPhysicsDemo.h"
|
||||
|
||||
class CcdPhysicsTest : public Test
|
||||
{
|
||||
{"Collision Processing", CollisionProcessing::Create}
|
||||
CcdPhysicsDemo* m_demo;
|
||||
CcdPhysicsTest()
|
||||
{
|
||||
m_demo = new CcdPhysicsDemo();
|
||||
m_demo->initPhysics();
|
||||
}
|
||||
virtual ~CcdPhysicsTest()
|
||||
{
|
||||
delete m_demo;
|
||||
}
|
||||
public:
|
||||
void Step(const Settings* settings)
|
||||
{
|
||||
m_demo->clientMoveAndDisplay();
|
||||
}
|
||||
static Test* Create()
|
||||
{
|
||||
return new CcdPhysicsTest;
|
||||
}
|
||||
};
|
||||
|
||||
#include "../../Demos/BspDemo/BspDemo.h"
|
||||
|
||||
class BspDemoTest : public Test
|
||||
{
|
||||
BspDemo* m_demo;
|
||||
|
||||
BspDemoTest()
|
||||
{
|
||||
m_demo = new BspDemo();
|
||||
m_demo->initPhysics("BspDemo.bsp");
|
||||
}
|
||||
virtual ~BspDemoTest()
|
||||
{
|
||||
delete m_demo;
|
||||
}
|
||||
public:
|
||||
void Step(const Settings* settings)
|
||||
{
|
||||
m_demo->clientMoveAndDisplay();
|
||||
}
|
||||
static Test* Create()
|
||||
{
|
||||
return new BspDemoTest;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
TestEntry g_testEntries[] =
|
||||
{
|
||||
{"CcdPhysics Test", CcdPhysicsTest::Create},
|
||||
{"BspDemo Test", BspDemoTest::Create},
|
||||
{"Collision Processing", CollisionProcessing::Create},
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user