Sfoglia il codice sorgente

Master merged in rendering-2

mikymod 12 anni fa
parent
commit
68d5aa67be
100 ha cambiato i file con 403 aggiunte e 290 eliminazioni
  1. 1 0
      COPYING.txt
  2. 2 1
      game/Game.h
  3. 1 1
      samples/terrain/CMakeLists.txt
  4. 11 10
      samples/terrain/Terrain.cpp
  5. 4 0
      samples/terrain/Terrain.h
  6. 4 3
      samples/terrain/terrain_main.cpp
  7. 13 9
      src/ArchiveBundle.cpp
  8. 10 6
      src/ArchiveBundle.h
  9. 4 3
      src/Bundle.h
  10. 9 5
      src/CMakeLists.txt
  11. 1 0
      src/Camera.cpp
  12. 9 8
      src/Camera.h
  13. 3 3
      src/Config.h.in
  14. 4 3
      src/Crown.h
  15. 20 17
      src/Device.cpp
  16. 6 3
      src/Device.h
  17. 1 0
      src/FPSSystem.cpp
  18. 1 0
      src/FPSSystem.h
  19. 6 5
      src/FileBundle.cpp
  20. 7 6
      src/FileBundle.h
  21. 3 2
      src/FontResource.cpp
  22. 3 2
      src/FontResource.h
  23. 1 0
      src/Glyph.h
  24. 3 2
      src/MaterialResource.cpp
  25. 3 2
      src/MaterialResource.h
  26. 4 4
      src/PixelShaderResource.cpp
  27. 4 3
      src/PixelShaderResource.h
  28. 1 0
      src/Resource.h
  29. 9 9
      src/ResourceManager.cpp
  30. 16 15
      src/ResourceManager.h
  31. 1 0
      src/Skybox.cpp
  32. 1 0
      src/Skybox.h
  33. 4 4
      src/TextResource.cpp
  34. 2 2
      src/TextResource.h
  35. 4 4
      src/TextureResource.cpp
  36. 3 2
      src/TextureResource.h
  37. 4 4
      src/VertexShaderResource.cpp
  38. 2 2
      src/VertexShaderResource.h
  39. 1 0
      src/core/Args.cpp
  40. 4 3
      src/core/Args.h
  41. 1 0
      src/core/Assert.h
  42. 1 0
      src/core/Log.cpp
  43. 1 0
      src/core/Log.h
  44. 1 0
      src/core/Types.h
  45. 7 6
      src/core/bv/Box.h
  46. 1 0
      src/core/bv/Circle.cpp
  47. 2 1
      src/core/bv/Circle.h
  48. 1 0
      src/core/bv/Frustum.cpp
  49. 3 2
      src/core/bv/Frustum.h
  50. 1 0
      src/core/bv/Rect.cpp
  51. 6 5
      src/core/bv/Rect.h
  52. 5 4
      src/core/bv/Sphere.h
  53. 5 4
      src/core/compressors/Compressor.h
  54. 1 0
      src/core/compressors/ZipCompressor.cpp
  55. 3 2
      src/core/compressors/ZipCompressor.h
  56. 1 0
      src/core/containers/Dictionary.h
  57. 1 0
      src/core/containers/Generic.cpp
  58. 1 0
      src/core/containers/Generic.h
  59. 4 3
      src/core/containers/IdTable.h
  60. 7 5
      src/core/containers/List.h
  61. 6 5
      src/core/containers/Queue.h
  62. 1 0
      src/core/containers/RBTree.h
  63. 1 0
      src/core/filesystem/BinaryReader.cpp
  64. 1 0
      src/core/filesystem/BinaryReader.h
  65. 1 0
      src/core/filesystem/BinaryWriter.cpp
  66. 1 0
      src/core/filesystem/BinaryWriter.h
  67. 5 3
      src/core/filesystem/DiskFile.cpp
  68. 16 15
      src/core/filesystem/DiskFile.h
  69. 1 0
      src/core/filesystem/File.cpp
  70. 2 1
      src/core/filesystem/File.h
  71. 4 2
      src/core/filesystem/Filesystem.cpp
  72. 17 13
      src/core/filesystem/Filesystem.h
  73. 1 0
      src/core/filesystem/MemoryFile.cpp
  74. 17 16
      src/core/filesystem/MemoryFile.h
  75. 17 16
      src/core/filesystem/NullFile.h
  76. 1 0
      src/core/filesystem/TextReader.cpp
  77. 1 0
      src/core/filesystem/TextReader.h
  78. 1 0
      src/core/filesystem/TextWriter.cpp
  79. 1 0
      src/core/filesystem/TextWriter.h
  80. 1 0
      src/core/math/Color4.cpp
  81. 1 0
      src/core/math/Color4.h
  82. 4 3
      src/core/math/Interpolation.h
  83. 1 0
      src/core/math/Intersection.h
  84. 1 0
      src/core/math/Mat3.cpp
  85. 7 6
      src/core/math/Mat3.h
  86. 1 0
      src/core/math/Mat4.cpp
  87. 7 6
      src/core/math/Mat4.h
  88. 1 0
      src/core/math/MathUtils.cpp
  89. 23 22
      src/core/math/MathUtils.h
  90. 1 0
      src/core/math/Plane.cpp
  91. 3 2
      src/core/math/Plane.h
  92. 1 0
      src/core/math/Point2.cpp
  93. 1 0
      src/core/math/Point2.h
  94. 1 0
      src/core/math/Quat.cpp
  95. 2 1
      src/core/math/Quat.h
  96. 2 1
      src/core/math/Random.h
  97. 2 1
      src/core/math/Ray.h
  98. 1 0
      src/core/math/Shape.cpp
  99. 1 0
      src/core/math/Shape.h
  100. 3 2
      src/core/math/Triangle.h

+ 1 - 0
COPYING.txt

@@ -1,3 +1,4 @@
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 2 - 1
game/Game.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -42,7 +43,7 @@ extern "C"
 	void shutdown();
 	void shutdown();
 
 
 	/// Called once per frame, here is the place you tipically perform input checking,
 	/// Called once per frame, here is the place you tipically perform input checking,
-	/// updates, drawing and so on. The @dt parameter contains the last frame delta time
+	/// updates, drawing and so on. The @a dt parameter contains the last frame delta time
 	/// in seconds. 
 	/// in seconds. 
 	void frame(float dt);
 	void frame(float dt);
 }
 }

+ 1 - 1
samples/terrain/CMakeLists.txt

@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8)
 project(sample-terrain)
 project(sample-terrain)
 
 
 set (SRC
 set (SRC
-	terrain.cpp
+	terrain_main.cpp
 	Terrain.cpp
 	Terrain.cpp
 )
 )
 
 

+ 11 - 10
samples/terrain/Terrain.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -50,13 +51,13 @@ Terrain::~Terrain()
 {
 {
 	if (mHeights != NULL)
 	if (mHeights != NULL)
 	{
 	{
-		delete[] mHeights;
+		m_allocator.deallocate(mHeights);
 	}
 	}
 
 
-	delete[] mVertices;
-	delete[] mNormals;
-	delete[] mTexCoords;
-	delete[] mIndices;
+	m_allocator.deallocate(mVertices);
+	m_allocator.deallocate(mNormals);
+	m_allocator.deallocate(mTexCoords);
+	m_allocator.deallocate(mIndices);
 }
 }
 
 
 void Terrain::CreateTerrain(uint32_t xSize, uint32_t zSize, uint32_t tilePerMeter, float initialHeight)
 void Terrain::CreateTerrain(uint32_t xSize, uint32_t zSize, uint32_t tilePerMeter, float initialHeight)
@@ -76,7 +77,7 @@ void Terrain::CreateTerrain(uint32_t xSize, uint32_t zSize, uint32_t tilePerMete
 
 
 	uint32_t heightsCount = mVerticesInSizeX * mVerticesInSizeZ;
 	uint32_t heightsCount = mVerticesInSizeX * mVerticesInSizeZ;
 
 
-	mHeights = new float[heightsCount];
+	mHeights = (float*)m_allocator.allocate(heightsCount * sizeof(float));
 
 
 	// Init heights
 	// Init heights
 	for (uint32_t i = 0; i < heightsCount; i++)
 	for (uint32_t i = 0; i < heightsCount; i++)
@@ -85,13 +86,13 @@ void Terrain::CreateTerrain(uint32_t xSize, uint32_t zSize, uint32_t tilePerMete
 	}
 	}
 
 
 	// Construct drawing data
 	// Construct drawing data
-	mVertices = new Vec3[heightsCount];			// There are as many vertices as heights
+	mVertices = (Vec3*)m_allocator.allocate(heightsCount * sizeof(Vec3));		// There are as many vertices as heights
 	mVertexCount = heightsCount;
 	mVertexCount = heightsCount;
-	mNormals = new Vec3[heightsCount];			// Same as vertices
+	mNormals = (Vec3*)m_allocator.allocate(heightsCount * sizeof(Vec3));		// Same as vertices
 	mNormalCount = heightsCount;
 	mNormalCount = heightsCount;
-	mTexCoords = new Vec2[heightsCount];		// Same as vertices
+	mTexCoords = (Vec2*)m_allocator.allocate(heightsCount * sizeof(Vec2));				// Same as vertices
 	mTexCoordCount = heightsCount;
 	mTexCoordCount = heightsCount;
-	mIndices = new uint16_t[mTilesInSizeX * mTilesInSizeZ * 6];	//
+	mIndices = (uint16_t*)m_allocator.allocate(mTilesInSizeX * mTilesInSizeZ * 6 * sizeof(uint16_t));	//
 	mIndexCount = mTilesInSizeX * mTilesInSizeZ * 6;
 	mIndexCount = mTilesInSizeX * mTilesInSizeZ * 6;
 
 
 	// Populate vertex list (generate a grid lying on the xz-plane and facing upwards)
 	// Populate vertex list (generate a grid lying on the xz-plane and facing upwards)

+ 4 - 0
samples/terrain/Terrain.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -30,6 +31,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Intersection.h"
 #include "Intersection.h"
 #include "Ray.h"
 #include "Ray.h"
 #include "Renderer.h"
 #include "Renderer.h"
+#include "MallocAllocator.h"
 
 
 #define MAX_BRUSH_SIZE 256
 #define MAX_BRUSH_SIZE 256
 
 
@@ -72,6 +74,8 @@ public:
 
 
 private:
 private:
 
 
+	MallocAllocator	m_allocator;
+
 	uint32_t		mSizeX;				// X in meters
 	uint32_t		mSizeX;				// X in meters
 	uint32_t		mSizeZ;				// Z in meters
 	uint32_t		mSizeZ;				// Z in meters
 	float			mOffsetX;
 	float			mOffsetX;

+ 4 - 3
samples/terrain/terrain.cpp → samples/terrain/terrain_main.cpp

@@ -83,10 +83,10 @@ public:
 		Vec3 start = Vec3(0.0f, 10.0f, 0.0f);
 		Vec3 start = Vec3(0.0f, 10.0f, 0.0f);
 
 
 		// Add a movable camera
 		// Add a movable camera
-		cam = new Camera(start, 90.0f, 1.6f);
-		system = new FPSSystem(cam, 10.0f, 2.5f);
+		cam = CE_NEW(m_allocator, Camera)(start, 90.0f, 1.6f);
+		system = CE_NEW(m_allocator, FPSSystem)(cam, 10.0f, 2.5f);
 		// Add a skybox
 		// Add a skybox
-		skybox = new Skybox(Vec3::ZERO, true);
+		skybox = CE_NEW(m_allocator, Skybox)(Vec3::ZERO, true);
 
 
 		terrain.CreateTerrain(64, 64, 1, 0.0f);
 		terrain.CreateTerrain(64, 64, 1, 0.0f);
 		terrain.PlotCircle(4, 4, 4, 2);
 		terrain.PlotCircle(4, 4, 4, 2);
@@ -175,6 +175,7 @@ public:
 
 
 private:
 private:
 
 
+	MallocAllocator m_allocator;
 	FPSSystem* system;
 	FPSSystem* system;
 	Camera* cam;
 	Camera* cam;
 	Skybox* skybox;
 	Skybox* skybox;

+ 13 - 9
src/ArchiveResourceArchive.cpp → src/ArchiveBundle.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -23,17 +24,18 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 OTHER DEALINGS IN THE SOFTWARE.
 */
 */
 
 
-#include "ArchiveResourceArchive.h"
+#include "ArchiveBundle.h"
 #include "Filesystem.h"
 #include "Filesystem.h"
 #include "Resource.h"
 #include "Resource.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
 #include "Log.h"
 #include "Log.h"
+#include "Memory.h"
 
 
 namespace crown
 namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-ArchiveResourceArchive::ArchiveResourceArchive(Filesystem& fs) :
+ArchiveBundle::ArchiveBundle(Filesystem& fs) :
 	m_filesystem(fs),
 	m_filesystem(fs),
 	m_archive_file(NULL),
 	m_archive_file(NULL),
 	m_entries_count(0),
 	m_entries_count(0),
@@ -51,24 +53,26 @@ ArchiveResourceArchive::ArchiveResourceArchive(Filesystem& fs) :
 	Log::d("Entries: %d", header.entries_count);
 	Log::d("Entries: %d", header.entries_count);
 	Log::d("Checksum: %d", header.checksum);
 	Log::d("Checksum: %d", header.checksum);
 	
 	
-	m_entries = new ArchiveEntry[header.entries_count];
+	// No need to initialize memory
+	m_entries = (ArchiveEntry*)m_allocator.allocate(header.entries_count * sizeof(ArchiveEntry));
+
 	m_entries_count = header.entries_count;
 	m_entries_count = header.entries_count;
-	
+
 	// Read the entries
 	// Read the entries
 	m_archive_file->read(m_entries, m_entries_count * sizeof(ArchiveEntry));
 	m_archive_file->read(m_entries, m_entries_count * sizeof(ArchiveEntry));
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-ArchiveResourceArchive::~ArchiveResourceArchive()
+ArchiveBundle::~ArchiveBundle()
 {
 {
 	if (m_archive_file != NULL)
 	if (m_archive_file != NULL)
 	{
 	{
-			m_filesystem.close(m_archive_file);
+		m_filesystem.close(m_archive_file);
 	}
 	}
 	
 	
 	if (m_entries != NULL)
 	if (m_entries != NULL)
 	{
 	{
-		delete[] m_entries;
+		m_allocator.deallocate(m_entries);
 	}
 	}
 	
 	
 	m_entries = NULL;
 	m_entries = NULL;
@@ -76,7 +80,7 @@ ArchiveResourceArchive::~ArchiveResourceArchive()
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-DiskFile* ArchiveResourceArchive::open(ResourceId name)
+DiskFile* ArchiveBundle::open(ResourceId name)
 {
 {
 	// Search the resource in the archive
 	// Search the resource in the archive
 	for (uint32_t i = 0; i < m_entries_count; i++)
 	for (uint32_t i = 0; i < m_entries_count; i++)
@@ -94,7 +98,7 @@ DiskFile* ArchiveResourceArchive::open(ResourceId name)
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void ArchiveResourceArchive::close(DiskFile* resource)
+void ArchiveBundle::close(DiskFile* resource)
 {
 {
 	// Does nothing, the stream is automatically closed at exit.
 	// Does nothing, the stream is automatically closed at exit.
 	(void)resource;
 	(void)resource;

+ 10 - 6
src/ArchiveResourceArchive.h → src/ArchiveBundle.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -26,7 +27,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 #pragma once
 
 
 #include "Types.h"
 #include "Types.h"
-#include "ResourceArchive.h"
+#include "Bundle.h"
+#include "MallocAllocator.h"
 
 
 namespace crown
 namespace crown
 {
 {
@@ -54,21 +56,23 @@ class DiskFile;
 /// recent version of the engine with older game archives.
 /// recent version of the engine with older game archives.
 
 
 /// Source of resources
 /// Source of resources
-class ArchiveResourceArchive : public ResourceArchive
+class ArchiveBundle : public Bundle
 {
 {
 public:
 public:
 
 
-					ArchiveResourceArchive(Filesystem& fs);
-					~ArchiveResourceArchive();
+					ArchiveBundle(Filesystem& fs);
+					~ArchiveBundle();
 
 
-	/// @copydoc ResourceArchive::open()
+	/// @a copydoc Bundle::open()
 	DiskFile*		open(ResourceId name);
 	DiskFile*		open(ResourceId name);
 
 
-	/// @copydoc ResourceArchive::close()
+	/// @a copydoc Bundle::close()
 	void			close(DiskFile* resource);
 	void			close(DiskFile* resource);
 
 
 private:
 private:
 
 
+	MallocAllocator	m_allocator;
+
 	Filesystem&		m_filesystem;
 	Filesystem&		m_filesystem;
 
 
 	DiskFile*		m_archive_file;
 	DiskFile*		m_archive_file;

+ 4 - 3
src/ResourceArchive.h → src/Bundle.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -51,13 +52,13 @@ struct ArchiveEntry
 class Filesystem;
 class Filesystem;
 class DiskFile;
 class DiskFile;
 
 
-class ResourceArchive
+class Bundle
 {
 {
 public:
 public:
 
 
-	virtual					~ResourceArchive() {}
+	virtual					~Bundle() {}
 
 
-	/// Opens the resource file containing @name resource
+	/// Opens the resource file containing @a name resource
 	/// and returns a stream from which read the data from.
 	/// and returns a stream from which read the data from.
 	/// @note
 	/// @note
 	/// The resource stream points exactly at the start
 	/// The resource stream points exactly at the start

+ 9 - 5
src/CMakeLists.txt

@@ -10,8 +10,8 @@ set (SRC
 	FontResource.cpp
 	FontResource.cpp
 	VertexShaderResource.cpp
 	VertexShaderResource.cpp
 	PixelShaderResource.cpp
 	PixelShaderResource.cpp
-	ArchiveResourceArchive.cpp
-	FileResourceArchive.cpp
+	ArchiveBundle.cpp
+	FileBundle.cpp
 
 
 	FPSSystem.cpp
 	FPSSystem.cpp
 	JSONParser.cpp
 	JSONParser.cpp
@@ -26,7 +26,7 @@ set (HEADERS
 	MaterialResource.h
 	MaterialResource.h
 	Resource.h
 	Resource.h
 	ResourceManager.h
 	ResourceManager.h
-	ResourceArchive.h
+	Bundle.h
 	Skybox.h
 	Skybox.h
 
 
 	TextureResource.h
 	TextureResource.h
@@ -34,8 +34,8 @@ set (HEADERS
 	FontResource.h
 	FontResource.h
 	VertexShaderResource.h
 	VertexShaderResource.h
 	PixelShaderResource.h
 	PixelShaderResource.h
-	ArchiveResourceArchive.h
-	FileResourceArchive.h
+	ArchiveBundle.h
+	FileBundle.h
 
 
 	FPSSystem.h
 	FPSSystem.h
 	JSONParser.h
 	JSONParser.h
@@ -150,6 +150,8 @@ set (STRINGS_HEADERS
 )
 )
 
 
 set (MEM_SRC
 set (MEM_SRC
+	core/mem/Memory.cpp
+	core/mem/Allocator.cpp
 	core/mem/MallocAllocator.cpp
 	core/mem/MallocAllocator.cpp
 	core/mem/ProxyAllocator.cpp
 	core/mem/ProxyAllocator.cpp
 )
 )
@@ -173,11 +175,13 @@ set (COMPRESSORS_HEADERS
 set (SETTINGS_SRC
 set (SETTINGS_SRC
 	core/settings/IntSetting.cpp
 	core/settings/IntSetting.cpp
 	core/settings/FloatSetting.cpp
 	core/settings/FloatSetting.cpp
+	core/settings/StringSetting.cpp
 )
 )
 
 
 set (SETTINGS_HEADERS
 set (SETTINGS_HEADERS
 	core/settings/IntSetting.h
 	core/settings/IntSetting.h
 	core/settings/FloatSetting.h
 	core/settings/FloatSetting.h
+	core/settings/StringSetting.h
 )
 )
 
 
 set (INPUT_SRC
 set (INPUT_SRC

+ 1 - 0
src/Camera.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 9 - 8
src/Camera.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -39,14 +40,14 @@ class Camera
 {
 {
 public:
 public:
 
 
-	/// Construct the camera placed at the given world-space @position
-	/// with the given @fov field of view and @aspect ratio.
+	/// Construct the camera placed at the given world-space @a position
+	/// with the given @a fov field of view and @a aspect ratio.
 					Camera(const Vec3& position, float fov, float aspect);
 					Camera(const Vec3& position, float fov, float aspect);
 
 
 	/// Returns the world-space position of the camera 
 	/// Returns the world-space position of the camera 
 	const Vec3&		position() const;
 	const Vec3&		position() const;
 
 
-	/// Sets the world-space @position of the camera
+	/// Sets the world-space @a position of the camera
 	void			set_position(const Vec3& position);
 	void			set_position(const Vec3& position);
 
 
 	/// Returns the lookat-point of the camera
 	/// Returns the lookat-point of the camera
@@ -55,7 +56,7 @@ public:
 	/// Sets the lookat-point of the camera
 	/// Sets the lookat-point of the camera
 	void			set_look_at(const Vec3& lookat);
 	void			set_look_at(const Vec3& lookat);
 
 
-	/// Sets the rotation of the camera about the world's @x axis and @y axis
+	/// Sets the rotation of the camera about the world's @a x axis and @a y axis
 	void			set_rotation(const float x, const float y);
 	void			set_rotation(const float x, const float y);
 
 
 	/// Returns the up-vector of the camera
 	/// Returns the up-vector of the camera
@@ -94,16 +95,16 @@ public:
 	/// Returns the renderer-independent view matrix used by the camera
 	/// Returns the renderer-independent view matrix used by the camera
 	const Mat4&		view_matrix() const;
 	const Mat4&		view_matrix() const;
 
 
-	/// Moves the camera towards look direction by @meters meters
+	/// Moves the camera towards look direction by @a meters meters
 	void			move_forward(float meters);
 	void			move_forward(float meters);
 
 
-	/// Moves the camera towards the opposite look direction by @meters meters
+	/// Moves the camera towards the opposite look direction by @a meters meters
 	void			move_backward(float meters);
 	void			move_backward(float meters);
 
 
-	/// Moves the camera along the axis perpendicular to the look direction by @meters meters
+	/// Moves the camera along the axis perpendicular to the look direction by @a meters meters
 	void			strafe_left(float meters);
 	void			strafe_left(float meters);
 
 
-	/// Moves the camera along the axis perpendicular to the look direction by @meters meters
+	/// Moves the camera along the axis perpendicular to the look direction by @a meters meters
 	void			strafe_right(float meters);
 	void			strafe_right(float meters);
 
 
 protected:
 protected:

+ 3 - 3
src/Config.h.in

@@ -24,9 +24,9 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 OTHER DEALINGS IN THE SOFTWARE.
 */
 */
 
 
-#define CROWN_VERSION_MAJOR @CROWN_VERSION_MAJOR@
-#define CROWN_VERSION_MINOR @CROWN_VERSION_MINOR@
-#define CROWN_VERSION_MICRO @CROWN_VERSION_MICRO@
+#define CROWN_VERSION_MAJOR @CROWN_VERSION_MAJOR@ 
+#define CROWN_VERSION_MINOR @CROWN_VERSION_MINOR@ 
+#define CROWN_VERSION_MICRO @CROWN_VERSION_MICRO@ 
 
 
 #cmakedefine LINUX
 #cmakedefine LINUX
 #cmakedefine WINDOWS
 #cmakedefine WINDOWS

+ 4 - 3
src/Crown.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -99,9 +100,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Camera.h"
 #include "Camera.h"
 #include "Device.h"
 #include "Device.h"
 #include "Glyph.h"
 #include "Glyph.h"
-#include "ResourceArchive.h"
-#include "ArchiveResourceArchive.h"
-#include "FileResourceArchive.h"
+#include "Bundle.h"
+#include "ArchiveBundle.h"
+#include "FileBundle.h"
 #include "ResourceManager.h"
 #include "ResourceManager.h"
 #include "Skybox.h"
 #include "Skybox.h"
 
 

+ 20 - 17
src/Device.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -37,8 +38,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "String.h"
 #include "String.h"
 #include "Args.h"
 #include "Args.h"
 #include "Game.h"
 #include "Game.h"
-#include "ArchiveResourceArchive.h"
-#include "FileResourceArchive.h"
+#include <cstdlib>
+#include "ArchiveBundle.h"
+#include "FileBundle.h"
 #include "ResourceManager.h"
 #include "ResourceManager.h"
 #include "TextureResource.h"
 #include "TextureResource.h"
 #include "Keyboard.h"
 #include "Keyboard.h"
@@ -46,6 +48,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Touch.h"
 #include "Touch.h"
 #include "Accelerometer.h"
 #include "Accelerometer.h"
 #include "OsWindow.h"
 #include "OsWindow.h"
+#include "Memory.h"
 
 
 namespace crown
 namespace crown
 {
 {
@@ -76,7 +79,7 @@ Device::Device() :
 	m_debug_renderer(NULL),
 	m_debug_renderer(NULL),
 
 
 	m_resource_manager(NULL),
 	m_resource_manager(NULL),
-	m_resource_archive(NULL),
+	m_resource_bundle(NULL),
 
 
 	m_game_library(NULL)
 	m_game_library(NULL)
 {
 {
@@ -172,13 +175,13 @@ void Device::shutdown()
 
 
 	if (m_input_manager)
 	if (m_input_manager)
 	{
 	{
-		delete m_input_manager;
+		CE_DELETE(m_allocator, m_input_manager);
 	}
 	}
 
 
 	Log::i("Releasing DebugRenderer...");
 	Log::i("Releasing DebugRenderer...");
 	if (m_debug_renderer)
 	if (m_debug_renderer)
 	{
 	{
-		delete m_debug_renderer;
+		CE_DELETE(m_allocator, m_debug_renderer);
 	}
 	}
 
 
 	Log::i("Releasing Renderer...");
 	Log::i("Releasing Renderer...");
@@ -192,24 +195,24 @@ void Device::shutdown()
 	Log::i("Releasing Window...");
 	Log::i("Releasing Window...");
 	if (m_window)
 	if (m_window)
 	{
 	{
-		delete m_window;
+		CE_DELETE(m_allocator, m_window);
 	}
 	}
 
 
 	Log::i("Releasing ResourceManager...");
 	Log::i("Releasing ResourceManager...");
-	if (m_resource_archive)
+	if (m_resource_bundle)
 	{
 	{
-		delete m_resource_archive;
+		CE_DELETE(m_allocator, m_resource_bundle);
 	}
 	}
 
 
 	if (m_resource_manager)
 	if (m_resource_manager)
 	{
 	{
-		delete m_resource_manager;
+		CE_DELETE(m_allocator, m_resource_manager);
 	}
 	}
 
 
 	Log::i("Releasing Filesystem...");
 	Log::i("Releasing Filesystem...");
 	if (m_filesystem)
 	if (m_filesystem)
 	{
 	{
-		delete m_filesystem;
+		CE_DELETE(m_allocator, m_filesystem);
 	}
 	}
 
 
 	m_is_init = false;
 	m_is_init = false;
@@ -379,7 +382,7 @@ const void* Device::data(ResourceId name)
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void Device::create_filesystem()
 void Device::create_filesystem()
 {
 {
-	m_filesystem = new Filesystem(m_preferred_root_path);
+	m_filesystem = CE_NEW(m_allocator, Filesystem)(m_preferred_root_path);
 
 
 	Log::d("Filesystem created.");
 	Log::d("Filesystem created.");
 	Log::d("Filesystem root path: %s", m_filesystem->root_path());
 	Log::d("Filesystem root path: %s", m_filesystem->root_path());
@@ -391,15 +394,15 @@ void Device::create_resource_manager()
 	// Select appropriate resource archive
 	// Select appropriate resource archive
 	if (m_preferred_mode == MODE_DEVELOPMENT)
 	if (m_preferred_mode == MODE_DEVELOPMENT)
 	{
 	{
-		m_resource_archive = new FileResourceArchive(*m_filesystem);
+		m_resource_bundle = CE_NEW(m_allocator, FileBundle)(*m_filesystem);
 	}
 	}
 	else
 	else
 	{
 	{
-		m_resource_archive = new ArchiveResourceArchive(*m_filesystem);
+		m_resource_bundle = CE_NEW(m_allocator, ArchiveBundle)(*m_filesystem);
 	}
 	}
 
 
 	// Create resource manager
 	// Create resource manager
-	m_resource_manager = new ResourceManager(*m_resource_archive, m_resource_allocator);
+	m_resource_manager = CE_NEW(m_allocator, ResourceManager)(*m_resource_bundle);
 
 
 	Log::d("Resource manager created.");
 	Log::d("Resource manager created.");
 	Log::d("Resource seed: %d", m_resource_manager->seed());
 	Log::d("Resource seed: %d", m_resource_manager->seed());
@@ -409,7 +412,7 @@ void Device::create_resource_manager()
 void Device::create_input_manager()
 void Device::create_input_manager()
 {
 {
 	// Create input manager
 	// Create input manager
-	m_input_manager = new InputManager();
+	m_input_manager = CE_NEW(m_allocator, InputManager)();
 
 
 	Log::d("Input manager created.");
 	Log::d("Input manager created.");
 }
 }
@@ -417,7 +420,7 @@ void Device::create_input_manager()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void Device::create_window()
 void Device::create_window()
 {
 {
-	m_window = new OsWindow(m_preferred_window_width, m_preferred_window_height);
+	m_window = CE_NEW(m_allocator, OsWindow)(m_preferred_window_width, m_preferred_window_height);
 
 
 	CE_ASSERT(m_window != NULL, "Unable to create the window");
 	CE_ASSERT(m_window != NULL, "Unable to create the window");
 
 
@@ -440,7 +443,7 @@ void Device::create_renderer()
 void Device::create_debug_renderer()
 void Device::create_debug_renderer()
 {
 {
 	// Create debug renderer
 	// Create debug renderer
-	m_debug_renderer = new DebugRenderer(*m_renderer);
+	m_debug_renderer = CE_NEW(m_allocator, DebugRenderer)(*m_renderer);
 
 
 	Log::d("Debug renderer created.");
 	Log::d("Debug renderer created.");
 }
 }

+ 6 - 3
src/Device.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -36,8 +37,8 @@ namespace crown
 
 
 class Filesystem;
 class Filesystem;
 class ResourceManager;
 class ResourceManager;
-class ResourceArchive;
 class OsWindow;
 class OsWindow;
+class Bundle;
 class Renderer;
 class Renderer;
 class DebugRenderer;
 class DebugRenderer;
 class InputManager;
 class InputManager;
@@ -125,6 +126,9 @@ private:
 
 
 private:
 private:
 
 
+	// Used to allocate all subsystems
+	MallocAllocator			m_allocator;
+
 	// Preferred settings from command line
 	// Preferred settings from command line
 	int32_t					m_preferred_window_width;
 	int32_t					m_preferred_window_width;
 	int32_t					m_preferred_window_height;
 	int32_t					m_preferred_window_height;
@@ -151,8 +155,7 @@ private:
 
 
 	// Private subsystems
 	// Private subsystems
 	ResourceManager*		m_resource_manager;
 	ResourceManager*		m_resource_manager;
-	ResourceArchive*		m_resource_archive;
-	MallocAllocator			m_resource_allocator;
+	Bundle*					m_resource_bundle;
 
 
 	// The game currently running
 	// The game currently running
 	void*					m_game_library;
 	void*					m_game_library;

+ 1 - 0
src/FPSSystem.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/FPSSystem.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 6 - 5
src/FileResourceArchive.cpp → src/FileBundle.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -24,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 */
 */
 
 
 #include <cstdio>
 #include <cstdio>
-#include "FileResourceArchive.h"
+#include "FileBundle.h"
 #include "Filesystem.h"
 #include "Filesystem.h"
 #include "Resource.h"
 #include "Resource.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
@@ -35,18 +36,18 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-FileResourceArchive::FileResourceArchive(Filesystem& fs) :
+FileBundle::FileBundle(Filesystem& fs) :
 	m_filesystem(fs)
 	m_filesystem(fs)
 {
 {
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-FileResourceArchive::~FileResourceArchive()
+FileBundle::~FileBundle()
 {
 {
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-DiskFile* FileResourceArchive::open(ResourceId name)
+DiskFile* FileBundle::open(ResourceId name)
 {
 {
 	// Convert name/type into strings
 	// Convert name/type into strings
 	char resource_name[512];
 	char resource_name[512];
@@ -68,7 +69,7 @@ DiskFile* FileResourceArchive::open(ResourceId name)
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void FileResourceArchive::close(DiskFile* resource)
+void FileBundle::close(DiskFile* resource)
 {
 {
 	m_filesystem.close(resource);
 	m_filesystem.close(resource);
 }
 }

+ 7 - 6
src/FileResourceArchive.h → src/FileBundle.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -26,7 +27,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 #pragma once
 
 
 #include "Types.h"
 #include "Types.h"
-#include "ResourceArchive.h"
+#include "Bundle.h"
 
 
 namespace crown
 namespace crown
 {
 {
@@ -46,17 +47,17 @@ struct ResourceHeader
 };
 };
 
 
 /// Source of resources
 /// Source of resources
-class FileResourceArchive : public ResourceArchive
+class FileBundle : public Bundle
 {
 {
 public:
 public:
 
 
-					FileResourceArchive(Filesystem& fs);
-					~FileResourceArchive();
+					FileBundle(Filesystem& fs);
+					~FileBundle();
 
 
-	/// @copydoc ResourceArchive::open()
+	/// @a copydoc Bundle::open()
 	DiskFile*		open(ResourceId name);
 	DiskFile*		open(ResourceId name);
 
 
-	/// @copydoc ResourceArchive::close()
+	/// @a copydoc Bundle::close()
 	void			close(DiskFile* resource);
 	void			close(DiskFile* resource);
 
 
 
 

+ 3 - 2
src/FontResource.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -30,10 +31,10 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* FontResource::load(Allocator& allocator, ResourceArchive& archive, ResourceId id)
+void* FontResource::load(Allocator& allocator, Bundle& bundle, ResourceId id)
 {
 {
 	(void)allocator;
 	(void)allocator;
-	(void)archive;
+	(void)bundle;
 	(void)id;
 	(void)id;
 
 
 	return NULL;
 	return NULL;

+ 3 - 2
src/FontResource.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -33,13 +34,13 @@ namespace crown
 {
 {
 
 
 class Allocator;
 class Allocator;
-class ResourceArchive;
+class Bundle;
 
 
 class FontResource
 class FontResource
 {
 {
 public:
 public:
 
 
-	static void*		load(Allocator& allocator, ResourceArchive& archive, ResourceId id);
+	static void*		load(Allocator& allocator, Bundle& bundle, ResourceId id);
 	static void			online(void* resource);
 	static void			online(void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			offline();
 	static void			offline();

+ 1 - 0
src/Glyph.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 3 - 2
src/MaterialResource.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -30,10 +31,10 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* MaterialResource::load(Allocator& allocator, ResourceArchive& archive, ResourceId id)
+void* MaterialResource::load(Allocator& allocator, Bundle& bundle, ResourceId id)
 {
 {
 	(void)allocator;
 	(void)allocator;
-	(void)archive;
+	(void)bundle;
 	(void)id;
 	(void)id;
 	// TODO
 	// TODO
 
 

+ 3 - 2
src/MaterialResource.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -40,7 +41,7 @@ namespace crown
 /// @note The maximum number of usable layers depends on the graphic card/Renderer config.
 /// @note The maximum number of usable layers depends on the graphic card/Renderer config.
 const uint32_t MAX_TEXTURE_LAYERS = 8;
 const uint32_t MAX_TEXTURE_LAYERS = 8;
 
 
-class ResourceArchive;
+class Bundle;
 class Allocator;
 class Allocator;
 
 
 /// A material describes the visual properties of a surface.
 /// A material describes the visual properties of a surface.
@@ -50,7 +51,7 @@ class MaterialResource
 {
 {
 public:
 public:
 
 
-	static void*	load(Allocator& allocator, ResourceArchive& archive, ResourceId id);
+	static void*	load(Allocator& allocator, Bundle& bundle, ResourceId id);
 	static void		online(void* resource);
 	static void		online(void* resource);
 	static void		unload(Allocator& allocator, void* texture);
 	static void		unload(Allocator& allocator, void* texture);
 	static void		offline();
 	static void		offline();

+ 4 - 4
src/PixelShaderResource.cpp

@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 
 #include "PixelShaderResource.h"
 #include "PixelShaderResource.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
-#include "ResourceArchive.h"
+#include "Bundle.h"
 #include "Allocator.h"
 #include "Allocator.h"
 #include "Device.h"
 #include "Device.h"
 #include "Log.h"
 #include "Log.h"
@@ -34,9 +34,9 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* PixelShaderResource::load(Allocator& allocator, ResourceArchive& archive, ResourceId id)
+void* PixelShaderResource::load(Allocator& allocator, Bundle& bundle, ResourceId id)
 {
 {
-	DiskFile* stream = archive.open(id);
+	DiskFile* stream = bundle.open(id);
 
 
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 
 
@@ -50,7 +50,7 @@ void* PixelShaderResource::load(Allocator& allocator, ResourceArchive& archive,
 	
 	
 	resource->m_program_text[resource->m_program_text_length] = '\0';
 	resource->m_program_text[resource->m_program_text_length] = '\0';
 
 
-	archive.close(stream);
+	bundle.close(stream);
 
 
 	return resource;
 	return resource;
 }
 }

+ 4 - 3
src/PixelShaderResource.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -32,15 +33,15 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 namespace crown
 {
 {
 
 
-class ResourceArchive;
+class Bundle;
 class Allocator;
 class Allocator;
 
 
 class PixelShaderResource
 class PixelShaderResource
 {
 {
 public:
 public:
 
 
-	static void*		load(Allocator& allocator, ResourceArchive& archive, ResourceId id);
-	static void			online(void* resource);
+	static void*		load(Allocator& allocator, Bundle& bundle, ResourceId id);
+	static void			online(void* script);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			offline();
 	static void			offline();
 
 

+ 1 - 0
src/Resource.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 9 - 9
src/ResourceManager.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -45,9 +46,8 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-ResourceManager::ResourceManager(ResourceArchive& archive, Allocator& allocator) :
-	m_resource_archive(archive),
-	m_resource_allocator(allocator),
+ResourceManager::ResourceManager(Bundle& bundle) :
+	m_resource_bundle(bundle),
 	m_resources(m_allocator),
 	m_resources(m_allocator),
 	m_loading_queue(m_allocator),
 	m_loading_queue(m_allocator),
 	m_loaded_queue(m_allocator),
 	m_loaded_queue(m_allocator),
@@ -338,30 +338,30 @@ void ResourceManager::background_load()
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* ResourceManager::load_by_type(ResourceId name) const
+void* ResourceManager::load_by_type(ResourceId name)
 {
 {
 	if (name.type == TEXTURE_TYPE)
 	if (name.type == TEXTURE_TYPE)
 	{
 	{
-		return TextureResource::load(m_resource_allocator, m_resource_archive, name);
+		return TextureResource::load(m_resource_allocator, m_resource_bundle, name);
 	}
 	}
 	else if (name.type == TEXT_TYPE)
 	else if (name.type == TEXT_TYPE)
 	{
 	{
-		return TextResource::load(m_resource_allocator, m_resource_archive, name);
+		return TextResource::load(m_resource_allocator, m_resource_bundle, name);
 	}
 	}
 	else if (name.type == VERTEX_SHADER_TYPE)
 	else if (name.type == VERTEX_SHADER_TYPE)
 	{
 	{
-		return VertexShaderResource::load(m_resource_allocator, m_resource_archive, name);
+		return VertexShaderResource::load(m_resource_allocator, m_resource_bundle, name);
 	}
 	}
 	else if (name.type == PIXEL_SHADER_TYPE)
 	else if (name.type == PIXEL_SHADER_TYPE)
 	{
 	{
-		return PixelShaderResource::load(m_resource_allocator, m_resource_archive, name);
+		return PixelShaderResource::load(m_resource_allocator, m_resource_bundle, name);
 	}
 	}
 
 
 	return NULL;
 	return NULL;
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void ResourceManager::unload_by_type(ResourceId name, void* resource) const
+void ResourceManager::unload_by_type(ResourceId name, void* resource)
 {
 {
 	if (name.type == TEXTURE_TYPE)
 	if (name.type == TEXTURE_TYPE)
 	{
 	{

+ 16 - 15
src/ResourceManager.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -63,18 +64,18 @@ struct LoadedResource
 	void*		data;
 	void*		data;
 };
 };
 
 
-class ResourceArchive;
+class Bundle;
 
 
 /// Resource manager.
 /// Resource manager.
 class ResourceManager
 class ResourceManager
 {
 {
 public:
 public:
 
 
-	/// Read resources from @archive and store resource data using @allocator.
-							ResourceManager(ResourceArchive& archive, Allocator& allocator);
+	/// Read resources from @a bundle and store resource data using @a allocator.
+							ResourceManager(Bundle& bundle);
 							~ResourceManager();
 							~ResourceManager();
 
 
-	/// Loads the resource by @name and returns its ResourceId.
+	/// Loads the resource by @a name and returns its ResourceId.
 	/// @note
 	/// @note
 	/// The resource data may be not immediately available,
 	/// The resource data may be not immediately available,
 	/// the resource gets pushed in a queue of load requests and loadead as
 	/// the resource gets pushed in a queue of load requests and loadead as
@@ -83,15 +84,15 @@ public:
 	/// loading process is actually completed.
 	/// loading process is actually completed.
 	ResourceId				load(const char* name);
 	ResourceId				load(const char* name);
 
 
-	/// Unloads the @resource, freeing up all the memory associated by it
+	/// Unloads the @a resource, freeing up all the memory associated by it
 	/// and eventually any global object associated with it.
 	/// and eventually any global object associated with it.
 	/// (Such as texture objects, vertex buffers etc.)
 	/// (Such as texture objects, vertex buffers etc.)
 	void					unload(ResourceId name);
 	void					unload(ResourceId name);
 
 
-	/// Reloads the @resource
+	/// Reloads the @a resource
 	void					reload(ResourceId name);
 	void					reload(ResourceId name);
 
 
-	/// Returns whether the manager has the @name resource into
+	/// Returns whether the manager has the @a name resource into
 	/// its list of resources.
 	/// its list of resources.
 	/// @note
 	/// @note
 	/// Having a resource does not mean that the resource is
 	/// Having a resource does not mean that the resource is
@@ -99,18 +100,18 @@ public:
 	/// obtain the resource availability status.
 	/// obtain the resource availability status.
 	bool					has(ResourceId name) const;
 	bool					has(ResourceId name) const;
 
 
-	/// Returns the data associated with the @name resource.
+	/// Returns the data associated with the @a name resource.
 	/// The resource data contains resource-specific metadata
 	/// The resource data contains resource-specific metadata
 	/// and the actual resource data. In order to correctly use
 	/// and the actual resource data. In order to correctly use
-	/// it, you have to know which type of data @name refers to
+	/// it, you have to know which type of data @a name refers to
 	/// and cast accordingly.
 	/// and cast accordingly.
 	const void*				data(ResourceId name) const;
 	const void*				data(ResourceId name) const;
 	
 	
-	/// Returns whether the @name resource is loaded (i.e. whether
+	/// Returns whether the @a name resource is loaded (i.e. whether
 	/// you can use the data associated with it).
 	/// you can use the data associated with it).
 	bool					is_loaded(ResourceId name) const;
 	bool					is_loaded(ResourceId name) const;
 
 
-	/// Returns the number of references to the @resource
+	/// Returns the number of references to the @a resource
 	uint32_t				references(ResourceId name) const;
 	uint32_t				references(ResourceId name) const;
 
 
 	/// Returns the number of resources still waiting to load.
 	/// Returns the number of resources still waiting to load.
@@ -136,8 +137,8 @@ private:
 
 
 	void					background_load();
 	void					background_load();
 
 
-	void*					load_by_type(ResourceId name) const;
-	void					unload_by_type(ResourceId name, void* resource) const;
+	void*					load_by_type(ResourceId name);
+	void					unload_by_type(ResourceId name, void* resource);
 	void					online(ResourceId name, void* resource);
 	void					online(ResourceId name, void* resource);
 
 
 private:
 private:
@@ -147,9 +148,9 @@ private:
 private:
 private:
 
 
 	// Archive whether to look for resources
 	// Archive whether to look for resources
-	ResourceArchive&		m_resource_archive;
+	Bundle&					m_resource_bundle;
 	// Used to strore resource memory
 	// Used to strore resource memory
-	Allocator&				m_resource_allocator;
+	MallocAllocator			m_resource_allocator;
 
 
 	MallocAllocator			m_allocator;
 	MallocAllocator			m_allocator;
 	// The master lookup table
 	// The master lookup table

+ 1 - 0
src/Skybox.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/Skybox.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 4 - 4
src/TextResource.cpp

@@ -1,6 +1,6 @@
 #include "TextResource.h"
 #include "TextResource.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
-#include "ResourceArchive.h"
+#include "Bundle.h"
 #include "Log.h"
 #include "Log.h"
 #include "Allocator.h"
 #include "Allocator.h"
 
 
@@ -8,9 +8,9 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* TextResource::load(Allocator& allocator, ResourceArchive& archive, ResourceId id)
+void* TextResource::load(Allocator& allocator, Bundle& bundle, ResourceId id)
 {
 {
-	DiskFile* stream = archive.open(id);
+	DiskFile* stream = bundle.open(id);
 
 
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 
 
@@ -24,7 +24,7 @@ void* TextResource::load(Allocator& allocator, ResourceArchive& archive, Resourc
 	
 	
 	resource->data[resource->length] = '\0';
 	resource->data[resource->length] = '\0';
 
 
-	archive.close(stream);
+	bundle.close(stream);
 
 
 	return resource;
 	return resource;
 }
 }

+ 2 - 2
src/TextResource.h

@@ -6,14 +6,14 @@
 namespace crown
 namespace crown
 {
 {
 
 
-class ResourceArchive;
+class Bundle;
 class Allocator;
 class Allocator;
 
 
 class TextResource
 class TextResource
 {
 {
 public:
 public:
 
 
-	static void*		load(Allocator& allocator, ResourceArchive& archive, ResourceId id);
+	static void*		load(Allocator& allocator, Bundle& bundle, ResourceId id);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			online(void* resource);
 	static void			online(void* resource);
 	static void			offline();
 	static void			offline();

+ 4 - 4
src/TextureResource.cpp

@@ -1,5 +1,5 @@
 #include "TextureResource.h"
 #include "TextureResource.h"
-#include "ResourceArchive.h"
+#include "Bundle.h"
 #include "Log.h"
 #include "Log.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
 #include "Assert.h"
 #include "Assert.h"
@@ -11,9 +11,9 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* TextureResource::load(Allocator& allocator, ResourceArchive& archive, ResourceId id)
+void* TextureResource::load(Allocator& allocator, Bundle& bundle, ResourceId id)
 {
 {
-	DiskFile* stream = archive.open(id);
+	DiskFile* stream = bundle.open(id);
 
 
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 
 
@@ -29,7 +29,7 @@ void* TextureResource::load(Allocator& allocator, ResourceArchive& archive, Reso
 
 
 	stream->read(resource->m_data, size);
 	stream->read(resource->m_data, size);
 
 
-	archive.close(stream);
+	bundle.close(stream);
 
 
 	return resource;
 	return resource;
 }
 }

+ 3 - 2
src/TextureResource.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -33,14 +34,14 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 namespace crown
 {
 {
 
 
-class ResourceArchive;
+class Bundle;
 class Allocator;
 class Allocator;
 
 
 class TextureResource
 class TextureResource
 {
 {
 public:
 public:
 
 
-	static void*		load(Allocator& allocator, ResourceArchive& archive, ResourceId id);
+	static void*		load(Allocator& allocator, Bundle& bundle, ResourceId id);
 	static void			online(void* resource);
 	static void			online(void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			offline();
 	static void			offline();

+ 4 - 4
src/VertexShaderResource.cpp

@@ -25,7 +25,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 
 #include "VertexShaderResource.h"
 #include "VertexShaderResource.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
-#include "ResourceArchive.h"
+#include "Bundle.h"
 #include "Allocator.h"
 #include "Allocator.h"
 #include "Device.h"
 #include "Device.h"
 #include "Log.h"
 #include "Log.h"
@@ -34,9 +34,9 @@ namespace crown
 {
 {
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-void* VertexShaderResource::load(Allocator& allocator, ResourceArchive& archive, ResourceId id)
+void* VertexShaderResource::load(Allocator& allocator, Bundle& bundle, ResourceId id)
 {
 {
-	DiskFile* stream = archive.open(id);
+	DiskFile* stream = bundle.open(id);
 
 
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 	CE_ASSERT(stream != NULL, "Resource does not exist: %.8X%.8X", id.name, id.type);
 
 
@@ -50,7 +50,7 @@ void* VertexShaderResource::load(Allocator& allocator, ResourceArchive& archive,
 	
 	
 	resource->m_program_text[resource->m_program_text_length] = '\0';
 	resource->m_program_text[resource->m_program_text_length] = '\0';
 
 
-	archive.close(stream);
+	bundle.close(stream);
 
 
 	return resource;
 	return resource;
 }
 }

+ 2 - 2
src/VertexShaderResource.h

@@ -32,14 +32,14 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 namespace crown
 {
 {
 
 
-class ResourceArchive;
+class Bundle;
 class Allocator;
 class Allocator;
 
 
 class VertexShaderResource
 class VertexShaderResource
 {
 {
 public:
 public:
 
 
-	static void*		load(Allocator& allocator, ResourceArchive& archive, ResourceId id);
+	static void*		load(Allocator& allocator, Bundle& bundle, ResourceId id);
 	static void			online(void* resource);
 	static void			online(void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			unload(Allocator& allocator, void* resource);
 	static void			offline();
 	static void			offline();

+ 1 - 0
src/core/Args.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 4 - 3
src/core/Args.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -77,13 +78,13 @@ public:
 	const char*			optarg() const;
 	const char*			optarg() const;
 
 
 
 
-	/// Sets the @index into argv[] from where to start option scanning.
-	/// If @index >= argc nothing will be scanned.
+	/// Sets the @a index into argv[] from where to start option scanning.
+	/// If @a index >= argc nothing will be scanned.
 	void				set_optind(int32_t index);
 	void				set_optind(int32_t index);
 
 
 private:
 private:
 
 
-	// Returns the @option type
+	// Returns the @a option type
 	// Returns AOT_SHORT if option is of the form "-x" where 'x' is the option.
 	// Returns AOT_SHORT if option is of the form "-x" where 'x' is the option.
 	// Returns AOT_LONG if option is of the form "--option" where "option" is the option.
 	// Returns AOT_LONG if option is of the form "--option" where "option" is the option.
 	// Returns AOT_NOT_OPTION in all other cases.
 	// Returns AOT_NOT_OPTION in all other cases.

+ 1 - 0
src/core/Assert.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/Log.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/Log.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/Types.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 7 - 6
src/core/bv/Box.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -44,7 +45,7 @@ public:
 	/// Does nothing for efficiency.
 	/// Does nothing for efficiency.
 					Box();
 					Box();
 
 
-	/// Constructs from @min and @max.
+	/// Constructs from @a min and @a max.
 					Box(const Vec3& min, const Vec3& max);			
 					Box(const Vec3& min, const Vec3& max);			
 					Box(const Box& box);
 					Box(const Box& box);
 
 
@@ -57,19 +58,19 @@ public:
 	real			radius() const;
 	real			radius() const;
 	real			volume() const;
 	real			volume() const;
 
 
-	/// Adds @count @points expanding if necessary.
+	/// Adds @a count @a points expanding if necessary.
 	void			add_points(const Vec3* points, uint32_t count);
 	void			add_points(const Vec3* points, uint32_t count);
 
 
-	/// Adds @count @boxes expanding if necessay.
+	/// Adds @a count @a boxes expanding if necessay.
 	void			add_boxes(const Box* boxes, uint32_t count);
 	void			add_boxes(const Box* boxes, uint32_t count);
 
 
-	/// Returns whether point @p is contained in the box.
+	/// Returns whether point @a p is contained in the box.
 	bool			contains_point(const Vec3& p) const;
 	bool			contains_point(const Vec3& p) const;
 
 
-	/// Returns the @index -th vertex of the box.
+	/// Returns the @a index -th vertex of the box.
 	Vec3			vertex(uint32_t index) const;		
 	Vec3			vertex(uint32_t index) const;		
 
 
-	/// Returns the box trasformed according to @mat matrix into @result.
+	/// Returns the box trasformed according to @a mat matrix into @a result.
 	void			transformed(const Mat4& mat, Box& result) const;	
 	void			transformed(const Mat4& mat, Box& result) const;	
 
 
 	/// Returns the eight vertices of the box.
 	/// Returns the eight vertices of the box.

+ 1 - 0
src/core/bv/Circle.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 2 - 1
src/core/bv/Circle.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -44,7 +45,7 @@ public:
 	/// Does nothing for efficiency.
 	/// Does nothing for efficiency.
 					Circle();
 					Circle();
 					
 					
-	/// Constructs from @center and @radius.
+	/// Constructs from @a center and @a radius.
 					Circle(const Vec2& center, real radius);	
 					Circle(const Vec2& center, real radius);	
 					Circle(const Circle& circle);				
 					Circle(const Circle& circle);				
 
 

+ 1 - 0
src/core/bv/Frustum.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 3 - 2
src/core/bv/Frustum.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -53,13 +54,13 @@ public:
 				Frustum();				
 				Frustum();				
 				Frustum(const Frustum& frustum);
 				Frustum(const Frustum& frustum);
 
 
-	/// Returns whether @point is contained into the frustum.
+	/// Returns whether @a point is contained into the frustum.
 	bool		contains_point(const Vec3& point) const;	
 	bool		contains_point(const Vec3& point) const;	
 
 
 	/// Returns one of the eight frustum's corners.
 	/// Returns one of the eight frustum's corners.
 	Vec3		vertex(uint32_t index) const;			
 	Vec3		vertex(uint32_t index) const;			
 
 
-	/// Builds the view frustum according to the matrix @m.
+	/// Builds the view frustum according to the matrix @a m.
 	void		from_matrix(const Mat4& m);				
 	void		from_matrix(const Mat4& m);				
 
 
 	/// Returns a Box containing the frustum volume.
 	/// Returns a Box containing the frustum volume.

+ 1 - 0
src/core/bv/Rect.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 6 - 5
src/core/bv/Rect.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -43,7 +44,7 @@ public:
 	/// Does nothing for efficiency.
 	/// Does nothing for efficiency.
 					Rect();		
 					Rect();		
 
 
-	/// Constructs from  @min and @max
+	/// Constructs from  @a min and @a max
 					Rect(const Vec2& min, const Vec2& max);		
 					Rect(const Vec2& min, const Vec2& max);		
 					Rect(const Rect& rect);	
 					Rect(const Rect& rect);	
 
 
@@ -59,19 +60,19 @@ public:
 	/// Returns the diagonal of the rect.
 	/// Returns the diagonal of the rect.
 	Vec2			size() const;						
 	Vec2			size() const;						
 
 
-	/// Returns whether @point point is contained into the rect.
+	/// Returns whether @a point point is contained into the rect.
 	bool			contains_point(const Vec2& point) const;
 	bool			contains_point(const Vec2& point) const;
 
 
-	/// Returns whether the rect intersects @r.
+	/// Returns whether the rect intersects @a r.
 	bool			intersects_rect(const Rect& rect) const;	
 	bool			intersects_rect(const Rect& rect) const;	
 
 
-	/// Sets the Rect from a @center and a @width - @height
+	/// Sets the Rect from a @a center and a @a width - @a height
 	void			set_from_center_and_dimensions(Vec2 center, real width, real height);	
 	void			set_from_center_and_dimensions(Vec2 center, real width, real height);	
 
 
 	/// Returns the four vertices of the rect.
 	/// Returns the four vertices of the rect.
 	void			vertices(Vec2 v[4]) const;
 	void			vertices(Vec2 v[4]) const;
 
 
-	/// Returns the @index -th vetex of the rect.
+	/// Returns the @a index -th vetex of the rect.
 	Vec2			vertex(uint32_t index) const;			
 	Vec2			vertex(uint32_t index) const;			
 
 
 	/// Returns the equivalent circle.
 	/// Returns the equivalent circle.

+ 5 - 4
src/core/bv/Sphere.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -43,7 +44,7 @@ public:
 	/// Does nothing for efficiency.
 	/// Does nothing for efficiency.
 					Sphere();
 					Sphere();
 
 
-	/// Constructs from @center and @radius.
+	/// Constructs from @a center and @a radius.
 					Sphere(const Vec3& center, real radius);
 					Sphere(const Vec3& center, real radius);
 					Sphere(const Sphere& a);
 					Sphere(const Sphere& a);
 
 
@@ -54,13 +55,13 @@ public:
 	void			set_center(const Vec3& center);
 	void			set_center(const Vec3& center);
 	void			set_radius(real radius);
 	void			set_radius(real radius);
 
 
-	/// Adds @count @points to the sphere expanding if necessary.
+	/// Adds @a count @a points to the sphere expanding if necessary.
 	void			add_points(const Vec3* points, uint32_t count);	
 	void			add_points(const Vec3* points, uint32_t count);	
 
 
-	/// Adds @count @spheres expanding if necessary.
+	/// Adds @a count @a spheres expanding if necessary.
 	void			add_spheres(const Sphere* spheres, uint32_t count);	
 	void			add_spheres(const Sphere* spheres, uint32_t count);	
 
 
-	/// Returns whether point @p is contained into the sphere.
+	/// Returns whether point @a p is contained into the sphere.
 	bool			contains_point(const Vec3& p) const;		
 	bool			contains_point(const Vec3& p) const;		
 
 
 private:
 private:

+ 5 - 4
src/core/compressors/Compressor.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -37,14 +38,14 @@ public:
 						Compressor(Allocator& allocator);
 						Compressor(Allocator& allocator);
 	virtual 			~Compressor() {}
 	virtual 			~Compressor() {}
 
 
-	/// Compresses the data pointed by @data of size @in_size (in bytes) and returns it.
-	/// The function also returns the size in bytes of the compressed data in @out_size.
+	/// Compresses the data pointed by @a data of size @a in_size (in bytes) and returns it.
+	/// The function also returns the size in bytes of the compressed data in @a out_size.
 	/// @note
 	/// @note
 	/// The returned data is automatically allocated using the passed allocator.
 	/// The returned data is automatically allocated using the passed allocator.
 	virtual uint8_t* 	compress(const void* data, size_t in_size, size_t& out_size) = 0;
 	virtual uint8_t* 	compress(const void* data, size_t in_size, size_t& out_size) = 0;
 
 
-	/// Uncompresses the data pointed by @data of size @in_size (in bytes) and returns it.
-	/// The function also returns the size in bytes of the uncompressed data in @out_size.
+	/// Uncompresses the data pointed by @a data of size @a in_size (in bytes) and returns it.
+	/// The function also returns the size in bytes of the uncompressed data in @a out_size.
 	/// @note
 	/// @note
 	/// The returned data is automatically allocated using the passed allocator.
 	/// The returned data is automatically allocated using the passed allocator.
 	virtual uint8_t* 	uncompress(const void* data, size_t in_size, size_t& out_size) = 0;
 	virtual uint8_t* 	uncompress(const void* data, size_t in_size, size_t& out_size) = 0;

+ 1 - 0
src/core/compressors/ZipCompressor.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 3 - 2
src/core/compressors/ZipCompressor.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -38,10 +39,10 @@ public:
 				ZipCompressor(Allocator& allocator);
 				ZipCompressor(Allocator& allocator);
 				~ZipCompressor();
 				~ZipCompressor();
 	
 	
-	/// @copydoc Compressor::compress()
+	/// @a copydoc Compressor::compress()
 	uint8_t* 	compress(const void* data, size_t in_size, size_t& out_size);
 	uint8_t* 	compress(const void* data, size_t in_size, size_t& out_size);
 
 
-	/// @copydoc Compressor::uncompress()
+	/// @a copydoc Compressor::uncompress()
 	uint8_t* 	uncompress(const void* data, size_t in_size, size_t& out_size);
 	uint8_t* 	uncompress(const void* data, size_t in_size, size_t& out_size);
 };
 };
 
 

+ 1 - 0
src/core/containers/Dictionary.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/containers/Generic.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/containers/Generic.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 4 - 3
src/core/containers/IdTable.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -48,17 +49,17 @@ class IdTable
 {
 {
 public:
 public:
 
 
-	/// Creates the table for tracking exactly @max_ids - 1 unique Ids.
+	/// Creates the table for tracking exactly @a max_ids - 1 unique Ids.
 					IdTable(Allocator& allocator, uint16_t max_ids);
 					IdTable(Allocator& allocator, uint16_t max_ids);
 					~IdTable();
 					~IdTable();
 
 
 	/// Returns a new Id.
 	/// Returns a new Id.
 	Id				create();
 	Id				create();
 
 
-	/// Destroys the specified @id.
+	/// Destroys the specified @a id.
 	void			destroy(Id id);
 	void			destroy(Id id);
 
 
-	/// Returns whether the table has the specified @id
+	/// Returns whether the table has the specified @a id
 	bool			has(Id id) const;
 	bool			has(Id id) const;
 
 
 private:
 private:

+ 7 - 5
src/core/containers/List.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -41,6 +42,7 @@ class List
 {
 {
 public:
 public:
 
 
+	/// Does not allocate memory.
 						List(Allocator& allocator);
 						List(Allocator& allocator);
 
 
 	/// Allocates capacity * sizeof(T) bytes.
 	/// Allocates capacity * sizeof(T) bytes.
@@ -63,20 +65,20 @@ public:
 	/// Returns the maximum number of items the array can hold
 	/// Returns the maximum number of items the array can hold
 	uint32_t			capacity() const;
 	uint32_t			capacity() const;
 
 
-	/// Resizes the list to the given @size.
+	/// Resizes the list to the given @a size.
 	/// @note
 	/// @note
 	/// Old items will be copied to the newly created list.
 	/// Old items will be copied to the newly created list.
 	/// If the new capacity is smaller than the previous one, the
 	/// If the new capacity is smaller than the previous one, the
 	/// list will be truncated.
 	/// list will be truncated.
 	void				resize(uint32_t size);
 	void				resize(uint32_t size);
 
 
-	/// Reserves space in the list for at least @capacity items.
+	/// Reserves space in the list for at least @a capacity items.
 	void				reserve(uint32_t capacity);
 	void				reserve(uint32_t capacity);
 
 
 	/// Sets the list capacity
 	/// Sets the list capacity
 	void				set_capacity(uint32_t capacity);
 	void				set_capacity(uint32_t capacity);
 
 
-	/// Grows the list to contain at least @min_capacity items
+	/// Grows the list to contain at least @a min_capacity items
 	void				grow(uint32_t min_capacity);
 	void				grow(uint32_t min_capacity);
 
 
 	/// Condenses the array so that the capacity matches the actual number
 	/// Condenses the array so that the capacity matches the actual number
@@ -89,7 +91,7 @@ public:
 	/// Removes the last item from the list.
 	/// Removes the last item from the list.
 	void				pop_back();
 	void				pop_back();
 
 
-	/// Appends @count @items to the list and returns the number
+	/// Appends @a count @a items to the list and returns the number
 	/// of items in the list after the append operation.
 	/// of items in the list after the append operation.
 	uint32_t			push(const T* items, uint32_t count);
 	uint32_t			push(const T* items, uint32_t count);
 
 
@@ -99,7 +101,7 @@ public:
 	/// the number of items in the list for efficiency.
 	/// the number of items in the list for efficiency.
 	void				clear();
 	void				clear();
 
 
-	/// Copies the content of the @other list into this one.
+	/// Copies the content of the @a other list into this one.
 	const List<T>&		operator=(const List<T>& other);
 	const List<T>&		operator=(const List<T>& other);
 
 
 	T*					begin();
 	T*					begin();

+ 6 - 5
src/core/containers/Queue.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -64,23 +65,23 @@ public:
 	/// Increase or decrease the capacity of the queue.
 	/// Increase or decrease the capacity of the queue.
 	/// @note
 	/// @note
 	/// Old items will be copied to the newly created queue.
 	/// Old items will be copied to the newly created queue.
-	/// If the new @capacity is smaller than the previous one, the
+	/// If the new @a capacity is smaller than the previous one, the
 	/// queue will be truncated.
 	/// queue will be truncated.
 	void			increase_capacity(uint32_t capacity);
 	void			increase_capacity(uint32_t capacity);
 
 
-	/// Grows the queue to contain at least @min_capacity items.
-	/// If @min_capacity is set to 0, the queue automatically
+	/// Grows the queue to contain at least @a min_capacity items.
+	/// If @a min_capacity is set to 0, the queue automatically
 	/// determines the new capacity based on its size at the 
 	/// determines the new capacity based on its size at the 
 	/// time of call.
 	/// time of call.
 	void			grow(uint32_t min_capacity);
 	void			grow(uint32_t min_capacity);
 
 
-	/// Adds an @item to the back of the queue
+	/// Adds an @a item to the back of the queue
 	void			push_back(const T& item);
 	void			push_back(const T& item);
 
 
 	/// Removes the last item from the queue
 	/// Removes the last item from the queue
 	void			pop_back();
 	void			pop_back();
 
 
-	/// Adds an @item to the front of the queue
+	/// Adds an @a item to the front of the queue
 	void			push_front(const T& item);
 	void			push_front(const T& item);
 
 
 	/// Removes the first item from the queue
 	/// Removes the first item from the queue

+ 1 - 0
src/core/containers/RBTree.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/BinaryReader.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/BinaryReader.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/BinaryWriter.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/BinaryWriter.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 5 - 3
src/core/filesystem/DiskFile.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -27,6 +28,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Types.h"
 #include "Types.h"
 #include "Log.h"
 #include "Log.h"
 #include "MathUtils.h"
 #include "MathUtils.h"
+#include "Allocator.h"
 
 
 namespace crown
 namespace crown
 {
 {
@@ -106,7 +108,7 @@ bool DiskFile::copy_to(File& file, size_t size)
 
 
 	const size_t chunksize = 1024*1024;
 	const size_t chunksize = 1024*1024;
 
 
-	char* buff = new char[chunksize];
+	char* buff = (char*) default_allocator().allocate(chunksize * sizeof(char));
 
 
 	size_t tot_read_bytes = 0;
 	size_t tot_read_bytes = 0;
 
 
@@ -127,7 +129,7 @@ bool DiskFile::copy_to(File& file, size_t size)
 				}
 				}
 			}
 			}
 
 
-			delete[] buff;
+			default_allocator().deallocate(buff);
 			//Either the file gave an error, or ended before size bytes could be copied
 			//Either the file gave an error, or ended before size bytes could be copied
 			return false;
 			return false;
 		}
 		}
@@ -136,7 +138,7 @@ bool DiskFile::copy_to(File& file, size_t size)
 		tot_read_bytes += read_bytes;
 		tot_read_bytes += read_bytes;
 	}
 	}
 
 
-	delete [] buff;
+	default_allocator().deallocate(buff);
 	return true;
 	return true;
 }
 }
 
 

+ 16 - 15
src/core/filesystem/DiskFile.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -37,50 +38,50 @@ class DiskFile: public File
 {
 {
 public:
 public:
 
 
-	/// Opens @filename with specified @mode
+	/// Opens @a filename with specified @a mode
 					DiskFile(FileOpenMode mode, const char* filename);
 					DiskFile(FileOpenMode mode, const char* filename);
 	virtual			~DiskFile();
 	virtual			~DiskFile();
 
 
-	/// @copydoc File::seek() 
+	/// @a copydoc File::seek() 
 	void			seek(size_t position);
 	void			seek(size_t position);
 
 
-	/// @copydoc File::seek_to_end() 
+	/// @a copydoc File::seek_to_end() 
 	void			seek_to_end();
 	void			seek_to_end();
 
 
-	/// @copydoc File::skip() 
+	/// @a copydoc File::skip() 
 	void			skip(size_t bytes);
 	void			skip(size_t bytes);
 
 
-	/// @copydoc File::read() 
+	/// @a copydoc File::read() 
 	void			read(void* buffer, size_t size);
 	void			read(void* buffer, size_t size);
 
 
-	/// @copydoc File::write() 
+	/// @a copydoc File::write() 
 	void			write(const void* buffer, size_t size);
 	void			write(const void* buffer, size_t size);
 
 
-	/// @copydoc File::copy_to() 
+	/// @a copydoc File::copy_to() 
 	bool			copy_to(File& file, size_t size = 0);
 	bool			copy_to(File& file, size_t size = 0);
 
 
-	/// @copydoc File::flush() 
+	/// @a copydoc File::flush() 
 	void			flush();
 	void			flush();
 
 
-	/// @copydoc File::end_of_file() 
+	/// @a copydoc File::end_of_file() 
 	bool			end_of_file() const;
 	bool			end_of_file() const;
 
 
-	/// @copydoc File::is_valid() 
+	/// @a copydoc File::is_valid() 
 	bool			is_valid() const;
 	bool			is_valid() const;
 
 
-	/// @copydoc File::size() 
+	/// @a copydoc File::size() 
 	size_t			size() const;
 	size_t			size() const;
 
 
-	/// @copydoc File::position() 
+	/// @a copydoc File::position() 
 	size_t			position() const;
 	size_t			position() const;
 
 
-	/// @copydoc File::can_read() 
+	/// @a copydoc File::can_read() 
 	bool			can_read() const;
 	bool			can_read() const;
 
 
-	/// @copydoc File::can_write() 
+	/// @a copydoc File::can_write() 
 	bool			can_write() const;
 	bool			can_write() const;
 
 
-	/// @copydoc File::can_seek() 
+	/// @a copydoc File::can_seek() 
 	bool			can_seek() const;
 	bool			can_seek() const;
 
 
 protected:
 protected:

+ 1 - 0
src/core/filesystem/File.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 2 - 1
src/core/filesystem/File.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -49,7 +50,7 @@ class File
 {
 {
 public:
 public:
 
 
-	/// Opens the file with the given @mode
+	/// Opens the file with the given @a mode
 						File(FileOpenMode mode) : m_open_mode(mode) {}
 						File(FileOpenMode mode) : m_open_mode(mode) {}
 	virtual				~File() {};
 	virtual				~File() {};
 
 

+ 4 - 2
src/core/filesystem/Filesystem.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -27,6 +28,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Log.h"
 #include "Log.h"
 #include "OS.h"
 #include "OS.h"
 #include "DiskFile.h"
 #include "DiskFile.h"
+#include "Memory.h"
 
 
 namespace crown
 namespace crown
 {
 {
@@ -191,13 +193,13 @@ DiskFile* Filesystem::open(const char* relative_path, FileOpenMode mode)
 	CE_ASSERT(get_info(relative_path, info), "File does not exist: %s", relative_path);
 	CE_ASSERT(get_info(relative_path, info), "File does not exist: %s", relative_path);
 	CE_ASSERT(info.type == FilesystemEntry::FILE, "File is not a regular file: %s", relative_path);
 	CE_ASSERT(info.type == FilesystemEntry::FILE, "File is not a regular file: %s", relative_path);
 
 
-	return new DiskFile(mode, info.os_path);
+	return CE_NEW(m_allocator, DiskFile)(mode, info.os_path);
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void Filesystem::close(DiskFile* stream)
 void Filesystem::close(DiskFile* stream)
 {
 {
-	delete stream;
+	CE_DELETE(m_allocator, stream);
 }
 }
 
 
 } // namespace crown
 } // namespace crown

+ 17 - 13
src/core/filesystem/Filesystem.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -28,6 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "String.h"
 #include "String.h"
 #include "OS.h"
 #include "OS.h"
 #include "File.h"
 #include "File.h"
+#include "MallocAllocator.h"
 
 
 namespace crown
 namespace crown
 {
 {
@@ -100,48 +102,48 @@ class Filesystem
 {
 {
 public:
 public:
 
 
-	/// The @root_path must be absolute.
+	/// The @a root_path must be absolute.
 						Filesystem(const char* root_path);
 						Filesystem(const char* root_path);
 						~Filesystem();
 						~Filesystem();
 
 
 	/// Returns the root path of the filesystem
 	/// Returns the root path of the filesystem
 	const char*			root_path() const;
 	const char*			root_path() const;
 
 
-	/// Returns whether the @relative_path exists and fills @info with
-	/// with informations about the given @relative_path path
+	/// Returns whether the @a relative_path exists and fills @a info with
+	/// with informations about the given @a relative_path path
 	bool				get_info(const char* relative_path, FilesystemEntry& info);
 	bool				get_info(const char* relative_path, FilesystemEntry& info);
 	
 	
-	/// Returns whether the @relative_path exists on disk
+	/// Returns whether the @a relative_path exists on disk
 	bool				exists(const char* relative_path);
 	bool				exists(const char* relative_path);
 
 
-	/// Returns whether @relative_path is a regular file
+	/// Returns whether @a relative_path is a regular file
 	bool				is_file(const char* relative_path);
 	bool				is_file(const char* relative_path);
 
 
-	/// Returns whether @relative_path is a directory
+	/// Returns whether @a relative_path is a directory
 	bool				is_dir(const char* relative_path);
 	bool				is_dir(const char* relative_path);
 
 
-	/// Creates a regular file named @relative_path
+	/// Creates a regular file named @a relative_path
 	bool				create_file(const char* relative_path);
 	bool				create_file(const char* relative_path);
 
 
-	/// Creates a directory named @relative_path
+	/// Creates a directory named @a relative_path
 	bool				create_dir(const char* relative_path);
 	bool				create_dir(const char* relative_path);
 
 
-	/// Deletes the regular file @relative_path
+	/// Deletes the regular file @a relative_path
 	bool				delete_file(const char* relative_path);
 	bool				delete_file(const char* relative_path);
 
 
-	/// Deletes the directory @relative_path
+	/// Deletes the directory @a relative_path
 	bool				delete_dir(const char* relative_path);
 	bool				delete_dir(const char* relative_path);
 
 
-	/// Returns the os-specific path which @relative_path refers to.
+	/// Returns the os-specific path which @a relative_path refers to.
 	/// @note
 	/// @note
 	/// In general, you typically do not want to use it for normal
 	/// In general, you typically do not want to use it for normal
 	/// file interactions. Prefer using the other methods whenever possible.
 	/// file interactions. Prefer using the other methods whenever possible.
 	const char*			os_path(const char* relative_path);
 	const char*			os_path(const char* relative_path);
 
 
-	/// Opens the file @relative_path with the specified access @mode
+	/// Opens the file @a relative_path with the specified access @a mode
 	DiskFile*			open(const char* relative_path, FileOpenMode mode);
 	DiskFile*			open(const char* relative_path, FileOpenMode mode);
 
 
-	/// Closes a previously opened file @stream
+	/// Closes a previously opened file @a stream
 	void				close(DiskFile* stream);
 	void				close(DiskFile* stream);
 
 
 private:
 private:
@@ -151,6 +153,8 @@ private:
 	
 	
 private:
 private:
 
 
+	MallocAllocator		m_allocator;
+
 	char				m_root_path[MAX_PATH_LENGTH];
 	char				m_root_path[MAX_PATH_LENGTH];
 
 
 	// Disable copying
 	// Disable copying

+ 1 - 0
src/core/filesystem/MemoryFile.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 17 - 16
src/core/filesystem/MemoryFile.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -84,52 +85,52 @@ class MemoryFile: public File
 {
 {
 public:
 public:
 
 
-	/// @copydoc File::File()
+	/// @a copydoc File::File()
 						MemoryFile(MemoryBuffer* buffer, FileOpenMode mode);
 						MemoryFile(MemoryBuffer* buffer, FileOpenMode mode);
 
 
-	/// @copydoc File::~File()
+	/// @a copydoc File::~File()
 	virtual				~MemoryFile();
 	virtual				~MemoryFile();
 
 
-	/// @copydoc File::seek()
+	/// @a copydoc File::seek()
 	void				seek(size_t position);
 	void				seek(size_t position);
 
 
-	/// @copydoc File::seek_to_end()
+	/// @a copydoc File::seek_to_end()
 	void				seek_to_end();
 	void				seek_to_end();
 
 
-	/// @copydoc File::skip()
+	/// @a copydoc File::skip()
 	void				skip(size_t bytes);
 	void				skip(size_t bytes);
 
 
-	/// @copydoc File::read()
+	/// @a copydoc File::read()
 	void				read(void* buffer, size_t size);
 	void				read(void* buffer, size_t size);
 
 
-	/// @copydoc File::write()
+	/// @a copydoc File::write()
 	void				write(const void* buffer, size_t size);
 	void				write(const void* buffer, size_t size);
 
 
-	/// @copydoc File::copy_to()
+	/// @a copydoc File::copy_to()
 	bool				copy_to(File& file, size_t size = 0);
 	bool				copy_to(File& file, size_t size = 0);
 
 
-	/// @copydoc File::flush()
+	/// @a copydoc File::flush()
 	void				flush();
 	void				flush();
 
 
-	/// @copydoc File::end_of_file()
+	/// @a copydoc File::end_of_file()
 	bool				end_of_file() const { return size() == m_memory_offset; }
 	bool				end_of_file() const { return size() == m_memory_offset; }
 
 
-	/// @copydoc File::is_valid()
+	/// @a copydoc File::is_valid()
 	bool				is_valid() const { CE_ASSERT(m_memory != NULL, "Memory is NULL"); return m_memory->is_valid(); }
 	bool				is_valid() const { CE_ASSERT(m_memory != NULL, "Memory is NULL"); return m_memory->is_valid(); }
 
 
-	/// @copydoc File::size()
+	/// @a copydoc File::size()
 	size_t				size() const { CE_ASSERT(m_memory != NULL, "Memory is NULL"); return m_memory->size(); }
 	size_t				size() const { CE_ASSERT(m_memory != NULL, "Memory is NULL"); return m_memory->size(); }
 
 
-	/// @copydoc File::position()
+	/// @a copydoc File::position()
 	size_t				position() const { return m_memory_offset; }
 	size_t				position() const { return m_memory_offset; }
 
 
-	/// @copydoc File::can_read()
+	/// @a copydoc File::can_read()
 	bool				can_read() const { return true; }
 	bool				can_read() const { return true; }
 
 
-	/// @copydoc File::can_write()
+	/// @a copydoc File::can_write()
 	bool				can_write() const { return true; }
 	bool				can_write() const { return true; }
 
 
-	/// @copydoc File::can_seek()
+	/// @a copydoc File::can_seek()
 	bool				can_seek() const { return true; }
 	bool				can_seek() const { return true; }
 
 
 	/// Dumps the data to the console.
 	/// Dumps the data to the console.

+ 17 - 16
src/core/filesystem/NullFile.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -37,22 +38,22 @@ class NullFile: public File
 {
 {
 public:
 public:
 
 
-	/// @copydoc File::File()
+	/// @a copydoc File::File()
 				NullFile(FileOpenMode mode) : File(mode) {}
 				NullFile(FileOpenMode mode) : File(mode) {}
 
 
-	/// @copydoc File::~File()
+	/// @a copydoc File::~File()
 	virtual		~NullFile() {}
 	virtual		~NullFile() {}
 
 
-	/// @copydoc File::seek()
+	/// @a copydoc File::seek()
 	void		seek(size_t position) { (void)position; }
 	void		seek(size_t position) { (void)position; }
 
 
-	/// @copydoc File::seek_to_end()
+	/// @a copydoc File::seek_to_end()
 	void		seek_to_end() {}
 	void		seek_to_end() {}
 
 
-	/// @copydoc File::skip()
+	/// @a copydoc File::skip()
 	void		skip(size_t bytes) { (void)bytes; }
 	void		skip(size_t bytes) { (void)bytes; }
 				
 				
-	/// @copydoc File::read()
+	/// @a copydoc File::read()
 	/// @note
 	/// @note
 	///	Fills buffer with zeroes
 	///	Fills buffer with zeroes
 	void		read(void* buffer, size_t size)
 	void		read(void* buffer, size_t size)
@@ -63,10 +64,10 @@ public:
 		}
 		}
 	}
 	}
 
 
-	/// @copydoc File::write()
+	/// @a copydoc File::write()
 	void		write(const void* buffer, size_t size) { (void)buffer; (void)size; }
 	void		write(const void* buffer, size_t size) { (void)buffer; (void)size; }
 
 
-	/// @copydoc File::copy_to()
+	/// @a copydoc File::copy_to()
 	/// @note
 	/// @note
 	///	Returns always true
 	///	Returns always true
 	bool		copy_to(File& file, size_t size = 0)
 	bool		copy_to(File& file, size_t size = 0)
@@ -76,40 +77,40 @@ public:
 		return true;
 		return true;
 	}
 	}
 
 
-	/// @copydoc File::flush()
+	/// @a copydoc File::flush()
 	void		flush() {};
 	void		flush() {};
 				
 				
-	/// @copydoc File::is_valid()
+	/// @a copydoc File::is_valid()
 	/// @note
 	/// @note
 	///	Returns always true
 	///	Returns always true
 	bool		is_valid() { return true; }
 	bool		is_valid() { return true; }
 				
 				
-	/// @copydoc File::end_of_file()
+	/// @a copydoc File::end_of_file()
 	/// @note
 	/// @note
 	///	Returns always false
 	///	Returns always false
 	bool		end_of_file() { return false; }
 	bool		end_of_file() { return false; }
 				
 				
-	/// @copydoc File::size()
+	/// @a copydoc File::size()
 	/// @note
 	/// @note
 	///	Returns always 0xFFFFFFFF
 	///	Returns always 0xFFFFFFFF
 	size_t		size() { return ~0; }
 	size_t		size() { return ~0; }
 				
 				
-	/// @copydoc File::position()
+	/// @a copydoc File::position()
 	/// @note
 	/// @note
 	///	Returns always zero
 	///	Returns always zero
 	size_t		position() { return 0; }
 	size_t		position() { return 0; }
 				
 				
-	/// @copydoc File::can_read()
+	/// @a copydoc File::can_read()
 	/// @note
 	/// @note
 	///	Returns always true
 	///	Returns always true
 	bool		can_read() { return true; }
 	bool		can_read() { return true; }
 				
 				
-	/// @copydoc File::can_write()
+	/// @a copydoc File::can_write()
 	/// @note
 	/// @note
 	///	Returns always true
 	///	Returns always true
 	bool		can_write() { return true; }
 	bool		can_write() { return true; }
 				
 				
-	/// @copydoc File::can_seek()
+	/// @a copydoc File::can_seek()
 	/// @note
 	/// @note
 	///	Returns always true
 	///	Returns always true
 	bool		can_seek() { return true; }
 	bool		can_seek() { return true; }

+ 1 - 0
src/core/filesystem/TextReader.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/TextReader.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/TextWriter.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/filesystem/TextWriter.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/math/Color4.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/math/Color4.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 4 - 3
src/core/math/Interpolation.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -32,15 +33,15 @@ namespace crown
 namespace interpolation
 namespace interpolation
 {
 {
 
 
-/// Returns the linear interpolated value between @p0 and @p1 at time @t
+/// Returns the linear interpolated value between @a p0 and @a p1 at time @a t
 template <typename T>
 template <typename T>
 static T	linear(const T& p0, const T& p1, real t);
 static T	linear(const T& p0, const T& p1, real t);
 
 
-/// Returns the cosine interpolated value between @p0 and @p1 at time @t
+/// Returns the cosine interpolated value between @a p0 and @a p1 at time @a t
 template <typename T>
 template <typename T>
 static T	cosine(const T& p0, const T& p1, real t);
 static T	cosine(const T& p0, const T& p1, real t);
 
 
-/// Returns the cubic interpolated value between @p0 and @p1 at time @t
+/// Returns the cubic interpolated value between @a p0 and @a p1 at time @a t
 template <typename T>
 template <typename T>
 static T	cubic(const T& p0, const T& p1, real t);
 static T	cubic(const T& p0, const T& p1, real t);
 
 

+ 1 - 0
src/core/math/Intersection.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/math/Mat3.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 7 - 6
src/core/math/Mat3.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -45,7 +46,7 @@ class Vec3;
 /// to write something like: matrix vector. Since we are also using column vectors, inverting
 /// to write something like: matrix vector. Since we are also using column vectors, inverting
 /// the operands would result in an impossible operation.
 /// the operands would result in an impossible operation.
 /// 
 /// 
-/// @verbatim:
+/// @a verbatim:
 ///   X base vector
 ///   X base vector
 ///     | Y base vector
 ///     | Y base vector
 ///     |   | Z base vector
 ///     |   | Z base vector
@@ -67,7 +68,7 @@ public:
 	/// Constructs from a set of real
 	/// Constructs from a set of real
 						Mat3(real r1c1, real r2c1, real r3c1, real r1c2, real r2c2, real r3c2, real r1c3, real r2c3, real r3c3);
 						Mat3(real r1c1, real r2c1, real r3c1, real r1c2, real r2c2, real r3c2, real r1c3, real r2c3, real r3c3);
 	
 	
-	/// Constructs from the @v array
+	/// Constructs from the @a v array
 						Mat3(const real v[9]);						
 						Mat3(const real v[9]);						
 						Mat3(const Mat3& a);	
 						Mat3(const Mat3& a);	
 
 
@@ -98,13 +99,13 @@ public:
 	/// For simmetry
 	/// For simmetry
 	friend Mat3			operator*(real k, const Mat3& a);			
 	friend Mat3			operator*(real k, const Mat3& a);			
 
 
-	/// Builds a rotation matrix about the X axis of @radians radians
+	/// Builds a rotation matrix about the X axis of @a radians radians
 	void				build_rotation_x(real radians);			
 	void				build_rotation_x(real radians);			
 
 
-	/// Builds a rotation matrix about the Y axis of @radians radians	
+	/// Builds a rotation matrix about the Y axis of @a radians radians	
 	void				build_rotation_y(real radians);	
 	void				build_rotation_y(real radians);	
 
 
-	/// Builds a rotation matrix about the Z axis of @radians radians			
+	/// Builds a rotation matrix about the Z axis of @a radians radians			
 	void				build_rotation_z(real radians);	
 	void				build_rotation_z(real radians);	
 
 
 	/// Builds a rotation matrix about an arbitrary axis of "radians" radians			
 	/// Builds a rotation matrix about an arbitrary axis of "radians" radians			
@@ -122,7 +123,7 @@ public:
 	/// Returns a Vec3 containing the matrix's scale portion
 	/// Returns a Vec3 containing the matrix's scale portion
 	Vec3				get_scale() const;	
 	Vec3				get_scale() const;	
 
 
-	/// Fills the matrix's scale portion with the values contained in @scale				
+	/// Fills the matrix's scale portion with the values contained in @a scale				
 	void				set_scale(const Vec3& scale);				
 	void				set_scale(const Vec3& scale);				
 
 
 	/// Returns the pointer to the matrix's data
 	/// Returns the pointer to the matrix's data

+ 1 - 0
src/core/math/Mat4.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 7 - 6
src/core/math/Mat4.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -46,7 +47,7 @@ class Vec4;
 /// to write something like: matrix * vector. Since we are also using column vectors, inverting
 /// to write something like: matrix * vector. Since we are also using column vectors, inverting
 /// the operands would result in an impossible operation.
 /// the operands would result in an impossible operation.
 /// 
 /// 
-/// @verbatim:
+/// @a verbatim:
 ///   X base vector
 ///   X base vector
 ///     | Y base vector
 ///     | Y base vector
 ///     |   | Z base vector
 ///     |   | Z base vector
@@ -70,7 +71,7 @@ public:
 	/// Constructs from a set of real
 	/// Constructs from a set of real
 						Mat4(real r1c1, real r2c1, real r3c1, real r4c1, real r1c2, real r2c2, real r3c2, real r4c2, real r1c3, real r2c3, real r3c3, real r4c3, real r1c4, real r2c4, real r3c4, real r4c4);
 						Mat4(real r1c1, real r2c1, real r3c1, real r4c1, real r1c2, real r2c2, real r3c2, real r4c2, real r1c3, real r2c3, real r3c3, real r4c3, real r1c4, real r2c4, real r3c4, real r4c4);
 	
 	
-	/// Contructs from the @v array
+	/// Contructs from the @a v array
 						Mat4(const real v[16]);						
 						Mat4(const real v[16]);						
 						Mat4(const Mat4& a);					
 						Mat4(const Mat4& a);					
 
 
@@ -101,13 +102,13 @@ public:
 	/// For simmetry
 	/// For simmetry
 	friend Mat4			operator*(real k, const Mat4& a);			
 	friend Mat4			operator*(real k, const Mat4& a);			
 
 
-	/// Builds a rotation matrix about the X axis of @radians radians
+	/// Builds a rotation matrix about the X axis of @a radians radians
 	void				build_rotation_x(real radians);
 	void				build_rotation_x(real radians);
 
 
 	/// Builds a rotation matrix about the Y axis of "radians" radians	
 	/// Builds a rotation matrix about the Y axis of "radians" radians	
 	void				build_rotation_y(real radians);	
 	void				build_rotation_y(real radians);	
 
 
-	/// Builds a rotation matrix about the Z axis of @radians radians			
+	/// Builds a rotation matrix about the Z axis of @a radians radians			
 	void				build_rotation_z(real radians);		
 	void				build_rotation_z(real radians);		
 
 
 	/// Builds a rotation matrix about an arbitrary axis of "radians" radians		
 	/// Builds a rotation matrix about an arbitrary axis of "radians" radians		
@@ -152,13 +153,13 @@ public:
 	/// Returns a Vec3 containing the matrix's translation portion
 	/// Returns a Vec3 containing the matrix's translation portion
 	Vec3				get_translation() const;	
 	Vec3				get_translation() const;	
 
 
-	/// Fills the matrix's translation portion values contained in @trans				
+	/// Fills the matrix's translation portion values contained in @a trans				
 	void				set_translation(const Vec3& trans);			
 	void				set_translation(const Vec3& trans);			
 
 
 	/// Returns a Vec3 containing the matrix's scale portion
 	/// Returns a Vec3 containing the matrix's scale portion
 	Vec3				get_scale() const;
 	Vec3				get_scale() const;
 
 
-	/// Fills the matrix's scale portion with the values contained in @scale							
+	/// Fills the matrix's scale portion with the values contained in @a scale							
 	void				set_scale(const Vec3& scale);				
 	void				set_scale(const Vec3& scale);				
 
 
 	/// Returns the pointer to the matrix's data
 	/// Returns the pointer to the matrix's data

+ 1 - 0
src/core/math/MathUtils.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 23 - 22
src/core/math/MathUtils.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -60,73 +61,73 @@ const double	DOUBLE_PRECISION			= (real)1.0e-9;
 bool			equals(float a, float b, float precision = FLOAT_PRECISION);
 bool			equals(float a, float b, float precision = FLOAT_PRECISION);
 bool			equals(double a, double b, double precision = DOUBLE_PRECISION);
 bool			equals(double a, double b, double precision = DOUBLE_PRECISION);
 
 
-/// Tests agains the specified @bitmask and returns true only if all bits are satisfied
+/// Tests agains the specified @a bitmask and returns true only if all bits are satisfied
 bool			test_bitmask(int32_t value, int32_t bitmask);
 bool			test_bitmask(int32_t value, int32_t bitmask);
 
 
-/// Sets the specified @bitmask	
+/// Sets the specified @a bitmask	
 int32_t			set_bitmask(int32_t value, int32_t bitmask);
 int32_t			set_bitmask(int32_t value, int32_t bitmask);
 
 
-/// Removes the specified @bitmask	
+/// Removes the specified @a bitmask	
 int32_t			unset_bitmask(int32_t value, int32_t bitmask);	
 int32_t			unset_bitmask(int32_t value, int32_t bitmask);	
 
 
-/// Returns minimum between @a and @b
+/// Returns minimum between @a a and @a b
 template <typename T> T		min(const T& a, const T& b);
 template <typename T> T		min(const T& a, const T& b);
 
 
-/// Returns maximum between @a and @b
+/// Returns maximum between @a a and @a b
 template <typename T> T		max(const T& a, const T& b);
 template <typename T> T		max(const T& a, const T& b);
 
 
-/// Returns the arithmetic mean of @a and @b	
+/// Returns the arithmetic mean of @a a and @a b	
 template <typename T> T		avg(const T& a, const T& b);
 template <typename T> T		avg(const T& a, const T& b);
 
 
 /// Clamps a value to a specific range (min < max)	
 /// Clamps a value to a specific range (min < max)	
 template <typename T> T		clamp_to_range(const T& min, const T& max, const T& value);	
 template <typename T> T		clamp_to_range(const T& min, const T& max, const T& value);	
 
 
-/// Swaps @a and @b
+/// Swaps @a a and @a b
 template <typename T> void	swap(T& a, T& b);				
 template <typename T> void	swap(T& a, T& b);				
 
 
-/// Returns @deg in radians
+/// Returns @a deg in radians
 real			deg_to_rad(real deg);
 real			deg_to_rad(real deg);
 
 
-/// Returns @rad in degrees
+/// Returns @a rad in degrees
 real			rad_to_deg(real rad);
 real			rad_to_deg(real rad);
 
 
-/// Returns the nearest power of two to @x
+/// Returns the nearest power of two to @a x
 uint32_t		next_pow_2(uint32_t x);
 uint32_t		next_pow_2(uint32_t x);
 
 
-/// Returns whether @x is a power of two			
+/// Returns whether @a x is a power of two			
 bool			is_pow_2(uint32_t x);	
 bool			is_pow_2(uint32_t x);	
 
 
-/// Returns the smallest integral value that is not less than @x
+/// Returns the smallest integral value that is not less than @a x
 real			ceil(real x);		
 real			ceil(real x);		
 
 
-/// Returns the largest integral value that is not greater than @x			
+/// Returns the largest integral value that is not greater than @a x			
 real			floor(real x);	
 real			floor(real x);	
 
 
-/// Returns the square root of @x				
+/// Returns the square root of @a x				
 real			sqrt(real x);	
 real			sqrt(real x);	
 
 
-/// Returns the inverse square root of @x				
+/// Returns the inverse square root of @a x				
 real			inv_sqrt(real x);
 real			inv_sqrt(real x);
 
 
-/// Returns the sine of @x				
+/// Returns the sine of @a x				
 real			sin(real x);	
 real			sin(real x);	
 
 
-/// Returns the cosine of @x				
+/// Returns the cosine of @a x				
 real			cos(real x);
 real			cos(real x);
 
 
-/// Returns the arc sine of @x					
+/// Returns the arc sine of @a x					
 real			asin(real x);	
 real			asin(real x);	
 
 
-/// Returns the arc cosine of @x				
+/// Returns the arc cosine of @a x				
 real			acos(real x);	
 real			acos(real x);	
 
 
-/// Returns the tangent of @x				
+/// Returns the tangent of @a x				
 real			tan(real x);		
 real			tan(real x);		
 
 
-/// Returns the arc tangent of @y/@x			
+/// Returns the arc tangent of @a y/@a x			
 real			atan2(real y, real x);	
 real			atan2(real y, real x);	
 
 
-/// Returns the absolute value of @x		
+/// Returns the absolute value of @a x		
 real			abs(real x);			
 real			abs(real x);			
 
 
 /// Returns the realing-point remainder of numerator/denominator		
 /// Returns the realing-point remainder of numerator/denominator		

+ 1 - 0
src/core/math/Plane.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 3 - 2
src/core/math/Plane.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -55,10 +56,10 @@ public:
 	/// Normalizes the plane
 	/// Normalizes the plane
 	Plane&				normalize();							
 	Plane&				normalize();							
 
 
-	/// Returns the signed distance between point @p and the plane
+	/// Returns the signed distance between point @a p and the plane
 	real				distance_to_point(const Vec3& p) const;	
 	real				distance_to_point(const Vec3& p) const;	
 
 
-	/// Returns whether the plane contains the point @p	
+	/// Returns whether the plane contains the point @a p	
 	bool				contains_point(const Vec3& p) const;		
 	bool				contains_point(const Vec3& p) const;		
 
 
 	static const Plane	ZERO;
 	static const Plane	ZERO;

+ 1 - 0
src/core/math/Point2.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/math/Point2.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/math/Quat.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 2 - 1
src/core/math/Quat.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -36,7 +37,7 @@ class Mat4;
 
 
 /// Quaternion.
 /// Quaternion.
 ///
 ///
-/// @Note:
+/// @a Note:
 /// This implementation uses the standard quaternion
 /// This implementation uses the standard quaternion
 /// multiplication equation, so, the order of multiplication
 /// multiplication equation, so, the order of multiplication
 /// for multiple rotations is in a reverse fashion:
 /// for multiple rotations is in a reverse fashion:

+ 2 - 1
src/core/math/Random.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -35,7 +36,7 @@ class Random
 {
 {
 public:
 public:
 
 
-	/// Initializes the generator with the given @seed.
+	/// Initializes the generator with the given @a seed.
 				Random(int32_t seed);
 				Random(int32_t seed);
 
 
 	/// Returns a pseudo-random integer in the range [0, 32767].
 	/// Returns a pseudo-random integer in the range [0, 32767].

+ 2 - 1
src/core/math/Ray.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -41,7 +42,7 @@ public:
 	/// Does nothing for efficiency.
 	/// Does nothing for efficiency.
 					Ray();
 					Ray();
 
 
-	/// Constructs from @origin and @direction
+	/// Constructs from @a origin and @a direction
 					Ray(const Vec3& origin, const Vec3& direction);
 					Ray(const Vec3& origin, const Vec3& direction);
 					Ray(const Ray& ray);
 					Ray(const Ray& ray);
 
 

+ 1 - 0
src/core/math/Shape.cpp

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 1 - 0
src/core/math/Shape.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person

+ 3 - 2
src/core/math/Triangle.h

@@ -1,4 +1,5 @@
 /*
 /*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
 
 
 Permission is hereby granted, free of charge, to any person
 Permission is hereby granted, free of charge, to any person
@@ -50,10 +51,10 @@ public:
 	/// Returns the center of gravity (a.k.a. "centroid").
 	/// Returns the center of gravity (a.k.a. "centroid").
 	Vec3		centroid() const;
 	Vec3		centroid() const;
 
 
-	/// Returns the barycentric coordinates of point @p in respect to the triangle.
+	/// Returns the barycentric coordinates of point @a p in respect to the triangle.
 	Vec3		barycentric_coords(const Vec3& p) const;
 	Vec3		barycentric_coords(const Vec3& p) const;
 
 
-	/// Returns whether the triangle contains the @p point.
+	/// Returns whether the triangle contains the @a p point.
 	bool		contains_point(const Vec3& p) const;
 	bool		contains_point(const Vec3& p) const;
 
 
 	/// Returns the plane containing the triangle.
 	/// Returns the plane containing the triangle.

Some files were not shown because too many files changed in this diff