Skip to content
Snippets Groups Projects
Commit 4b9f3236 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

fix bullet-dependent includes

parent cb7dc873
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,10 @@
#include <filesystem>
#include <iostream>
#if __has_include("fggl/phys/bullet/bullet.hpp")
#include "fggl/phys/bullet/bullet.hpp"
#endif
#include "fggl/app.hpp"
#include "fggl/audio/openal/audio.hpp"
......@@ -34,7 +38,6 @@
#include "fggl/platform/paths.hpp"
#include "fggl/ecs3/types.hpp"
#include "../../integrations/bullet/include/fggl/phys/bullet/bullet.hpp"
#include "fggl/scenes/menu.hpp"
......@@ -103,7 +106,9 @@ int main(int argc, const char* argv[]) {
// load a bunch of modules to provide game functionality
//app.use<fggl::ecs3::ecsTypes>();
app.use<fggl::gfx::SceneUtils>();
app.use<fggl::phys::Bullet3>();
#ifdef FGGL_MODULE_BULLET
app.use<FGGL_MODULE_BULLET>();
#endif
test_atlas_api();
......
......@@ -18,7 +18,10 @@
#include "fggl/scenes/game.hpp"
#include "fggl/util/service.hpp"
#include "../../integrations/bullet/include/fggl/phys/bullet/types.hpp"
#if __has_include("fggl/phys/bullet/bullet.hpp")
#include "fggl/phys/bullet/bullet.hpp"
#endif
namespace fggl::scenes {
......@@ -33,8 +36,10 @@ namespace fggl::scenes {
// setup the scene
m_world = std::make_unique<ecs3::World>(*m_owner.registry());
// FIXME this ties bullet to the game state - which shouldn't be the case
m_phys = std::make_unique<phys::bullet::BulletPhysicsEngine>(m_world.get());
#ifdef FGGL_MODULE_BULLET
// FIXME this ties bullet to the game state - which shouldn't be the case
m_phys = std::make_unique<fggl::phys::bullet::BulletPhysicsEngine>(m_world.get());
#endif
}
void Game::deactivate() {
......
......@@ -19,6 +19,7 @@
#ifndef FGGL_PHYS_TYPES_HPP
#define FGGL_PHYS_TYPES_HPP
#include "fggl/math/types.hpp"
#include "fggl/phys/callbacks.hpp"
namespace fggl::phys {
......
......@@ -33,10 +33,12 @@
#ifndef FGGL_PHYS_BULLET_BULLET_HPP
#define FGGL_PHYS_BULLET_BULLET_HPP
#define FGGL_MODULE_BULLET fggl::phys::Bullet3
#include "fggl/ecs3/module/module.hpp"
#include "fggl/phys/types.hpp"
#include "types.hpp"
#include "fggl/phys/bullet/types.hpp"
namespace fggl::phys::bullet {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment