Daniele Bartolini 11 лет назад
Родитель
Сommit
15e7cd9ba8
100 измененных файлов с 610 добавлено и 610 удалено
  1. 0 133
      engine/Crown.h
  2. 10 10
      engine/audio/backend/al_sound_world.cpp
  3. 14 14
      engine/audio/backend/sles_sound_world.cpp
  4. 2 2
      engine/audio/sound_world.h
  5. 10 10
      engine/compilers/bundle_compiler.cpp
  6. 3 3
      engine/compilers/bundle_compiler.h
  7. 2 2
      engine/config.h
  8. 13 13
      engine/console_server.cpp
  9. 6 6
      engine/console_server.h
  10. 3 3
      engine/core/args.h
  11. 2 2
      engine/core/assert.h
  12. 3 3
      engine/core/compressors/compressor.h
  13. 2 2
      engine/core/compressors/zip_compressor.cpp
  14. 2 2
      engine/core/compressors/zip_compressor.h
  15. 3 3
      engine/core/containers/array.h
  16. 2 2
      engine/core/containers/blob.h
  17. 4 4
      engine/core/containers/container_types.h
  18. 2 2
      engine/core/containers/dynamic_blob.h
  19. 4 4
      engine/core/containers/event_stream.h
  20. 5 5
      engine/core/containers/hash.h
  21. 3 3
      engine/core/containers/id_array.h
  22. 3 3
      engine/core/containers/id_table.h
  23. 4 4
      engine/core/containers/map.h
  24. 2 2
      engine/core/containers/priority_queue.h
  25. 5 5
      engine/core/containers/queue.h
  26. 1 1
      engine/core/containers/sort_map.h
  27. 3 3
      engine/core/containers/vector.h
  28. 6 6
      engine/core/error.h
  29. 7 7
      engine/core/filesystem/disk_file.cpp
  30. 17 17
      engine/core/filesystem/disk_file.h
  31. 5 5
      engine/core/filesystem/disk_filesystem.cpp
  32. 2 2
      engine/core/filesystem/disk_filesystem.h
  33. 4 4
      engine/core/filesystem/file.cpp
  34. 3 3
      engine/core/filesystem/file.h
  35. 3 3
      engine/core/filesystem/filesystem.h
  36. 0 0
      engine/core/filesystem/filesystem_types.h
  37. 11 11
      engine/core/filesystem/network_file.cpp
  38. 18 18
      engine/core/filesystem/network_file.h
  39. 7 7
      engine/core/filesystem/network_filesystem.cpp
  40. 4 4
      engine/core/filesystem/network_filesystem.h
  41. 10 10
      engine/core/filesystem/null_file.h
  42. 2 2
      engine/core/filesystem/reader_writer.h
  43. 0 0
      engine/core/functional.h
  44. 6 6
      engine/core/json/json.cpp
  45. 5 5
      engine/core/json/json.h
  46. 13 13
      engine/core/json/json_parser.cpp
  47. 5 5
      engine/core/json/json_parser.h
  48. 2 2
      engine/core/log.h
  49. 0 0
      engine/core/macros.h
  50. 7 7
      engine/core/math/aabb.h
  51. 1 1
      engine/core/math/color4.cpp
  52. 8 8
      engine/core/math/color4.h
  53. 5 5
      engine/core/math/frustum.h
  54. 7 7
      engine/core/math/intersection.h
  55. 2 2
      engine/core/math/math_types.h
  56. 3 3
      engine/core/math/math_utils.h
  57. 8 8
      engine/core/math/matrix3x3.h
  58. 11 11
      engine/core/math/matrix4x4.h
  59. 4 4
      engine/core/math/plane.h
  60. 6 6
      engine/core/math/quaternion.h
  61. 0 0
      engine/core/math/random.h
  62. 2 2
      engine/core/math/ray.h
  63. 9 9
      engine/core/math/sphere.h
  64. 4 4
      engine/core/math/vector2.h
  65. 5 5
      engine/core/math/vector3.h
  66. 5 5
      engine/core/math/vector4.h
  67. 1 1
      engine/core/mem/allocator.h
  68. 2 2
      engine/core/mem/linear_allocator.cpp
  69. 1 1
      engine/core/mem/linear_allocator.h
  70. 3 3
      engine/core/mem/memory.cpp
  71. 3 3
      engine/core/mem/memory.h
  72. 0 0
      engine/core/mem/memory_types.h
  73. 2 2
      engine/core/mem/pool_allocator.cpp
  74. 1 1
      engine/core/mem/pool_allocator.h
  75. 4 4
      engine/core/mem/proxy_allocator.cpp
  76. 2 2
      engine/core/mem/proxy_allocator.h
  77. 2 2
      engine/core/mem/stack_allocator.cpp
  78. 1 1
      engine/core/mem/stack_allocator.h
  79. 2 2
      engine/core/mem/temp_allocator.h
  80. 6 6
      engine/core/profiler.h
  81. 2 2
      engine/core/settings/float_setting.cpp
  82. 1 1
      engine/core/settings/float_setting.h
  83. 2 2
      engine/core/settings/int_setting.cpp
  84. 1 1
      engine/core/settings/int_setting.h
  85. 3 3
      engine/core/settings/string_setting.cpp
  86. 2 2
      engine/core/settings/string_setting.h
  87. 6 6
      engine/core/strings/dynamic_string.h
  88. 10 10
      engine/core/strings/path.cpp
  89. 2 2
      engine/core/strings/path.h
  90. 3 3
      engine/core/strings/string_stream.h
  91. 26 26
      engine/core/strings/string_utils.h
  92. 3 3
      engine/core/thread/atomic_int.h
  93. 3 3
      engine/core/thread/mutex.h
  94. 5 5
      engine/core/thread/semaphore.h
  95. 7 7
      engine/core/thread/thread.h
  96. 1 1
      engine/core/types.h
  97. 133 0
      engine/crown.h
  98. 32 32
      engine/device.cpp
  99. 6 6
      engine/device.h
  100. 2 2
      engine/input/accelerometer.h

+ 0 - 133
engine/Crown.h

@@ -1,133 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#pragma once
-
-// Core
-#include "Assert.h"
-#include "Types.h"
-#include "Args.h"
-#include "Log.h"
-
-// Core/Math
-#include "AABB.h"
-#include "Color4.h"
-#include "Frustum.h"
-#include "Intersection.h"
-#include "MathUtils.h"
-#include "Matrix3x3.h"
-#include "Matrix4x4.h"
-#include "Plane.h"
-#include "Quaternion.h"
-#include "Random.h"
-#include "Ray.h"
-#include "Sphere.h"
-#include "Vector2.h"
-#include "Vector3.h"
-#include "Vector4.h"
-
-// Core/Containers
-#include "ContainerTypes.h"
-#include "EventStream.h"
-#include "Hash.h"
-#include "IdArray.h"
-#include "IdTable.h"
-#include "Map.h"
-#include "PriorityQueue.h"
-#include "Queue.h"
-#include "Vector.h"
-
-// Core/Strings
-#include "StringUtils.h"
-#include "StringStream.h"
-#include "StringUtils.h"
-#include "Path.h"
-
-// Core/Mem
-#include "Memory.h"
-#include "Allocator.h"
-#include "TempAllocator.h"
-#include "LinearAllocator.h"
-#include "StackAllocator.h"
-#include "ProxyAllocator.h"
-#include "PoolAllocator.h"
-
-// Core/Filesystem
-#include "DiskFile.h"
-#include "File.h"
-#include "Filesystem.h"
-#include "NullFile.h"
-#include "ReaderWriter.h"
-
-// Core/Json
-#include "JSON.h"
-#include "JSONParser.h"
-
-// Core/Settings
-#include "IntSetting.h"
-#include "FloatSetting.h"
-#include "StringSetting.h"
-
-// Engine
-#include "Camera.h"
-#include "Device.h"
-#include "ConsoleServer.h"
-
-// Engine/Input
-#include "Keyboard.h"
-#include "KeyCode.h"
-#include "Mouse.h"
-#include "Touch.h"
-
-// Engine/Lua
-#include "LuaStack.h"
-#include "LuaEnvironment.h"
-
-// Engine/Os
-#include "Thread.h"
-#include "Mutex.h"
-#include "OsFile.h"
-#include "OsWindow.h"
-#include "OsSocket.h"
-
-// Engine/Renderers
-#include "Renderer.h"
-#include "RenderContext.h"
-#include "PixelFormat.h"
-#include "VertexFormat.h"
-
-// Engine/Resource
-#include "Bundle.h"
-#include "ResourceLoader.h"
-#include "ResourceManager.h"
-#include "TextureResource.h"
-#include "MeshResource.h"
-#include "SoundResource.h"
-#include "MaterialResource.h"
-#include "FontResource.h"
-
-// Engine/Audio
-#include "SoundWorld.h"

+ 10 - 10
engine/audio/backend/ALSoundWorld.cpp → engine/audio/backend/al_sound_world.cpp

@@ -27,16 +27,16 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <AL/al.h>
 #include <AL/alc.h>
 
-#include "SoundWorld.h"
-#include "IdArray.h"
-#include "Allocator.h"
-#include "Vector3.h"
-#include "Matrix4x4.h"
-#include "Resource.h"
-#include "SoundResource.h"
-#include "ContainerTypes.h"
-#include "TempAllocator.h"
-#include "Log.h"
+#include "sound_world.h"
+#include "id_array.h"
+#include "allocator.h"
+#include "vector3.h"
+#include "matrix4x4.h"
+#include "resource.h"
+#include "sound_resource.h"
+#include "container_types.h"
+#include "temp_allocator.h"
+#include "log.h"
 
 namespace crown
 {

+ 14 - 14
engine/audio/backend/SLESSoundWorld.cpp → engine/audio/backend/sles_sound_world.cpp

@@ -27,16 +27,16 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <SLES/OpenSLES.h>
 #include <SLES/OpenSLES_Android.h>
 
-#include "SoundWorld.h"
-#include "IdArray.h"
-#include "Allocator.h"
-#include "Vector3.h"
-#include "Matrix4x4.h"
-#include "Resource.h"
-#include "SoundResource.h"
-#include "ContainerTypes.h"
-#include "TempAllocator.h"
-#include "Queue.h"
+#include "sound_world.h"
+#include "id_array.h"
+#include "allocator.h"
+#include "vector3.h"
+#include "matrix4x4.h"
+#include "resource.h"
+#include "sound_resource.h"
+#include "container_types.h"
+#include "temp_allocator.h"
+#include "queue.h"
 
 namespace crown
 {
@@ -93,7 +93,7 @@ namespace audio_system
 		const SLInterfaceID ids1[] = {SL_IID_VOLUME};
 		const SLboolean reqs1[] = {SL_BOOLEAN_FALSE};
 
-		SL_CHECK((*s_sl_engine_itf)->CreateOutputMix(s_sl_engine_itf, &s_sl_output_mix, 1, ids1, reqs1)); 
+		SL_CHECK((*s_sl_engine_itf)->CreateOutputMix(s_sl_engine_itf, &s_sl_output_mix, 1, ids1, reqs1));
 		SL_CHECK((*s_sl_output_mix)->Realize(s_sl_output_mix, SL_BOOLEAN_FALSE));
 	}
 
@@ -196,7 +196,7 @@ struct SoundInstance
 			case 96000: format_pcm.samplesPerSec = SL_SAMPLINGRATE_96; break;
 			case 192000: format_pcm.samplesPerSec = SL_SAMPLINGRATE_192; break;
 			default: CE_FATAL("Oops, sample rate not supported"); break;
-		}	
+		}
 
 		format_pcm.bitsPerSample = SL_PCMSAMPLEFORMAT_FIXED_16;
 		format_pcm.containerSize = SL_PCMSAMPLEFORMAT_FIXED_16;
@@ -287,7 +287,7 @@ struct SoundInstance
 	{
 		SLuint32 state;
 		SL_CHECK((*play_itf())->GetPlayState(play_itf(), &state));
-		return state == SL_PLAYSTATE_PLAYING;	
+		return state == SL_PLAYSTATE_PLAYING;
 	}
 
 	bool finished()
@@ -326,7 +326,7 @@ struct SoundInstance
 		// 	{
 		// 		s->m_decoder.rewind();
 		// 		s->m_decoder.stream();
-		// 		(*s->m_player_bufferqueue)->Enqueue(s->m_player_bufferqueue, s->m_decoder.data(), s->m_decoder.size());	
+		// 		(*s->m_player_bufferqueue)->Enqueue(s->m_player_bufferqueue, s->m_decoder.data(), s->m_decoder.size());
 		// 	}
 		// 	else
 		// 	{

+ 2 - 2
engine/audio/SoundWorld.h → engine/audio/sound_world.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {
@@ -101,4 +101,4 @@ public:
 	static void destroy(Allocator& a, SoundWorld* sw);
 };
 
-} // namespace crown 
+} // namespace crown

+ 10 - 10
engine/compilers/BundleCompiler.cpp → engine/compilers/bundle_compiler.cpp

@@ -24,16 +24,16 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "BundleCompiler.h"
-#include "Vector.h"
-#include "DynamicString.h"
-#include "Allocator.h"
-#include "OS.h"
-#include "Log.h"
-#include "Resource.h"
-#include "Path.h"
-#include "DiskFilesystem.h"
-#include "TempAllocator.h"
+#include "bundle_compiler.h"
+#include "vector.h"
+#include "dynamic_string.h"
+#include "allocator.h"
+#include "os.h"
+#include "log.h"
+#include "resource.h"
+#include "path.h"
+#include "disk_filesystem.h"
+#include "temp_allocator.h"
 #include <inttypes.h>
 
 namespace crown

+ 3 - 3
engine/compilers/BundleCompiler.h → engine/compilers/bundle_compiler.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "DiskFilesystem.h"
-#include "DynamicString.h"
-#include "Vector.h"
+#include "disk_filesystem.h"
+#include "dynamic_string.h"
+#include "vector.h"
 
 namespace crown
 {

+ 2 - 2
engine/Config.h → engine/config.h

@@ -122,7 +122,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 	#undef CROWN_CPU_JIT
 	#define CROWN_CPU_JIT 1
 	#define CROWN_CACHE_LINE_SIZE 64
-#endif // 
+#endif //
 
 #if defined(__x86_64__) || defined(_M_X64) || defined(__64BIT__) || defined(__powerpc64__) || defined(__ppc64__)
 	#undef CROWN_ARCH_64BIT
@@ -205,7 +205,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #define CE_MAX_MESH_COMPONENTS				16					// Per unit
 #define CE_MAX_SPRITE_COMPONENTS			16					// Per unit
 #define CE_MAX_ACTOR_COMPONENTS				16					// Per unit
-#define CE_MAX_MATERIAL_COMPONENTS			16					// Per unit				
+#define CE_MAX_MATERIAL_COMPONENTS			16					// Per unit
 
 #define CE_MAX_CONSOLE_CLIENTS				32
 

+ 13 - 13
engine/ConsoleServer.cpp → engine/console_server.cpp

@@ -24,18 +24,18 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "ConsoleServer.h"
-#include "JSONParser.h"
-#include "TempAllocator.h"
-#include "StringStream.h"
-#include "Log.h"
-#include "Device.h"
-#include "ProxyAllocator.h"
-#include "LuaEnvironment.h"
-#include "File.h"
-#include "Filesystem.h"
-#include "MathUtils.h"
-#include "Memory.h"
+#include "console_server.h"
+#include "json_parser.h"
+#include "temp_allocator.h"
+#include "string_stream.h"
+#include "log.h"
+#include "device.h"
+#include "proxy_allocator.h"
+#include "lua_environment.h"
+#include "file.h"
+#include "filesystem.h"
+#include "math_utils.h"
+#include "memory.h"
 
 namespace crown
 {
@@ -209,7 +209,7 @@ ReadResult ConsoleServer::update_client(TCPSocket client)
 void ConsoleServer::process(TCPSocket client, const char* request)
 {
 	JSONParser parser(request);
-	DynamicString type; 
+	DynamicString type;
 	parser.root().key("type").to_string(type);
 
 	// Determine request type

+ 6 - 6
engine/ConsoleServer.h → engine/console_server.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "OsSocket.h"
-#include "ContainerTypes.h"
-#include "Queue.h"
-#include "IdArray.h"
-#include "Config.h"
+#include "os_socket.h"
+#include "container_types.h"
+#include "queue.h"
+#include "id_array.h"
+#include "config.h"
 
 namespace crown
 {
@@ -44,7 +44,7 @@ struct LogSeverity
 		WARN	= 1,
 		ERROR	= 2,
 		DEBUG	= 3
-	};	
+	};
 };
 
 struct Client

+ 3 - 3
engine/core/Args.h → engine/core/args.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Types.h"
-#include "StringUtils.h"
+#include "assert.h"
+#include "types.h"
+#include "string_utils.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/Assert.h → engine/core/assert.h

@@ -28,8 +28,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #include <cstdlib>
 #include <cstdio>
-#include "Config.h"
-#include "Error.h"
+#include "config.h"
+#include "error.h"
 
 #if defined(CROWN_DEBUG)
 	#define CE_ASSERT(condition, msg, ...) do { if (!(condition)) {\

+ 3 - 3
engine/core/compressors/Compressor.h → engine/core/compressors/compressor.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Allocator.h"
+#include "types.h"
+#include "allocator.h"
 
 namespace crown
 {
@@ -51,7 +51,7 @@ public:
 	virtual uint8_t* 	uncompress(const void* data, size_t in_size, size_t& out_size) = 0;
 
 protected:
-	
+
 	Allocator& 			m_allocator;
 };
 

+ 2 - 2
engine/core/compressors/ZipCompressor.cpp → engine/core/compressors/zip_compressor.cpp

@@ -27,8 +27,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <cstring>
 
 //#include "zlib.h"
-#include "Assert.h"
-#include "ZipCompressor.h"
+#include "assert.h"
+#include "zip_compressor.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/compressors/ZipCompressor.h → engine/core/compressors/zip_compressor.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Compressor.h"
+#include "compressor.h"
 
 namespace crown
 {
@@ -38,7 +38,7 @@ public:
 
 				ZipCompressor(Allocator& allocator);
 				~ZipCompressor();
-	
+
 	/// @copydoc Compressor::compress()
 	uint8_t* 	compress(const void* data, size_t in_size, size_t& out_size);
 

+ 3 - 3
engine/core/containers/Array.h → engine/core/containers/array.h

@@ -27,9 +27,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include <cstring>
-#include "Assert.h"
-#include "ContainerTypes.h"
-#include "Allocator.h"
+#include "assert.h"
+#include "container_types.h"
+#include "allocator.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/containers/Blob.h → engine/core/containers/blob.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Assert.h"
+#include "types.h"
+#include "assert.h"
 
 namespace crown
 {

+ 4 - 4
engine/core/containers/ContainerTypes.h → engine/core/containers/container_types.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "MemoryTypes.h"
-#include "Functional.h"
+#include "types.h"
+#include "memory_types.h"
+#include "functional.h"
 
 namespace crown
 {
@@ -125,7 +125,7 @@ template<typename T>
 struct Hash
 {
 	Hash(Allocator &a);
-	
+
 	struct Entry
 	{
 		uint64_t key;

+ 2 - 2
engine/core/containers/DynamicBlob.h → engine/core/containers/dynamic_blob.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Allocator.h"
-#include "Array.h"
+#include "allocator.h"
+#include "array.h"
 
 namespace crown
 {

+ 4 - 4
engine/core/containers/EventStream.h → engine/core/containers/event_stream.h

@@ -26,14 +26,14 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Array.h"
+#include "assert.h"
+#include "array.h"
 
 namespace crown
 {
 
 /// Array of generic event structs.
-/// 
+///
 /// @ingroup Containers
 typedef Array<char> EventStream;
 
@@ -51,7 +51,7 @@ namespace event_stream
 		uint32_t size;
 	};
 
-	/// Appends the @a event of the given @a type and @a size to the stream @a s. 
+	/// Appends the @a event of the given @a type and @a size to the stream @a s.
 	inline void write(EventStream& s, uint32_t type, uint32_t size, const void* event)
 	{
 		Header header;

+ 5 - 5
engine/core/containers/Hash.h → engine/core/containers/hash.h

@@ -25,13 +25,13 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Array.h"
-#include "ContainerTypes.h"
+#include "array.h"
+#include "container_types.h"
 
 namespace crown {
 
 	/// The hash function stores its data in a "list-in-an-array" where
-	/// indices are used instead of pointers. 
+	/// indices are used instead of pointers.
 	///
 	/// When items are removed, the array-list is repacked to always keep
 	/// it tightly ordered.
@@ -96,7 +96,7 @@ namespace crown {
 	namespace hash_internal
 	{
 		const uint32_t END_OF_LIST = 0xffffffffu;
-		
+
 		struct FindResult
 		{
 			uint32_t hash_i;
@@ -208,7 +208,7 @@ namespace crown {
 
 			h._data[i].next = fr.data_i;
 			return i;
-		}	
+		}
 
 		template<typename T> void find_and_erase(Hash<T> &h, uint64_t key)
 		{

+ 3 - 3
engine/core/containers/IdArray.h → engine/core/containers/id_array.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Types.h"
-#include "ContainerTypes.h"
+#include "assert.h"
+#include "types.h"
+#include "container_types.h"
 
 namespace crown
 {

+ 3 - 3
engine/core/containers/IdTable.h → engine/core/containers/id_table.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Allocator.h"
-#include "Types.h"
+#include "assert.h"
+#include "allocator.h"
+#include "types.h"
 
 namespace crown
 {

+ 4 - 4
engine/core/containers/Map.h → engine/core/containers/map.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "ContainerTypes.h"
-#include "Vector.h"
+#include "container_types.h"
+#include "vector.h"
 
 // #define RBTREE_VERIFY
 
@@ -83,14 +83,14 @@ namespace map_internal
 		CE_ASSERT(n < vector::size(m.m_data), "Index out of bounds (size = %d, n = %d)", vector::size(m.m_data), n);
 		return m.m_data[n].parent;
 	}
-	
+
 	template <typename TKey, typename TValue>
 	inline uint32_t left(const Map<TKey, TValue>& m, uint32_t n)
 	{
 		CE_ASSERT(n < vector::size(m.m_data), "Index out of bounds (size = %d, n = %d)", vector::size(m.m_data), n);
 		return m.m_data[n].left;
 	}
-	
+
 	template <typename TKey, typename TValue>
 	inline uint32_t right(const Map<TKey, TValue>& m, uint32_t n)
 	{

+ 2 - 2
engine/core/containers/PriorityQueue.h → engine/core/containers/priority_queue.h

@@ -27,8 +27,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include <algorithm>
-#include "ContainerTypes.h"
-#include "Array.h"
+#include "container_types.h"
+#include "array.h"
 
 namespace crown
 {

+ 5 - 5
engine/core/containers/Queue.h → engine/core/containers/queue.h

@@ -27,9 +27,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include <cstring>
-#include "ContainerTypes.h"
-#include "Array.h"
-#include "Assert.h"
+#include "container_types.h"
+#include "array.h"
+#include "assert.h"
 
 namespace crown
 {
@@ -58,7 +58,7 @@ namespace queue
 
 	/// 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.
 	template<typename T> void grow(Queue<T>& q, uint32_t min_capacity);
 
@@ -205,7 +205,7 @@ namespace queue
 	{
 		if (q.space() < n)
 		{
-			q.grow(q.size() + n);		
+			q.grow(q.size() + n);
 		}
 
 		const uint32_t size = array::size(q.m_queue);

+ 1 - 1
engine/core/containers/SortMap.h → engine/core/containers/sort_map.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Array.h"
+#include "array.h"
 #include <algorithm>
 
 namespace crown

+ 3 - 3
engine/core/containers/Vector.h → engine/core/containers/vector.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Assert.h"
-#include "Array.h"
+#include "types.h"
+#include "assert.h"
+#include "array.h"
 
 namespace crown
 {

+ 6 - 6
engine/core/Error.h → engine/core/error.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Config.h"
-#include "Types.h"
-#include "Macros.h"
+#include "config.h"
+#include "types.h"
+#include "macros.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -59,11 +59,11 @@ inline void log_backtrace()
 		// find parantheses and +address offset surrounding mangled name
 		for (char *p = messages[i]; *p; ++p)
 		{
-			if (*p == '(') 
+			if (*p == '(')
 			{
-				mangled_name = p; 
+				mangled_name = p;
 			}
-			else if (*p == '+') 
+			else if (*p == '+')
 			{
 				offset_begin = p;
 			}

+ 7 - 7
engine/core/filesystem/DiskFile.cpp → engine/core/filesystem/disk_file.cpp

@@ -24,11 +24,11 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "DiskFile.h"
-#include "Types.h"
-#include "Log.h"
-#include "MathUtils.h"
-#include "Memory.h"
+#include "disk_file.h"
+#include "types.h"
+#include "log.h"
+#include "math_utils.h"
+#include "memory.h"
 
 namespace crown
 {
@@ -158,7 +158,7 @@ bool DiskFile::is_valid()
 void DiskFile::flush()
 {
 	check_valid();
-	
+
 	// FIXME implement flush in File
 }
 
@@ -174,7 +174,7 @@ size_t DiskFile::position()
 size_t DiskFile::size()
 {
 	check_valid();
-	
+
 	return m_file.size();
 }
 

+ 17 - 17
engine/core/filesystem/DiskFile.h → engine/core/filesystem/disk_file.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "OsFile.h"
-#include "File.h"
+#include "assert.h"
+#include "os_file.h"
+#include "file.h"
 
 namespace crown
 {
@@ -44,46 +44,46 @@ public:
 	DiskFile(FileOpenMode mode, const char* filename);
 	virtual ~DiskFile();
 
-	/// @copydoc File::seek() 
+	/// @copydoc File::seek()
 	void seek(size_t position);
 
-	/// @copydoc File::seek_to_end() 
+	/// @copydoc File::seek_to_end()
 	void seek_to_end();
 
-	/// @copydoc File::skip() 
+	/// @copydoc File::skip()
 	void skip(size_t bytes);
 
-	/// @copydoc File::read() 
+	/// @copydoc File::read()
 	void read(void* buffer, size_t size);
 
-	/// @copydoc File::write() 
+	/// @copydoc File::write()
 	void write(const void* buffer, size_t size);
 
-	/// @copydoc File::copy_to() 
+	/// @copydoc File::copy_to()
 	bool copy_to(File& file, size_t size = 0);
 
-	/// @copydoc File::flush() 
+	/// @copydoc File::flush()
 	void flush();
 
-	/// @copydoc File::end_of_file() 
+	/// @copydoc File::end_of_file()
 	bool end_of_file();
 
-	/// @copydoc File::is_valid() 
+	/// @copydoc File::is_valid()
 	bool is_valid();
 
-	/// @copydoc File::size() 
+	/// @copydoc File::size()
 	size_t size();
 
-	/// @copydoc File::position() 
+	/// @copydoc File::position()
 	size_t position();
 
-	/// @copydoc File::can_read() 
+	/// @copydoc File::can_read()
 	bool can_read() const;
 
-	/// @copydoc File::can_write() 
+	/// @copydoc File::can_write()
 	bool can_write() const;
 
-	/// @copydoc File::can_seek() 
+	/// @copydoc File::can_seek()
 	bool can_seek() const;
 
 protected:

+ 5 - 5
engine/core/filesystem/DiskFilesystem.cpp → engine/core/filesystem/disk_filesystem.cpp

@@ -24,11 +24,11 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "DiskFilesystem.h"
-#include "StringUtils.h"
-#include "TempAllocator.h"
-#include "DiskFile.h"
-#include "Vector.h"
+#include "disk_filesystem.h"
+#include "string_utils.h"
+#include "temp_allocator.h"
+#include "disk_file.h"
+#include "vector.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/filesystem/DiskFilesystem.h → engine/core/filesystem/disk_filesystem.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Filesystem.h"
-#include "OS.h" // For MAX_PATH_LENGTH
+#include "filesystem.h"
+#include "os.h" // for max_path_length
 
 namespace crown
 {

+ 4 - 4
engine/core/filesystem/File.cpp → engine/core/filesystem/file.cpp

@@ -24,10 +24,10 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "File.h"
-#include "Types.h"
-#include "Compressor.h"
-#include "Memory.h"
+#include "file.h"
+#include "types.h"
+#include "compressor.h"
+#include "memory.h"
 
 namespace crown
 {

+ 3 - 3
engine/core/filesystem/File.h → engine/core/filesystem/file.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {
@@ -40,7 +40,7 @@ enum FileOpenMode
 class Compressor;
 
 /// An abstraction to access data files.
-/// 
+///
 /// It represents a flow of data attached to a 'file' which can be an archived file,
 /// a regular file, a location in memory or anything that can be read or wrote.
 /// A File is an abstraction to interact with these in an uniform way; every file
@@ -90,7 +90,7 @@ public:
 
 	/// Returns whether the file is valid.
 	/// A file is valid when the buffer where it operates
-	/// exists. (i.e. a file descriptor is attached to the file, 
+	/// exists. (i.e. a file descriptor is attached to the file,
 	/// a memory area is attached to the file etc.)
 	virtual bool is_valid() = 0;
 

+ 3 - 3
engine/core/filesystem/Filesystem.h → engine/core/filesystem/filesystem.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "File.h"
-#include "ContainerTypes.h"
-#include "DynamicString.h"
+#include "file.h"
+#include "container_types.h"
+#include "dynamic_string.h"
 
 namespace crown
 {

+ 0 - 0
engine/core/filesystem/FilesystemTypes.h → engine/core/filesystem/filesystem_types.h


+ 11 - 11
engine/core/filesystem/NetworkFile.cpp → engine/core/filesystem/network_file.cpp

@@ -24,17 +24,17 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "JSONParser.h"
-#include "ContainerTypes.h"
-#include "Log.h"
-#include "MathUtils.h"
-#include "NetworkFile.h"
-#include "NetworkFilesystem.h"
-#include "StringStream.h"
-#include "StringUtils.h"
-#include "TempAllocator.h"
-#include "Types.h"
-#include "DynamicString.h"
+#include "json_parser.h"
+#include "container_types.h"
+#include "log.h"
+#include "math_utils.h"
+#include "network_file.h"
+#include "network_filesystem.h"
+#include "string_stream.h"
+#include "string_utils.h"
+#include "temp_allocator.h"
+#include "types.h"
+#include "dynamic_string.h"
 
 namespace crown
 {

+ 18 - 18
engine/core/filesystem/NetworkFile.h → engine/core/filesystem/network_file.h

@@ -26,10 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "File.h"
-#include "OsSocket.h"
-#include "File.h"
+#include "assert.h"
+#include "file.h"
+#include "os_socket.h"
+#include "file.h"
 
 namespace crown
 {
@@ -45,46 +45,46 @@ public:
 	NetworkFile(const NetAddress& addr, uint16_t port, const char* filename);
 	virtual ~NetworkFile();
 
-	/// @copydoc File::seek() 
+	/// @copydoc File::seek()
 	void seek(size_t position);
 
-	/// @copydoc File::seek_to_end() 
+	/// @copydoc File::seek_to_end()
 	void seek_to_end();
 
-	/// @copydoc File::skip() 
+	/// @copydoc File::skip()
 	void skip(size_t bytes);
 
-	/// @copydoc File::read() 
+	/// @copydoc File::read()
 	void read(void* buffer, size_t size);
 
-	/// @copydoc File::write() 
+	/// @copydoc File::write()
 	void write(const void* buffer, size_t size);
 
-	/// @copydoc File::copy_to() 
+	/// @copydoc File::copy_to()
 	bool copy_to(File& file, size_t size = 0);
 
-	/// @copydoc File::flush() 
+	/// @copydoc File::flush()
 	void flush();
 
-	/// @copydoc File::end_of_file() 
+	/// @copydoc File::end_of_file()
 	bool end_of_file();
 
-	/// @copydoc File::is_valid() 
+	/// @copydoc File::is_valid()
 	bool is_valid();
 
-	/// @copydoc File::size() 
+	/// @copydoc File::size()
 	size_t size();
 
-	/// @copydoc File::position() 
+	/// @copydoc File::position()
 	size_t position();
 
-	/// @copydoc File::can_read() 
+	/// @copydoc File::can_read()
 	bool can_read() const;
 
-	/// @copydoc File::can_write() 
+	/// @copydoc File::can_write()
 	bool can_write() const;
 
-	/// @copydoc File::can_seek() 
+	/// @copydoc File::can_seek()
 	bool can_seek() const;
 
 private:

+ 7 - 7
engine/core/filesystem/NetworkFilesystem.cpp → engine/core/filesystem/network_filesystem.cpp

@@ -24,13 +24,13 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "JSONParser.h"
-#include "NetworkFile.h"
-#include "NetworkFilesystem.h"
-#include "OS.h"
-#include "StringUtils.h"
-#include "TempAllocator.h"
-#include "StringStream.h"
+#include "json_parser.h"
+#include "network_file.h"
+#include "network_filesystem.h"
+#include "os.h"
+#include "string_utils.h"
+#include "temp_allocator.h"
+#include "string_stream.h"
 
 namespace crown
 {

+ 4 - 4
engine/core/filesystem/NetworkFilesystem.h → engine/core/filesystem/network_filesystem.h

@@ -26,10 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Filesystem.h"
-#include "OsSocket.h"
-#include "OS.h" // For MAX_PATH_LENGTH
-#include "Log.h"
+#include "filesystem.h"
+#include "os_socket.h"
+#include "os.h" // for max_path_length
+#include "log.h"
 
 namespace crown
 {

+ 10 - 10
engine/core/filesystem/NullFile.h → engine/core/filesystem/null_file.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "File.h"
+#include "file.h"
 
 namespace crown
 {
@@ -54,7 +54,7 @@ public:
 
 	/// @copydoc File::skip()
 	void		skip(size_t bytes) { (void)bytes; }
-				
+
 	/// @copydoc File::read()
 	/// @note
 	///	Fills buffer with zeroes
@@ -75,43 +75,43 @@ public:
 	bool		copy_to(File& file, size_t size = 0)
 	{
 		char zero = 0;
-		file.write(&zero, size);		
+		file.write(&zero, size);
 		return true;
 	}
 
 	/// @copydoc File::flush()
 	void		flush() {};
-				
+
 	/// @copydoc File::is_valid()
 	/// @note
 	///	Returns always true
 	bool		is_valid() { return true; }
-				
+
 	/// @copydoc File::end_of_file()
 	/// @note
 	///	Returns always false
 	bool		end_of_file() { return false; }
-				
+
 	/// @copydoc File::size()
 	/// @note
 	///	Returns always 0xFFFFFFFF
 	size_t		size() { return ~0; }
-				
+
 	/// @copydoc File::position()
 	/// @note
 	///	Returns always zero
 	size_t		position() { return 0; }
-				
+
 	/// @copydoc File::can_read()
 	/// @note
 	///	Returns always true
 	bool		can_read() { return true; }
-				
+
 	/// @copydoc File::can_write()
 	/// @note
 	///	Returns always true
 	bool		can_write() { return true; }
-				
+
 	/// @copydoc File::can_seek()
 	/// @note
 	///	Returns always true

+ 2 - 2
engine/core/filesystem/ReaderWriter.h → engine/core/filesystem/reader_writer.h

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "Types.h"
-#include "File.h"
+#include "types.h"
+#include "file.h"
 
 namespace crown
 {

+ 0 - 0
engine/core/Functional.h → engine/core/functional.h


+ 6 - 6
engine/core/json/JSON.cpp → engine/core/json/json.cpp

@@ -24,11 +24,11 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "JSON.h"
-#include "ContainerTypes.h"
-#include "StringUtils.h"
-#include "DynamicString.h"
-#include "Map.h"
+#include "json.h"
+#include "container_types.h"
+#include "string_utils.h"
+#include "dynamic_string.h"
+#include "map.h"
 
 namespace crown
 {
@@ -362,7 +362,7 @@ namespace json
 				ch = next(ch, 'f');
 				ch = next(ch, 'a');
 				ch = next(ch, 'l');
-				ch = next(ch, 's');			
+				ch = next(ch, 's');
 				ch = next(ch, 'e');
 				return false;
 			}

+ 5 - 5
engine/core/json/JSON.h → engine/core/json/json.h

@@ -24,9 +24,9 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "Types.h"
-#include "DynamicString.h"
-#include "ContainerTypes.h"
+#include "types.h"
+#include "dynamic_string.h"
+#include "container_types.h"
 
 #pragma once
 
@@ -56,13 +56,13 @@ struct JSONType
 /// @ingroup JSON
 namespace json
 {
-	/// Returns the data type of the JSON string @a s. 
+	/// Returns the data type of the JSON string @a s.
 	JSONType::Enum type(const char* s);
 
 	/// Parses the JSON string @a s ad puts it into @a str.
 	void parse_string(const char* s, DynamicString& str);
 
-	/// Returns the JSON number @a s as double. 
+	/// Returns the JSON number @a s as double.
 	double parse_number(const char* s);
 
 	/// Returns the JSON number @a s as int.

+ 13 - 13
engine/core/json/JSONParser.cpp → engine/core/json/json_parser.cpp

@@ -24,18 +24,18 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "JSONParser.h"
-#include "JSON.h"
-#include "TempAllocator.h"
-#include "StringUtils.h"
-#include "Vector.h"
-#include "Map.h"
-#include "Vector2.h"
-#include "Vector3.h"
-#include "Vector4.h"
-#include "Quaternion.h"
-#include "Matrix4x4.h"
-#include "File.h"
+#include "json_parser.h"
+#include "json.h"
+#include "temp_allocator.h"
+#include "string_utils.h"
+#include "vector.h"
+#include "map.h"
+#include "vector2.h"
+#include "vector3.h"
+#include "vector4.h"
+#include "quaternion.h"
+#include "matrix4x4.h"
+#include "file.h"
 
 namespace crown
 {
@@ -378,7 +378,7 @@ bool JSONElement::is_number() const
 {
 	if (m_at != NULL)
 	{
-		return json::type(m_at) == JSONType::NUMBER;		
+		return json::type(m_at) == JSONType::NUMBER;
 	}
 
 	return false;

+ 5 - 5
engine/core/json/JSONParser.h → engine/core/json/json_parser.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "ContainerTypes.h"
-#include "MathTypes.h"
-#include "Macros.h"
-#include "Resource.h"
+#include "types.h"
+#include "container_types.h"
+#include "math_types.h"
+#include "macros.h"
+#include "resource.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/Log.h → engine/core/log.h

@@ -27,8 +27,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #if defined(CROWN_DEBUG)
-	#include "Device.h"
-	#include "ConsoleServer.h"
+	#include "device.h"
+	#include "console_server.h"
 	#define CE_LOGI(msg, ...) crown::device()->console()->log_to_all(crown::LogSeverity::INFO, msg, ##__VA_ARGS__)
 	#define CE_LOGD(msg, ...) crown::device()->console()->log_to_all(crown::LogSeverity::DEBUG, msg, ##__VA_ARGS__)
 	#define CE_LOGE(msg, ...) crown::device()->console()->log_to_all(crown::LogSeverity::ERROR, msg, ##__VA_ARGS__)

+ 0 - 0
engine/core/Macros.h → engine/core/macros.h


+ 7 - 7
engine/core/math/AABB.h → engine/core/math/aabb.h

@@ -26,12 +26,12 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "MathTypes.h"
-#include "Matrix4x4.h"
-#include "Sphere.h"
-#include "Types.h"
-#include "Vector3.h"
+#include "assert.h"
+#include "math_types.h"
+#include "matrix4x4.h"
+#include "sphere.h"
+#include "types.h"
+#include "vector3.h"
 
 namespace crown
 {
@@ -62,7 +62,7 @@ namespace aabb
 	bool contains_point(const AABB& b, const Vector3& p);
 
 	/// Returns the @a index -th vertex of the box.
-	Vector3 vertex(const AABB& b, uint32_t index);		
+	Vector3 vertex(const AABB& b, uint32_t index);
 
 	/// Returns the box enclosing @a b transformed by @a m.
 	AABB transformed(const AABB& b, const Matrix4x4& m);

+ 1 - 1
engine/core/math/Color4.cpp → engine/core/math/color4.cpp

@@ -24,7 +24,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "Color4.h"
+#include "color4.h"
 
 namespace crown
 {

+ 8 - 8
engine/core/math/Color4.h → engine/core/math/color4.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "MathUtils.h"
+#include "types.h"
+#include "math_utils.h"
 
 namespace crown
 {
@@ -38,16 +38,16 @@ namespace crown
 struct Color4
 {
 	Color4();
-	Color4(float r, float g, float b);		
+	Color4(float r, float g, float b);
 	Color4(int r, int g, int b);
 	Color4(float r, float g, float b, float a);
-	Color4(int r, int g, int b, int a);		
+	Color4(int r, int g, int b, int a);
 	explicit Color4(float c[4]);
 
 	/// Construct from 32-bit integer (red at MSB, alpha at LSB)
 	explicit Color4(uint32_t rgba);
 
-	float& operator[](uint32_t i);				
+	float& operator[](uint32_t i);
 	const float& operator[](uint32_t i) const;
 
 	Color4& operator+=(const Color4& c);
@@ -244,7 +244,7 @@ inline Color4 operator*(float k, Color4 a)
 
 /// Functions to mamipulate Color4
 ///
-/// @ingroup Math 
+/// @ingroup Math
 namespace color4
 {
 	/// Returns the color as a packed 32-bit integer. (RGBA order, alpha assumed = 255)
@@ -253,7 +253,7 @@ namespace color4
 	/// Returns the color as a packed 32-bit integer. (ABGR order, alpha assumed = 255)
 	uint32_t to_bgr(const Color4& c);
 
-	/// Returns the color as a packed 32-bit integer. (RGBA order)	
+	/// Returns the color as a packed 32-bit integer. (RGBA order)
 	uint32_t to_rgba(const Color4& c);
 
 	/// Returns the color as a packed 32-bit integer. (ABGR order)
@@ -262,7 +262,7 @@ namespace color4
 	/// Returns the pointer to the color's data.
 	float* to_float_ptr(Color4& c);
 
-	/// Returns the pointer to the color's data.						
+	/// Returns the pointer to the color's data.
 	const float* to_float_ptr(const Color4& c);
 } // namespace color4
 

+ 5 - 5
engine/core/math/Frustum.h → engine/core/math/frustum.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "MathTypes.h"
-#include "Vector3.h"
-#include "Plane.h"
-#include "Intersection.h"
+#include "types.h"
+#include "math_types.h"
+#include "vector3.h"
+#include "plane.h"
+#include "intersection.h"
 
 namespace crown
 {

+ 7 - 7
engine/core/math/Intersection.h → engine/core/math/intersection.h

@@ -26,13 +26,13 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Ray.h"
-#include "Plane.h"
-#include "Sphere.h"
-#include "Frustum.h"
-#include "MathUtils.h"
-#include "Types.h"
-#include "AABB.h"
+#include "ray.h"
+#include "plane.h"
+#include "sphere.h"
+#include "frustum.h"
+#include "math_utils.h"
+#include "types.h"
+#include "aabb.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/math/MathTypes.h → engine/core/math/math_types.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {
@@ -177,7 +177,7 @@ struct AABB
 struct Plane
 {
 	/// Does nothing for efficiency.
-	Plane();						
+	Plane();
 	Plane(const Vector3& n, float d);
 
 	Vector3 n;

+ 3 - 3
engine/core/math/MathUtils.h → engine/core/math/math_utils.h

@@ -28,9 +28,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #include <math.h>
 
-#include "Assert.h"
-#include "Types.h"
-#include "Memory.h"
+#include "assert.h"
+#include "types.h"
+#include "memory.h"
 
 namespace crown
 {

+ 8 - 8
engine/core/math/Matrix3x3.h → engine/core/math/matrix3x3.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "MathTypes.h"
-#include "Vector3.h"
-#include "Assert.h"
+#include "math_types.h"
+#include "vector3.h"
+#include "assert.h"
 
 namespace crown
 {
@@ -60,7 +60,7 @@ Matrix3x3 operator*(Matrix3x3 a, const Matrix3x3& b);
 namespace matrix3x3
 {
 	const Matrix3x3 IDENTITY = Matrix3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0);
-	
+
 	/// Transposes the matrix @a m and returns the result.
 	Matrix3x3& transpose(Matrix3x3& m);
 
@@ -77,18 +77,18 @@ namespace matrix3x3
 	Matrix3x3 get_inverted(Matrix3x3 m);
 
 	/// Sets the matrix @a m to identity.
-	void set_identity(Matrix3x3& m);							
+	void set_identity(Matrix3x3& m);
 
 	/// Returns the pointer to the matrix's data
 	float* to_float_ptr(Matrix3x3& m);
 
-	/// Returns the pointer to the matrix's data				
+	/// Returns the pointer to the matrix's data
 	const float* to_float_ptr(const Matrix3x3& m);
 
-	/// Returns a 4x4 matrix according to the matrix's rotation portion						
+	/// Returns a 4x4 matrix according to the matrix's rotation portion
 	Matrix4x4 to_matrix4x4(const Matrix3x3& m);
 
-	/// Returns a quaternion according to the matrix's rotation portion							
+	/// Returns a quaternion according to the matrix's rotation portion
 	Quaternion to_quaternion(const Matrix3x3& m);
 } // namespace matrix3x3
 

+ 11 - 11
engine/core/math/Matrix4x4.h → engine/core/math/matrix4x4.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "MathTypes.h"
-#include "Matrix3x3.h"
-#include "Quaternion.h"
-#include "Vector4.h"
-#include "Types.h"
+#include "math_types.h"
+#include "matrix3x3.h"
+#include "quaternion.h"
+#include "vector4.h"
+#include "types.h"
 
 namespace crown
 {
@@ -82,18 +82,18 @@ namespace matrix4x4
 	void set_look_rh(Matrix4x4& m, const Vector3& pos, const Vector3& target, const Vector3& up);
 
 	/// Transposes the matrix @a m and returns the result.
-	Matrix4x4& transpose(Matrix4x4& m);					
+	Matrix4x4& transpose(Matrix4x4& m);
 
-	/// Returns the transposed of the matrix @a m.			
+	/// Returns the transposed of the matrix @a m.
 	Matrix4x4 get_transposed(Matrix4x4 m);
 
-	/// Returns the determinant of the matrix @a m.						
+	/// Returns the determinant of the matrix @a m.
 	float determinant(const Matrix4x4& m);
 
 	/// Inverts the matrix @a m and returns the result.
 	Matrix4x4& invert(Matrix4x4& m);
 
-	/// Returns the inverse of the matrix @a m.				
+	/// Returns the inverse of the matrix @a m.
 	Matrix4x4 get_inverted(Matrix4x4 m);
 
 	/// Sets the matrix @a m to identity.
@@ -118,7 +118,7 @@ namespace matrix4x4
 	void set_z(Matrix4x4& m, const Vector3& z);
 
 	/// Returns the translation portion of the matrix @a m.
-	Vector3 translation(const Matrix4x4& m);	
+	Vector3 translation(const Matrix4x4& m);
 
 	/// Sets the translation portion of the matrix @a m.
 	void set_translation(Matrix4x4& m, const Vector3& trans);
@@ -586,7 +586,7 @@ inline Matrix4x4& Matrix4x4::operator*=(float k)
 inline Matrix4x4& Matrix4x4::operator/=(float k)
 {
 	const float inv_k = 1.0 / k;
-	
+
 	x *= inv_k;
 	y *= inv_k;
 	z *= inv_k;

+ 4 - 4
engine/core/math/Plane.h → engine/core/math/plane.h

@@ -26,10 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Sphere.h"
-#include "Vector3.h"
-#include "MathTypes.h"
+#include "types.h"
+#include "sphere.h"
+#include "vector3.h"
+#include "math_types.h"
 
 namespace crown
 {

+ 6 - 6
engine/core/math/Quaternion.h → engine/core/math/quaternion.h

@@ -26,10 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Vector3.h"
-#include "MathTypes.h"
-#include "Matrix3x3.h"
+#include "types.h"
+#include "vector3.h"
+#include "math_types.h"
+#include "matrix3x3.h"
 
 namespace crown
 {
@@ -166,14 +166,14 @@ inline Quaternion::Quaternion(const Vector3& axis, float angle)
 {
 }
 
-//-----------------------------------------------------------------------------	
+//-----------------------------------------------------------------------------
 inline float& Quaternion::operator[](uint32_t i)
 {
 	CE_ASSERT(i < 4, "Index out of bounds");
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------	
+//-----------------------------------------------------------------------------
 inline const float& Quaternion::operator[](uint32_t i) const
 {
 	CE_ASSERT(i < 4, "Index out of bounds");

+ 0 - 0
engine/core/math/Random.h → engine/core/math/random.h


+ 2 - 2
engine/core/math/Ray.h → engine/core/math/ray.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Vector3.h"
+#include "types.h"
+#include "vector3.h"
 
 namespace crown
 {

+ 9 - 9
engine/core/math/Sphere.h → engine/core/math/sphere.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "MathUtils.h"
-#include "Vector3.h"
+#include "types.h"
+#include "math_utils.h"
+#include "vector3.h"
 
 namespace crown
 {
@@ -48,21 +48,21 @@ public:
 					Sphere(const Vector3& center, float radius);
 					Sphere(const Sphere& a);
 
-	const Vector3&	center() const;		
-	float			radius() const;	
-	float			volume() const;	
+	const Vector3&	center() const;
+	float			radius() const;
+	float			volume() const;
 
 	void			set_center(const Vector3& center);
 	void			set_radius(float radius);
 
 	/// Adds @a count @a points to the sphere expanding if necessary.
-	void			add_points(const Vector3* points, uint32_t count);	
+	void			add_points(const Vector3* points, uint32_t count);
 
 	/// 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 @a p is contained into the sphere.
-	bool			contains_point(const Vector3& p) const;		
+	bool			contains_point(const Vector3& p) const;
 
 private:
 

+ 4 - 4
engine/core/math/Vector2.h → engine/core/math/vector2.h

@@ -26,10 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Types.h"
-#include "MathUtils.h"
-#include "MathTypes.h"
+#include "assert.h"
+#include "types.h"
+#include "math_utils.h"
+#include "math_types.h"
 
 namespace crown
 {

+ 5 - 5
engine/core/math/Vector3.h → engine/core/math/vector3.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Types.h"
-#include "MathUtils.h"
-#include "Vector2.h"
-#include "MathTypes.h"
+#include "assert.h"
+#include "types.h"
+#include "math_utils.h"
+#include "vector2.h"
+#include "math_types.h"
 
 namespace crown
 {

+ 5 - 5
engine/core/math/Vector4.h → engine/core/math/vector4.h

@@ -26,10 +26,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Assert.h"
-#include "Types.h"
-#include "MathUtils.h"
-#include "Vector3.h"
+#include "assert.h"
+#include "types.h"
+#include "math_utils.h"
+#include "vector3.h"
 
 namespace crown
 {
@@ -209,7 +209,7 @@ namespace vector4
 	inline Vector3 to_vector3(const Vector4& a)
 	{
 		return Vector3(a.x, a.y, a.z);
-	}	
+	}
 }
 
 //-----------------------------------------------------------------------------

+ 1 - 1
engine/core/mem/Allocator.h → engine/core/mem/allocator.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/mem/LinearAllocator.cpp → engine/core/mem/linear_allocator.cpp

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "LinearAllocator.h"
-#include "Memory.h"
+#include "linear_allocator.h"
+#include "memory.h"
 
 namespace crown
 {

+ 1 - 1
engine/core/mem/LinearAllocator.h → engine/core/mem/linear_allocator.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Allocator.h"
+#include "allocator.h"
 
 namespace crown
 {

+ 3 - 3
engine/core/mem/Memory.cpp → engine/core/mem/memory.cpp

@@ -24,9 +24,9 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "Memory.h"
-#include "Allocator.h"
-#include "Mutex.h"
+#include "memory.h"
+#include "allocator.h"
+#include "mutex.h"
 
 // //-----------------------------------------------------------------------------
 // void* operator new(size_t) throw (std::bad_alloc)

+ 3 - 3
engine/core/mem/Memory.h → engine/core/mem/memory.h

@@ -27,9 +27,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include <new>
-#include "Types.h"
-#include "Assert.h"
-#include "Allocator.h"
+#include "types.h"
+#include "assert.h"
+#include "allocator.h"
 
 namespace crown
 {

+ 0 - 0
engine/core/mem/MemoryTypes.h → engine/core/mem/memory_types.h


+ 2 - 2
engine/core/mem/PoolAllocator.cpp → engine/core/mem/pool_allocator.cpp

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "PoolAllocator.h"
-#include "Assert.h"
+#include "pool_allocator.h"
+#include "assert.h"
 
 namespace crown
 {

+ 1 - 1
engine/core/mem/PoolAllocator.h → engine/core/mem/pool_allocator.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Allocator.h"
+#include "allocator.h"
 
 namespace crown
 {

+ 4 - 4
engine/core/mem/ProxyAllocator.cpp → engine/core/mem/proxy_allocator.cpp

@@ -24,10 +24,10 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "Assert.h"
-#include "ProxyAllocator.h"
-#include "StringUtils.h"
-#include "Mutex.h"
+#include "assert.h"
+#include "proxy_allocator.h"
+#include "string_utils.h"
+#include "mutex.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/mem/ProxyAllocator.h → engine/core/mem/proxy_allocator.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Allocator.h"
-#include "Macros.h"
+#include "allocator.h"
+#include "macros.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/mem/StackAllocator.cpp → engine/core/mem/stack_allocator.cpp

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "StackAllocator.h"
-#include "Memory.h"
+#include "stack_allocator.h"
+#include "memory.h"
 
 namespace crown
 {

+ 1 - 1
engine/core/mem/StackAllocator.h → engine/core/mem/stack_allocator.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Allocator.h"
+#include "allocator.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/mem/TempAllocator.h → engine/core/mem/temp_allocator.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Allocator.h"
-#include "Memory.h"
+#include "allocator.h"
+#include "memory.h"
 
 namespace crown
 {

+ 6 - 6
engine/core/Profiler.h → engine/core/profiler.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "OS.h"
-#include "Memory.h"
-#include "Mutex.h"
-#include "ScopedMutex.h"
-#include "Macros.h"
+#include "os.h"
+#include "memory.h"
+#include "mutex.h"
+#include "scoped_mutex.h"
+#include "macros.h"
 
 namespace crown
 {
@@ -52,7 +52,7 @@ namespace profiler
 	struct RecordFloat
 	{
 		const char* name;
-		float value; 
+		float value;
 	};
 
 	struct RecordVector3

+ 2 - 2
engine/core/settings/FloatSetting.cpp → engine/core/settings/float_setting.cpp

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "FloatSetting.h"
-#include "StringUtils.h"
+#include "float_setting.h"
+#include "string_utils.h"
 
 namespace crown
 {

+ 1 - 1
engine/core/settings/FloatSetting.h → engine/core/settings/float_setting.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {

+ 2 - 2
engine/core/settings/IntSetting.cpp → engine/core/settings/int_setting.cpp

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "IntSetting.h"
-#include "StringUtils.h"
+#include "int_setting.h"
+#include "string_utils.h"
 
 namespace crown
 {

+ 1 - 1
engine/core/settings/IntSetting.h → engine/core/settings/int_setting.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {

+ 3 - 3
engine/core/settings/StringSetting.cpp → engine/core/settings/string_setting.cpp

@@ -24,8 +24,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "StringSetting.h"
-#include "StringUtils.h"
+#include "string_setting.h"
+#include "string_utils.h"
 
 namespace crown
 {
@@ -93,4 +93,4 @@ StringSetting* StringSetting::find_setting(const char* name)
 	return NULL;
 }
 
-} // namespace crown
+} // namespace crown

+ 2 - 2
engine/core/settings/StringSetting.h → engine/core/settings/string_setting.h

@@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
+#include "types.h"
 
 namespace crown
 {
@@ -59,4 +59,4 @@ private:
 	StringSetting*			m_next;
 };
 
-} // namespace crown
+} // namespace crown

+ 6 - 6
engine/core/strings/DynamicString.h → engine/core/strings/dynamic_string.h

@@ -29,11 +29,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <algorithm>
 #include <cstring>
 
-#include "Assert.h"
-#include "Memory.h"
-#include "StringUtils.h"
-#include "Array.h"
-#include "StringUtils.h"
+#include "assert.h"
+#include "memory.h"
+#include "string_utils.h"
+#include "array.h"
+#include "string_utils.h"
 
 namespace crown
 {
@@ -251,4 +251,4 @@ inline const char* DynamicString::c_str() const
 	return array::begin(m_string);
 }
 
-} // namespace crown
+} // namespace crown

+ 10 - 10
engine/core/strings/Path.cpp → engine/core/strings/path.cpp

@@ -24,7 +24,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "Path.h"
+#include "path.h"
 
 namespace crown
 {
@@ -34,7 +34,7 @@ namespace path
 	bool is_valid_segment(const char* segment)
 	{
 		CE_ASSERT(segment != NULL, "Segment must be != NULL");
-		
+
 		size_t segment_len = string::strlen(segment);
 
 		// Empty segment is not valid
@@ -119,7 +119,7 @@ namespace path
 	/// e.g. "/home/project" -> "/home"
 	/// e.g. "/home" -> "/"
 	/// e.g. "home" -> ""
-	/// 
+	///
 	/// The @a path must be valid.
 	void pathname(const char* path, char* str, size_t len)
 	{
@@ -152,7 +152,7 @@ namespace path
 		CE_ASSERT(str != NULL, "Str must be != NULL");
 
 		const char* last_separator = string::find_last(path, '/');
-		
+
 		if (last_separator == string::end(path))
 		{
 			string::strncpy(str, "", len);
@@ -206,9 +206,9 @@ namespace path
 	{
 		CE_ASSERT(path != NULL, "Path must be != NULL");
 		CE_ASSERT(str != NULL, "Str must be != NULL");
-		
+
 		const char* last_dot = string::find_last(path, '.');
-		
+
 		if (last_dot == string::end(path))
 		{
 			string::strncpy(str, "", len);
@@ -229,9 +229,9 @@ namespace path
 	{
 		CE_ASSERT(path != NULL, "Path must be != NULL");
 		CE_ASSERT(str != NULL, "Str must be != NULL");
-		
+
 		const char* last_dot = string::find_last(path, '.');
-		
+
 		string::substring(string::begin(path), last_dot, str, len);
 	}
 
@@ -258,9 +258,9 @@ namespace path
 	{
 		CE_ASSERT(path != NULL, "Path must be != NULL");
 		CE_ASSERT(str != NULL, "Str must be != NULL");
-		
+
 		size_t path_len = string::strlen(path);
-		
+
 		if (path[path_len - 1] == '/')
 		{
 			string::substring(string::begin(path), string::end(path) - 2, str, len);

+ 2 - 2
engine/core/strings/Path.h → engine/core/strings/path.h

@@ -26,12 +26,12 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "StringUtils.h"
+#include "string_utils.h"
 
 namespace crown
 {
 
-/// @defgroup Path Path 
+/// @defgroup Path Path
 
 /// Functions for operating on strings as file paths.
 ///

+ 3 - 3
engine/core/strings/StringStream.h → engine/core/strings/string_stream.h

@@ -27,9 +27,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 #pragma once
 
 #include <stdio.h>
-#include "ContainerTypes.h"
-#include "StringUtils.h"
-#include "OS.h"
+#include "container_types.h"
+#include "string_utils.h"
+#include "os.h"
 
 namespace crown
 {

+ 26 - 26
engine/core/strings/StringUtils.h → engine/core/strings/string_utils.h

@@ -29,10 +29,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <cstdio>
 #include <cstring>
 
-#include "Assert.h"
-#include "Types.h"
-#include "Config.h"
-#include "Macros.h"
+#include "assert.h"
+#include "types.h"
+#include "config.h"
+#include "macros.h"
 
 namespace crown
 {
@@ -120,7 +120,7 @@ inline char* strncat(char* dest, const char* src, size_t len)
 inline const char* begin(const char* str)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
-	
+
 	return str;
 }
 
@@ -128,7 +128,7 @@ inline const char* begin(const char* str)
 inline const char* end(const char* str)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
-	
+
 	return str + string::strlen(str) + 1;
 }
 
@@ -138,17 +138,17 @@ inline const char* find_first(const char* str, char c)
 	CE_ASSERT(str != NULL, "Str must be != NULL");
 
 	const char* str_begin = string::begin(str);
-	
+
 	while (str_begin != string::end(str))
 	{
 		if ((*str_begin) == c)
 		{
 			return str_begin;
 		}
-		
+
 		str_begin++;
 	}
-	
+
 	return string::end(str);
 }
 
@@ -156,19 +156,19 @@ inline const char* find_first(const char* str, char c)
 inline const char* find_last(const char* str, char c)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
-	
+
 	const char* str_end = string::end(str) - 1;
-	
+
 	while (str_end != string::begin(str) - 1)
 	{
 		if ((*str_end) == c)
 		{
 			return str_end;
 		}
-		
+
 		str_end--;
 	}
-	
+
 	return string::end(str);
 }
 
@@ -178,15 +178,15 @@ inline void substring(const char* begin, const char* end, char* out, size_t len)
 	CE_ASSERT(begin != NULL, "Begin must be != NULL");
 	CE_ASSERT(end != NULL, "End must be != NULL");
 	CE_ASSERT(out != NULL, "Out must be != NULL");
-	
+
 	size_t i = 0;
-	
+
 	char* out_iterator = out;
 
 	while (begin != end && i < len)
 	{
 		(*out_iterator) = (*begin);
-		
+
 		begin++;
 		out_iterator++;
 		i++;
@@ -276,17 +276,17 @@ inline uint32_t murmur2_32(const void* key, size_t len, uint32_t seed = 0)
 	{
 		unsigned int k = *(unsigned int *)data;
 
-		k *= m; 
-		k ^= k >> r; 
-		k *= m; 
-		
-		h *= m; 
+		k *= m;
+		k ^= k >> r;
+		k *= m;
+
+		h *= m;
 		h ^= k;
 
 		data += 4;
 		len -= 4;
 	}
-	
+
 	// Handle the last few bytes of the input array
 	switch(len)
 	{
@@ -319,12 +319,12 @@ inline uint64_t murmur2_64(const void* key, int len, uint64_t seed = 0)
 	{
 		uint64_t k = *data++;
 
-		k *= m; 
-		k ^= k >> r; 
-		k *= m; 
+		k *= m;
+		k ^= k >> r;
+		k *= m;
 
 		h ^= k;
-		h *= m; 
+		h *= m;
 	}
 
 	const unsigned char * data2 = (const unsigned char*)data;

+ 3 - 3
engine/core/thread/AtomicInt.h → engine/core/thread/atomic_int.h

@@ -26,11 +26,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Config.h"
+#include "config.h"
 
 #if CROWN_PLATFORM_WINDOWS
-	#include "Types.h"
-	#include "WinHeaders.h"
+	#include "types.h"
+	#include "win_headers.h"
 #endif
 
 namespace crown

+ 3 - 3
engine/core/thread/Mutex.h → engine/core/thread/mutex.h

@@ -26,9 +26,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Config.h"
-#include "Types.h"
-#include "Assert.h"
+#include "config.h"
+#include "types.h"
+#include "assert.h"
 
 #if CROWN_PLATFORM_POSIX
 	#include <pthread.h>

+ 5 - 5
engine/core/thread/Semaphore.h → engine/core/thread/semaphore.h

@@ -26,14 +26,14 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Config.h"
-#include "Assert.h"
-#include "Mutex.h"
+#include "config.h"
+#include "assert.h"
+#include "mutex.h"
 
 #if CROWN_PLATFORM_POSIX
 	#include <pthread.h>
 #elif CROWN_PLATFORM_WINDOWS
-	#include "WinHeaders.h"
+	#include "win_headers.h"
 	#include <limits.h>
 #endif
 
@@ -97,7 +97,7 @@ struct Semaphore
 		{
 			int result = pthread_cond_wait(&m_cond, &(m_mutex.m_mutex));
 			CE_ASSERT(result == 0, "pthread_cond_wait: errno = %d", result);
-			CE_UNUSED(result);	
+			CE_UNUSED(result);
 		}
 
 		m_count--;

+ 7 - 7
engine/core/thread/Thread.h → engine/core/thread/thread.h

@@ -26,17 +26,17 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Config.h"
-#include "Assert.h"
-#include "Types.h"
-#include "Semaphore.h"
+#include "config.h"
+#include "assert.h"
+#include "types.h"
+#include "semaphore.h"
 
 #if CROWN_PLATFORM_POSIX
 	#include <pthread.h>
 #elif CROWN_PLATFORM_WINDOWS
-	#include "WinHeaders.h"
+	#include "win_headers.h"
 	#include <process.h>
-	#include <WinBase.h>
+	#include <win_base.h>
 #endif
 
 namespace crown
@@ -138,7 +138,7 @@ private:
 	{
 		static int32_t result = -1;
 		result = ((Thread*)arg)->run();
-		return (void*)&result;			
+		return (void*)&result;
 	}
 	#elif CROWN_PLATFORM_WINDOWS
 	static DWORD WINAPI OsThread::thread_proc(void* arg)

+ 1 - 1
engine/core/Types.h → engine/core/types.h

@@ -29,7 +29,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #define NOMINMAX
 #include <cstddef>
 #include <stdint.h>
-#include "Config.h"
+#include "config.h"
 
 typedef uint32_t StringId32;
 typedef uint64_t StringId64;

+ 133 - 0
engine/crown.h

@@ -0,0 +1,133 @@
+/*
+Copyright (c) 2013 Daniele Bartolini, Michele Rossi
+Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#pragma once
+
+// Core
+#include "assert.h"
+#include "types.h"
+#include "args.h"
+#include "log.h"
+
+// Core/Math
+#include "aabb.h"
+#include "color4.h"
+#include "frustum.h"
+#include "intersection.h"
+#include "math_utils.h"
+#include "matrix3x3.h"
+#include "matrix4x4.h"
+#include "plane.h"
+#include "quaternion.h"
+#include "random.h"
+#include "ray.h"
+#include "sphere.h"
+#include "vector2.h"
+#include "vector3.h"
+#include "vector4.h"
+
+// Core/Containers
+#include "container_types.h"
+#include "event_stream.h"
+#include "hash.h"
+#include "id_array.h"
+#include "id_table.h"
+#include "map.h"
+#include "priority_queue.h"
+#include "queue.h"
+#include "vector.h"
+
+// Core/Strings
+#include "string_utils.h"
+#include "string_stream.h"
+#include "string_utils.h"
+#include "path.h"
+
+// Core/Mem
+#include "memory.h"
+#include "allocator.h"
+#include "temp_allocator.h"
+#include "linear_allocator.h"
+#include "stack_allocator.h"
+#include "proxy_allocator.h"
+#include "pool_allocator.h"
+
+// Core/Filesystem
+#include "disk_file.h"
+#include "file.h"
+#include "filesystem.h"
+#include "null_file.h"
+#include "reader_writer.h"
+
+// Core/Json
+#include "json.h"
+#include "json_parser.h"
+
+// Core/Settings
+#include "int_setting.h"
+#include "float_setting.h"
+#include "string_setting.h"
+
+// Engine
+#include "camera.h"
+#include "device.h"
+#include "console_server.h"
+
+// Engine/Input
+#include "keyboard.h"
+#include "key_code.h"
+#include "mouse.h"
+#include "touch.h"
+
+// Engine/Lua
+#include "lua_stack.h"
+#include "lua_environment.h"
+
+// Engine/Os
+#include "thread.h"
+#include "mutex.h"
+#include "os_file.h"
+#include "os_window.h"
+#include "os_socket.h"
+
+// Engine/Renderers
+#include "renderer.h"
+#include "render_context.h"
+#include "pixel_format.h"
+#include "vertex_format.h"
+
+// Engine/Resource
+#include "bundle.h"
+#include "resource_loader.h"
+#include "resource_manager.h"
+#include "texture_resource.h"
+#include "mesh_resource.h"
+#include "sound_resource.h"
+#include "material_resource.h"
+#include "font_resource.h"
+
+// Engine/Audio
+#include "sound_world.h"

+ 32 - 32
engine/Device.cpp → engine/device.cpp

@@ -27,42 +27,42 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #include <cstdlib>
 
-#include "Config.h"
-#include "Device.h"
-#include "Accelerometer.h"
-#include "Args.h"
-#include "DiskFile.h"
-#include "DiskFilesystem.h"
-#include "JSONParser.h"
-#include "Keyboard.h"
-#include "Log.h"
-#include "LuaEnvironment.h"
-#include "Memory.h"
-#include "Mouse.h"
-#include "OS.h"
-#include "OsWindow.h"
-#include "Renderer.h"
-#include "ResourceManager.h"
-#include "StringSetting.h"
-#include "StringUtils.h"
-#include "Touch.h"
-#include "Types.h"
-#include "Bundle.h"
-#include "TempAllocator.h"
-#include "ResourcePackage.h"
-#include "ConsoleServer.h"
-#include "World.h"
-#include "LuaStack.h"
-#include "WorldManager.h"
-#include "NetworkFilesystem.h"
-#include "LuaSystem.h"
+#include "config.h"
+#include "device.h"
+#include "accelerometer.h"
+#include "args.h"
+#include "disk_file.h"
+#include "disk_filesystem.h"
+#include "json_parser.h"
+#include "keyboard.h"
+#include "log.h"
+#include "lua_environment.h"
+#include "memory.h"
+#include "mouse.h"
+#include "os.h"
+#include "os_window.h"
+#include "renderer.h"
+#include "resource_manager.h"
+#include "string_setting.h"
+#include "string_utils.h"
+#include "touch.h"
+#include "types.h"
+#include "bundle.h"
+#include "temp_allocator.h"
+#include "resource_package.h"
+#include "console_server.h"
+#include "world.h"
+#include "lua_stack.h"
+#include "world_manager.h"
+#include "network_filesystem.h"
+#include "lua_system.h"
 
 #if CROWN_PLATFORM_LINUX || CROWN_PLATFORM_WINDOWS
-	#include "BundleCompiler.h"
+	#include "bundle_compiler.h"
 #endif
 
 #if CROWN_PLATFORM_ANDROID
-	#include "ApkFilesystem.h"
+	#include "apk_filesystem.h"
 #endif
 
 #define MAX_SUBSYSTEMS_HEAP 8 * 1024 * 1024
@@ -72,7 +72,7 @@ namespace crown
 //-----------------------------------------------------------------------------
 Device::Device()
 	: m_allocator(default_allocator(), MAX_SUBSYSTEMS_HEAP)
-	
+
 	, m_argc(0)
 	, m_argv(NULL)
 

+ 6 - 6
engine/Device.h → engine/device.h

@@ -26,12 +26,12 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Config.h"
-#include "OS.h"
-#include "LinearAllocator.h"
-#include "Resource.h"
-#include "WorldTypes.h"
+#include "types.h"
+#include "config.h"
+#include "os.h"
+#include "linear_allocator.h"
+#include "resource.h"
+#include "world_types.h"
 
 namespace crown
 {

+ 2 - 2
engine/input/Accelerometer.h → engine/input/accelerometer.h

@@ -26,8 +26,8 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "Types.h"
-#include "Vector3.h"
+#include "types.h"
+#include "vector3.h"
 
 namespace crown
 {

Некоторые файлы не были показаны из-за большого количества измененных файлов