Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add new test to explore using Bullet

  • Loading branch information...
commit aaef258da05ccad2f7b46a4d447fe3d5541b2ca7 1 parent c2d8621
@alriddoch alriddoch authored
Showing with 95 additions and 3 deletions.
  1. +85 −0 tests/BulletDomainintegration.cpp
  2. +10 −3 tests/Makefile.am
View
85 tests/BulletDomainintegration.cpp
@@ -0,0 +1,85 @@
+// Cyphesis Online RPG Server and AI Engine
+// Copyright (C) 2010 Alistair Riddoch
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+// $Id$
+
+#include "rulesets/BulletDomain.h"
+
+#include "rulesets/TerrainProperty.h"
+
+#include <cassert>
+
+int main()
+{
+ return 0;
+}
+
+// stubs
+
+TerrainProperty::TerrainProperty() :
+ m_data(*(Mercator::Terrain*)0),
+ m_tileShader(*(Mercator::TileShader*)0)
+{
+}
+
+TerrainProperty::~TerrainProperty()
+{
+}
+
+bool TerrainProperty::get(Atlas::Message::Element & ent) const
+{
+ return true;
+}
+
+void TerrainProperty::set(const Atlas::Message::Element & ent)
+{
+}
+
+bool TerrainProperty::getHeightAndNormal(float x,
+ float y,
+ float & height,
+ Vector3D & normal) const
+{
+ return true;
+}
+
+PropertyBase::PropertyBase(unsigned int flags) : m_flags(flags)
+{
+}
+
+PropertyBase::~PropertyBase()
+{
+}
+
+void PropertyBase::install(Entity *)
+{
+}
+
+void PropertyBase::apply(Entity *)
+{
+}
+
+void PropertyBase::add(const std::string & s,
+ Atlas::Message::MapType & ent) const
+{
+ get(ent[s]);
+}
+
+void PropertyBase::add(const std::string & s,
+ const Atlas::Objects::Entity::RootEntity & ent) const
+{
+}
View
13 tests/Makefile.am
@@ -44,8 +44,9 @@ RULESETS_TESTS = LocatedEntitytest Entitytest Planttest \
PythonWrappertest PythonEntityScripttest \
MindFactorytest TaskScripttest PythonContexttest \
ArithmeticScripttest PythonArithmeticScripttest \
- ArithmeticFactorytest PythonArithmeticFactorytest \
- MindFactoryintegration
+ ArithmeticFactorytest PythonArithmeticFactorytest
+
+RULESETS_INTEGRATION_TESTS = MindFactoryintegration BulletDomainintegration
CLIENT_TESTS = Py_CreatorClienttest Py_ObserverClienttest \
ClientConnectiontest
@@ -75,7 +76,7 @@ LIBS = $(COMMON_LIBS) $(PGSQL_LIBS) $(PYTHON_LIBS) $(PYTHON_UTIL_LIBS) $(MATH_LI
TESTS = $(COMMON_TESTS) $(PHYSICS_TESTS) $(MODULE_TESTS) $(RULESETS_TESTS) \
$(SERVER_TESTS) $(SERVER_COMM_TESTS) $(CLIENT_TESTS) $(TOOLS_TESTS) \
- $(SERVER_INTEGRATION_TESTS)
+ $(RULESETS_INTEGRATION_TESTS) $(SERVER_INTEGRATION_TESTS)
EXTRA_PROGRAMS = $(PYTHON_TESTS) Mastertest
@@ -849,6 +850,12 @@ MindFactoryintegration_LDADD = \
$(top_builddir)/common/libcommon.a \
$(TERRAIN_LIBS)
+BulletDomainintegration_SOURCES = BulletDomainintegration.cpp
+BulletDomainintegration_LDADD = \
+ $(top_builddir)/rulesets/BulletDomain.o \
+ $(top_builddir)/rulesets/Domain.o \
+ $(TERRAIN_LIBS)
+
# CLIENT_TESTS
Py_CreatorClienttest_SOURCES = Py_CreatorClienttest.cpp python_testers.h
Please sign in to comment.
Something went wrong with that request. Please try again.