Daniele Bartolini 11 лет назад
Родитель
Сommit
aebdadaf95

+ 1 - 1
engine/lua/lua_environment.h

@@ -29,6 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "config.h"
 #include "types.h"
 #include "macros.h"
+#include "resource_types.h"
 #include "math_types.h" // HACK
 #include "lua.hpp"
 
@@ -40,7 +41,6 @@ enum LuaArgumentType
 	ARGUMENT_FLOAT
 };
 
-struct LuaResource;
 // HACK
 struct Actor;
 struct Unit;

+ 4 - 4
engine/physics/actor.cpp

@@ -120,10 +120,10 @@ void Actor::create_objects()
 			static_cast<PxRigidDynamic*>(m_actor)->setRigidDynamicFlag(PxRigidDynamicFlag::eKINEMATIC, true);
 		}
 
-		PxD6Joint* joint = PxD6JointCreate(*physics, m_actor, PxTransform(pose), NULL, PxTransform(pose));
-		joint->setMotion(PxD6Axis::eX, PxD6Motion::eFREE);
-		joint->setMotion(PxD6Axis::eY, PxD6Motion::eFREE);
-		joint->setMotion(PxD6Axis::eSWING2, PxD6Motion::eFREE);
+		// PxD6Joint* joint = PxD6JointCreate(*physics, m_actor, PxTransform(pose), NULL, PxTransform(pose));
+		// joint->setMotion(PxD6Axis::eX, PxD6Motion::eFREE);
+		// joint->setMotion(PxD6Axis::eY, PxD6Motion::eFREE);
+		// joint->setMotion(PxD6Axis::eSWING2, PxD6Motion::eFREE);
 	}
 	else
 	{

+ 1 - 2
engine/physics/actor.h

@@ -31,6 +31,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "physics_types.h"
 #include "id_array.h"
 #include "world_types.h"
+#include "resource_types.h"
 
 #include "PxPhysics.h"
 #include "PxScene.h"
@@ -44,8 +45,6 @@ namespace crown
 
 #define MAX_PHYSX_VERTICES 256
 
-struct PhysicsResource;
-struct PhysicsConfigResource;
 struct Unit;
 struct SceneGraph;
 

+ 2 - 2
engine/physics/controller.h

@@ -26,9 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
+#include "physics_callback.h"
+#include "resource_types.h"
 #include "PxController.h"
 #include "PxControllerManager.h"
-#include "physics_callback.h"
 
 using physx::PxController;
 using physx::PxControllerManager;
@@ -39,7 +40,6 @@ using physx::PxU32;
 namespace crown
 {
 
-struct PhysicsResource;
 struct Vector3;
 struct SceneGraph;
 class PhysicsControllerCallback;

+ 1 - 1
engine/physics/joint.h

@@ -27,6 +27,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include "types.h"
+#include "resource_types.h"
 
 #include "PxPhysics.h"
 #include "PxScene.h"
@@ -41,7 +42,6 @@ using physx::PxMaterial;
 namespace crown
 {
 
-struct PhysicsResource;
 struct Actor;
 
 ///

+ 1 - 2
engine/physics/physics_world.h

@@ -34,6 +34,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "physics_types.h"
 #include "math_types.h"
 #include "world_types.h"
+#include "resource_types.h"
 #include "PxScene.h"
 #include "PxCooking.h"
 #include "PxDefaultCpuDispatcher.h"
@@ -57,8 +58,6 @@ namespace crown
 
 struct SceneGraph;
 class World;
-struct PhysicsResource;
-struct PhysicsConfigResource;
 struct Unit;
 struct DebugLine;
 

+ 1 - 1
engine/renderers/material.h

@@ -27,13 +27,13 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include "math_types.h"
+#include "resource_types.h"
 #include <bgfx.h>
 
 namespace crown
 {
 
 struct MaterialManager;
-struct MaterialResource;
 
 struct Material
 {

+ 1 - 1
engine/renderers/material_manager.h

@@ -30,6 +30,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "container_types.h"
 #include "material.h"
 #include "resource_manager.h"
+#include "resource_types.h"
 #include "id_table.h"
 #include <bgfx.h>
 
@@ -37,7 +38,6 @@ namespace crown
 {
 
 typedef Id MaterialId;
-struct MaterialResource;
 
 struct MaterialManager
 {

+ 0 - 2
engine/resource/resource.h

@@ -33,7 +33,6 @@ namespace crown
 {
 
 /// Hashed values for supported resource types
-#define CONFIG_EXTENSION			"config"
 #define FONT_EXTENSION				"font"
 #define LEVEL_EXTENSION				"level"
 #define LUA_EXTENSION				"lua"
@@ -49,7 +48,6 @@ namespace crown
 #define TEXTURE_EXTENSION			"texture"
 #define UNIT_EXTENSION				"unit"
 
-#define CONFIG_TYPE					uint64_t(0x82645835e6b73232)
 #define FONT_TYPE					uint64_t(0x9efe0a916aae7880)
 #define LEVEL_TYPE					uint64_t(0x2a690fd348fe9ac5)
 #define LUA_TYPE					uint64_t(0xa14e8dfa2cd117e2)

+ 12 - 1
engine/resource/resource_types.h

@@ -27,8 +27,19 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 	class ResourceManager;
+	struct ResourcePackage;
 
+	struct FontResource;
 	struct LevelResource;
-	struct UnitResource;
+	struct LuaResource;
+	struct MaterialResource;
+	struct MeshResource;
+	struct PackageResource;
+	struct PhysicsConfigResource;
+	struct PhysicsResource;
 	struct SoundResource;
+	struct SpriteAnimationResource;
+	struct SpriteResource;
+	struct TextureResource;
+	struct UnitResource;
 } // namespace crown