Daniele Bartolini 11 anos atrás
pai
commit
9bc5f473ec
100 arquivos alterados com 0 adições e 1217 exclusões
  1. 0 2
      engine/audio/sound_world_al.cpp
  2. 0 2
      engine/audio/sound_world_sles.cpp
  3. 0 4
      engine/compilers/bundle_compiler.cpp
  4. 0 15
      engine/console_server.cpp
  5. 0 12
      engine/core/containers/id_array.h
  6. 0 7
      engine/core/containers/id_table.h
  7. 0 3
      engine/core/containers/priority_queue.h
  8. 0 23
      engine/core/containers/queue.h
  9. 0 7
      engine/core/containers/vector.h
  10. 0 16
      engine/core/filesystem/apk_file.cpp
  11. 0 12
      engine/core/filesystem/apk_filesystem.cpp
  12. 0 16
      engine/core/filesystem/disk_file.cpp
  13. 0 13
      engine/core/filesystem/disk_filesystem.cpp
  14. 0 16
      engine/core/filesystem/network_file.cpp
  15. 0 14
      engine/core/filesystem/network_filesystem.cpp
  16. 0 4
      engine/core/filesystem/reader_writer.h
  17. 0 17
      engine/core/json/json.cpp
  18. 0 40
      engine/core/json/json_parser.cpp
  19. 0 13
      engine/core/math/aabb.h
  20. 0 24
      engine/core/math/color4.h
  21. 0 5
      engine/core/math/frustum.h
  22. 0 3
      engine/core/math/intersection.h
  23. 0 22
      engine/core/math/math_utils.h
  24. 0 20
      engine/core/math/matrix3x3.h
  25. 0 35
      engine/core/math/matrix4x4.h
  26. 0 4
      engine/core/math/plane.h
  27. 0 8
      engine/core/math/quaternion.h
  28. 0 4
      engine/core/math/random.h
  29. 0 11
      engine/core/math/sphere.h
  30. 0 19
      engine/core/math/vector2.h
  31. 0 21
      engine/core/math/vector3.h
  32. 0 21
      engine/core/math/vector4.h
  33. 0 7
      engine/core/memory/linear_allocator.cpp
  34. 0 8
      engine/core/memory/memory.cpp
  35. 0 5
      engine/core/memory/pool_allocator.cpp
  36. 0 9
      engine/core/memory/proxy_allocator.cpp
  37. 0 5
      engine/core/memory/stack_allocator.cpp
  38. 0 5
      engine/core/memory/temp_allocator.h
  39. 0 15
      engine/core/network/socket.h
  40. 0 6
      engine/core/os.h
  41. 0 14
      engine/core/os_event_queue.h
  42. 0 18
      engine/core/os_window_android.cpp
  43. 0 14
      engine/core/os_window_linux.cpp
  44. 0 12
      engine/core/os_window_windows.cpp
  45. 0 9
      engine/core/settings/float_setting.cpp
  46. 0 9
      engine/core/settings/int_setting.cpp
  47. 0 6
      engine/core/settings/string_setting.cpp
  48. 0 19
      engine/core/strings/dynamic_string.h
  49. 0 1
      engine/core/strings/path.cpp
  50. 0 11
      engine/core/strings/string_stream.h
  51. 0 22
      engine/core/strings/string_utils.h
  52. 0 20
      engine/device.cpp
  53. 0 2
      engine/input/keyboard.h
  54. 0 5
      engine/input/mouse.h
  55. 0 5
      engine/input/touch.h
  56. 0 35
      engine/lua/lua_actor.cpp
  57. 0 24
      engine/lua/lua_camera.cpp
  58. 0 3
      engine/lua/lua_color4.cpp
  59. 0 6
      engine/lua/lua_controller.cpp
  60. 0 6
      engine/lua/lua_debug_line.cpp
  61. 0 13
      engine/lua/lua_device.cpp
  62. 0 10
      engine/lua/lua_environment.cpp
  63. 0 6
      engine/lua/lua_float_setting.cpp
  64. 0 8
      engine/lua/lua_gui.cpp
  65. 0 6
      engine/lua/lua_int_setting.cpp
  66. 0 6
      engine/lua/lua_keyboard.cpp
  67. 0 4
      engine/lua/lua_material.cpp
  68. 0 17
      engine/lua/lua_math.cpp
  69. 0 23
      engine/lua/lua_matrix4x4.cpp
  70. 0 6
      engine/lua/lua_matrix4x4_box.cpp
  71. 0 10
      engine/lua/lua_mesh.cpp
  72. 0 9
      engine/lua/lua_mouse.cpp
  73. 0 6
      engine/lua/lua_physics_world.cpp
  74. 0 12
      engine/lua/lua_quaternion.cpp
  75. 0 6
      engine/lua/lua_quaternion_box.cpp
  76. 0 2
      engine/lua/lua_raycast.cpp
  77. 0 6
      engine/lua/lua_resource_package.cpp
  78. 0 6
      engine/lua/lua_sound_world.cpp
  79. 0 8
      engine/lua/lua_sprite.cpp
  80. 0 63
      engine/lua/lua_stack.h
  81. 0 4
      engine/lua/lua_string_setting.cpp
  82. 0 18
      engine/lua/lua_system.cpp
  83. 0 6
      engine/lua/lua_touch.cpp
  84. 0 27
      engine/lua/lua_unit.cpp
  85. 0 20
      engine/lua/lua_vector2.cpp
  86. 0 8
      engine/lua/lua_vector2_box.cpp
  87. 0 23
      engine/lua/lua_vector3.cpp
  88. 0 8
      engine/lua/lua_vector3_box.cpp
  89. 0 11
      engine/lua/lua_window.cpp
  90. 0 23
      engine/lua/lua_world.cpp
  91. 0 7
      engine/main/main_android.cpp
  92. 0 4
      engine/main/main_linux.cpp
  93. 0 3
      engine/main/main_windows.cpp
  94. 0 41
      engine/physics/actor.cpp
  95. 0 9
      engine/physics/controller.cpp
  96. 0 2
      engine/physics/joint.cpp
  97. 0 11
      engine/physics/physics_callback.h
  98. 0 9
      engine/physics/physics_types.h
  99. 0 21
      engine/physics/physics_world.cpp
  100. 0 1
      engine/physics/physics_world.h

+ 0 - 2
engine/audio/sound_world_al.cpp

@@ -42,7 +42,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 #if defined(CROWN_DEBUG)
 	static const char* al_error_to_string(ALenum error)
 	{
@@ -96,7 +95,6 @@ namespace audio_globals
 	}
 }
 
-//-----------------------------------------------------------------------------
 struct SoundInstance
 {
 	void create(SoundResource* sr, const Vector3& pos)

+ 0 - 2
engine/audio/sound_world_sles.cpp

@@ -42,7 +42,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 #if defined(CROWN_DEBUG)
 	static const char* sles_error_to_string(SLresult result)
 	{
@@ -143,7 +142,6 @@ namespace sles_sound_world
 	}
 }
 
-//-----------------------------------------------------------------------------
 struct SoundInstance
 {
 	void create(SLEngineItf engine, SLObjectItf output_mix, SoundInstanceId id, SoundResource* sr)

+ 0 - 4
engine/compilers/bundle_compiler.cpp

@@ -41,7 +41,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 BundleCompiler::BundleCompiler(const char* source_dir, const char* bundle_dir)
 	: _source_fs(source_dir)
 	, _bundle_fs(bundle_dir)
@@ -50,7 +49,6 @@ BundleCompiler::BundleCompiler(const char* source_dir, const char* bundle_dir)
 	temp.create_directory(bundle_dir);
 }
 
-//-----------------------------------------------------------------------------
 bool BundleCompiler::compile(const char* type, const char* name, Platform::Enum platform)
 {
 	const ResourceId id(type, name);
@@ -67,7 +65,6 @@ bool BundleCompiler::compile(const char* type, const char* name, Platform::Enum
 	_bundle_fs.close(outf);
 }
 
-//-----------------------------------------------------------------------------
 bool BundleCompiler::compile_all(Platform::Enum platform)
 {
 	Vector<DynamicString> files(default_allocator());
@@ -108,7 +105,6 @@ bool BundleCompiler::compile_all(Platform::Enum platform)
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 void BundleCompiler::scan(const char* cur_dir, Vector<DynamicString>& files)
 {
 	Vector<DynamicString> my_files(default_allocator());

+ 0 - 15
engine/console_server.cpp

@@ -41,7 +41,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::init(uint16_t port, bool wait)
 {
 	m_server.bind(port);
@@ -61,7 +60,6 @@ void ConsoleServer::init(uint16_t port, bool wait)
 	}
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::shutdown()
 {
 	for (uint32_t i = 0; i < id_array::size(m_clients); i++)
@@ -72,7 +70,6 @@ void ConsoleServer::shutdown()
 	m_server.close();
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::log_to_all(LogSeverity::Enum severity, const char* message, ...)
 {
 	va_list args;
@@ -81,7 +78,6 @@ void ConsoleServer::log_to_all(LogSeverity::Enum severity, const char* message,
 	va_end(args);
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::log_to_all(LogSeverity::Enum severity, const char* message, ::va_list arg)
 {
 	using namespace string_stream;
@@ -124,7 +120,6 @@ void ConsoleServer::log_to_all(LogSeverity::Enum severity, const char* message,
 	send_to_all(c_str(json));
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::send(TCPSocket client, const char* json)
 {
 	uint32_t len = string::strlen(json);
@@ -132,7 +127,6 @@ void ConsoleServer::send(TCPSocket client, const char* json)
 	client.write(json, len);
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::send_to_all(const char* json)
 {
 	for (uint32_t i = 0; i < id_array::size(m_clients); i++)
@@ -141,7 +135,6 @@ void ConsoleServer::send_to_all(const char* json)
 	}
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::update()
 {
 	// Check for new clients only if we have room for them
@@ -173,7 +166,6 @@ void ConsoleServer::update()
 	}
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::add_client(TCPSocket socket)
 {
 	Client client;
@@ -182,7 +174,6 @@ void ConsoleServer::add_client(TCPSocket socket)
 	id_array::get(m_clients, id).id = id;
 }
 
-//-----------------------------------------------------------------------------
 ReadResult ConsoleServer::update_client(TCPSocket client)
 {
 	uint32_t msg_len = 0;
@@ -206,7 +197,6 @@ ReadResult ConsoleServer::update_client(TCPSocket client)
 	return msg_result;
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::process(TCPSocket client, const char* request)
 {
 	JSONParser parser(request);
@@ -222,13 +212,11 @@ void ConsoleServer::process(TCPSocket client, const char* request)
 	else CE_FATAL("Request unknown.");
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::process_ping(TCPSocket client, const char* /*msg*/)
 {
 	send(client, "{\"type\":\"pong\"}");
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::process_script(TCPSocket /*client*/, const char* msg)
 {
 	JSONParser parser(msg);
@@ -239,7 +227,6 @@ void ConsoleServer::process_script(TCPSocket /*client*/, const char* msg)
 	device()->lua_environment()->execute_string(script.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::process_stats(TCPSocket client, const char* /*msg*/)
 {
 	using namespace string_stream;
@@ -267,7 +254,6 @@ void ConsoleServer::process_stats(TCPSocket client, const char* /*msg*/)
 	send(client, c_str(response));
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::process_command(TCPSocket /*client*/, const char* msg)
 {
 	JSONParser parser(msg);
@@ -303,7 +289,6 @@ void ConsoleServer::process_command(TCPSocket /*client*/, const char* msg)
 	}
 }
 
-//-----------------------------------------------------------------------------
 void ConsoleServer::processs_filesystem(TCPSocket client, const char* msg)
 {
 /*

+ 0 - 12
engine/core/containers/id_array.h

@@ -90,7 +90,6 @@ namespace id_array
 
 namespace id_array
 {
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline Id create(IdArray<MAX, T>& a, const T& object)
 	{
@@ -120,7 +119,6 @@ namespace id_array
 		return id;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline void destroy(IdArray<MAX, T>& a, Id id)
 	{
@@ -143,7 +141,6 @@ namespace id_array
 		a._size--;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline T& get(IdArray<MAX, T>& a, const Id& id)
 	{
@@ -152,42 +149,36 @@ namespace id_array
 		return a._objects[a._sparse_to_dense[id.index]];
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline bool has(const IdArray<MAX, T>& a, Id id)
 	{
 		return id.index < MAX && a._sparse[id.index].id == id.id;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline uint32_t size(const IdArray<MAX, T>& a)
 	{
 		return a._size;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline T* begin(IdArray<MAX, T>& a)
 	{
 		return a._objects;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline const T* begin(const IdArray<MAX, T>& a)
 	{
 		return a._objects;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline T* end(IdArray<MAX, T>& a)
 	{
 		return a._objects + a._size;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX, typename T>
 	inline const T* end(const IdArray<MAX, T>& a)
 	{
@@ -195,7 +186,6 @@ namespace id_array
 	}
 } // namespace id_array
 
-//-----------------------------------------------------------------------------
 template <uint32_t MAX, typename T>
 inline IdArray<MAX, T>::IdArray()
 	: _freelist(INVALID_ID)
@@ -208,7 +198,6 @@ inline IdArray<MAX, T>::IdArray()
 	}
 }
 
-//-----------------------------------------------------------------------------
 template <uint32_t MAX, typename T>
 inline T& IdArray<MAX, T>::operator[](uint32_t i)
 {
@@ -216,7 +205,6 @@ inline T& IdArray<MAX, T>::operator[](uint32_t i)
 	return _objects[i];
 }
 
-//-----------------------------------------------------------------------------
 template <uint32_t MAX, typename T>
 inline const T& IdArray<MAX, T>::operator[](uint32_t i) const
 {

+ 0 - 7
engine/core/containers/id_table.h

@@ -78,7 +78,6 @@ namespace id_table
 
 namespace id_table
 {
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX>
 	inline Id create(IdTable<MAX>& a)
 	{
@@ -103,7 +102,6 @@ namespace id_table
 		return id;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX>
 	inline void destroy(IdTable<MAX>& a, Id id)
 	{
@@ -115,28 +113,24 @@ namespace id_table
 		a._size--;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX>
 	inline bool has(const IdTable<MAX>& a, Id id)
 	{
 		return id.index < MAX && a._ids[id.index].id == id.id;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX>
 	inline uint16_t size(const IdTable<MAX>& a)
 	{
 		return a._size;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX>
 	inline const Id* begin(const IdTable<MAX>& a)
 	{
 		return a._ids;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <uint32_t MAX>
 	inline const Id* end(const IdTable<MAX>& a)
 	{
@@ -144,7 +138,6 @@ namespace id_table
 	}
 } // namespace id_table
 
-//-----------------------------------------------------------------------------
 template <uint32_t MAX>
 inline IdTable<MAX>::IdTable()
 	: _freelist(INVALID_ID)

+ 0 - 3
engine/core/containers/priority_queue.h

@@ -50,14 +50,12 @@ namespace priority_queue
 
 namespace priority_queue
 {
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	const T& top(const PriorityQueue<T>& q)
 	{
 		return array::front(q._queue);
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	void push(PriorityQueue<T>& q, const T& item)
 	{
@@ -65,7 +63,6 @@ namespace priority_queue
 		std::push_heap(array::begin(q._queue), array::end(q._queue));
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	void pop(PriorityQueue<T>& q)
 	{

+ 0 - 23
engine/core/containers/queue.h

@@ -99,28 +99,24 @@ namespace queue
 
 namespace queue
 {
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline bool empty(const Queue<T>& q)
 	{
 		return q._size == 0;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline uint32_t size(const Queue<T>& q)
 	{
 		return q._size;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline uint32_t space(const Queue<T>& q)
 	{
 		return array::size(q._queue) - q._size;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void increase_capacity(Queue<T>& q, uint32_t capacity)
 	{
@@ -136,7 +132,6 @@ namespace queue
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void grow(Queue<T>& q, uint32_t min_capacity)
 	{
@@ -150,7 +145,6 @@ namespace queue
 		increase_capacity(q, new_capacity);
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void push_back(Queue<T>& q, const T& item)
 	{
@@ -164,7 +158,6 @@ namespace queue
 		q._size++;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void pop_back(Queue<T>& q)
 	{
@@ -173,7 +166,6 @@ namespace queue
 		q._size--;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void push_front(Queue<T>& q, const T& item)
 	{
@@ -189,7 +181,6 @@ namespace queue
 		q._size++;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void pop_front(Queue<T>& q)
 	{
@@ -199,7 +190,6 @@ namespace queue
 		q._size--;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void push(Queue<T>& q, const T *items, uint32_t n)
 	{
@@ -227,7 +217,6 @@ namespace queue
 		q._size += n;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void pop(Queue<T>& q, uint32_t n)
 	{
@@ -237,7 +226,6 @@ namespace queue
 		q._size -= n;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline void clear(Queue<T>& q)
 	{
@@ -245,21 +233,18 @@ namespace queue
 		q._size = 0;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline T* begin(Queue<T>& q)
 	{
 		return array::begin(q._queue) + q._read;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline const T* begin(const Queue<T>& q)
 	{
 		return array::begin(q._queue) + q._read;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline T* end(Queue<T>& q)
 	{
@@ -268,7 +253,6 @@ namespace queue
 		return end >= array::size(q._queue) ? array::end(q._queue) : array::begin(q._queue) + end;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline const T* end(const Queue<T>& q)
 	{
@@ -277,7 +261,6 @@ namespace queue
 		return end >= array::size(q._queue) ? array::end(q._queue) : array::begin(q._queue) + end;
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline T& front(Queue<T>& q)
 	{
@@ -286,7 +269,6 @@ namespace queue
 		return q._queue[q._read];
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline const T& front(const Queue<T>& q)
 	{
@@ -295,7 +277,6 @@ namespace queue
 		return q._queue[q._read];
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline T& back(Queue<T>& q)
 	{
@@ -304,7 +285,6 @@ namespace queue
 		return q[q._size - 1];
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline const T& back(const Queue<T>& q)
 	{
@@ -315,7 +295,6 @@ namespace queue
 
 } // namespace queue
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline Queue<T>::Queue(Allocator& allocator)
 	: _read(0)
@@ -324,14 +303,12 @@ inline Queue<T>::Queue(Allocator& allocator)
 {
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline T& Queue<T>::operator[](uint32_t index)
 {
 	return _queue[(_read + index) % array::size(_queue)];
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline const T& Queue<T>::operator[](uint32_t index) const
 {

+ 0 - 7
engine/core/containers/vector.h

@@ -261,21 +261,18 @@ namespace vector
 	}
 } // namespace vector
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline Vector<T>::Vector(Allocator& allocator)
 	: _array(allocator)
 {
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline Vector<T>::Vector(Allocator& allocator, uint32_t capacity)
 	: _array(allocator)
 {
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline Vector<T>::Vector(const Vector<T>& other)
 	: _array(other._array)
@@ -283,7 +280,6 @@ inline Vector<T>::Vector(const Vector<T>& other)
 	*this = other;
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline Vector<T>::~Vector()
 {
@@ -293,21 +289,18 @@ inline Vector<T>::~Vector()
 	}
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline T& Vector<T>::operator[](uint32_t index)
 {
 	return _array[index];
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline const T& Vector<T>::operator[](uint32_t index) const
 {
 	return _array[index];
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline const Vector<T>& Vector<T>::operator=(const Vector<T>& other)
 {

+ 0 - 16
engine/core/filesystem/apk_file.cpp

@@ -36,7 +36,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 ApkFile::ApkFile(AAssetManager* asset_manager, const char* path)
 	: File(FOM_READ)
 	, m_asset(NULL)
@@ -45,7 +44,6 @@ ApkFile::ApkFile(AAssetManager* asset_manager, const char* path)
 	CE_ASSERT(m_asset != NULL, "AAssetManager_open: failed to open %s", path);
 }
 
-//-----------------------------------------------------------------------------
 ApkFile::~ApkFile()
 {
 	if (m_asset != NULL)
@@ -55,7 +53,6 @@ ApkFile::~ApkFile()
 	}
 }
 
-//-----------------------------------------------------------------------------
 void ApkFile::seek(size_t position)
 {
 	off_t seek_result = AAsset_seek(m_asset, (off_t)position, SEEK_SET);
@@ -63,7 +60,6 @@ void ApkFile::seek(size_t position)
 	CE_UNUSED(seek_result);
 }
 
-//-----------------------------------------------------------------------------
 void ApkFile::seek_to_end()
 {
 	off_t seek_result = AAsset_seek(m_asset, 0, SEEK_END);
@@ -71,7 +67,6 @@ void ApkFile::seek_to_end()
 	CE_UNUSED(seek_result);
 }
 
-//-----------------------------------------------------------------------------
 void ApkFile::skip(size_t bytes)
 {
 	off_t seek_result = AAsset_seek(m_asset, (off_t) bytes, SEEK_CUR);
@@ -79,7 +74,6 @@ void ApkFile::skip(size_t bytes)
 	CE_UNUSED(seek_result);
 }
 
-//-----------------------------------------------------------------------------
 void ApkFile::read(void* buffer, size_t size)
 {
 	CE_ASSERT_NOT_NULL(buffer);
@@ -88,62 +82,52 @@ void ApkFile::read(void* buffer, size_t size)
 	CE_UNUSED(bytes_read);
 }
 
-//-----------------------------------------------------------------------------
 void ApkFile::write(const void* /*buffer*/, size_t /*size*/)
 {
 	CE_ASSERT(false, "Apk files are read only!");
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFile::copy_to(File& /*file*/, size_t /*size = 0*/)
 {
 	CE_ASSERT(false, "Not implemented");
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 void ApkFile::flush()
 {
 	// Not needed
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFile::is_valid()
 {
 	return m_asset != NULL;
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFile::end_of_file()
 {
 	return AAsset_getRemainingLength(m_asset) == 0;
 }
 
-//-----------------------------------------------------------------------------
 size_t ApkFile::size()
 {
 	return AAsset_getLength(m_asset);
 }
 
-//-----------------------------------------------------------------------------
 size_t ApkFile::position()
 {
 	return (size_t) (AAsset_getLength(m_asset) - AAsset_getRemainingLength(m_asset));
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFile::can_read() const
 {
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFile::can_write() const
 {
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFile::can_seek() const
 {
 	return true;

+ 0 - 12
engine/core/filesystem/apk_filesystem.cpp

@@ -38,13 +38,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 ApkFilesystem::ApkFilesystem(AAssetManager* asset_manager)
 	: _asset_manager(asset_manager)
 {
 }
 
-//-----------------------------------------------------------------------------
 File* ApkFilesystem::open(const char* path, FileOpenMode mode)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -52,56 +50,47 @@ File* ApkFilesystem::open(const char* path, FileOpenMode mode)
 	return CE_NEW(default_allocator(), ApkFile)(_asset_manager, path);
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::close(File* file)
 {
 	CE_ASSERT_NOT_NULL(file);
 	CE_DELETE(default_allocator(), file);
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFilesystem::exists(const char* path)
 {
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFilesystem::is_directory(const char* path)
 {
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool ApkFilesystem::is_file(const char* path)
 {
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::create_directory(const char* /*path*/)
 {
 	CE_ASSERT(false, "Attempt to create directory in Android assets folder");
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::delete_directory(const char* /*path*/)
 {
 	CE_ASSERT(false, "Attempt to delete directory in Android assets folder");
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::create_file(const char* /*path*/)
 {
 	CE_ASSERT(false, "Attempt to create file in Android assets folder");
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::delete_file(const char* /*path*/)
 {
 	CE_ASSERT(false, "Attempt to delete file in Android assets folder");
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::list_files(const char* path, Vector<DynamicString>& files)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -120,7 +109,6 @@ void ApkFilesystem::list_files(const char* path, Vector<DynamicString>& files)
 	AAssetDir_close(root_dir);
 }
 
-//-----------------------------------------------------------------------------
 void ApkFilesystem::get_absolute_path(const char* path, DynamicString& os_path)
 {
 	os_path = path;

+ 0 - 16
engine/core/filesystem/disk_file.cpp

@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 DiskFile::DiskFile(FileOpenMode mode, const char* filename) :
 	File(mode),
 	m_file(filename, mode),
@@ -41,13 +40,11 @@ DiskFile::DiskFile(FileOpenMode mode, const char* filename) :
 {
 }
 
-//-----------------------------------------------------------------------------
 DiskFile::~DiskFile()
 {
 	m_file.close();
 }
 
-//-----------------------------------------------------------------------------
 void DiskFile::seek(size_t position)
 {
 	check_valid();
@@ -55,7 +52,6 @@ void DiskFile::seek(size_t position)
 	m_file.seek(position);
 }
 
-//-----------------------------------------------------------------------------
 void DiskFile::seek_to_end()
 {
 	check_valid();
@@ -63,7 +59,6 @@ void DiskFile::seek_to_end()
 	m_file.seek_to_end();
 }
 
-//-----------------------------------------------------------------------------
 void DiskFile::skip(size_t bytes)
 {
 	check_valid();
@@ -71,7 +66,6 @@ void DiskFile::skip(size_t bytes)
 	m_file.skip(bytes);
 }
 
-//-----------------------------------------------------------------------------
 void DiskFile::read(void* buffer, size_t size)
 {
 	check_valid();
@@ -86,7 +80,6 @@ void DiskFile::read(void* buffer, size_t size)
 	//CE_ASSERT(bytes_read == size, "Failed to read from file: requested: %llu, read: %llu", size, bytes_read);
 }
 
-//-----------------------------------------------------------------------------
 void DiskFile::write(const void* buffer, size_t size)
 {
 	check_valid();
@@ -101,7 +94,6 @@ void DiskFile::write(const void* buffer, size_t size)
 	//CE_ASSERT(bytes_written == size, "Failed to write to file: requested: %llu, written: %llu", size, bytes_written);
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFile::copy_to(File& file, size_t size)
 {
 	check_valid();
@@ -142,19 +134,16 @@ bool DiskFile::copy_to(File& file, size_t size)
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFile::end_of_file()
 {
 	return position() == size();
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFile::is_valid()
 {
 	return m_file.is_open();
 }
 
-//-----------------------------------------------------------------------------
 void DiskFile::flush()
 {
 	check_valid();
@@ -162,7 +151,6 @@ void DiskFile::flush()
 	// FIXME implement flush in File
 }
 
-//-----------------------------------------------------------------------------
 size_t DiskFile::position()
 {
 	check_valid();
@@ -170,7 +158,6 @@ size_t DiskFile::position()
 	return m_file.position();
 }
 
-//-----------------------------------------------------------------------------
 size_t DiskFile::size()
 {
 	check_valid();
@@ -178,7 +165,6 @@ size_t DiskFile::size()
 	return m_file.size();
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFile::can_read() const
 {
 	check_valid();
@@ -186,7 +172,6 @@ bool DiskFile::can_read() const
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFile::can_write() const
 {
 	check_valid();
@@ -194,7 +179,6 @@ bool DiskFile::can_write() const
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFile::can_seek() const
 {
 	return true;

+ 0 - 13
engine/core/filesystem/disk_filesystem.cpp

@@ -33,20 +33,17 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 DiskFilesystem::DiskFilesystem()
 {
 	os::getcwd(m_root_path, MAX_PATH_LENGTH);
 }
 
-//-----------------------------------------------------------------------------
 DiskFilesystem::DiskFilesystem(const char* root_path)
 {
 	CE_ASSERT_NOT_NULL(root_path);
 	string::strncpy(m_root_path, root_path, MAX_PATH_LENGTH);
 }
 
-//-----------------------------------------------------------------------------
 File* DiskFilesystem::open(const char* path, FileOpenMode mode)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -58,7 +55,6 @@ File* DiskFilesystem::open(const char* path, FileOpenMode mode)
 	return CE_NEW(default_allocator(), DiskFile)(mode, abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::close(File* file)
 {
 	CE_ASSERT_NOT_NULL(file);
@@ -66,7 +62,6 @@ void DiskFilesystem::close(File* file)
 	CE_DELETE(default_allocator(), file);
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFilesystem::exists(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -78,7 +73,6 @@ bool DiskFilesystem::exists(const char* path)
 	return os::exists(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFilesystem::is_directory(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -90,7 +84,6 @@ bool DiskFilesystem::is_directory(const char* path)
 	return os::is_directory(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 bool DiskFilesystem::is_file(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -102,7 +95,6 @@ bool DiskFilesystem::is_file(const char* path)
 	return os::is_file(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::create_directory(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -115,7 +107,6 @@ void DiskFilesystem::create_directory(const char* path)
 		os::create_directory(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::delete_directory(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -127,7 +118,6 @@ void DiskFilesystem::delete_directory(const char* path)
 	os::delete_directory(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::create_file(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -139,7 +129,6 @@ void DiskFilesystem::create_file(const char* path)
 	os::create_file(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::delete_file(const char* path)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -151,7 +140,6 @@ void DiskFilesystem::delete_file(const char* path)
 	os::delete_file(abs_path.c_str());
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::list_files(const char* path, Vector<DynamicString>& files)
 {
 	CE_ASSERT_NOT_NULL(path);
@@ -163,7 +151,6 @@ void DiskFilesystem::list_files(const char* path, Vector<DynamicString>& files)
 	os::list_files(abs_path.c_str(), files);
 }
 
-//-----------------------------------------------------------------------------
 void DiskFilesystem::get_absolute_path(const char* path, DynamicString& os_path)
 {
 	if (os::is_absolute_path(path))

+ 0 - 16
engine/core/filesystem/network_file.cpp

@@ -39,7 +39,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 NetworkFile::NetworkFile(const NetAddress& addr, uint16_t port, const char* filename)
 	: File(FOM_READ)
 	, m_address(addr)
@@ -50,31 +49,26 @@ NetworkFile::NetworkFile(const NetAddress& addr, uint16_t port, const char* file
 	m_socket.connect(addr, port);
 }
 
-//-----------------------------------------------------------------------------
 NetworkFile::~NetworkFile()
 {
 	m_socket.close();
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFile::seek(size_t position)
 {
 	m_position = position;
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFile::seek_to_end()
 {
 	m_position = size();
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFile::skip(size_t bytes)
 {
 	m_position += bytes;
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFile::read(void* buffer, size_t size)
 {
 	using namespace string_stream;
@@ -107,43 +101,36 @@ void NetworkFile::read(void* buffer, size_t size)
 	// default_allocator().deallocate(data);
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFile::write(const void* /*buffer*/, size_t /*size*/)
 {
 	CE_FATAL("Cannot write to a network file");
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFile::copy_to(File& file, size_t size)
 {
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFile::end_of_file()
 {
 	return position() == size();
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFile::is_valid()
 {
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFile::flush()
 {
 	// Do nothing
 }
 
-//-----------------------------------------------------------------------------
 size_t NetworkFile::position()
 {
 	return m_position;
 }
 
-//-----------------------------------------------------------------------------
 size_t NetworkFile::size()
 {
 	using namespace string_stream;
@@ -167,19 +154,16 @@ size_t NetworkFile::size()
 	return (size_t) root.key("size").to_int();
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFile::can_read() const
 {
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFile::can_write() const
 {
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFile::can_seek() const
 {
 	return true;

+ 0 - 14
engine/core/filesystem/network_filesystem.cpp

@@ -35,81 +35,67 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 NetworkFilesystem::NetworkFilesystem()
 {
 }
 
-//-----------------------------------------------------------------------------
 NetworkFilesystem::NetworkFilesystem(const NetAddress& addr, uint16_t port)
 	: m_address(addr)
 	, m_port(port)
 {
 }
 
-//-----------------------------------------------------------------------------
 File* NetworkFilesystem::open(const char* path, FileOpenMode mode)
 {
 	return CE_NEW(default_allocator(), NetworkFile)(m_address, m_port, path);
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::close(File* file)
 {
 	CE_ASSERT_NOT_NULL(file);
 	CE_DELETE(default_allocator(), file);
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFilesystem::exists(const char* path)
 {
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFilesystem::is_directory(const char* path)
 {
   return false;
 }
 
-//-----------------------------------------------------------------------------
 bool NetworkFilesystem::is_file(const char* path)
 {
   return false;
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::create_directory(const char* /*path*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::delete_directory(const char* /*path*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::create_file(const char* /*path*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::delete_file(const char* /*path*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::list_files(const char* /*path*/, Vector<DynamicString>& /*files*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void NetworkFilesystem::get_absolute_path(const char* path, DynamicString& os_path)
 {
 
 }
 
-//-----------------------------------------------------------------------------
 TCPSocket NetworkFilesystem::new_connection()
 {
 	TCPSocket socket;

+ 0 - 4
engine/core/filesystem/reader_writer.h

@@ -39,7 +39,6 @@ class TextReader
 {
 public:
 
-	//-----------------------------------------------------------------------------
 	TextReader(File& file) : m_file(file) {}
 
 	/// Reads characters from file and stores them as a C string
@@ -85,7 +84,6 @@ class TextWriter
 {
 public:
 
-	//-----------------------------------------------------------------------------
 	TextWriter(File& file) : m_file(file) {}
 
 	/// Writes the string pointed by string to the file.
@@ -109,7 +107,6 @@ class BinaryWriter
 {
 public:
 
-	//-----------------------------------------------------------------------------
 	BinaryWriter(File& file) : m_file(file) {}
 
 	void write(const void* data, size_t size)
@@ -140,7 +137,6 @@ class BinaryReader
 {
 public:
 
-	//-----------------------------------------------------------------------------
 	BinaryReader(File& file) : m_file(file) {}
 
 	void read(void* data, size_t size)

+ 0 - 17
engine/core/json/json.cpp

@@ -34,7 +34,6 @@ namespace crown
 {
 namespace json
 {
-	//-----------------------------------------------------------------------------
 	static const char* next(const char* str, const char c = 0)
 	{
 		CE_ASSERT_NOT_NULL(str);
@@ -47,7 +46,6 @@ namespace json
 		return str + 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_whites(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -59,7 +57,6 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_string(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -85,7 +82,6 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_number(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -102,7 +98,6 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_object(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -127,7 +122,6 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_array(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -152,7 +146,6 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_bool(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -187,7 +180,6 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static const char* skip_null(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -219,14 +211,12 @@ namespace json
 		return ch;
 	}
 
-	//-----------------------------------------------------------------------------
 	static bool is_escapee(char c)
 	{
 		return c == '"' || c == '\\' || c == '/' || c == '\b' || c == '\f' || c == '\n' ||
 				c == '\r' || c == '\t';
 	}
 
-	//-----------------------------------------------------------------------------
 	JSONType::Enum type(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -243,7 +233,6 @@ namespace json
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	void parse_string(const char* s, DynamicString& str)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -288,7 +277,6 @@ namespace json
 		CE_FATAL("Bad string");
 	}
 
-	//-----------------------------------------------------------------------------
 	double parse_number(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -340,7 +328,6 @@ namespace json
 		return string::parse_double(array::begin(str));
 	}
 
-	//-----------------------------------------------------------------------------
 	bool parse_bool(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -374,7 +361,6 @@ namespace json
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	int32_t parse_int(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -382,7 +368,6 @@ namespace json
 		return (int32_t) parse_number(s);
 	}
 
-	//-----------------------------------------------------------------------------
 	float parse_float(const char* s)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -390,7 +375,6 @@ namespace json
 		return (float) parse_number(s);
 	}
 
-	//-----------------------------------------------------------------------------
 	void parse_array(const char* s, Array<const char*>& array)
 	{
 		CE_ASSERT_NOT_NULL(s);
@@ -438,7 +422,6 @@ namespace json
 		CE_FATAL("Bad array");
 	}
 
-	//-----------------------------------------------------------------------------
 	void parse_object(const char* s, Map<DynamicString, const char*>& object)
 	{
 		CE_ASSERT_NOT_NULL(s);

+ 0 - 40
engine/core/json/json_parser.cpp

@@ -40,25 +40,21 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//--------------------------------------------------------------------------
 JSONElement::JSONElement()
 	: m_at(NULL)
 {
 }
 
-//--------------------------------------------------------------------------
 JSONElement::JSONElement(const char* at)
 	: m_at(at)
 {
 }
 
-//--------------------------------------------------------------------------
 JSONElement::JSONElement(const JSONElement& other)
 	: m_at(other.m_at)
 {
 }
 
-//--------------------------------------------------------------------------
 JSONElement& JSONElement::operator=(const JSONElement& other)
 {
 	// Our begin is the other's at
@@ -66,7 +62,6 @@ JSONElement& JSONElement::operator=(const JSONElement& other)
 	return *this;
 }
 
-//--------------------------------------------------------------------------
 JSONElement JSONElement::operator[](uint32_t i)
 {
 	Array<const char*> array(default_allocator());
@@ -78,13 +73,11 @@ JSONElement JSONElement::operator[](uint32_t i)
 	return JSONElement(array[i]);
 }
 
-//--------------------------------------------------------------------------
 JSONElement JSONElement::index(uint32_t i)
 {
 	return this->operator[](i);
 }
 
-//--------------------------------------------------------------------------
 JSONElement JSONElement::index_or_nil(uint32_t i)
 {
 	if (m_at != NULL)
@@ -104,7 +97,6 @@ JSONElement JSONElement::index_or_nil(uint32_t i)
 	return JSONElement();
 }
 
-//--------------------------------------------------------------------------
 JSONElement JSONElement::key(const char* k)
 {
 	Map<DynamicString, const char*> object(default_allocator());
@@ -116,7 +108,6 @@ JSONElement JSONElement::key(const char* k)
 	return JSONElement(value);
 }
 
-//--------------------------------------------------------------------------
 JSONElement JSONElement::key_or_nil(const char* k)
 {
 	if (m_at != NULL)
@@ -133,7 +124,6 @@ JSONElement JSONElement::key_or_nil(const char* k)
 	return JSONElement();
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::has_key(const char* k) const
 {
 	Map<DynamicString, const char*> object(default_allocator());
@@ -142,25 +132,21 @@ bool JSONElement::has_key(const char* k) const
 	return map::has(object, DynamicString(k));
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::to_bool(bool def) const
 {
 	return is_nil() ? def : json::parse_bool(m_at);
 }
 
-//--------------------------------------------------------------------------
 int32_t JSONElement::to_int(int32_t def) const
 {
 	return is_nil() ? def : json::parse_int(m_at);
 }
 
-//--------------------------------------------------------------------------
 float JSONElement::to_float(float def) const
 {
 	return is_nil() ? def : json::parse_float(m_at);
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_string(DynamicString& str, const char* def) const
 {
 	if (is_nil())
@@ -169,7 +155,6 @@ void JSONElement::to_string(DynamicString& str, const char* def) const
 		json::parse_string(m_at, str);
 }
 
-//--------------------------------------------------------------------------
 Vector2 JSONElement::to_vector2(const Vector2& def) const
 {
 	if (is_nil())
@@ -183,7 +168,6 @@ Vector2 JSONElement::to_vector2(const Vector2& def) const
 					json::parse_float(array[1]));
 }
 
-//--------------------------------------------------------------------------
 Vector3 JSONElement::to_vector3(const Vector3& def) const
 {
 	if (is_nil())
@@ -198,7 +182,6 @@ Vector3 JSONElement::to_vector3(const Vector3& def) const
 					json::parse_float(array[2]));
 }
 
-//--------------------------------------------------------------------------
 Vector4 JSONElement::to_vector4(const Vector4& def) const
 {
 	if (is_nil())
@@ -214,7 +197,6 @@ Vector4 JSONElement::to_vector4(const Vector4& def) const
 					json::parse_float(array[3]));
 }
 
-//--------------------------------------------------------------------------
 Quaternion JSONElement::to_quaternion(const Quaternion& def) const
 {
 	if (is_nil())
@@ -230,7 +212,6 @@ Quaternion JSONElement::to_quaternion(const Quaternion& def) const
 					json::parse_float(array[3]));
 }
 
-//--------------------------------------------------------------------------
 Matrix4x4 JSONElement::to_matrix4x4(const Matrix4x4& def) const
 {
 	if (is_nil())
@@ -243,7 +224,6 @@ Matrix4x4 JSONElement::to_matrix4x4(const Matrix4x4& def) const
 	return Matrix4x4(array::begin(array));
 }
 
-//--------------------------------------------------------------------------
 StringId32 JSONElement::to_string_id(const StringId32 def) const
 {
 	if (is_nil())
@@ -255,7 +235,6 @@ StringId32 JSONElement::to_string_id(const StringId32 def) const
 	return str.to_string_id();
 }
 
-//--------------------------------------------------------------------------
 ResourceId JSONElement::to_resource_id(const char* type) const
 {
 	CE_ASSERT_NOT_NULL(type);
@@ -265,7 +244,6 @@ ResourceId JSONElement::to_resource_id(const char* type) const
 	return ResourceId(type, str.c_str());
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Array<bool>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -278,7 +256,6 @@ void JSONElement::to_array(Array<bool>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Array<int16_t>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -291,7 +268,6 @@ void JSONElement::to_array(Array<int16_t>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Array<uint16_t>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -304,7 +280,6 @@ void JSONElement::to_array(Array<uint16_t>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Array<int32_t>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -317,7 +292,6 @@ void JSONElement::to_array(Array<int32_t>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Array<uint32_t>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -330,7 +304,6 @@ void JSONElement::to_array(Array<uint32_t>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Array<float>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -343,7 +316,6 @@ void JSONElement::to_array(Array<float>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_array(Vector<DynamicString>& array) const
 {
 	Array<const char*> temp(default_allocator());
@@ -358,7 +330,6 @@ void JSONElement::to_array(Vector<DynamicString>& array) const
 	}
 }
 
-//--------------------------------------------------------------------------
 void JSONElement::to_keys(Vector<DynamicString>& keys) const
 {
 	Map<DynamicString, const char*> object(default_allocator());
@@ -372,7 +343,6 @@ void JSONElement::to_keys(Vector<DynamicString>& keys) const
 	}
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::is_nil() const
 {
 	if (m_at != NULL)
@@ -383,7 +353,6 @@ bool JSONElement::is_nil() const
 	return true;
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::is_bool() const
 {
 	if (m_at != NULL)
@@ -394,7 +363,6 @@ bool JSONElement::is_bool() const
 	return false;
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::is_number() const
 {
 	if (m_at != NULL)
@@ -405,7 +373,6 @@ bool JSONElement::is_number() const
 	return false;
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::is_string() const
 {
 	if (m_at != NULL)
@@ -416,7 +383,6 @@ bool JSONElement::is_string() const
 	return false;
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::is_array() const
 {
 	if (m_at != NULL)
@@ -427,7 +393,6 @@ bool JSONElement::is_array() const
 	return false;
 }
 
-//--------------------------------------------------------------------------
 bool JSONElement::is_object() const
 {
 	if (m_at != NULL)
@@ -438,7 +403,6 @@ bool JSONElement::is_object() const
 	return false;
 }
 
-//--------------------------------------------------------------------------
 uint32_t JSONElement::size() const
 {
 	if (m_at == NULL)
@@ -486,7 +450,6 @@ uint32_t JSONElement::size() const
 	}
 }
 
-//--------------------------------------------------------------------------
 JSONParser::JSONParser(const char* s)
 	: m_file(false)
 	, m_document(s)
@@ -494,7 +457,6 @@ JSONParser::JSONParser(const char* s)
 	CE_ASSERT_NOT_NULL(s);
 }
 
-//--------------------------------------------------------------------------
 JSONParser::JSONParser(File& f)
 	: m_file(true)
 	, m_document(NULL)
@@ -505,7 +467,6 @@ JSONParser::JSONParser(File& f)
 	m_document = doc;
 }
 
-//--------------------------------------------------------------------------
 JSONParser::~JSONParser()
 {
 	if (m_file)
@@ -514,7 +475,6 @@ JSONParser::~JSONParser()
 	}
 }
 
-//--------------------------------------------------------------------------
 JSONElement JSONParser::root()
 {
 	const char* ch = m_document;

+ 0 - 13
engine/core/math/aabb.h

@@ -76,31 +76,26 @@ namespace aabb
 
 namespace aabb
 {
-	//-----------------------------------------------------------------------------
 	inline void reset(AABB& b)
 	{
 		b.min = vector3::ZERO;
 		b.max = vector3::ZERO;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 center(const AABB& b)
 	{
 		return (b.min + b.max) * 0.5;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float radius(const AABB& b)
 	{
 		return vector3::length(b.max - (b.min + b.max) * 0.5);
 	}
-	//-----------------------------------------------------------------------------
 	inline float volume(const AABB& b)
 	{
 		return (b.max.x - b.min.x) * (b.max.y - b.min.y) * (b.max.z - b.min.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void add_points(AABB& b, uint32_t num, const Vector3* points)
 	{
 		for (uint32_t i = 0; i < num; i++)
@@ -116,7 +111,6 @@ namespace aabb
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void add_boxes(AABB& b, uint32_t num, const AABB* boxes)
 	{
 		for (uint32_t i = 0; i < num; i++)
@@ -132,7 +126,6 @@ namespace aabb
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	inline bool contains_point(const AABB& b, const Vector3& p)
 	{
 		return (p.x > b.min.x &&
@@ -143,7 +136,6 @@ namespace aabb
 				p.z < b.max.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 vertex(const AABB& b, uint32_t index)
 	{
 		CE_ASSERT(index < 8, "Index must be < 8");
@@ -161,7 +153,6 @@ namespace aabb
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	inline AABB transformed(const AABB& b, const Matrix4x4& m)
 	{
 		Vector3 vertices[8];
@@ -182,7 +173,6 @@ namespace aabb
 		return res;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void to_vertices(const AABB& b, Vector3 v[8])
 	{
 		// 7 ---- 6
@@ -227,20 +217,17 @@ namespace aabb
 		v[7].z = b.min.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Sphere to_sphere(const AABB& b)
 	{
 		return Sphere(center(b), radius(b));
 	}
 } // namespace aabb
 
-//-----------------------------------------------------------------------------
 inline AABB::AABB()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline AABB::AABB(const Vector3& min, const Vector3& max)
 	: min(min), max(max)
 {

+ 0 - 24
engine/core/math/color4.h

@@ -206,35 +206,30 @@ struct Color4
 	float r, g, b, a;
 };
 
-//-----------------------------------------------------------------------------
 inline Color4 operator+(Color4 a, const Color4& b)
 {
 	a += b;
 	return a;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4 operator-(Color4 a, const Color4& b)
 {
 	a -= b;
 	return a;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4 operator*(Color4 a, const Color4& b)
 {
 	a *= b;
 	return a;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4 operator*(Color4 a, float k)
 {
 	a *= k;
 	return a;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4 operator*(float k, Color4 a)
 {
 	a *= k;
@@ -267,7 +262,6 @@ namespace color4
 
 namespace color4
 {
-	//-----------------------------------------------------------------------------
 	inline uint32_t to_rgb(const Color4& c)
 	{
 		uint32_t rgba;
@@ -280,7 +274,6 @@ namespace color4
 		return rgba;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline uint32_t to_bgr(const Color4& c)
 	{
 		uint32_t abgr;
@@ -293,7 +286,6 @@ namespace color4
 		return abgr;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline uint32_t to_rgba(const Color4& c)
 	{
 		uint32_t rgba;
@@ -306,7 +298,6 @@ namespace color4
 		return rgba;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline uint32_t to_abgr(const Color4& c)
 	{
 		uint32_t abgr;
@@ -319,32 +310,27 @@ namespace color4
 		return abgr;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float* to_float_ptr(Color4& c)
 	{
 		return &c.r;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline const float* to_float_ptr(const Color4& c)
 	{
 		return &c.r;
 	}
 } // namespace color4
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4(float r, float g, float b)
 	: r(r), g(g), b(b), a(1)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4(int r, int g, int b)
 	: r(r * float(1.0/255.0))
 	, g(g * float(1.0/255.0))
@@ -353,7 +339,6 @@ inline Color4::Color4(int r, int g, int b)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4(float r, float g, float b, float a)
 {
 	this->r = r;
@@ -362,7 +347,6 @@ inline Color4::Color4(float r, float g, float b, float a)
 	this->a = a;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4(int r, int g, int b, int a)
 	: r(r * float(1.0/255.0))
 	, g(g * float(1.0/255.0))
@@ -371,7 +355,6 @@ inline Color4::Color4(int r, int g, int b, int a)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4(float c[4])
 	: r(c[0])
 	, g(c[1])
@@ -380,7 +363,6 @@ inline Color4::Color4(float c[4])
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Color4::Color4(uint32_t rgba)
 	: r(float(1.0/255.0) * ((rgba & 0xFF000000) >> 24))
 	, g(float(1.0/255.0) * ((rgba & 0x00FF0000) >> 16))
@@ -389,19 +371,16 @@ inline Color4::Color4(uint32_t rgba)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline float& Color4::operator[](uint32_t i)
 {
 	return (&r)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline const float& Color4::operator[](uint32_t i) const
 {
 	return (&r)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Color4& Color4::operator+=(const Color4& c)
 {
 	r += c.r;
@@ -412,7 +391,6 @@ inline Color4& Color4::operator+=(const Color4& c)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4& Color4::operator-=(const Color4& c)
 {
 	r -= c.r;
@@ -423,7 +401,6 @@ inline Color4& Color4::operator-=(const Color4& c)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4& Color4::operator*=(const Color4& c)
 {
 	r *= c.r;
@@ -434,7 +411,6 @@ inline Color4& Color4::operator*=(const Color4& c)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Color4& Color4::operator*=(float k)
 {
 	r *= k;

+ 0 - 5
engine/core/math/frustum.h

@@ -65,7 +65,6 @@ namespace frustum
 
 namespace frustum
 {
-	//-----------------------------------------------------------------------------
 	inline bool contains_point(const Frustum& f, const Vector3& p)
 	{
 		if (plane::distance_to_point(f.left, p) < 0.0) return false;
@@ -78,7 +77,6 @@ namespace frustum
 		return true;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 vertex(const Frustum& f, uint32_t index)
 	{
 		CE_ASSERT(index < 8, "Index must be < 8");
@@ -111,7 +109,6 @@ namespace frustum
 		return ip;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void from_matrix(Frustum& f, const Matrix4x4& m)
 	{
 		f.left.n.x		= m[3] + m[0];
@@ -152,7 +149,6 @@ namespace frustum
 		plane::normalize(f.far);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline AABB to_aabb(const Frustum& f)
 	{
 		AABB tmp;
@@ -174,7 +170,6 @@ namespace frustum
 	}
 } // namespace frustum
 
-//-----------------------------------------------------------------------------
 inline Frustum::Frustum()
 {
 	// Do not initialize

+ 0 - 3
engine/core/math/intersection.h

@@ -66,7 +66,6 @@ inline float ray_sphere_intersection(const Vector3& from, const Vector3& dir, co
 	return b - math::sqrt(det);
 }
 
-//-----------------------------------------------------------------------------
 inline bool plane_3_intersection(const Plane& p1, const Plane& p2, const Plane& p3, Vector3& ip)
 {
 	const Vector3& n1 = p1.n;
@@ -86,7 +85,6 @@ inline bool plane_3_intersection(const Plane& p1, const Plane& p2, const Plane&
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 inline bool frustum_sphere_intersection(const Frustum& f, const Sphere& s)
 {
 	if (plane::distance_to_point(f.left, s.center()) < -s.radius() ||
@@ -110,7 +108,6 @@ inline bool frustum_sphere_intersection(const Frustum& f, const Sphere& s)
 	return true;
 }
 
-//-----------------------------------------------------------------------------
 inline bool frustum_box_intersection(const Frustum& f, const AABB& b)
 {
 	uint8_t out;

+ 0 - 22
engine/core/math/math_utils.h

@@ -46,33 +46,28 @@ const float HALF_PI = PI * 0.5f;
 const float FLOAT_PRECISION = 1.0e-7f;
 const double DOUBLE_PRECISION = 1.0e-9;
 
-//-----------------------------------------------------------------------------
 inline bool equals(float a, float b, float precision = FLOAT_PRECISION)
 {
 	return ((b <= (a + precision)) && (b >= (a - precision)));
 }
 
-//-----------------------------------------------------------------------------
 inline bool equals(double a, double b, double precision = DOUBLE_PRECISION)
 {
 	return ((b <= (a + precision)) && (b >= (a - precision)));
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline T min(const T& a, const T& b)
 {
 	return a < b ? a : b;
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline T max(const T& a, const T& b)
 {
 	return a < b ? b : a;
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline T clamp(const T& min, const T& max, const T& val)
 {
@@ -80,7 +75,6 @@ inline T clamp(const T& min, const T& max, const T& val)
 	return val > max ? max : val < min ? min : val;
 }
 
-//-----------------------------------------------------------------------------
 template <typename T>
 inline void swap(T& a, T& b)
 {
@@ -89,19 +83,16 @@ inline void swap(T& a, T& b)
 	b = tmp;
 }
 
-//-----------------------------------------------------------------------------
 inline float to_rad(float deg)
 {
 	return deg * float(PI / 180.0);
 }
 
-//-----------------------------------------------------------------------------
 inline float to_deg(float rad)
 {
 	return rad * float(180.0 / PI);
 }
 
-//-----------------------------------------------------------------------------
 inline uint32_t next_pow_2(uint32_t x)
 {
 	x--;
@@ -115,79 +106,66 @@ inline uint32_t next_pow_2(uint32_t x)
 	return ++x;
 }
 
-//-----------------------------------------------------------------------------
 inline bool is_pow_2(uint32_t x)
 {
 	return !(x & (x - 1)) && x;
 }
 
-//-----------------------------------------------------------------------------
 inline float ceil(float x)
 {
 	return ceilf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float floor(float x)
 {
 	return floorf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float sqrt(float x)
 {
 	return sqrtf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float inv_sqrt(float x)
 {
 	return 1.0f / sqrt(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float sin(float x)
 {
 	return sinf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float cos(float x)
 {
 	return cosf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float asin(float x)
 {
 	return asinf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float acos(float x)
 {
 	return acosf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float tan(float x)
 {
 	return tanf(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float atan2(float y, float x)
 {
 	return atan2f(y, x);
 }
 
-//-----------------------------------------------------------------------------
 inline float abs(float x)
 {
 	return fabs(x);
 }
 
-//-----------------------------------------------------------------------------
 inline float fmod(float n, float d)
 {
 	return ::fmod(n, d);

+ 0 - 20
engine/core/math/matrix3x3.h

@@ -141,7 +141,6 @@ inline Matrix3x3 operator*(Matrix3x3 a, const Matrix3x3& b)
 
 namespace matrix3x3
 {
-	//-----------------------------------------------------------------------------
 	inline Matrix3x3& transpose(Matrix3x3& m)
 	{
 		float tmp;
@@ -161,14 +160,12 @@ namespace matrix3x3
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix3x3 get_transposed(Matrix3x3 m)
 	{
 		transpose(m);
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float determinant(const Matrix3x3& m)
 	{
 		return	m.x.x * (m.y.y * m.z.z - m.z.y * m.y.z) -
@@ -176,7 +173,6 @@ namespace matrix3x3
 				m.z.x * (m.x.y * m.y.z - m.y.y * m.x.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix3x3& invert(Matrix3x3& m)
 	{
 		Matrix3x3 mat;
@@ -207,14 +203,12 @@ namespace matrix3x3
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix3x3 get_inverted(Matrix3x3 m)
 	{
 		invert(m);
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_identity(Matrix3x3& m)
 	{
 		m.x = Vector3(1, 0, 0);
@@ -222,13 +216,11 @@ namespace matrix3x3
 		m.z = Vector3(0, 0, 1);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix4x4 to_matrix4x4(const Matrix3x3& m)
 	{
 		return Matrix4x4(m);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Quaternion to_quaternion(const Matrix3x3& m)
 	{
 		const float fourWSquaredMinusOne = m.x.x + m.y.y + m.z.z;
@@ -305,13 +297,11 @@ namespace matrix3x3
 	}
 } // namespace matrix3x3
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3::Matrix3x3()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3::Matrix3x3(const Vector3& x, const Vector3& y, const Vector3& z)
 	: x(x)
 	, y(y)
@@ -319,7 +309,6 @@ inline Matrix3x3::Matrix3x3(const Vector3& x, const Vector3& y, const Vector3& z
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3::Matrix3x3(const Quaternion& r)
 	: x(1.0f - 2.0f * r.y * r.y - 2.0f * r.z * r.z, 2.0f * r.x * r.y + 2.0f * r.w * r.z, 2.0f * r.x * r.z - 2.0f * r.w * r.y)
 	, y(2.0f * r.x * r.y - 2.0f * r.w * r.z, 1.0f - 2.0f * r.x * r.x - 2.0f * r.z * r.z, 2.0f * r.y * r.z + 2.0f * r.w * r.x)
@@ -327,7 +316,6 @@ inline Matrix3x3::Matrix3x3(const Quaternion& r)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3::Matrix3x3(float r1c1, float r2c1, float r3c1, float r1c2, float r2c2, float r3c2,
 						float r1c3, float r2c3, float r3c3)
 	: x(r1c1, r2c1, r3c1)
@@ -336,7 +324,6 @@ inline Matrix3x3::Matrix3x3(float r1c1, float r2c1, float r3c1, float r1c2, floa
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3::Matrix3x3(const float v[9])
 	: x(v[0], v[1], v[2])
 	, y(v[3], v[4], v[5])
@@ -344,7 +331,6 @@ inline Matrix3x3::Matrix3x3(const float v[9])
 {
 }
 
-//-----------------------------------------------------------------------------
 inline float& Matrix3x3::operator[](uint32_t i)
 {
 	CE_ASSERT(i < 9, "Index out of bounds");
@@ -352,7 +338,6 @@ inline float& Matrix3x3::operator[](uint32_t i)
 	return vector3::to_float_ptr(x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline const float& Matrix3x3::operator[](uint32_t i) const
 {
 	CE_ASSERT(i < 9, "Index out of bounds");
@@ -360,7 +345,6 @@ inline const float& Matrix3x3::operator[](uint32_t i) const
 	return vector3::to_float_ptr(x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3& Matrix3x3::operator+=(const Matrix3x3& a)
 {
 	x += a.x;
@@ -370,7 +354,6 @@ inline Matrix3x3& Matrix3x3::operator+=(const Matrix3x3& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3& Matrix3x3::operator-=(const Matrix3x3& a)
 {
 	x -= a.x;
@@ -380,7 +363,6 @@ inline Matrix3x3& Matrix3x3::operator-=(const Matrix3x3& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3& Matrix3x3::operator*=(float k)
 {
 	x *= k;
@@ -390,7 +372,6 @@ inline Matrix3x3& Matrix3x3::operator*=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3& Matrix3x3::operator/=(float k)
 {
 	const float inv_k = 1.0f / k;
@@ -402,7 +383,6 @@ inline Matrix3x3& Matrix3x3::operator/=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix3x3& Matrix3x3::operator*=(const Matrix3x3& a)
 {
 	Matrix3x3 tmp;

+ 0 - 35
engine/core/math/matrix4x4.h

@@ -197,13 +197,11 @@ inline Matrix4x4 operator*(Matrix4x4 a, const Matrix4x4& b)
 
 namespace matrix4x4
 {
-	//-----------------------------------------------------------------------------
 	inline void set_rotation(Matrix4x4& m, const Quaternion& rot)
 	{
 		set_rotation(m, quaternion::to_matrix3x3(rot));
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_rotation(Matrix4x4& m, const Matrix3x3& rot)
 	{
 		m.x.x = rot.x.x;
@@ -217,7 +215,6 @@ namespace matrix4x4
 		m.z.z = rot.z.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_perspective_rh(Matrix4x4& m, float fovy, float aspect, float near, float far)
 	{
 		const float height = 1.0f / math::tan(fovy * ((float) math::PI / 180.0f) * 0.5f);
@@ -231,7 +228,6 @@ namespace matrix4x4
 		m.t = Vector4(0, 0, bb, 0);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_orthographic_rh(Matrix4x4& m, float left, float right, float bottom, float top, float near, float far)
 	{
 		m.x = Vector4(2.0f / (right - left), 0, 0, 0);
@@ -240,7 +236,6 @@ namespace matrix4x4
 		m.t = Vector4((left + right) / (left - right), (top + bottom) / (bottom - top), near / (near - far), 1.0f);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix4x4& transpose(Matrix4x4& m)
 	{
 		float tmp;
@@ -272,14 +267,12 @@ namespace matrix4x4
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix4x4 get_transposed(Matrix4x4 m)
 	{
 		transpose(m);
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_look_rh(Matrix4x4& m, const Vector3& pos, const Vector3& target, const Vector3& up)
 	{
 		Vector3 zAxis = pos - target;
@@ -308,7 +301,6 @@ namespace matrix4x4
 		m.t.w= 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float determinant(const Matrix4x4& m)
 	{
 		const float m02m07_m06m03 = m.x.z * m.y.w - m.y.z * m.x.w;
@@ -324,7 +316,6 @@ namespace matrix4x4
 				- m.t.x * (m.x.y * m06m11_m10m07 - m.y.y * m02m11_m10m03 + m.z.y * m02m07_m06m03);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix4x4& invert(Matrix4x4& m)
 	{
 		Matrix4x4 mat;
@@ -388,14 +379,12 @@ namespace matrix4x4
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix4x4 get_inverted(Matrix4x4 m)
 	{
 		invert(m);
 		return m;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_identity(Matrix4x4& m)
 	{
 		m.x = Vector4(1, 0, 0, 0);
@@ -404,25 +393,21 @@ namespace matrix4x4
 		m.t = Vector4(0, 0, 0, 1);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 x(const Matrix4x4& m)
 	{
 		return Vector3(m.x.x, m.x.y, m.x.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 y(const Matrix4x4& m)
 	{
 		return Vector3(m.y.x, m.y.y, m.y.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 z(const Matrix4x4& m)
 	{
 		return Vector3(m.z.x, m.z.y, m.z.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_x(Matrix4x4& m, const Vector3& x)
 	{
 		m.x.x = x.x;
@@ -430,7 +415,6 @@ namespace matrix4x4
 		m.x.z = x.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_y(Matrix4x4& m, const Vector3& y)
 	{
 		m.y.x = y.x;
@@ -438,7 +422,6 @@ namespace matrix4x4
 		m.y.z = y.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_z(Matrix4x4& m, const Vector3& z)
 	{
 		m.z.x = z.x;
@@ -446,13 +429,11 @@ namespace matrix4x4
 		m.z.z = z.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 translation(const Matrix4x4& m)
 	{
 		return Vector3(m.t.x, m.t.y, m.t.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_translation(Matrix4x4& m, const Vector3& trans)
 	{
 		m.t.x = trans.x;
@@ -460,32 +441,27 @@ namespace matrix4x4
 		m.t.z = trans.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float* to_float_ptr(Matrix4x4& m)
 	{
 		return vector4::to_float_ptr(m.x);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline const float* to_float_ptr(const Matrix4x4& m)
 	{
 		return vector4::to_float_ptr(m.x);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Matrix3x3 to_matrix3x3(const Matrix4x4& m)
 	{
 		return Matrix3x3(x(m), y(m), z(m));
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Quaternion to_quaternion(const Matrix4x4& m)
 	{
 		return matrix3x3::to_quaternion(to_matrix3x3(m));
 	}
 } // namespace matrix4x4
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4::Matrix4x4()
 {
 	// Do not initialize
@@ -496,7 +472,6 @@ inline Matrix4x4::Matrix4x4(const Vector3& x, const Vector3& y, const Vector3& z
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4::Matrix4x4(float r1c1, float r2c1, float r3c1, float r4c1,
 							float r1c2, float r2c2, float r3c2, float r4c2,
 							float r1c3, float r2c3, float r3c3, float r4c3,
@@ -508,7 +483,6 @@ inline Matrix4x4::Matrix4x4(float r1c1, float r2c1, float r3c1, float r4c1,
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4::Matrix4x4(const Quaternion& r, const Vector3& p)
 	: x(1.0f - 2.0f * r.y * r.y - 2.0f * r.z * r.z, 2.0f * r.x * r.y + 2.0f * r.w * r.z, 2.0f * r.x * r.z - 2.0f * r.w * r.y, 0)
 	, y(2.0f * r.x * r.y - 2.0f * r.w * r.z, 1.0f - 2.0f * r.x * r.x - 2.0f * r.z * r.z, 2.0f * r.y * r.z + 2.0f * r.w * r.x, 0)
@@ -517,7 +491,6 @@ inline Matrix4x4::Matrix4x4(const Quaternion& r, const Vector3& p)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4::Matrix4x4(const Matrix3x3& m)
 	: x(m.x, 0)
 	, y(m.y, 0)
@@ -526,7 +499,6 @@ inline Matrix4x4::Matrix4x4(const Matrix3x3& m)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4::Matrix4x4(const float v[16])
 	: x(v[0], v[1], v[2], v[3])
 	, y(v[4], v[5], v[6], v[7])
@@ -535,7 +507,6 @@ inline Matrix4x4::Matrix4x4(const float v[16])
 {
 }
 
-//-----------------------------------------------------------------------------
 inline float& Matrix4x4::operator[](uint32_t i)
 {
 	CE_ASSERT(i < 16, "Index out of bounds");
@@ -543,7 +514,6 @@ inline float& Matrix4x4::operator[](uint32_t i)
 	return vector4::to_float_ptr(x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline const float& Matrix4x4::operator[](uint32_t i) const
 {
 	CE_ASSERT(i < 16, "Index out of bounds");
@@ -551,7 +521,6 @@ inline const float& Matrix4x4::operator[](uint32_t i) const
 	return vector4::to_float_ptr(x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4& Matrix4x4::operator+=(const Matrix4x4& a)
 {
 	x += a.x;
@@ -562,7 +531,6 @@ inline Matrix4x4& Matrix4x4::operator+=(const Matrix4x4& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4& Matrix4x4::operator-=(const Matrix4x4& a)
 {
 	x -= a.x;
@@ -573,7 +541,6 @@ inline Matrix4x4& Matrix4x4::operator-=(const Matrix4x4& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4& Matrix4x4::operator*=(float k)
 {
 	x *= k;
@@ -584,7 +551,6 @@ inline Matrix4x4& Matrix4x4::operator*=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4& Matrix4x4::operator/=(float k)
 {
 	const float inv_k = 1.0f / k;
@@ -597,7 +563,6 @@ inline Matrix4x4& Matrix4x4::operator/=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Matrix4x4& Matrix4x4::operator*=(const Matrix4x4& a)
 {
 	Matrix4x4 tmp;

+ 0 - 4
engine/core/math/plane.h

@@ -54,7 +54,6 @@ namespace plane
 	const Plane	YAXIS = Plane(vector3::YAXIS, 0.0);
 	const Plane	ZAXIS = Plane(vector3::ZAXIS, 0.0);
 
-	//-----------------------------------------------------------------------------
 	inline Plane& normalize(Plane& p)
 	{
 		float len = vector3::length(p.n);
@@ -72,20 +71,17 @@ namespace plane
 		return p;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float distance_to_point(const Plane& p, const Vector3& point)
 	{
 		return vector3::dot(p.n, point) + p.d;
 	}
 } // namespace plane
 
-//-----------------------------------------------------------------------------
 inline Plane::Plane()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Plane::Plane(const Vector3& normal, float dist)
 	: n(normal), d(dist)
 {

+ 0 - 8
engine/core/math/quaternion.h

@@ -91,13 +91,11 @@ inline Quaternion operator*(const Quaternion& a, float k)
 
 namespace quaternion
 {
-	//-----------------------------------------------------------------------------
 	inline float dot(const Quaternion& a, const Quaternion& b)
 	{
 		return a.w * b.w + a.x * b.x + a.y * b.y + a.z * b.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float length(const Quaternion& q)
 	{
 		return math::sqrt(q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z);
@@ -142,13 +140,11 @@ namespace quaternion
 	}
 } // namespace quaternion
 
-//-----------------------------------------------------------------------------
 inline Quaternion::Quaternion()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Quaternion::Quaternion(float nx, float ny, float nz, float nw)
 	: x(nx)
 	, y(ny)
@@ -157,7 +153,6 @@ inline Quaternion::Quaternion(float nx, float ny, float nz, float nw)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Quaternion::Quaternion(const Vector3& axis, float angle)
 	: x(axis.x * math::sin(angle * 0.5f))
 	, y(axis.y * math::sin(angle * 0.5f))
@@ -166,21 +161,18 @@ 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");
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Quaternion& Quaternion::operator*=(const Quaternion& a)
 {
 	const float t_x = w * a.x + x * a.w + z * a.y - y * a.z;

+ 0 - 4
engine/core/math/random.h

@@ -53,12 +53,10 @@ private:
 	int32_t		m_seed;
 };
 
-//-----------------------------------------------------------------------------
 inline Random::Random(int32_t seed) : m_seed(seed)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline int32_t Random::integer()
 {
 	m_seed = 214013 * m_seed + 13737667;
@@ -66,13 +64,11 @@ inline int32_t Random::integer()
 	return (m_seed >> 16) & 0x7FFF;
 }
 
-//-----------------------------------------------------------------------------
 inline int32_t Random::integer(int32_t max)
 {
 	return (max == 0) ? 0 : integer() % max;
 }
 
-//-----------------------------------------------------------------------------
 inline float Random::unit_float()
 {
 	return integer() / (float) 0x7FFF;

+ 0 - 11
engine/core/math/sphere.h

@@ -69,52 +69,43 @@ private:
 	float			m_radius;
 };
 
-//-----------------------------------------------------------------------------
 inline Sphere::Sphere()
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Sphere::Sphere(const Vector3& center, float radius) : m_center(center), m_radius(radius)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Sphere::Sphere(const Sphere& a) : m_center(a.m_center), m_radius(a.m_radius)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline const Vector3& Sphere::center() const
 {
 	return m_center;
 }
 
-//-----------------------------------------------------------------------------
 inline float Sphere::radius() const
 {
 	return m_radius;
 }
 
-//-----------------------------------------------------------------------------
 inline float Sphere::volume() const
 {
 	return float(4.0 / 3.0 * math::PI) * m_radius * m_radius * m_radius;
 }
 
-//-----------------------------------------------------------------------------
 inline void Sphere::set_center(const Vector3& center)
 {
 	m_center = center;
 }
 
-//-----------------------------------------------------------------------------
 inline void Sphere::set_radius(float radius)
 {
 	m_radius = radius;
 }
 
-//-----------------------------------------------------------------------------
 inline void Sphere::add_points(const Vector3* points, uint32_t count)
 {
 	for (uint32_t i = 0; i < count; i++)
@@ -130,7 +121,6 @@ inline void Sphere::add_points(const Vector3* points, uint32_t count)
 	}
 }
 
-//-----------------------------------------------------------------------------
 inline void Sphere::add_spheres(const Sphere* spheres, uint32_t count)
 {
 	for (uint32_t i = 0; i < count; i++)
@@ -149,7 +139,6 @@ inline void Sphere::add_spheres(const Sphere* spheres, uint32_t count)
 	}
 }
 
-//-----------------------------------------------------------------------------
 inline bool Sphere::contains_point(const Vector3& p) const
 {
 	float dist = vector3::squared_length(p - m_center);

+ 0 - 19
engine/core/math/vector2.h

@@ -133,25 +133,21 @@ inline bool operator==(const Vector2& a, const Vector2& b)
 namespace vector2
 {
 
-	//-----------------------------------------------------------------------------
 	inline float dot(const Vector2& a, const Vector2& b)
 	{
 		return a.x * b.x + a.y * b.y;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float length(const Vector2& a)
 	{
 		return math::sqrt(a.x * a.x + a.y * a.y);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float squared_length(const Vector2& a)
 	{
 		return a.x * a.x + a.y * a.y;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_length(Vector2& a, float len)
 	{
 		normalize(a);
@@ -160,7 +156,6 @@ namespace vector2
 		a.y *= len;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector2 normalize(Vector2& a)
 	{
 		float inv_len = 1.0f / length(a);
@@ -171,53 +166,44 @@ namespace vector2
 		return a;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float distance(const Vector2& a, const Vector2& b)
 	{
 		return length(b - a);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float angle(const Vector2& a, const Vector2& b)
 	{
 		return math::acos(dot(a, b) / (length(a) * length(b)));
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float* to_float_ptr(Vector2& a)
 	{
 		return &a.x;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline const float* to_float_ptr(const Vector2& a)
 	{
 		return &a.x;
 	}
 } // namespace vector2
 
-//-----------------------------------------------------------------------------
 inline Vector2::Vector2()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2::Vector2(float val) : x(val), y(val)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2::Vector2(float nx, float ny) : x(nx), y(ny)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2::Vector2(const float a[2]) : x(a[0]), y(a[1])
 {
 }
 
-//-----------------------------------------------------------------------------
 inline const float& Vector2::operator[](uint32_t i) const
 {
 	CE_ASSERT(i < 2, "Index out of bounds");
@@ -225,7 +211,6 @@ inline const float& Vector2::operator[](uint32_t i) const
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline float& Vector2::operator[](uint32_t i)
 {
 	CE_ASSERT(i < 2, "Index out of bounds");
@@ -233,7 +218,6 @@ inline float& Vector2::operator[](uint32_t i)
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2& Vector2::operator+=(const Vector2& a)
 {
 	x += a.x;
@@ -242,7 +226,6 @@ inline Vector2& Vector2::operator+=(const Vector2& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2& Vector2::operator-=(const Vector2& a)
 {
 	x -= a.x;
@@ -251,7 +234,6 @@ inline Vector2& Vector2::operator-=(const Vector2& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2& Vector2::operator*=(float k)
 {
 	x *= k;
@@ -260,7 +242,6 @@ inline Vector2& Vector2::operator*=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector2& Vector2::operator/=(float k)
 {
 	CE_ASSERT(k != (float)0.0, "Division by zero");

+ 0 - 21
engine/core/math/vector3.h

@@ -142,31 +142,26 @@ inline bool operator==(const Vector3& a, const Vector3& b)
 
 namespace vector3
 {
-	//-----------------------------------------------------------------------------
 	inline float dot(const Vector3& a, const Vector3& b)
 	{
 		return a.x * b.x + a.y * b.y + a.z * b.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 cross(const Vector3& a, const Vector3& b)
 	{
 		return Vector3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float length(const Vector3& a)
 	{
 		return math::sqrt(a.x * a.x + a.y * a.y + a.z * a.z);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float squared_length(const Vector3& a)
 	{
 		return a.x * a.x + a.y * a.y + a.z * a.z;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_length(Vector3& a, float len)
 	{
 		normalize(a);
@@ -176,7 +171,6 @@ namespace vector3
 		a.z *= len;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 normalize(Vector3& a)
 	{
 		float inv_len = 1.0f / length(a);
@@ -188,59 +182,49 @@ namespace vector3
 		return a;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float distance(const Vector3& a, const Vector3& b)
 	{
 		return length(b - a);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float angle(const Vector3& a, const Vector3& b)
 	{
 		return math::acos(dot(a, b) / (length(a) * length(b)));
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float* to_float_ptr(Vector3& a)
 	{
 		return &a.x;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline const float* to_float_ptr(const Vector3& a)
 	{
 		return &a.x;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector2 to_vector2(const Vector3& a)
 	{
 		return Vector2(a.x, a.y);
 	}
 } // namespace vector3
 
-//-----------------------------------------------------------------------------
 inline Vector3::Vector3()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3::Vector3(float val) : x(val), y(val), z(val)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3::Vector3(float nx, float ny, float nz) : x(nx), y(ny), z(nz)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3::Vector3(const float v[3]) : x(v[0]), y(v[1]), z(v[2])
 {
 }
 
-//-----------------------------------------------------------------------------
 inline const float& Vector3::operator[](uint32_t i) const
 {
 	CE_ASSERT(i < 3, "Index out of bounds");
@@ -248,7 +232,6 @@ inline const float& Vector3::operator[](uint32_t i) const
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline float& Vector3::operator[](uint32_t i)
 {
 	CE_ASSERT(i < 3, "Index out of bounds");
@@ -256,7 +239,6 @@ inline float& Vector3::operator[](uint32_t i)
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3& Vector3::operator+=(const Vector3& a)
 {
 	x += a.x;
@@ -266,7 +248,6 @@ inline Vector3& Vector3::operator+=(const Vector3& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3& Vector3::operator-=(const Vector3& a)
 {
 	x -= a.x;
@@ -276,7 +257,6 @@ inline Vector3& Vector3::operator-=(const Vector3& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3& Vector3::operator*=(float k)
 {
 	x *= k;
@@ -286,7 +266,6 @@ inline Vector3& Vector3::operator*=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector3& Vector3::operator/=(float k)
 {
 	CE_ASSERT(k != (float)0.0, "Division by zero");

+ 0 - 21
engine/core/math/vector4.h

@@ -139,25 +139,21 @@ inline bool operator==(const Vector4& a, const Vector4& b)
 
 namespace vector4
 {
-	//-----------------------------------------------------------------------------
 	inline float dot(const Vector4& a, const Vector4& b)
 	{
 		return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float length(const Vector4& a)
 	{
 		return math::sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float squared_length(const Vector4& a)
 	{
 		return a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void set_length(Vector4& a, float len)
 	{
 		normalize(a);
@@ -168,7 +164,6 @@ namespace vector4
 		a.w *= len;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector4 normalize(Vector4& a)
 	{
 		float inv_len = 1.0f / length(a);
@@ -181,64 +176,53 @@ namespace vector4
 		return a;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float distance(const Vector4& a, const Vector4& b)
 	{
 		return length(b - a);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float angle(const Vector4& a, const Vector4& b)
 	{
 		return math::acos(dot(a, b) / (length(a) * length(b)));
 	}
 
-	//-----------------------------------------------------------------------------
 	inline float* to_float_ptr(Vector4& a)
 	{
 		return &a.x;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline const float* to_float_ptr(const Vector4& a)
 	{
 		return &a.x;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline Vector3 to_vector3(const Vector4& a)
 	{
 		return Vector3(a.x, a.y, a.z);
 	}
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4::Vector4()
 {
 	// Do not initialize
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4::Vector4(const Vector3& a, float w) : x(a.x), y(a.y), z(a.z), w(w)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4::Vector4(float val) : x(val), y(val), z(val), w(val)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4::Vector4(float nx, float ny, float nz, float nw) : x(nx), y(ny), z(nz), w(nw)
 {
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4::Vector4(const float a[4]) : x(a[0]), y(a[1]), z(a[2]), w(a[3])
 {
 }
 
-//-----------------------------------------------------------------------------
 inline const float& Vector4::operator[](uint32_t i) const
 {
 	CE_ASSERT(i < 4, "Index out of bounds");
@@ -246,7 +230,6 @@ inline const float& Vector4::operator[](uint32_t i) const
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline float& Vector4::operator[](uint32_t i)
 {
 	CE_ASSERT(i < 4, "Index out of bounds");
@@ -254,7 +237,6 @@ inline float& Vector4::operator[](uint32_t i)
 	return (&x)[i];
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4& Vector4::operator+=(const Vector4& a)
 {
 	x += a.x;
@@ -265,7 +247,6 @@ inline Vector4& Vector4::operator+=(const Vector4& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4& Vector4::operator-=(const Vector4& a)
 {
 	x -= a.x;
@@ -276,7 +257,6 @@ inline Vector4& Vector4::operator-=(const Vector4& a)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4& Vector4::operator*=(float k)
 {
 	x *= k;
@@ -287,7 +267,6 @@ inline Vector4& Vector4::operator*=(float k)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline Vector4& Vector4::operator/=(float k)
 {
 	CE_ASSERT(k != (float)0.0, "Division by zero");

+ 0 - 7
engine/core/memory/linear_allocator.cpp

@@ -30,7 +30,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 LinearAllocator::LinearAllocator(Allocator& backing, size_t size)
 	: _backing(&backing)
 	, _physical_start(NULL)
@@ -40,7 +39,6 @@ LinearAllocator::LinearAllocator(Allocator& backing, size_t size)
 	_physical_start = backing.allocate(size);
 }
 
-//-----------------------------------------------------------------------------
 LinearAllocator::LinearAllocator(void* start, size_t size)
 	: _backing(NULL)
 	, _physical_start(start)
@@ -49,7 +47,6 @@ LinearAllocator::LinearAllocator(void* start, size_t size)
 {
 }
 
-//-----------------------------------------------------------------------------
 LinearAllocator::~LinearAllocator()
 {
 	if (_backing)
@@ -60,7 +57,6 @@ LinearAllocator::~LinearAllocator()
 	CE_ASSERT(_offset == 0, "Memory leak of %ld bytes, maybe you forgot to call clear()?", _offset);
 }
 
-//-----------------------------------------------------------------------------
 void* LinearAllocator::allocate(size_t size, size_t align)
 {
 	const size_t actual_size = size + align;
@@ -78,19 +74,16 @@ void* LinearAllocator::allocate(size_t size, size_t align)
 	return user_ptr;
 }
 
-//-----------------------------------------------------------------------------
 void LinearAllocator::deallocate(void* /*data*/)
 {
 	// Single deallocations not supported. Use clear().
 }
 
-//-----------------------------------------------------------------------------
 void LinearAllocator::clear()
 {
 	_offset = 0;
 }
 
-//-----------------------------------------------------------------------------
 size_t LinearAllocator::allocated_size()
 {
 	return _offset;

+ 0 - 8
engine/core/memory/memory.cpp

@@ -28,7 +28,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "allocator.h"
 #include "mutex.h"
 
-// //-----------------------------------------------------------------------------
 // void* operator new(size_t) throw (std::bad_alloc)
 // {
 // 	CE_ASSERT(false, "operator new forbidden");
@@ -36,7 +35,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 // 	return NULL;
 // }
 
-// //-----------------------------------------------------------------------------
 // void* operator new[](size_t) throw (std::bad_alloc)
 // {
 // 	CE_ASSERT(false, "operator new[] forbidden");
@@ -44,13 +42,11 @@ OTHER DEALINGS IN THE SOFTWARE.
 // 	return NULL;
 // }
 
-// //-----------------------------------------------------------------------------
 // void operator delete(void*) throw ()
 // {
 // 	CE_ASSERT(false, "operator delete forbidden");
 // }
 
-// //-----------------------------------------------------------------------------
 // void operator delete[](void*) throw ()
 // {
 // 	CE_ASSERT(false, "operator delete[] forbidden");
@@ -136,13 +132,11 @@ namespace memory
 			uint32_t size;
 		};
 
-		//-----------------------------------------------------------------------------
 		size_t actual_allocation_size(size_t size, size_t align)
 		{
 			return size + align + sizeof(Header);
 		}
 
-		//-----------------------------------------------------------------------------
 		Header* header(void* data)
 		{
 			uint32_t* ptr = (uint32_t*)data;
@@ -156,13 +150,11 @@ namespace memory
 			return (Header*)ptr;
 		}
 
-		//-----------------------------------------------------------------------------
 		void* data(Header* header, size_t align)
 		{
 			return memory::align_top(header + 1, align);
 		}
 
-		//-----------------------------------------------------------------------------
 		void pad(Header* header, void* data)
 		{
 			uint32_t* p = (uint32_t*)(header + 1);

+ 0 - 5
engine/core/memory/pool_allocator.cpp

@@ -30,7 +30,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 PoolAllocator::PoolAllocator(Allocator& backing, size_t num_blocks, size_t block_size, size_t block_align)
 	: _backing(backing)
 	, _start(NULL)
@@ -65,13 +64,11 @@ PoolAllocator::PoolAllocator(Allocator& backing, size_t num_blocks, size_t block
 	_freelist = mem;
 }
 
-//-----------------------------------------------------------------------------
 PoolAllocator::~PoolAllocator()
 {
 	_backing.deallocate(_start);
 }
 
-//-----------------------------------------------------------------------------
 void* PoolAllocator::allocate(size_t size, size_t align)
 {
 	CE_ASSERT(size == _block_size, "Size must match block size");
@@ -88,7 +85,6 @@ void* PoolAllocator::allocate(size_t size, size_t align)
 	return user_ptr;
 }
 
-//-----------------------------------------------------------------------------
 void PoolAllocator::deallocate(void* data)
 {
 	if (!data)
@@ -105,7 +101,6 @@ void PoolAllocator::deallocate(void* data)
 	_allocated_size -= _block_size;
 }
 
-//-----------------------------------------------------------------------------
 size_t PoolAllocator::allocated_size()
 {
 	return _allocated_size;

+ 0 - 9
engine/core/memory/proxy_allocator.cpp

@@ -35,7 +35,6 @@ namespace crown
 static ProxyAllocator* g_proxy_allocators_head = NULL;
 static Mutex g_proxy_allocators_mutex;
 
-//-----------------------------------------------------------------------------
 ProxyAllocator::ProxyAllocator(const char* name, Allocator& allocator)
 	: _allocator(allocator)
 	, _name(name)
@@ -54,7 +53,6 @@ ProxyAllocator::ProxyAllocator(const char* name, Allocator& allocator)
 	g_proxy_allocators_head = this;
 }
 
-//-----------------------------------------------------------------------------
 void* ProxyAllocator::allocate(size_t size, size_t align)
 {
 	_total_allocated += size;
@@ -62,25 +60,21 @@ void* ProxyAllocator::allocate(size_t size, size_t align)
 	return _allocator.allocate(size, align);
 }
 
-//-----------------------------------------------------------------------------
 void ProxyAllocator::deallocate(void* data)
 {
 	_allocator.deallocate(data);
 }
 
-//-----------------------------------------------------------------------------
 size_t ProxyAllocator::allocated_size()
 {
 	return _total_allocated;
 }
 
-//-----------------------------------------------------------------------------
 const char* ProxyAllocator::name() const
 {
 	return _name;
 }
 
-//-----------------------------------------------------------------------------
 uint32_t ProxyAllocator::count()
 {
 	ScopedMutex sm(g_proxy_allocators_mutex);
@@ -97,7 +91,6 @@ uint32_t ProxyAllocator::count()
 	return count;
 }
 
-//-----------------------------------------------------------------------------
 ProxyAllocator* ProxyAllocator::find(const char* name)
 {
 	ScopedMutex sm(g_proxy_allocators_mutex);
@@ -117,13 +110,11 @@ ProxyAllocator* ProxyAllocator::find(const char* name)
 	return NULL;
 }
 
-//-----------------------------------------------------------------------------
 ProxyAllocator* ProxyAllocator::begin()
 {
 	return g_proxy_allocators_head;
 }
 
-//-----------------------------------------------------------------------------
 ProxyAllocator* ProxyAllocator::next(ProxyAllocator* a)
 {
 	if (a == NULL)

+ 0 - 5
engine/core/memory/stack_allocator.cpp

@@ -30,7 +30,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 StackAllocator::StackAllocator(void* start, size_t size)
 	: _physical_start(start)
 	, _total_size(size)
@@ -39,14 +38,12 @@ StackAllocator::StackAllocator(void* start, size_t size)
 {
 }
 
-//-----------------------------------------------------------------------------
 StackAllocator::~StackAllocator()
 {
 	CE_ASSERT(_allocation_count == 0 && allocated_size() == 0,
 		"Missing %d deallocations causing a leak of %ld bytes", _allocation_count, allocated_size());
 }
 
-//-----------------------------------------------------------------------------
 void* StackAllocator::allocate(size_t size, size_t align)
 {
 	const size_t actual_size = sizeof(Header) + size + align;
@@ -75,7 +72,6 @@ void* StackAllocator::allocate(size_t size, size_t align)
 	return user_ptr;
 }
 
-//-----------------------------------------------------------------------------
 void StackAllocator::deallocate(void* data)
 {
 	if (!data)
@@ -91,7 +87,6 @@ void StackAllocator::deallocate(void* data)
 	_allocation_count--;
 }
 
-//-----------------------------------------------------------------------------
 size_t StackAllocator::allocated_size()
 {
 	return (char*) _top - (char*) _physical_start;

+ 0 - 5
engine/core/memory/temp_allocator.h

@@ -77,7 +77,6 @@ typedef TempAllocator<1024> TempAllocator1024;
 typedef TempAllocator<2048> TempAllocator2048;
 typedef TempAllocator<4096> TempAllocator4096;
 
-//-----------------------------------------------------------------------------
 template <size_t SIZE>
 inline TempAllocator<SIZE>::TempAllocator(Allocator& backing)
 	: _backing(backing)
@@ -90,7 +89,6 @@ inline TempAllocator<SIZE>::TempAllocator(Allocator& backing)
 	_cur += sizeof(void*);
 }
 
-//-----------------------------------------------------------------------------
 template <size_t SIZE>
 inline TempAllocator<SIZE>::~TempAllocator()
 {
@@ -106,7 +104,6 @@ inline TempAllocator<SIZE>::~TempAllocator()
 	}
 }
 
-//-----------------------------------------------------------------------------
 template <size_t SIZE>
 inline void* TempAllocator<SIZE>::allocate(size_t size, size_t align)
 {
@@ -137,13 +134,11 @@ inline void* TempAllocator<SIZE>::allocate(size_t size, size_t align)
 	return result;
 }
 
-//-----------------------------------------------------------------------------
 template <size_t SIZE>
 inline void TempAllocator<SIZE>::deallocate(void* /*data*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 template <size_t SIZE>
 inline size_t TempAllocator<SIZE>::allocated_size()
 {

+ 0 - 15
engine/core/network/socket.h

@@ -82,7 +82,6 @@ struct AcceptResult
 /// @ingroup Network
 struct TCPSocket
 {
-	//-----------------------------------------------------------------------------
 	TCPSocket()
 #if CROWN_PLATFORM_POSIX
 		: m_socket(0)
@@ -92,7 +91,6 @@ struct TCPSocket
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	void open()
 	{
 #if CROWN_PLATFORM_POSIX
@@ -104,7 +102,6 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	ConnectResult connect(const NetAddress& ip, uint16_t port)
 	{
 		close();
@@ -155,7 +152,6 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	bool bind(uint16_t port)
 	{
 		close();
@@ -184,7 +180,6 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	void listen(uint32_t max)
 	{
 #if CROWN_PLATFORM_POSIX
@@ -235,21 +230,18 @@ struct TCPSocket
 #endif		
 	}
 
-	//-----------------------------------------------------------------------------
 	AcceptResult accept_nonblock(TCPSocket& c)
 	{
 		set_blocking(false);
 		return accept_internal(c);
 	}
 
-	//-----------------------------------------------------------------------------
 	AcceptResult accept(TCPSocket& c)
 	{
 		set_blocking(true);
 		return accept_internal(c);
 	}
 
-	//-----------------------------------------------------------------------------
 	void close()
 	{
 #if CROWN_PLATFORM_POSIX
@@ -332,14 +324,12 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	ReadResult read_nonblock(void* data, size_t size)
 	{
 		set_blocking(false);
 		return read_internal(data, size);
 	}
 
-	//-----------------------------------------------------------------------------
 	ReadResult read(void* data, size_t size)
 	{
 		set_blocking(true);
@@ -421,21 +411,18 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	WriteResult write_nonblock(const void* data, size_t size)
 	{
 		set_blocking(false);
 		return write_internal(data, size);
 	}
 
-	//-----------------------------------------------------------------------------
 	WriteResult write(const void* data, size_t size)
 	{
 		set_blocking(true);
 		return write_internal(data, size);
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_blocking(bool blocking)
 	{
 #if CROWN_PLATFORM_POSIX
@@ -448,7 +435,6 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_reuse_address(bool reuse)
 	{
 #if CROWN_PLATFORM_POSIX
@@ -462,7 +448,6 @@ struct TCPSocket
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_timeout(uint32_t seconds)
 	{
 #if CROWN_PLATFORM_POSIX

+ 0 - 6
engine/core/os.h

@@ -71,7 +71,6 @@ namespace crown
 
 namespace os
 {
-	//-----------------------------------------------------------------------------
 	inline void log_debug(const char* string, va_list arg)
 	{
 #if CROWN_PLATFORM_ANDROID
@@ -82,7 +81,6 @@ namespace os
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void log_error(const char* string, va_list arg)
 	{
 #if CROWN_PLATFORM_ANDROID
@@ -93,7 +91,6 @@ namespace os
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void log_warning(const char* string, va_list arg)
 	{
 #if CROWN_PLATFORM_ANDROID
@@ -104,7 +101,6 @@ namespace os
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	inline void log_info(const char* string, va_list arg)
 	{
 #if CROWN_PLATFORM_ANDROID
@@ -115,7 +111,6 @@ namespace os
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	inline bool is_root_path(const char* path)
 	{
 #if CROWN_PLATFORM_POSIX
@@ -126,7 +121,6 @@ namespace os
 #endif
 	}
 
-	//-----------------------------------------------------------------------------
 	inline bool is_absolute_path(const char* path)
 	{
 #if CROWN_PLATFORM_POSIX

+ 0 - 14
engine/core/os_event_queue.h

@@ -133,14 +133,12 @@ struct OsEvent
 /// Used only to pass events from os thread to main thread.
 struct OsEventQueue
 {
-	//-----------------------------------------------------------------------------
 	OsEventQueue()
 		: m_tail(0)
 		, m_head(0)
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_mouse_event(uint16_t x, uint16_t y)
 	{
 		OsEvent ev;
@@ -152,7 +150,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_mouse_event(uint16_t x, uint16_t y, MouseButton::Enum b, bool pressed)
 	{
 		OsEvent ev;
@@ -166,7 +163,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_keyboard_event(uint32_t modifier, KeyboardButton::Enum b, bool pressed)
 	{
 		OsEvent ev;
@@ -178,7 +174,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_touch_event(uint16_t x, uint16_t y, uint8_t pointer_id)
 	{
 		OsEvent ev;
@@ -191,7 +186,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_touch_event(uint16_t x, uint16_t y, uint8_t pointer_id, bool pressed)
 	{
 		OsEvent ev;
@@ -205,7 +199,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_exit_event(int32_t code)
 	{
 		OsEvent ev;
@@ -215,7 +208,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_pause_event()
 	{
 		OsEvent ev;
@@ -223,7 +215,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_resume_event()
 	{
 		OsEvent ev;
@@ -231,7 +222,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_metrics_event(uint16_t x, uint16_t y, uint16_t width, uint16_t height)
 	{
 		OsEvent ev;
@@ -244,7 +234,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_none_event()
 	{
 		OsEvent ev;
@@ -253,7 +242,6 @@ struct OsEventQueue
 		push_event(ev);
 	}
 
-	//-----------------------------------------------------------------------------
 	bool push_event(const OsEvent& ev)
 	{
 		int cur_tail = m_tail.load();
@@ -268,7 +256,6 @@ struct OsEventQueue
 		return false;
 	}
 
-	//-----------------------------------------------------------------------------
 	bool pop_event(OsEvent& ev)
 	{
 		const int cur_head = m_head.load();
@@ -279,7 +266,6 @@ struct OsEventQueue
 		return true;
 	}
 
-	//-----------------------------------------------------------------------------
 	int increment(int idx) const
 	{
 	  return (idx + 1) % MAX_OS_EVENTS;

+ 0 - 18
engine/core/os_window_android.cpp

@@ -35,7 +35,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 OsWindow::OsWindow()
 	: m_x(0)
 	, m_y(0)
@@ -44,93 +43,76 @@ OsWindow::OsWindow()
 {
 }
 
-//-----------------------------------------------------------------------------
 OsWindow::~OsWindow()
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::show()
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::hide()
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::get_size(uint32_t& width, uint32_t& height)
 {
 	width = m_width;
 	height = m_height;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::get_position(uint32_t& x, uint32_t& y)
 {
 	x = m_x;
 	y = m_y;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::resize(uint32_t /*width*/, uint32_t /*height*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::move(uint32_t /*x*/, uint32_t /*y*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::minimize()
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::restore()
 {
 }
 
-//-----------------------------------------------------------------------------
 bool OsWindow::is_resizable() const
 {
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_resizable(bool /*resizeable*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::show_cursor(bool /*show*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::get_cursor_xy(int32_t& /*x*/, int32_t& /*y*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_cursor_xy(int32_t /*x*/, int32_t /*y*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 char* OsWindow::title()
 {
 	return NULL;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_title(const char* /*title*/)
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::frame()
 {
 }

+ 0 - 14
engine/core/os_window_linux.cpp

@@ -44,7 +44,6 @@ void oswindow_set_window(Display* dpy, Window win)
 	m_x11_window = win;
 }
 
-//-----------------------------------------------------------------------------
 OsWindow::OsWindow()
 	: m_x(0)
 	, m_y(0)
@@ -54,68 +53,57 @@ OsWindow::OsWindow()
 {
 }
 
-//-----------------------------------------------------------------------------
 OsWindow::~OsWindow()
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::show()
 {
 	XMapRaised(m_x11_display, m_x11_window);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::hide()
 {
 	XUnmapWindow(m_x11_display, m_x11_window);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::get_size(uint32_t& width, uint32_t& height)
 {
 	width = m_width;
 	height = m_height;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::get_position(uint32_t& x, uint32_t& y)
 {
 	x = m_x;
 	y = m_y;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::resize(uint32_t width, uint32_t height)
 {
 	XResizeWindow(m_x11_display, m_x11_window, width, height);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::move(uint32_t x, uint32_t y)
 {
 	XMoveWindow(m_x11_display, m_x11_window, x, y);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::minimize()
 {
 	XIconifyWindow(m_x11_display, m_x11_window, DefaultScreen(m_x11_display));
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::restore()
 {
 	XMapRaised(m_x11_display, m_x11_window);
 }
 
-//-----------------------------------------------------------------------------
 bool OsWindow::is_resizable() const
 {
 	return m_resizable;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_resizable(bool resizable)
 {
 	XSizeHints hints;
@@ -130,7 +118,6 @@ void OsWindow::set_resizable(bool resizable)
 	m_resizable = resizable;
 }
 
-//-----------------------------------------------------------------------------
 char* OsWindow::title()
 {
 	static char title[1024];
@@ -144,7 +131,6 @@ char* OsWindow::title()
 	return title;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_title(const char* title)
 {
 	XStoreName(m_x11_display, m_x11_window, title);

+ 0 - 12
engine/core/os_window_windows.cpp

@@ -40,73 +40,61 @@ void oswindow_set_window(HWND handle_win)
 	m_windows_window = handle_win;
 }
 
-//-----------------------------------------------------------------------------
 OsWindow::OsWindow()
 	: m_resizable(true)
 {
 	set_title("");
 }
 
-//-----------------------------------------------------------------------------
 OsWindow::~OsWindow()
 {
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::show()
 {
 	ShowWindow(m_windows_window, SW_SHOW);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::hide()
 {
 	ShowWindow(m_windows_window, SW_HIDE);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::resize(uint32_t width, uint32_t height)
 {
 	SetWindowPos(m_windows_window, NULL, 0, 0, width, height, SWP_NOMOVE | SWP_NOZORDER);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::move(uint32_t x, uint32_t y)
 {
 	SetWindowPos(m_windows_window, NULL, x, y, 0, 0, SWP_NOMOVE | SWP_NOZORDER);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::minimize()
 {
 	ShowWindow(m_windows_window, SW_MINIMIZE);
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::restore()
 {
 	ShowWindow(m_windows_window, SW_RESTORE);
 }
 
-//-----------------------------------------------------------------------------
 bool OsWindow::is_resizable() const
 {
 	return m_resizable;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_resizable(bool resizable)
 {
 	m_resizable = resizable;
 }
 
-//-----------------------------------------------------------------------------
 char* OsWindow::title()
 {
 	return m_title;
 }
 
-//-----------------------------------------------------------------------------
 void OsWindow::set_title(const char* title)
 {
 	string::strncpy(m_title, title, 32);

+ 0 - 9
engine/core/settings/float_setting.cpp

@@ -32,7 +32,6 @@ namespace crown
 
 static FloatSetting* g_float_settings_head = NULL;
 
-//-----------------------------------------------------------------------------
 FloatSetting::FloatSetting(const char* name, const char* synopsis, float value, float min, float max) :
 	m_name(name),
 	m_synopsis(synopsis),
@@ -51,43 +50,36 @@ FloatSetting::FloatSetting(const char* name, const char* synopsis, float value,
 	g_float_settings_head = this;
 }
 
-//-----------------------------------------------------------------------------
 const char* FloatSetting::name() const
 {
 	return m_name;
 }
 
-//-----------------------------------------------------------------------------
 const char* FloatSetting::synopsis() const
 {
 	return m_synopsis;
 }
 
-//-----------------------------------------------------------------------------
 float FloatSetting::value() const
 {
 	return m_value;
 }
 
-//-----------------------------------------------------------------------------
 float FloatSetting::min() const
 {
 	return m_min;
 }
 
-//-----------------------------------------------------------------------------
 float FloatSetting::max() const
 {
 	return m_max;
 }
 
-//-----------------------------------------------------------------------------
 FloatSetting::operator float()
 {
 	return m_value;
 }
 
-//-----------------------------------------------------------------------------
 FloatSetting& FloatSetting::operator=(const float value)
 {
 	if (value > m_max)
@@ -106,7 +98,6 @@ FloatSetting& FloatSetting::operator=(const float value)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 FloatSetting* FloatSetting::find_setting(const char* name)
 {
 	FloatSetting* head = g_float_settings_head;

+ 0 - 9
engine/core/settings/int_setting.cpp

@@ -32,7 +32,6 @@ namespace crown
 
 static IntSetting* g_int_settings_head = NULL;
 
-//-----------------------------------------------------------------------------
 IntSetting::IntSetting(const char* name, const char* synopsis, int32_t value, int32_t min, int32_t max) :
 	m_name(name),
 	m_synopsis(synopsis),
@@ -51,43 +50,36 @@ IntSetting::IntSetting(const char* name, const char* synopsis, int32_t value, in
 	g_int_settings_head = this;
 }
 
-//-----------------------------------------------------------------------------
 const char* IntSetting::name() const
 {
 	return m_name;
 }
 
-//-----------------------------------------------------------------------------
 const char* IntSetting::synopsis() const
 {
 	return m_synopsis;
 }
 
-//-----------------------------------------------------------------------------
 int32_t IntSetting::value() const
 {
 	return m_value;
 }
 
-//-----------------------------------------------------------------------------
 int32_t IntSetting::min() const
 {
 	return m_min;
 }
 
-//-----------------------------------------------------------------------------
 int32_t IntSetting::max() const
 {
 	return m_max;
 }
 
-//-----------------------------------------------------------------------------
 IntSetting::operator int()
 {
 	return m_value;
 }
 
-//-----------------------------------------------------------------------------
 IntSetting& IntSetting::operator=(const int32_t value)
 {
 	if (value > m_max)
@@ -106,7 +98,6 @@ IntSetting& IntSetting::operator=(const int32_t value)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 IntSetting*	IntSetting::find_setting(const char* name)
 {
 	IntSetting* head = g_int_settings_head;

+ 0 - 6
engine/core/settings/string_setting.cpp

@@ -32,7 +32,6 @@ namespace crown
 
 static StringSetting* g_string_settings_head = NULL;
 
-//-----------------------------------------------------------------------------
 StringSetting::StringSetting(const char* name, const char* synopsis, const char* value) :
 	m_name(name),
 	m_synopsis(synopsis),
@@ -49,25 +48,21 @@ StringSetting::StringSetting(const char* name, const char* synopsis, const char*
 	g_string_settings_head = this;
 }
 
-//-----------------------------------------------------------------------------
 const char* StringSetting::name() const
 {
 	return m_name;
 }
 
-//-----------------------------------------------------------------------------
 const char* StringSetting::synopsis() const
 {
 	return m_synopsis;
 }
 
-//-----------------------------------------------------------------------------
 const char*	StringSetting::value() const
 {
 	return m_value;
 }
 
-//-----------------------------------------------------------------------------
 StringSetting& StringSetting::operator=(const char* value)
 {
 	m_value = value;
@@ -75,7 +70,6 @@ StringSetting& StringSetting::operator=(const char* value)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 StringSetting* StringSetting::find_setting(const char* name)
 {
 	StringSetting* head = g_string_settings_head;

+ 0 - 19
engine/core/strings/dynamic_string.h

@@ -90,14 +90,12 @@ private:
 	Array<char> m_string;
 };
 
-//-----------------------------------------------------------------------------
 inline DynamicString::DynamicString(Allocator& allocator)
 	: m_string(allocator)
 {
 	array::push_back(m_string, '\0');
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString::DynamicString(const char* s, Allocator& allocator)
 	: m_string(allocator)
 {
@@ -108,18 +106,15 @@ inline DynamicString::DynamicString(const char* s, Allocator& allocator)
 	array::push_back(m_string, '\0');
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString::~DynamicString()
 {
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString& DynamicString::operator+=(const DynamicString& s)
 {
 	return *this += s.c_str();
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString& DynamicString::operator+=(const char* s)
 {
 	CE_ASSERT_NOT_NULL(s);
@@ -129,7 +124,6 @@ inline DynamicString& DynamicString::operator+=(const char* s)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString& DynamicString::operator+=(const char c)
 {
 	array::pop_back(m_string);
@@ -138,14 +132,12 @@ inline DynamicString& DynamicString::operator+=(const char c)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString& DynamicString::operator=(const DynamicString& s)
 {
 	m_string = s.m_string;
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString& DynamicString::operator=(const char* s)
 {
 	CE_ASSERT_NOT_NULL(s);
@@ -155,7 +147,6 @@ inline DynamicString& DynamicString::operator=(const char* s)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline DynamicString& DynamicString::operator=(const char c)
 {
 	array::clear(m_string);
@@ -164,19 +155,16 @@ inline DynamicString& DynamicString::operator=(const char c)
 	return *this;
 }
 
-//-----------------------------------------------------------------------------
 inline bool DynamicString::operator<(const DynamicString& s) const
 {
 	return string::strcmp(c_str(), s.c_str()) < 0;
 }
 
-//-----------------------------------------------------------------------------
 inline bool DynamicString::operator==(const DynamicString& s) const
 {
 	return string::strcmp(c_str(), s.c_str()) == 0;
 }
 
-//-----------------------------------------------------------------------------
 inline bool DynamicString::operator==(const char* s) const
 {
 	CE_ASSERT_NOT_NULL(s);
@@ -184,13 +172,11 @@ inline bool DynamicString::operator==(const char* s) const
 	return string::strcmp(c_str(), s) == 0;
 }
 
-//-----------------------------------------------------------------------------
 inline uint32_t DynamicString::length() const
 {
 	return string::strlen(this->c_str());
 }
 
-//-----------------------------------------------------------------------------
 inline void DynamicString::strip_leading(const char* s)
 {
 	CE_ASSERT_NOT_NULL(s);
@@ -204,7 +190,6 @@ inline void DynamicString::strip_leading(const char* s)
 	array::push_back(m_string, '\0');
 }
 
-//-----------------------------------------------------------------------------
 inline void DynamicString::strip_trailing(const char* s)
 {
 	CE_ASSERT_NOT_NULL(s);
@@ -216,14 +201,12 @@ inline void DynamicString::strip_trailing(const char* s)
 	array::push_back(m_string, '\0');
 }
 
-//-----------------------------------------------------------------------------
 inline bool DynamicString::starts_with(const char* s) const
 {
 	CE_ASSERT_NOT_NULL(s);
 	return string::strncmp(c_str(), s, string::strlen(s)) == 0;
 }
 
-//-----------------------------------------------------------------------------
 inline bool DynamicString::ends_with(const char* s) const
 {
 	CE_ASSERT_NOT_NULL(s);
@@ -239,13 +222,11 @@ inline bool DynamicString::ends_with(const char* s) const
 	return false;
 }
 
-//-----------------------------------------------------------------------------
 inline StringId32 DynamicString::to_string_id() const
 {
 	return string::murmur2_32(c_str(), length());
 }
 
-//-----------------------------------------------------------------------------
 inline const char* DynamicString::c_str() const
 {
 	return array::begin(m_string);

+ 0 - 1
engine/core/strings/path.cpp

@@ -30,7 +30,6 @@ namespace crown
 {
 namespace path
 {
-	//-----------------------------------------------------------------------------
 	bool is_valid_segment(const char* segment)
 	{
 		CE_ASSERT(segment != NULL, "Segment must be != NULL");

+ 0 - 11
engine/core/strings/string_stream.h

@@ -62,62 +62,52 @@ namespace string_stream
 
 namespace string_stream
 {
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, int16_t val)
 	{
 		return stream_printf(s, "%hd", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, uint16_t val)
 	{
 		return stream_printf(s, "%hu", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, int32_t val)
 	{
 		return stream_printf(s, "%d", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, uint32_t val)
 	{
 		return stream_printf(s, "%u", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, int64_t val)
 	{
 		return stream_printf(s, "%lld", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, uint64_t val)
 	{
 		return stream_printf(s, "%llu", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, float val)
 	{
 		return stream_printf(s, "%g", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, double val)
 	{
 		return stream_printf(s, "%g", val);
 	}
 
-	//-----------------------------------------------------------------------------
 	inline StringStream& operator<<(StringStream& s, const char* string)
 	{
 		array::push(s, string, string::strlen(string));
 		return s;
 	}
 
-	//-----------------------------------------------------------------------------
 	inline const char* c_str(StringStream& s)
 	{
 		array::push_back(s, '\0');
@@ -125,7 +115,6 @@ namespace string_stream
 		return array::begin(s);
 	}
 
-	//-----------------------------------------------------------------------------
 	template <typename T>
 	inline StringStream& stream_printf(StringStream& s, const char* format, T& val)
 	{

+ 0 - 22
engine/core/strings/string_utils.h

@@ -39,61 +39,51 @@ namespace crown
 namespace string
 {
 
-//-----------------------------------------------------------------------------
 inline bool is_alpha(char c)
 {
 	return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
 }
 
-//-----------------------------------------------------------------------------
 inline bool is_digit(char c)
 {
 	return !(c < '0' || c > '9');
 }
 
-//-----------------------------------------------------------------------------
 inline bool is_upper(char c)
 {
 	return (c >= 'A' && c <= 'Z');
 }
 
-//-----------------------------------------------------------------------------
 inline bool is_lower(char c)
 {
 	return (c >= 'a' && c <= 'z');
 }
 
-//-----------------------------------------------------------------------------
 inline bool is_whitespace(char c)
 {
 	return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
 }
 
-//-----------------------------------------------------------------------------
 inline size_t strlen(const char* str)
 {
 	return ::strlen(str);
 }
 
-//-----------------------------------------------------------------------------
 inline const char* strstr(const char* str1, const char* str2)
 {
 	return ::strstr(str1, str2);
 }
 
-//-----------------------------------------------------------------------------
 inline int32_t strcmp(const char* str1, const char* str2)
 {
 	return ::strcmp(str1, str2);
 }
 
-//-----------------------------------------------------------------------------
 inline int32_t strncmp(const char* s1, const char* s2, size_t len)
 {
 	return ::strncmp(s1, s2, len);
 }
 
-//-----------------------------------------------------------------------------
 inline char* strncpy(char* dest, const char* src, size_t len)
 {
 	char* ret = ::strncpy(dest, src, len);
@@ -102,19 +92,16 @@ inline char* strncpy(char* dest, const char* src, size_t len)
 	return ret;
 }
 
-//-----------------------------------------------------------------------------
 inline char* strcat(char* dest, const char* src)
 {
 	return ::strcat(dest, src);
 }
 
-//-----------------------------------------------------------------------------
 inline char* strncat(char* dest, const char* src, size_t len)
 {
 	return ::strncat(dest, src, len);
 }
 
-//-----------------------------------------------------------------------------
 inline const char* begin(const char* str)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
@@ -122,7 +109,6 @@ inline const char* begin(const char* str)
 	return str;
 }
 
-//-----------------------------------------------------------------------------
 inline const char* end(const char* str)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
@@ -130,7 +116,6 @@ inline const char* end(const char* str)
 	return str + string::strlen(str) + 1;
 }
 
-//-----------------------------------------------------------------------------
 inline const char* find_first(const char* str, char c)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
@@ -150,7 +135,6 @@ inline const char* find_first(const char* str, char c)
 	return string::end(str);
 }
 
-//-----------------------------------------------------------------------------
 inline const char* find_last(const char* str, char c)
 {
 	CE_ASSERT(str != NULL, "Str must be != NULL");
@@ -170,7 +154,6 @@ inline const char* find_last(const char* str, char c)
 	return string::end(str);
 }
 
-//-----------------------------------------------------------------------------
 inline void substring(const char* begin, const char* end, char* out, size_t len)
 {
 	CE_ASSERT(begin != NULL, "Begin must be != NULL");
@@ -193,7 +176,6 @@ inline void substring(const char* begin, const char* end, char* out, size_t len)
 	out[i] = '\0';
 }
 
-//-----------------------------------------------------------------------------
 inline int32_t parse_int(const char* string)
 {
 	int val;
@@ -205,7 +187,6 @@ inline int32_t parse_int(const char* string)
 	return val;
 }
 
-//-----------------------------------------------------------------------------
 inline uint32_t parse_uint(const char* string)
 {
 	unsigned int val;
@@ -217,7 +198,6 @@ inline uint32_t parse_uint(const char* string)
 	return val;
 }
 
-//-----------------------------------------------------------------------------
 inline float parse_float(const char* string)
 {
 	float val;
@@ -229,7 +209,6 @@ inline float parse_float(const char* string)
 	return val;
 }
 
-//-----------------------------------------------------------------------------
 inline double parse_double(const char* string)
 {
 	double val;
@@ -241,7 +220,6 @@ inline double parse_double(const char* string)
 	return val;
 }
 
-//-----------------------------------------------------------------------------
 /// MurmurHash2, by Austin Appleby
 ///
 /// @note

+ 0 - 20
engine/device.cpp

@@ -46,7 +46,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 namespace crown
 {
-//-----------------------------------------------------------------------------
 Device::Device(Filesystem& fs, StringId64 boot_package, StringId64 boot_script)
 	: _allocator(default_allocator(), MAX_SUBSYSTEMS_HEAP)
 	, _width(0)
@@ -70,7 +69,6 @@ Device::Device(Filesystem& fs, StringId64 boot_package, StringId64 boot_script)
 {
 }
 
-//-----------------------------------------------------------------------------
 void Device::init()
 {
 	// Initialize
@@ -111,7 +109,6 @@ void Device::init()
 	_lua_environment->call_global("init", 0);
 }
 
-//-----------------------------------------------------------------------------
 void Device::shutdown()
 {
 	CE_ASSERT(_is_init, "Engine is not initialized");
@@ -142,63 +139,53 @@ void Device::shutdown()
 	_is_init = false;
 }
 
-//-----------------------------------------------------------------------------
 ResourceManager* Device::resource_manager()
 {
 	return _resource_manager;
 }
 
-//-----------------------------------------------------------------------------
 LuaEnvironment* Device::lua_environment()
 {
 	return _lua_environment;
 }
 
-//-----------------------------------------------------------------------------
 void Device::quit()
 {
 	_is_running = false;
 }
 
-//-----------------------------------------------------------------------------
 void Device::pause()
 {
 	_is_paused = true;
 	CE_LOGI("Engine paused.");
 }
 
-//-----------------------------------------------------------------------------
 void Device::unpause()
 {
 	_is_paused = false;
 	CE_LOGI("Engine unpaused.");
 }
 
-//-----------------------------------------------------------------------------
 bool Device::is_running() const
 {
 	return _is_running;
 }
 
-//-----------------------------------------------------------------------------
 uint64_t Device::frame_count() const
 {
 	return _frame_count;
 }
 
-//-----------------------------------------------------------------------------
 float Device::last_delta_time() const
 {
 	return _last_delta_time;
 }
 
-//-----------------------------------------------------------------------------
 double Device::time_since_start() const
 {
 	return _time_since_start;
 }
 
-//-----------------------------------------------------------------------------
 void Device::update()
 {
 	_current_time = os::clocktime();
@@ -218,44 +205,37 @@ void Device::update()
 	_frame_count++;
 }
 
-//-----------------------------------------------------------------------------
 void Device::render_world(World* world, Camera* camera)
 {
 	world->render(camera);
 }
 
-//-----------------------------------------------------------------------------
 WorldId Device::create_world()
 {
 	return _world_manager->create_world();
 }
 
-//-----------------------------------------------------------------------------
 void Device::destroy_world(WorldId world)
 {
 	_world_manager->destroy_world(world);
 }
 
-//-----------------------------------------------------------------------------
 ResourcePackage* Device::create_resource_package(const char* name)
 {
 	ResourceId resid("package", name);
 	return create_resource_package((StringId64) resid.name);
 }
 
-//-----------------------------------------------------------------------------
 ResourcePackage* Device::create_resource_package(StringId64 id)
 {
 	return CE_NEW(default_allocator(), ResourcePackage)(id, *_resource_manager);
 }
 
-//-----------------------------------------------------------------------------
 void Device::destroy_resource_package(ResourcePackage* package)
 {
 	CE_DELETE(default_allocator(), package);
 }
 
-//-----------------------------------------------------------------------------
 void Device::reload(const char* , const char* )
 {
 }

+ 0 - 2
engine/input/keyboard.h

@@ -80,14 +80,12 @@ struct Keyboard
 		return button_released(_last_button);
 	}
 
-	//-------------------------------------------------------------------------
 	void set_button_state(KeyboardButton::Enum b, bool state)
 	{
 		_last_button = b;
 		_current_state[b] = state;
 	}
 
-	//-------------------------------------------------------------------------
 	void update()
 	{
 		memcpy(_last_state, _current_state, KeyboardButton::COUNT);

+ 0 - 5
engine/input/mouse.h

@@ -53,7 +53,6 @@ struct MouseButton
 /// @ingroup Input
 struct Mouse
 {
-	//-----------------------------------------------------------------------------
 	Mouse()
 		: _last_button(MouseButton::NONE)
 	{
@@ -134,21 +133,18 @@ struct Mouse
 		set_cursor_xy(Vector2(position.x * (float) _width, position.y * (float) _height));
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_position(uint16_t x, uint16_t y)
 	{
 		_x = x;
 		_y = y;
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_metrics(uint16_t width, uint16_t height)
 	{
 		_width = width;
 		_height = height;
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_button_state(uint16_t x, uint16_t y, MouseButton::Enum b, bool state)
 	{
 		set_position(x, y);
@@ -157,7 +153,6 @@ struct Mouse
 		_current_state[b] = state;
 	}
 
-	//-----------------------------------------------------------------------------
 	void update()
 	{
 		memcpy(_last_state, _current_state, MouseButton::COUNT);

+ 0 - 5
engine/input/touch.h

@@ -43,7 +43,6 @@ const uint32_t MAX_POINTER_IDS = 4;
 /// @ingroup Input
 struct Touch
 {
-	//-----------------------------------------------------------------------------
 	Touch()
 		: _last_pointer(0xFF)
 	{
@@ -88,7 +87,6 @@ struct Touch
 		return Vector2(_x[p], _y[p]);
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_position(uint8_t p, uint16_t x, uint16_t y)
 	{
 		if (p >= MAX_POINTER_IDS) return;
@@ -96,14 +94,12 @@ struct Touch
 		_y[p] = y;
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_metrics(uint16_t width, uint16_t height)
 	{
 		_width = width;
 		_height = height;
 	}
 
-	//-----------------------------------------------------------------------------
 	void set_pointer_state(uint16_t x, uint16_t y, uint8_t p, bool state)
 	{
 		set_position(p, x, y);
@@ -112,7 +108,6 @@ struct Touch
 		_current_state[p] = state;
 	}
 
-	//-----------------------------------------------------------------------------
 	void update()
 	{
 		memcpy(_last_state, _current_state, MAX_POINTER_IDS);

+ 0 - 35
engine/lua/lua_actor.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int actor_world_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int actor_world_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_world_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int actor_world_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_world_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int actor_world_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_teleport_world_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int actor_teleport_world_position(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_teleport_world_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -71,7 +66,6 @@ static int actor_teleport_world_rotation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_teleport_world_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -79,7 +73,6 @@ static int actor_teleport_world_pose(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_center_of_mass(lua_State* L)
 {
 	LuaStack stack(L);
@@ -87,7 +80,6 @@ static int actor_center_of_mass(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_enable_gravity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -95,7 +87,6 @@ static int actor_enable_gravity(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_disable_gravity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -103,7 +94,6 @@ static int actor_disable_gravity(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_enable_collision(lua_State* L)
 {
 	LuaStack stack(L);
@@ -111,7 +101,6 @@ static int actor_enable_collision(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_disable_collision(lua_State* L)
 {
 	LuaStack stack(L);
@@ -119,7 +108,6 @@ static int actor_disable_collision(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_set_collision_filter(lua_State* L)
 {
 	LuaStack stack(L);
@@ -127,7 +115,6 @@ static int actor_set_collision_filter(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_set_kinematic(lua_State* L)
 {
 	LuaStack stack(L);
@@ -135,7 +122,6 @@ static int actor_set_kinematic(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_move(lua_State* L)
 {
 	LuaStack stack(L);
@@ -143,7 +129,6 @@ static int actor_move(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_is_static(lua_State* L)
 {
 	LuaStack stack(L);
@@ -151,7 +136,6 @@ static int actor_is_static(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_is_dynamic(lua_State* L)
 {
 	LuaStack stack(L);
@@ -159,7 +143,6 @@ static int actor_is_dynamic(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_is_kinematic(lua_State* L)
 {
 	LuaStack stack(L);
@@ -167,7 +150,6 @@ static int actor_is_kinematic(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_is_nonkinematic(lua_State* L)
 {
 	LuaStack stack(L);
@@ -176,7 +158,6 @@ static int actor_is_nonkinematic(lua_State* L)
 }
 
 
-//-----------------------------------------------------------------------------
 static int actor_linear_damping(lua_State* L)
 {
 	LuaStack stack(L);
@@ -184,7 +165,6 @@ static int actor_linear_damping(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_set_linear_damping(lua_State* L)
 {
 	LuaStack stack(L);
@@ -192,7 +172,6 @@ static int actor_set_linear_damping(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_angular_damping(lua_State* L)
 {
 	LuaStack stack(L);
@@ -200,7 +179,6 @@ static int actor_angular_damping(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_set_angular_damping(lua_State* L)
 {
 	LuaStack stack(L);
@@ -208,7 +186,6 @@ static int actor_set_angular_damping(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_linear_velocity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -216,7 +193,6 @@ static int actor_linear_velocity(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_set_linear_velocity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -224,7 +200,6 @@ static int actor_set_linear_velocity(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_angular_velocity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -232,7 +207,6 @@ static int actor_angular_velocity(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_set_angular_velocity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -240,7 +214,6 @@ static int actor_set_angular_velocity(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_add_impulse(lua_State* L)
 {
 	LuaStack stack(L);
@@ -248,7 +221,6 @@ static int actor_add_impulse(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_add_impulse_at(lua_State* L)
 {
 	LuaStack stack(L);
@@ -256,7 +228,6 @@ static int actor_add_impulse_at(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_add_torque_impulse(lua_State* L)
 {
 	LuaStack stack(L);
@@ -264,7 +235,6 @@ static int actor_add_torque_impulse(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_push(lua_State* L)
 {
 	LuaStack stack(L);
@@ -272,7 +242,6 @@ static int actor_push(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_push_at(lua_State* L)
 {
 	LuaStack stack(L);
@@ -280,7 +249,6 @@ static int actor_push_at(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_is_sleeping(lua_State* L)
 {
 	LuaStack stack(L);
@@ -288,7 +256,6 @@ static int actor_is_sleeping(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_wake_up(lua_State* L)
 {
 	LuaStack stack(L);
@@ -296,7 +263,6 @@ static int actor_wake_up(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int actor_unit(lua_State* L)
 {
 	LuaStack stack(L);
@@ -305,7 +271,6 @@ static int actor_unit(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_actor(LuaEnvironment& env)
 {
 	env.load_module_function("Actor", "world_position",          actor_world_position);

+ 0 - 24
engine/lua/lua_camera.cpp

@@ -34,7 +34,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int camera_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -42,7 +41,6 @@ static int camera_local_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -50,7 +48,6 @@ static int camera_local_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -58,7 +55,6 @@ static int camera_local_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_world_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -66,7 +62,6 @@ static int camera_world_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_world_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -74,7 +69,6 @@ static int camera_world_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_world_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -82,7 +76,6 @@ static int camera_world_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -90,7 +83,6 @@ static int camera_set_local_position(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -98,7 +90,6 @@ static int camera_set_local_rotation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -106,7 +97,6 @@ static int camera_set_local_pose(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_projection_type(lua_State* L)
 {
 	LuaStack stack(L);
@@ -114,7 +104,6 @@ static int camera_set_projection_type(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_projection_type(lua_State* L)
 {
 	LuaStack stack(L);
@@ -122,7 +111,6 @@ static int camera_projection_type(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_fov(lua_State* L)
 {
 	LuaStack stack(L);
@@ -130,7 +118,6 @@ static int camera_fov(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_fov(lua_State* L)
 {
 	LuaStack stack(L);
@@ -138,7 +125,6 @@ static int camera_set_fov(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_aspect(lua_State* L)
 {
 	LuaStack stack(L);
@@ -146,7 +132,6 @@ static int camera_aspect(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_aspect(lua_State* L)
 {
 	LuaStack stack(L);
@@ -154,7 +139,6 @@ static int camera_set_aspect(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_near_clip_distance(lua_State* L)
 {
 	LuaStack stack(L);
@@ -162,7 +146,6 @@ static int camera_near_clip_distance(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_near_clip_distance(lua_State* L)
 {
 	LuaStack stack(L);
@@ -170,7 +153,6 @@ static int camera_set_near_clip_distance(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_far_clip_distance(lua_State* L)
 {
 	LuaStack stack(L);
@@ -178,7 +160,6 @@ static int camera_far_clip_distance(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_far_clip_distance(lua_State* L)
 {
 	LuaStack stack(L);
@@ -186,7 +167,6 @@ static int camera_set_far_clip_distance(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_orthographic_metrics(lua_State* L)
 {
 	LuaStack stack(L);
@@ -195,7 +175,6 @@ static int camera_set_orthographic_metrics(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_set_viewport_metrics(lua_State* L)
 {
 	LuaStack stack(L);
@@ -204,7 +183,6 @@ static int camera_set_viewport_metrics(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_screen_to_world(lua_State* L)
 {
 	LuaStack stack(L);
@@ -212,7 +190,6 @@ static int camera_screen_to_world(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int camera_world_to_screen(lua_State* L)
 {
 	LuaStack stack(L);
@@ -220,7 +197,6 @@ static int camera_world_to_screen(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_camera(LuaEnvironment& env)
 {
 	env.load_module_function("Camera", "local_position",           camera_local_position);

+ 0 - 3
engine/lua/lua_color4.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int color4_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -42,7 +41,6 @@ static int color4_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int color4_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -50,7 +48,6 @@ static int color4_ctor(lua_State* L)
 	return color4_new(L);
 }
 
-//-----------------------------------------------------------------------------
 void load_color4(LuaEnvironment& env)
 {
 	env.load_module_function("Color4", "new", color4_new);

+ 0 - 6
engine/lua/lua_controller.cpp

@@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int controller_move(lua_State* L)
 {
 	LuaStack stack(L);
@@ -40,7 +39,6 @@ static int controller_move(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int controller_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -48,7 +46,6 @@ static int controller_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int controller_collides_up(lua_State* L)
 {
 	LuaStack stack(L);
@@ -56,7 +53,6 @@ static int controller_collides_up(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int controller_collides_down(lua_State* L)
 {
 	LuaStack stack(L);
@@ -64,7 +60,6 @@ static int controller_collides_down(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int controller_collides_sides(lua_State* L)
 {
 	LuaStack stack(L);
@@ -72,7 +67,6 @@ static int controller_collides_sides(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_controller(LuaEnvironment& env)
 {
 	env.load_module_function("Controller", "move",           controller_move);

+ 0 - 6
engine/lua/lua_debug_line.cpp

@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int debug_line_add_line(lua_State* L)
 {
 	LuaStack stack(L);
@@ -41,7 +40,6 @@ static int debug_line_add_line(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int debug_line_add_sphere(lua_State* L)
 {
 	LuaStack stack(L);
@@ -49,7 +47,6 @@ static int debug_line_add_sphere(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int debug_line_clear(lua_State* L)
 {
 	LuaStack stack(L);
@@ -57,7 +54,6 @@ static int debug_line_clear(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int debug_line_commit(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +61,6 @@ static int debug_line_commit(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int debug_line_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +68,6 @@ static int debug_line_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_debug_line(LuaEnvironment& env)
 {
 	env.load_module_function("DebugLine", "add_line",   debug_line_add_line);

+ 0 - 13
engine/lua/lua_device.cpp

@@ -38,7 +38,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int device_platform(lua_State* L)
 {
 	LuaStack stack(L);
@@ -46,7 +45,6 @@ static int device_platform(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int device_architecture(lua_State* L)
 {
 	LuaStack stack(L);
@@ -54,7 +52,6 @@ static int device_architecture(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int device_version(lua_State* L)
 {
 	LuaStack stack(L);
@@ -62,7 +59,6 @@ static int device_version(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int device_last_delta_time(lua_State* L)
 {
 	LuaStack stack(L);
@@ -70,14 +66,12 @@ static int device_last_delta_time(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int device_quit(lua_State* /*L*/)
 {
 	device()->quit();
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int device_resolution(lua_State* L)
 {
 	LuaStack stack(L);
@@ -88,7 +82,6 @@ static int device_resolution(lua_State* L)
 	return 2;
 }
 
-//-----------------------------------------------------------------------------
 static int device_create_world(lua_State* L)
 {
 	LuaStack stack(L);
@@ -97,7 +90,6 @@ static int device_create_world(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int device_destroy_world(lua_State* L)
 {
 	LuaStack stack(L);
@@ -105,7 +97,6 @@ static int device_destroy_world(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int device_render_world(lua_State* L)
 {
 	LuaStack stack(L);
@@ -113,7 +104,6 @@ static int device_render_world(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int device_create_resource_package(lua_State* L)
 {
 	LuaStack stack(L);
@@ -121,7 +111,6 @@ static int device_create_resource_package(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int device_destroy_resource_package(lua_State* L)
 {
 	LuaStack stack(L);
@@ -129,7 +118,6 @@ static int device_destroy_resource_package(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int device_console_send(lua_State* L)
 {
 	using namespace string_stream;
@@ -156,7 +144,6 @@ static int device_console_send(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_device(LuaEnvironment& env)
 {
 	env.load_module_function("Device", "platform",                 device_platform);

+ 0 - 10
engine/lua/lua_environment.cpp

@@ -37,13 +37,11 @@ namespace crown
 
 namespace lua_system { extern int error_handler(lua_State*); }
 
-//-----------------------------------------------------------------------------
 LuaEnvironment::LuaEnvironment(lua_State* L)
 	: _L(L)
 {
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::execute(const LuaResource* lr)
 {
 	using namespace lua_resource;
@@ -53,7 +51,6 @@ void LuaEnvironment::execute(const LuaResource* lr)
 	lua_pop(_L, 1);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::execute_string(const char* s)
 {
 	lua_pushcfunction(_L, lua_system::error_handler);
@@ -62,7 +59,6 @@ void LuaEnvironment::execute_string(const char* s)
 	lua_pop(_L, 1);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::load_module_function(const char* module, const char* name, const lua_CFunction func)
 {
 	luaL_newmetatable(_L, module);
@@ -78,7 +74,6 @@ void LuaEnvironment::load_module_function(const char* module, const char* name,
 	lua_pop(_L, -1);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::load_module_function(const char* module, const char* name, const char* value)
 {
 	luaL_newmetatable(_L, module);
@@ -87,7 +82,6 @@ void LuaEnvironment::load_module_function(const char* module, const char* name,
 	lua_setglobal(_L, module);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::load_module_constructor(const char* module, const lua_CFunction func)
 {
 	// Create dummy tables to be used as module's metatable
@@ -101,7 +95,6 @@ void LuaEnvironment::load_module_constructor(const char* module, const lua_CFunc
 	lua_pop(_L, -1);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::load_module_enum(const char* module, const char* name, uint32_t value)
 {
 	// Checks table existance
@@ -121,7 +114,6 @@ void LuaEnvironment::load_module_enum(const char* module, const char* name, uint
 	lua_pop(_L, 2);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::call_global(const char* func, uint8_t argc, ...)
 {
 	CE_ASSERT_NOT_NULL(func);
@@ -157,7 +149,6 @@ void LuaEnvironment::call_global(const char* func, uint8_t argc, ...)
 	lua_pop(_L, -1);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::call_physics_callback(Actor* actor_0, Actor* actor_1, Unit* unit_0, Unit* unit_1, const Vector3& where, const Vector3& normal, const char* type)
 {
 	LuaStack stack(_L);
@@ -178,7 +169,6 @@ void LuaEnvironment::call_physics_callback(Actor* actor_0, Actor* actor_1, Unit*
 	lua_pop(_L, -1);
 }
 
-//-----------------------------------------------------------------------------
 void LuaEnvironment::call_trigger_callback(Actor* trigger, Actor* other, const char* type)
 {
 	LuaStack stack(_L);

+ 0 - 6
engine/lua/lua_float_setting.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int float_setting_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -52,7 +51,6 @@ static int float_setting_value(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int float_setting_synopsis(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +71,6 @@ static int float_setting_synopsis(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int float_setting_min(lua_State* L)
 {
 	LuaStack stack(L);
@@ -94,7 +91,6 @@ static int float_setting_min(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int float_setting_max(lua_State* L)
 {
 	LuaStack stack(L);
@@ -115,7 +111,6 @@ static int float_setting_max(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int float_setting_update(lua_State* L)
 {
 	LuaStack stack(L);
@@ -133,7 +128,6 @@ static int float_setting_update(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_float_setting(LuaEnvironment& env)
 {
 	env.load_module_function("FloatSetting", "value",    float_setting_value);

+ 0 - 8
engine/lua/lua_gui.cpp

@@ -37,7 +37,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int gui_resolution(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +46,6 @@ static int gui_resolution(lua_State* L)
 	return 2;
 }
 
-//-----------------------------------------------------------------------------
 static int gui_move(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +53,6 @@ static int gui_move(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int gui_screen_to_gui(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +60,6 @@ static int gui_screen_to_gui(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int gui_draw_rectangle(lua_State* L)
 {
 	LuaStack stack(L);
@@ -72,7 +68,6 @@ static int gui_draw_rectangle(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int gui_draw_image(lua_State* L)
 {
 	LuaStack stack(L);
@@ -81,7 +76,6 @@ static int gui_draw_image(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int gui_draw_image_uv(lua_State* L)
 {
 	LuaStack stack(L);
@@ -90,7 +84,6 @@ static int gui_draw_image_uv(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int gui_draw_text(lua_State* L)
 {
 	LuaStack stack(L);
@@ -99,7 +92,6 @@ static int gui_draw_text(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_gui(LuaEnvironment& env)
 {
 	env.load_module_function("Gui", "resolution",     gui_resolution);

+ 0 - 6
engine/lua/lua_int_setting.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int int_setting_query_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -52,7 +51,6 @@ static int int_setting_query_value(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int int_setting_query_synopsis(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +71,6 @@ static int int_setting_query_synopsis(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int int_setting_query_min(lua_State* L)
 {
 	LuaStack stack(L);
@@ -94,7 +91,6 @@ static int int_setting_query_min(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int int_setting_query_max(lua_State* L)
 {
 	LuaStack stack(L);
@@ -115,7 +111,6 @@ static int int_setting_query_max(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int int_setting_update(lua_State* L)
 {
 	LuaStack stack(L);
@@ -133,7 +128,6 @@ static int int_setting_update(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_int_setting(LuaEnvironment& env)
 {
 	env.load_module_function("IntSetting", "value",    int_setting_query_value);

+ 0 - 6
engine/lua/lua_keyboard.cpp

@@ -34,7 +34,6 @@ namespace crown
 {
 using namespace input_globals;
 
-//-----------------------------------------------------------------------------
 static int keyboard_modifier_pressed(lua_State* L)
 {
 	LuaStack stack(L);
@@ -42,7 +41,6 @@ static int keyboard_modifier_pressed(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int keyboard_button_pressed(lua_State* L)
 {
 	LuaStack stack(L);
@@ -50,7 +48,6 @@ static int keyboard_button_pressed(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int keyboard_button_released(lua_State* L)
 {
 	LuaStack stack(L);
@@ -58,7 +55,6 @@ static int keyboard_button_released(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int keyboard_any_pressed(lua_State* L)
 {
 	LuaStack stack(L);
@@ -66,7 +62,6 @@ static int keyboard_any_pressed(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int keyboard_any_released(lua_State* L)
 {
 	LuaStack stack(L);
@@ -74,7 +69,6 @@ static int keyboard_any_released(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_keyboard(LuaEnvironment& env)
 {
 	env.load_module_function("Keyboard", "modifier_pressed", keyboard_modifier_pressed);

+ 0 - 4
engine/lua/lua_material.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int material_set_float(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int material_set_float(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int material_set_vector2(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int material_set_vector2(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int material_set_vector3(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int material_set_vector3(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_material(LuaEnvironment& env)
 {
 	env.load_module_function("Material", "set_float",   material_set_float);

+ 0 - 17
engine/lua/lua_math.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int math_to_rad(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int math_to_rad(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_to_deg(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int math_to_deg(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_next_pow_2(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int math_next_pow_2(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_is_pow_2(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int math_is_pow_2(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_ceil(lua_State* L)
 {
 	LuaStack stack(L);
@@ -71,7 +66,6 @@ static int math_ceil(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_floor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -79,7 +73,6 @@ static int math_floor(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_sqrt(lua_State* L)
 {
 	LuaStack stack(L);
@@ -87,7 +80,6 @@ static int math_sqrt(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_inv_sqrt(lua_State* L)
 {
 	LuaStack stack(L);
@@ -95,7 +87,6 @@ static int math_inv_sqrt(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_sin(lua_State* L)
 {
 	LuaStack stack(L);
@@ -103,7 +94,6 @@ static int math_sin(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_cos(lua_State* L)
 {
 	LuaStack stack(L);
@@ -111,7 +101,6 @@ static int math_cos(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_asin(lua_State* L)
 {
 	LuaStack stack(L);
@@ -119,7 +108,6 @@ static int math_asin(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_acos(lua_State* L)
 {
 	LuaStack stack(L);
@@ -127,7 +115,6 @@ static int math_acos(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_tan(lua_State* L)
 {
 	LuaStack stack(L);
@@ -135,7 +122,6 @@ static int math_tan(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_atan2(lua_State* L)
 {
 	LuaStack stack(L);
@@ -143,7 +129,6 @@ static int math_atan2(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_abs(lua_State* L)
 {
 	LuaStack stack(L);
@@ -151,7 +136,6 @@ static int math_abs(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int math_fmod(lua_State* L)
 {
 	LuaStack stack(L);
@@ -159,7 +143,6 @@ static int math_fmod(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_math(LuaEnvironment& env)
 {
 	env.load_module_function("Math", "to_rad",     math_to_rad);

+ 0 - 23
engine/lua/lua_matrix4x4.cpp

@@ -34,7 +34,6 @@ namespace crown
 
 using namespace matrix4x4;
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -58,7 +57,6 @@ static int matrix4x4_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -66,7 +64,6 @@ static int matrix4x4_ctor(lua_State* L)
 	return matrix4x4_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_from_quaternion(lua_State* L)
 {
 	LuaStack stack(L);
@@ -74,7 +71,6 @@ static int matrix4x4_from_quaternion(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_from_translation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -82,7 +78,6 @@ static int matrix4x4_from_translation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_from_quaternion_translation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -90,7 +85,6 @@ static int matrix4x4_from_quaternion_translation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_from_axes(lua_State* L)
 {
 	LuaStack stack(L);
@@ -98,7 +92,6 @@ static int matrix4x4_from_axes(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_add(lua_State* L)
 {
 	LuaStack stack(L);
@@ -106,7 +99,6 @@ static int matrix4x4_add(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_subtract(lua_State* L)
 {
 	LuaStack stack(L);
@@ -114,7 +106,6 @@ static int matrix4x4_subtract(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_multiply(lua_State* L)
 {
 	LuaStack stack(L);
@@ -122,7 +113,6 @@ static int matrix4x4_multiply(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_transpose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -130,7 +120,6 @@ static int matrix4x4_transpose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_determinant(lua_State* L)
 {
 	LuaStack stack(L);
@@ -138,7 +127,6 @@ static int matrix4x4_determinant(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_invert(lua_State* L)
 {
 	LuaStack stack(L);
@@ -146,7 +134,6 @@ static int matrix4x4_invert(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_x(lua_State* L)
 {
 	LuaStack stack(L);
@@ -154,7 +141,6 @@ static int matrix4x4_x(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_y(lua_State* L)
 {
 	LuaStack stack(L);
@@ -162,7 +148,6 @@ static int matrix4x4_y(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_z(lua_State* L)
 {
 	LuaStack stack(L);
@@ -170,7 +155,6 @@ static int matrix4x4_z(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_set_x(lua_State* L)
 {
 	LuaStack stack(L);
@@ -178,7 +162,6 @@ static int matrix4x4_set_x(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_set_y(lua_State* L)
 {
 	LuaStack stack(L);
@@ -186,7 +169,6 @@ static int matrix4x4_set_y(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_set_z(lua_State* L)
 {
 	LuaStack stack(L);
@@ -194,7 +176,6 @@ static int matrix4x4_set_z(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_translation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -202,7 +183,6 @@ static int matrix4x4_translation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_set_translation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -210,7 +190,6 @@ static int matrix4x4_set_translation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_identity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -218,7 +197,6 @@ static int matrix4x4_identity(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4_to_string(lua_State* L)
 {
 	LuaStack stack(L);
@@ -228,7 +206,6 @@ static int matrix4x4_to_string(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_matrix4x4(LuaEnvironment& env)
 {
 	env.load_module_function("Matrix4x4", "new",                         matrix4x4_new);

+ 0 - 6
engine/lua/lua_matrix4x4_box.cpp

@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int matrix4x4box_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -41,7 +40,6 @@ static int matrix4x4box_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4box_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -49,7 +47,6 @@ static int matrix4x4box_ctor(lua_State* L)
 	return matrix4x4box_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4box_store(lua_State* L)
 {
 	LuaStack stack(L);
@@ -57,7 +54,6 @@ static int matrix4x4box_store(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4box_unbox(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +61,6 @@ static int matrix4x4box_unbox(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int matrix4x4box_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -74,7 +69,6 @@ static int matrix4x4box_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_matrix4x4box(LuaEnvironment& env)
 {
 	env.load_module_function("Matrix4x4Box", "new",        matrix4x4box_new);

+ 0 - 10
engine/lua/lua_mesh.cpp

@@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int mesh_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -40,7 +39,6 @@ static int mesh_local_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -48,7 +46,6 @@ static int mesh_local_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -56,7 +53,6 @@ static int mesh_local_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_world_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -64,7 +60,6 @@ static int mesh_world_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_world_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -72,7 +67,6 @@ static int mesh_world_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_world_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -80,7 +74,6 @@ static int mesh_world_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_set_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -88,7 +81,6 @@ static int mesh_set_local_position(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_set_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -96,7 +88,6 @@ static int mesh_set_local_rotation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int mesh_set_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -104,7 +95,6 @@ static int mesh_set_local_pose(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_mesh(LuaEnvironment& env)
 {
 	env.load_module_function("Mesh", "local_position",     mesh_local_position);

+ 0 - 9
engine/lua/lua_mouse.cpp

@@ -33,7 +33,6 @@ namespace crown
 {
 using namespace input_globals;
 
-//-----------------------------------------------------------------------------
 static int mouse_button_pressed(lua_State* L)
 {
 	LuaStack stack(L);
@@ -41,7 +40,6 @@ static int mouse_button_pressed(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_button_released(lua_State* L)
 {
 	LuaStack stack(L);
@@ -49,7 +47,6 @@ static int mouse_button_released(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_any_pressed(lua_State* L)
 {
 	LuaStack stack(L);
@@ -57,7 +54,6 @@ static int mouse_any_pressed(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_any_released(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +61,6 @@ static int mouse_any_released(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_cursor_xy(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +68,6 @@ static int mouse_cursor_xy(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_set_cursor_xy(lua_State* L)
 {
 	LuaStack stack(L);
@@ -81,7 +75,6 @@ static int mouse_set_cursor_xy(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_cursor_relative_xy(lua_State* L)
 {
 	LuaStack stack(L);
@@ -89,7 +82,6 @@ static int mouse_cursor_relative_xy(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int mouse_set_cursor_relative_xy(lua_State* L)
 {
 	LuaStack stack(L);
@@ -97,7 +89,6 @@ static int mouse_set_cursor_relative_xy(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_mouse(LuaEnvironment& env)
 {
 	env.load_module_function("Mouse", "button_pressed",         mouse_button_pressed);

+ 0 - 6
engine/lua/lua_physics_world.cpp

@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int physics_world_gravity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -41,7 +40,6 @@ static int physics_world_gravity(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int physics_world_set_gravity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -49,7 +47,6 @@ static int physics_world_set_gravity(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int physics_world_make_raycast(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +62,6 @@ static int physics_world_make_raycast(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int physics_world_overlap_test(lua_State* L)
 {
 	LuaStack stack(L);
@@ -93,7 +89,6 @@ static int physics_world_overlap_test(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int physics_world_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -102,7 +97,6 @@ static int physics_world_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_physics_world(LuaEnvironment& env)
 {
 	env.load_module_function("PhysicsWorld", "gravity",      physics_world_gravity);

+ 0 - 12
engine/lua/lua_quaternion.cpp

@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int quaternion_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -41,7 +40,6 @@ static int quaternion_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -49,7 +47,6 @@ static int quaternion_ctor(lua_State* L)
 	return quaternion_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_negate(lua_State* L)
 {
 	LuaStack stack(L);
@@ -57,7 +54,6 @@ static int quaternion_negate(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_identity(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +61,6 @@ static int quaternion_identity(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +68,6 @@ static int quaternion_length(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_conjugate(lua_State* L)
 {
 	LuaStack stack(L);
@@ -81,7 +75,6 @@ static int quaternion_conjugate(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_inverse(lua_State* L)
 {
 	LuaStack stack(L);
@@ -89,7 +82,6 @@ static int quaternion_inverse(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_multiply(lua_State* L)
 {
 	LuaStack stack(L);
@@ -97,7 +89,6 @@ static int quaternion_multiply(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_multiply_by_scalar(lua_State* L)
 {
 	LuaStack stack(L);
@@ -105,7 +96,6 @@ static int quaternion_multiply_by_scalar(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_power(lua_State* L)
 {
 	LuaStack stack(L);
@@ -113,7 +103,6 @@ static int quaternion_power(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternion_elements(lua_State* L)
 {
 	LuaStack stack(L);
@@ -125,7 +114,6 @@ static int quaternion_elements(lua_State* L)
 	return 4;
 }
 
-//-----------------------------------------------------------------------------
 void load_quaternion(LuaEnvironment& env)
 {
 	env.load_module_function("Quaternion", "new",                quaternion_new);

+ 0 - 6
engine/lua/lua_quaternion_box.cpp

@@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int quaternionbox_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -57,7 +56,6 @@ static int quaternionbox_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternionbox_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +63,6 @@ static int quaternionbox_ctor(lua_State* L)
 	return quaternionbox_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int quaternionbox_store(lua_State* L)
 {
 	LuaStack stack(L);
@@ -89,7 +86,6 @@ static int quaternionbox_store(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternionbox_unbox(lua_State* L)
 {
 	LuaStack stack(L);
@@ -100,7 +96,6 @@ static int quaternionbox_unbox(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int quaternionbox_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -109,7 +104,6 @@ static int quaternionbox_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_quaternionbox(LuaEnvironment& env)
 {
 	env.load_module_function("QuaternionBox", "new",        quaternionbox_new);

+ 0 - 2
engine/lua/lua_raycast.cpp

@@ -33,7 +33,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int raycast_cast(lua_State* L)
 {
 	LuaStack stack(L);
@@ -91,7 +90,6 @@ static int raycast_cast(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_raycast(LuaEnvironment& env)
 {
 	env.load_module_function("Raycast", "cast", raycast_cast);

+ 0 - 6
engine/lua/lua_resource_package.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int resource_package_load(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int resource_package_load(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int resource_package_unload(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int resource_package_unload(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int resource_package_flush(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int resource_package_flush(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int resource_package_has_loaded(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int resource_package_has_loaded(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int resource_package_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -72,7 +67,6 @@ static int resource_package_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_resource_package(LuaEnvironment& env)
 {
 	env.load_module_function("ResourcePackage", "load",       resource_package_load);

+ 0 - 6
engine/lua/lua_sound_world.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int sound_world_stop_all(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int sound_world_stop_all(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int sound_world_pause_all(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int sound_world_pause_all(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int sound_world_resume_all(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int sound_world_resume_all(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int sound_world_is_playing(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int sound_world_is_playing(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int sound_world_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -72,7 +67,6 @@ static int sound_world_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_sound_world(LuaEnvironment& env)
 {
 	env.load_module_function("SoundWorld", "stop_all",   sound_world_stop_all);

+ 0 - 8
engine/lua/lua_sprite.cpp

@@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int sprite_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -40,7 +39,6 @@ static int sprite_local_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int sprite_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -48,7 +46,6 @@ static int sprite_local_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int sprite_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -56,7 +53,6 @@ static int sprite_local_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int sprite_set_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -64,7 +60,6 @@ static int sprite_set_local_position(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int sprite_set_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -72,7 +67,6 @@ static int sprite_set_local_rotation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int sprite_set_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -80,7 +74,6 @@ static int sprite_set_local_pose(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int sprite_set_frame(lua_State* L)
 {
 	LuaStack stack(L);
@@ -88,7 +81,6 @@ static int sprite_set_frame(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_sprite(LuaEnvironment& env)
 {
 	env.load_module_function("Sprite", "local_position",     sprite_local_position);

+ 0 - 63
engine/lua/lua_stack.h

@@ -36,7 +36,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "string_utils.h"
 #include "color4.h"
 
-//-----------------------------------------------------------------------------
 #if defined(CROWN_DEBUG)
 	static void* checkudata(lua_State* L, int index, const char* expected)
 	{
@@ -97,13 +96,11 @@ typedef int (*MetamethodFunction)(lua_State*);
 
 struct LuaStack
 {
-	//-----------------------------------------------------------------------------
 	LuaStack(lua_State* L)
 		: _L(L)
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	lua_State* state()
 	{
 		return _L;
@@ -130,13 +127,11 @@ struct LuaStack
 	{
 		lua_pop(_L, n);
 	}
-	//-----------------------------------------------------------------------------
 	bool is_nil(int32_t index)
 	{
 		return lua_isnil(_L, index) == 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	bool is_number(int32_t index)
 	{
 		return lua_isnumber(_L, index) == 1;
@@ -148,43 +143,36 @@ struct LuaStack
 		return lua_type(_L, index);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_nil()
 	{
 		lua_pushnil(_L);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_bool(bool value)
 	{
 		lua_pushboolean(_L, value);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_int32(int32_t value)
 	{
 		lua_pushinteger(_L, value);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_uint32(uint32_t value)
 	{
 		lua_pushinteger(_L, value);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_float(float value)
 	{
 		lua_pushnumber(_L, value);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_string(const char* s)
 	{
 		lua_pushstring(_L, s);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_fstring(const char* fmt, ...)
 	{
 		va_list vl;
@@ -193,31 +181,26 @@ struct LuaStack
 		va_end(vl);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_literal(const char* s, size_t len)
 	{
 		lua_pushlstring(_L, s, len);
 	}
 
-	//-----------------------------------------------------------------------------
 	bool get_bool(int32_t index)
 	{
 		return CHECKBOOLEAN(_L, index) == 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	int32_t get_int(int32_t index)
 	{
 		return CHECKINTEGER(_L, index);
 	}
 
-	//-----------------------------------------------------------------------------
 	float get_float(int32_t index)
 	{
 		return (float) CHECKNUMBER(_L, index);
 	}
 
-	//-----------------------------------------------------------------------------
 	const char* get_string(int32_t index)
 	{
 		return CHECKSTRING(_L, index);
@@ -260,7 +243,6 @@ struct LuaStack
 		return lua_next(_L, i);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_resource_package(ResourcePackage* package)
 	{
 		ResourcePackage** p = (ResourcePackage**) lua_newuserdata(_L, sizeof(ResourcePackage*));
@@ -269,14 +251,12 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	ResourcePackage* get_resource_package(int32_t index)
 	{
 		ResourcePackage* pkg = *(ResourcePackage**) CHECKUDATA(_L, index, "ResourcePackage");
 		return pkg;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_world(World* world)
 	{
 		World** w = (World**) lua_newuserdata(_L, sizeof(World*));
@@ -285,14 +265,12 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	};
 
-	//-----------------------------------------------------------------------------
 	World* get_world(int32_t index)
 	{
 		World* w = *(World**) CHECKUDATA(_L, index, "World");
 		return w;
 	};
 
-	//-----------------------------------------------------------------------------
 	void push_physics_world(PhysicsWorld* world)
 	{
 		PhysicsWorld** w = (PhysicsWorld**) lua_newuserdata(_L, sizeof(PhysicsWorld*));
@@ -301,14 +279,12 @@ struct LuaStack
 		*w = world;
 	}
 
-	//-----------------------------------------------------------------------------
 	PhysicsWorld* get_physics_world(int32_t index)
 	{
 		PhysicsWorld* w = *(PhysicsWorld**) CHECKUDATA(_L, index, "PhysicsWorld");
 		return w;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_sound_world(SoundWorld* world)
 	{
 		SoundWorld** w = (SoundWorld**) lua_newuserdata(_L, sizeof(SoundWorld*));
@@ -317,117 +293,98 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	SoundWorld* get_sound_world(int32_t index)
 	{
 		SoundWorld* w = *(SoundWorld**) CHECKUDATA(_L, index, "SoundWorld");
 		return w;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_unit(Unit* unit)
 	{
 		lua_pushlightuserdata(_L, unit);
 	}
 
-	//-----------------------------------------------------------------------------
 	Unit* get_unit(int32_t index)
 	{
 		return (Unit*) CHECKLIGHTDATA(_L, index, always_true, "Unit");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_camera(Camera* camera)
 	{
 		lua_pushlightuserdata(_L, camera);
 	}
 
-	//-----------------------------------------------------------------------------
 	Camera* get_camera(int32_t index)
 	{
 		return (Camera*) CHECKLIGHTDATA(_L, index, always_true, "Camera");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_mesh(Mesh* mesh)
 	{
 		lua_pushlightuserdata(_L, mesh);
 	}
 
-	//-----------------------------------------------------------------------------
 	Mesh* get_mesh(int32_t index)
 	{
 		return (Mesh*) CHECKLIGHTDATA(_L, index, always_true, "Mesh");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_sprite(Sprite* sprite)
 	{
 		lua_pushlightuserdata(_L, sprite);
 	}
 
-	//-----------------------------------------------------------------------------
 	Sprite* get_sprite(int32_t index)
 	{
 		return (Sprite*) CHECKLIGHTDATA(_L, index, always_true, "Sprite");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_material(Material* material)
 	{
 		lua_pushlightuserdata(_L, material);
 	}
 
-	//-----------------------------------------------------------------------------
 	Material* get_material(int32_t index)
 	{
 		return (Material*) CHECKLIGHTDATA(_L, index, always_true, "Material");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_actor(Actor* actor)
 	{
 		lua_pushlightuserdata(_L, actor);
 	}
 
-	//-----------------------------------------------------------------------------
 	Actor* get_actor(int32_t index)
 	{
 		return (Actor*) CHECKLIGHTDATA(_L, index, always_true, "Actor");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_controller(Controller* controller)
 	{
 		lua_pushlightuserdata(_L, controller);
 	}
 
-	//-----------------------------------------------------------------------------
 	Controller* get_controller(int32_t index)
 	{
 		return (Controller*) CHECKLIGHTDATA(_L, index, always_true, "Controller");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_raycast(Raycast* raycast)
 	{
 		lua_pushlightuserdata(_L, raycast);
 	}
 
-	//-----------------------------------------------------------------------------
 	Raycast* get_raycast(int32_t index)
 	{
 		return (Raycast*) CHECKLIGHTDATA(_L, index, always_true, "Raycast");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_sound_instance_id(const SoundInstanceId id)
 	{
 		uintptr_t enc = id.encode();
 		lua_pushlightuserdata(_L, (void*)enc);
 	}
 
-	//-----------------------------------------------------------------------------
 	SoundInstanceId get_sound_instance_id(int32_t index)
 	{
 		uint32_t enc = (uintptr_t) CHECKLIGHTDATA(_L, index, always_true, "SoundInstanceId");
@@ -436,19 +393,16 @@ struct LuaStack
 		return id;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_gui(Gui* gui)
 	{
 		lua_pushlightuserdata(_L, gui);
 	}
 
-	//-----------------------------------------------------------------------------
 	Gui* get_gui(int32_t index)
 	{
 		return (Gui*) CHECKLIGHTDATA(_L, index, always_true, "Gui");
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_debug_line(DebugLine* line)
 	{
 		DebugLine** l = (DebugLine**) lua_newuserdata(_L, sizeof(DebugLine*));
@@ -457,35 +411,30 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	DebugLine* get_debug_line(int32_t index)
 	{
 		DebugLine* l = *(DebugLine**) CHECKUDATA(_L, index, "DebugLine");
 		return l;
 	}
 
-	//-----------------------------------------------------------------------------
 	Vector2& get_vector2(int32_t index)
 	{
 		void* v = CHECKLIGHTDATA(_L, index, lua_system::is_vector2, "Vector2");
 		return *(Vector2*)v;
 	}
 
-	//-----------------------------------------------------------------------------
 	Vector3& get_vector3(int32_t index)
 	{
 		void* v = CHECKLIGHTDATA(_L, index, lua_system::is_vector3, "Vector3");
 		return *(Vector3*)v;
 	}
 
-	//-----------------------------------------------------------------------------
 	Matrix4x4& get_matrix4x4(int32_t index)
 	{
 		void* m = CHECKLIGHTDATA(_L, index, lua_system::is_matrix4x4, "Matrix4x4");
 		return *(Matrix4x4*)m;
 	}
 
-	//-----------------------------------------------------------------------------
 	Quaternion& get_quaternion(int32_t index)
 	{
 		void* q = CHECKLIGHTDATA(_L, index, lua_system::is_quaternion, "Quaternion");
@@ -500,7 +449,6 @@ struct LuaStack
 		return Color4(q.x, q.y, q.z, q.w);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_vector2(const Vector2& v)
 	{
 		lua_pushlightuserdata(_L, lua_system::next_vector2(v));
@@ -508,7 +456,6 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_vector3(const Vector3& v)
 	{
 		lua_pushlightuserdata(_L, lua_system::next_vector3(v));
@@ -516,7 +463,6 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_matrix4x4(const Matrix4x4& m)
 	{
 		lua_pushlightuserdata(_L, lua_system::next_matrix4x4(m));
@@ -524,7 +470,6 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_quaternion(const Quaternion& q)
 	{
 		lua_pushlightuserdata(_L, lua_system::next_quaternion(q));
@@ -532,7 +477,6 @@ struct LuaStack
 		lua_setmetatable(_L, -2);
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_vector2box(const Vector2& v)
 	{
 		Vector2* vec = (Vector2*) lua_newuserdata(_L, sizeof(Vector2));
@@ -541,14 +485,12 @@ struct LuaStack
 		*vec = v;
 	}
 
-	//-----------------------------------------------------------------------------
 	Vector2& get_vector2box(uint32_t index)
 	{
 		Vector2* v = (Vector2*) CHECKUDATA(_L, index, "Vector2Box");
 		return *v;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_vector3box(const Vector3& v)
 	{
 		Vector3* vec = (Vector3*) lua_newuserdata(_L, sizeof(Vector3));
@@ -557,14 +499,12 @@ struct LuaStack
 		*vec = v;
 	}
 
-	//-----------------------------------------------------------------------------
 	Vector3& get_vector3box(uint32_t index)
 	{
 		Vector3* v = (Vector3*) CHECKUDATA(_L, index, "Vector3Box");
 		return *v;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_quaternionbox(const Quaternion& q)
 	{
 		Quaternion* quat = (Quaternion*) lua_newuserdata(_L, sizeof(Quaternion));
@@ -573,14 +513,12 @@ struct LuaStack
 		*quat = q;
 	}
 
-	//-----------------------------------------------------------------------------
 	Quaternion& get_quaternionbox(uint32_t index)
 	{
 		Quaternion* q = (Quaternion*) CHECKUDATA(_L, index, "QuaternionBox");
 		return *q;
 	}
 
-	//-----------------------------------------------------------------------------
 	void push_matrix4x4box(const Matrix4x4& m)
 	{
 		Matrix4x4* mat = (Matrix4x4*) lua_newuserdata(_L, sizeof(Matrix4x4));
@@ -589,7 +527,6 @@ struct LuaStack
 		*mat = m;
 	}
 
-	//-----------------------------------------------------------------------------
 	Matrix4x4& get_matrix4x4box(uint32_t index)
 	{
 		Matrix4x4* m = (Matrix4x4*) CHECKUDATA(_L, index, "Matrix4x4Box");

+ 0 - 4
engine/lua/lua_string_setting.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int string_setting_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -52,7 +51,6 @@ static int string_setting_value(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int string_setting_synopsis(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +71,6 @@ static int string_setting_synopsis(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int string_setting_update(lua_State* L)
 {
 	LuaStack stack(L);
@@ -91,7 +88,6 @@ static int string_setting_update(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_string_setting(LuaEnvironment& env)
 {
 	env.load_module_function("StringSetting", "value",    string_setting_value);

+ 0 - 18
engine/lua/lua_system.cpp

@@ -137,7 +137,6 @@ namespace lua_system
 		return 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_add(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -156,7 +155,6 @@ namespace lua_system
 		return 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_sub(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -175,7 +173,6 @@ namespace lua_system
 		return 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_mul(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -194,7 +191,6 @@ namespace lua_system
 		return 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_div(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -213,7 +209,6 @@ namespace lua_system
 		return 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_unm(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -227,7 +222,6 @@ namespace lua_system
 		return 1;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_index(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -273,7 +267,6 @@ namespace lua_system
 		return 0;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int lightuserdata_newindex(lua_State* L)
 	{
 		LuaStack stack(L);
@@ -397,19 +390,16 @@ namespace lua_system
 		CE_ASSERT(lua_gettop(s_L) == 0, "Stack not clean");
 	}
 
-	//-----------------------------------------------------------------------------
 	void shutdown()
 	{
 		lua_close(s_L);
 	}
 
-	//-----------------------------------------------------------------------------
 	lua_State* state()
 	{
 		return s_L;
 	}
 
-	//-----------------------------------------------------------------------------
 	Vector2* next_vector2(const Vector2& v)
 	{
 		CE_ASSERT(s_vec2_used < CE_MAX_LUA_VECTOR2, "Maximum number of Vector2 reached");
@@ -417,7 +407,6 @@ namespace lua_system
 		return &(s_vec2_buffer[s_vec2_used++] = v);
 	}
 
-	//-----------------------------------------------------------------------------
 	Vector3* next_vector3(const Vector3& v)
 	{
 		CE_ASSERT(s_vec3_used < CE_MAX_LUA_VECTOR3, "Maximum number of Vector3 reached");
@@ -425,7 +414,6 @@ namespace lua_system
 		return &(s_vec3_buffer[s_vec3_used++] = v);
 	}
 
-	//-----------------------------------------------------------------------------
 	Matrix4x4* next_matrix4x4(const Matrix4x4& m)
 	{
 		CE_ASSERT(s_mat4_used < CE_MAX_LUA_MATRIX4X4, "Maximum number of Matrix4x4 reached");
@@ -433,42 +421,36 @@ namespace lua_system
 		return &(s_mat4_buffer[s_mat4_used++] = m);
 	}
 
-	//-----------------------------------------------------------------------------
 	Quaternion* next_quaternion(const Quaternion& q)
 	{
 		CE_ASSERT(s_quat_used < CE_MAX_LUA_QUATERNION, "Maximum number of Quaternion reached");
 		return &(s_quat_buffer[s_quat_used++] = q);
 	}
 
-	//-----------------------------------------------------------------------------
 	bool is_vector2(int32_t index)
 	{
 		void* type = lua_touserdata(s_L, index);
 		return (type >= &s_vec2_buffer[0] && type <= &s_vec2_buffer[CE_MAX_LUA_VECTOR2 - 1]);
 	}
 
-	//-----------------------------------------------------------------------------
 	bool is_vector3(int32_t index)
 	{
 		void* type = lua_touserdata(s_L, index);
 		return (type >= &s_vec3_buffer[0] && type <= &s_vec3_buffer[CE_MAX_LUA_VECTOR3 - 1]);
 	}
 
-	//-----------------------------------------------------------------------------
 	bool is_matrix4x4(int32_t index)
 	{
 		void* type = lua_touserdata(s_L, index);
 		return (type >= &s_mat4_buffer[0] && type <= &s_mat4_buffer[CE_MAX_LUA_MATRIX4X4 - 1]);
 	}
 
-	//-----------------------------------------------------------------------------
 	bool is_quaternion(int32_t index)
 	{
 		void* type = lua_touserdata(s_L, index);
 		return (type >= &s_quat_buffer[0] && type <= &s_quat_buffer[CE_MAX_LUA_QUATERNION - 1]);
 	}
 
-	//-----------------------------------------------------------------------------
 	void clear_temporaries()
 	{
 		s_vec2_used = 0;

+ 0 - 6
engine/lua/lua_touch.cpp

@@ -33,7 +33,6 @@ namespace crown
 {
 using namespace input_globals;
 
-//-----------------------------------------------------------------------------
 static int touch_pointer_down(lua_State* L)
 {
 	LuaStack stack(L);
@@ -41,7 +40,6 @@ static int touch_pointer_down(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int touch_pointer_up(lua_State* L)
 {
 	LuaStack stack(L);
@@ -49,7 +47,6 @@ static int touch_pointer_up(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int touch_any_down(lua_State* L)
 {
 	LuaStack stack(L);
@@ -57,7 +54,6 @@ static int touch_any_down(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int touch_any_up(lua_State* L)
 {
 	LuaStack stack(L);
@@ -65,7 +61,6 @@ static int touch_any_up(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int touch_pointer_xy(lua_State* L)
 {
 	LuaStack stack(L);
@@ -73,7 +68,6 @@ static int touch_pointer_xy(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_touch(LuaEnvironment& env)
 {
 	env.load_module_function("Touch", "pointer_down", touch_pointer_down);

+ 0 - 27
engine/lua/lua_unit.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int unit_node(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int unit_node(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_has_node(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int unit_has_node(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_num_nodes(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int unit_num_nodes(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int unit_local_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -71,7 +66,6 @@ static int unit_local_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -79,7 +73,6 @@ static int unit_local_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_world_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -87,7 +80,6 @@ static int unit_world_position(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_world_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -95,7 +87,6 @@ static int unit_world_rotation(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_world_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -103,7 +94,6 @@ static int unit_world_pose(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_set_local_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -111,7 +101,6 @@ static int unit_set_local_position(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_set_local_rotation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -119,7 +108,6 @@ static int unit_set_local_rotation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_set_local_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -127,7 +115,6 @@ static int unit_set_local_pose(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_link_node(lua_State* L)
 {
 	LuaStack stack(L);
@@ -135,7 +122,6 @@ static int unit_link_node(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_unlink_node(lua_State* L)
 {
 	LuaStack stack(L);
@@ -143,7 +129,6 @@ static int unit_unlink_node(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_camera(lua_State* L)
 {
 	LuaStack stack(L);
@@ -160,7 +145,6 @@ static int unit_camera(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_material(lua_State* L)
 {
 	LuaStack stack(L);
@@ -177,7 +161,6 @@ static int unit_material(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_mesh(lua_State* L)
 {
 	LuaStack stack(L);
@@ -194,7 +177,6 @@ static int unit_mesh(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_sprite(lua_State* L)
 {
 	LuaStack stack(L);
@@ -211,7 +193,6 @@ static int unit_sprite(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_actor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -228,7 +209,6 @@ static int unit_actor(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_controller(lua_State* L)
 {
 	LuaStack stack(L);
@@ -237,7 +217,6 @@ static int unit_controller(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_is_a(lua_State* L)
 {
 	LuaStack stack(L);
@@ -245,7 +224,6 @@ static int unit_is_a(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_play_sprite_animation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -253,7 +231,6 @@ static int unit_play_sprite_animation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_stop_sprite_animation(lua_State* L)
 {
 	LuaStack stack(L);
@@ -261,7 +238,6 @@ static int unit_stop_sprite_animation(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_has_key(lua_State* L)
 {
 	LuaStack stack(L);
@@ -269,7 +245,6 @@ static int unit_has_key(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_get_key(lua_State* L)
 {
 	LuaStack stack(L);
@@ -313,7 +288,6 @@ static int unit_get_key(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int unit_set_key(lua_State* L)
 {
 	LuaStack stack(L);
@@ -333,7 +307,6 @@ static int unit_set_key(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_unit(LuaEnvironment& env)
 {
 	env.load_module_function("Unit", "node",                  unit_node);

+ 0 - 20
engine/lua/lua_vector2.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int vector2_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int vector2_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int vector2_ctor(lua_State* L)
 	return vector2_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_x(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int vector2_x(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_y(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int vector2_y(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_set_x(lua_State* L)
 {
 	LuaStack stack(L);
@@ -71,7 +66,6 @@ static int vector2_set_x(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_set_y(lua_State* L)
 {
 	LuaStack stack(L);
@@ -79,7 +73,6 @@ static int vector2_set_y(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_values(lua_State* L)
 {
 	LuaStack stack(L);
@@ -89,7 +82,6 @@ static int vector2_values(lua_State* L)
 	return 2;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_add(lua_State* L)
 {
 	LuaStack stack(L);
@@ -97,7 +89,6 @@ static int vector2_add(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_subtract(lua_State* L)
 {
 	LuaStack stack(L);
@@ -105,7 +96,6 @@ static int vector2_subtract(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_multiply(lua_State* L)
 {
 	LuaStack stack(L);
@@ -113,7 +103,6 @@ static int vector2_multiply(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_divide(lua_State* L)
 {
 	LuaStack stack(L);
@@ -121,7 +110,6 @@ static int vector2_divide(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_dot(lua_State* L)
 {
 	LuaStack stack(L);
@@ -129,7 +117,6 @@ static int vector2_dot(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_equal(lua_State* L)
 {
 	LuaStack stack(L);
@@ -137,7 +124,6 @@ static int vector2_equal(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -145,7 +131,6 @@ static int vector2_length(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_squared_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -153,7 +138,6 @@ static int vector2_squared_length(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_set_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -161,7 +145,6 @@ static int vector2_set_length(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_normalize(lua_State* L)
 {
 	LuaStack stack(L);
@@ -169,7 +152,6 @@ static int vector2_normalize(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_distance(lua_State* L)
 {
 	LuaStack stack(L);
@@ -177,7 +159,6 @@ static int vector2_distance(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2_angle(lua_State* L)
 {
 	LuaStack stack(L);
@@ -185,7 +166,6 @@ static int vector2_angle(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_vector2(LuaEnvironment& env)
 {
 	env.load_module_function("Vector2", "new",            vector2_new);

+ 0 - 8
engine/lua/lua_vector2_box.cpp

@@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int vector2box_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -53,7 +52,6 @@ static int vector2box_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2box_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -61,7 +59,6 @@ static int vector2box_ctor(lua_State* L)
 	return vector2box_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int vector2box_get_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -84,7 +81,6 @@ static int vector2box_get_value(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2box_set_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -105,7 +101,6 @@ static int vector2box_set_value(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2box_store(lua_State* L)
 {
 	LuaStack stack(L);
@@ -126,7 +121,6 @@ static int vector2box_store(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2box_unbox(lua_State* L)
 {
 	LuaStack stack(L);
@@ -137,7 +131,6 @@ static int vector2box_unbox(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector2box_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -146,7 +139,6 @@ static int vector2box_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_vector2box(LuaEnvironment& env)
 {
 	env.load_module_function("Vector2Box", "new",        vector2box_new);

+ 0 - 23
engine/lua/lua_vector3.cpp

@@ -31,7 +31,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int vector3_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -39,7 +38,6 @@ static int vector3_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -47,7 +45,6 @@ static int vector3_ctor(lua_State* L)
 	return vector3_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_x(lua_State* L)
 {
 	LuaStack stack(L);
@@ -55,7 +52,6 @@ static int vector3_x(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_y(lua_State* L)
 {
 	LuaStack stack(L);
@@ -63,7 +59,6 @@ static int vector3_y(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_z(lua_State* L)
 {
 	LuaStack stack(L);
@@ -71,7 +66,6 @@ static int vector3_z(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_set_x(lua_State* L)
 {
 	LuaStack stack(L);
@@ -79,7 +73,6 @@ static int vector3_set_x(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_set_y(lua_State* L)
 {
 	LuaStack stack(L);
@@ -87,7 +80,6 @@ static int vector3_set_y(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_set_z(lua_State* L)
 {
 	LuaStack stack(L);
@@ -95,7 +87,6 @@ static int vector3_set_z(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_values(lua_State* L)
 {
 	LuaStack stack(L);
@@ -106,7 +97,6 @@ static int vector3_values(lua_State* L)
 	return 3;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_add(lua_State* L)
 {
 	LuaStack stack(L);
@@ -114,7 +104,6 @@ static int vector3_add(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_subtract(lua_State* L)
 {
 	LuaStack stack(L);
@@ -122,7 +111,6 @@ static int vector3_subtract(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_multiply(lua_State* L)
 {
 	LuaStack stack(L);
@@ -130,7 +118,6 @@ static int vector3_multiply(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_divide(lua_State* L)
 {
 	LuaStack stack(L);
@@ -138,7 +125,6 @@ static int vector3_divide(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_dot(lua_State* L)
 {
 	LuaStack stack(L);
@@ -146,7 +132,6 @@ static int vector3_dot(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_cross(lua_State* L)
 {
 	LuaStack stack(L);
@@ -154,7 +139,6 @@ static int vector3_cross(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_equal(lua_State* L)
 {
 	LuaStack stack(L);
@@ -162,7 +146,6 @@ static int vector3_equal(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -170,7 +153,6 @@ static int vector3_length(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_squared_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -178,7 +160,6 @@ static int vector3_squared_length(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_set_length(lua_State* L)
 {
 	LuaStack stack(L);
@@ -186,7 +167,6 @@ static int vector3_set_length(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_normalize(lua_State* L)
 {
 	LuaStack stack(L);
@@ -194,7 +174,6 @@ static int vector3_normalize(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_distance(lua_State* L)
 {
 	LuaStack stack(L);
@@ -202,7 +181,6 @@ static int vector3_distance(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3_angle(lua_State* L)
 {
 	LuaStack stack(L);
@@ -210,7 +188,6 @@ static int vector3_angle(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_vector3(LuaEnvironment& env)
 {
 	env.load_module_function("Vector3", "new",            vector3_new);

+ 0 - 8
engine/lua/lua_vector3_box.cpp

@@ -32,7 +32,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int vector3box_new(lua_State* L)
 {
 	LuaStack stack(L);
@@ -54,7 +53,6 @@ static int vector3box_new(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3box_ctor(lua_State* L)
 {
 	LuaStack stack(L);
@@ -62,7 +60,6 @@ static int vector3box_ctor(lua_State* L)
 	return vector3box_new(L);
 }
 
-//-----------------------------------------------------------------------------
 static int vector3box_get_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -90,7 +87,6 @@ static int vector3box_get_value(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3box_set_value(lua_State* L)
 {
 	LuaStack stack(L);
@@ -115,7 +111,6 @@ static int vector3box_set_value(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3box_store(lua_State* L)
 {
 	LuaStack stack(L);
@@ -137,7 +132,6 @@ static int vector3box_store(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3box_unbox(lua_State* L)
 {
 	LuaStack stack(L);
@@ -148,7 +142,6 @@ static int vector3box_unbox(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int vector3box_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -157,7 +150,6 @@ static int vector3box_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_vector3box(LuaEnvironment& env)
 {
 	env.load_module_function("Vector3Box", "new",        vector3box_new);

+ 0 - 11
engine/lua/lua_window.cpp

@@ -42,7 +42,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int window_show(lua_State* L)
 {
 	LuaStack stack(L);
@@ -50,7 +49,6 @@ static int window_show(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_hide(lua_State* L)
 {
 	LuaStack stack(L);
@@ -58,7 +56,6 @@ static int window_hide(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_resize(lua_State* L)
 {
 	LuaStack stack(L);
@@ -66,7 +63,6 @@ static int window_resize(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_move(lua_State* L)
 {
 	LuaStack stack(L);
@@ -74,21 +70,18 @@ static int window_move(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_minimize(lua_State* /*L*/)
 {
 	// window()->minimize();
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_restore(lua_State* /*L*/)
 {
 	// window()->restore();
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_is_resizable(lua_State* L)
 {
 	LuaStack stack(L);
@@ -96,7 +89,6 @@ static int window_is_resizable(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int window_set_resizable(lua_State* L)
 {
 	LuaStack stack(L);
@@ -104,7 +96,6 @@ static int window_set_resizable(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int window_title(lua_State* L)
 {
 	LuaStack stack(L);
@@ -113,7 +104,6 @@ static int window_title(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int window_set_title(lua_State* L)
 {
 	LuaStack stack(L);
@@ -121,7 +111,6 @@ static int window_set_title(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 void load_window(LuaEnvironment& env)
 {
 	env.load_module_function("Window", "show",          window_show);

+ 0 - 23
engine/lua/lua_world.cpp

@@ -35,7 +35,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 static int world_spawn_unit(lua_State* L)
 {
 	LuaStack stack(L);
@@ -50,7 +49,6 @@ static int world_spawn_unit(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_destroy_unit(lua_State* L)
 {
 	LuaStack stack(L);
@@ -58,7 +56,6 @@ static int world_destroy_unit(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_num_units(lua_State* L)
 {
 	LuaStack stack(L);
@@ -66,7 +63,6 @@ static int world_num_units(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_units(lua_State* L)
 {
 	LuaStack stack(L);
@@ -87,7 +83,6 @@ static int world_units(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_update_animations(lua_State* L)
 {
 	LuaStack stack(L);
@@ -95,7 +90,6 @@ static int world_update_animations(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_update_scene(lua_State* L)
 {
 	LuaStack stack(L);
@@ -103,7 +97,6 @@ static int world_update_scene(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_update(lua_State* L)
 {
 	LuaStack stack(L);
@@ -111,7 +104,6 @@ static int world_update(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_play_sound(lua_State* L)
 {
 	LuaStack stack(L);
@@ -128,7 +120,6 @@ static int world_play_sound(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_stop_sound(lua_State* L)
 {
 	LuaStack stack(L);
@@ -136,7 +127,6 @@ static int world_stop_sound(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_link_sound(lua_State* L)
 {
 	LuaStack stack(L);
@@ -146,7 +136,6 @@ static int world_link_sound(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_set_listener_pose(lua_State* L)
 {
 	LuaStack stack(L);
@@ -154,7 +143,6 @@ static int world_set_listener_pose(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_set_sound_position(lua_State* L)
 {
 	LuaStack stack(L);
@@ -163,7 +151,6 @@ static int world_set_sound_position(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_set_sound_range(lua_State* L)
 {
 	LuaStack stack(L);
@@ -172,7 +159,6 @@ static int world_set_sound_range(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_set_sound_volume(lua_State* L)
 {
 	LuaStack stack(L);
@@ -181,7 +167,6 @@ static int world_set_sound_volume(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_create_window_gui(lua_State* L)
 {
 	LuaStack stack(L);
@@ -191,7 +176,6 @@ static int world_create_window_gui(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_destroy_gui(lua_State* L)
 {
 	LuaStack stack(L);
@@ -199,7 +183,6 @@ static int world_destroy_gui(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_create_debug_line(lua_State* L)
 {
 	LuaStack stack(L);
@@ -207,7 +190,6 @@ static int world_create_debug_line(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_destroy_debug_line(lua_State* L)
 {
 	LuaStack stack(L);
@@ -215,7 +197,6 @@ static int world_destroy_debug_line(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_load_level(lua_State* L)
 {
 	LuaStack stack(L);
@@ -223,7 +204,6 @@ static int world_load_level(lua_State* L)
 	return 0;
 }
 
-//-----------------------------------------------------------------------------
 static int world_physics_world(lua_State* L)
 {
 	LuaStack stack(L);
@@ -231,7 +211,6 @@ static int world_physics_world(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_sound_world(lua_State* L)
 {
 	LuaStack stack(L);
@@ -239,7 +218,6 @@ static int world_sound_world(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 static int world_tostring(lua_State* L)
 {
 	LuaStack stack(L);
@@ -248,7 +226,6 @@ static int world_tostring(lua_State* L)
 	return 1;
 }
 
-//-----------------------------------------------------------------------------
 void load_world(LuaEnvironment& env)
 {
 	env.load_module_function("World", "spawn_unit",         world_spawn_unit);

+ 0 - 7
engine/main/main_android.cpp

@@ -48,19 +48,16 @@ extern "C"
 namespace crown
 {
 
-// //-----------------------------------------------------------------------------
 // void display_modes(Array<DisplayMode>& /*modes*/)
 // {
 // 	// Do nothing
 // }
 
-// //-----------------------------------------------------------------------------
 // void set_display_mode(uint32_t /*id*/)
 // {
 // 	// Do nothing
 // }
 
-// //-----------------------------------------------------------------------------
 // void set_fullscreen(bool /*full*/)
 // {
 // 	// Do nothing
@@ -110,7 +107,6 @@ struct AndroidDevice
 		_main_thread.stop();
 	}
 
-	//-----------------------------------------------------------------------------
 	void process_command(struct android_app* app, int32_t cmd)
 	{
 		switch (cmd)
@@ -156,7 +152,6 @@ struct AndroidDevice
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	int32_t process_input(struct android_app* app, AInputEvent* event)
 	{
 		if (AInputEvent_getType(event) == AINPUT_EVENT_TYPE_MOTION)
@@ -222,13 +217,11 @@ struct AndroidDevice
 		return 0;
 	}
 
-	//-----------------------------------------------------------------------------
 	static int32_t on_input_event(struct android_app* app, AInputEvent* event)
 	{
 		return ((AndroidDevice*) app->userData)->process_input(app, event);
 	}
 
-	//-----------------------------------------------------------------------------
 	static void on_app_cmd(struct android_app* app, int32_t cmd)
 	{
 		((AndroidDevice*) app->userData)->process_command(app, cmd);

+ 0 - 4
engine/main/main_linux.cpp

@@ -50,7 +50,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-// //-----------------------------------------------------------------------------
 // void display_modes(Array<DisplayMode>& modes)
 // {
 // 	int num_rrsizes = 0;
@@ -66,7 +65,6 @@ namespace crown
 // 	}
 // }
 
-// //-----------------------------------------------------------------------------
 // void set_display_mode(uint32_t id)
 // {
 // 	// Check if id is valid
@@ -85,7 +83,6 @@ namespace crown
 // 		CurrentTime);
 // }
 
-// //-----------------------------------------------------------------------------
 // void set_fullscreen(bool full)
 // {
 // 	XEvent e;
@@ -98,7 +95,6 @@ namespace crown
 // 	XSendEvent(m_x11_display, DefaultRootWindow(m_x11_display), False, SubstructureNotifyMask, &e);
 // }
 
-//-----------------------------------------------------------------------------
 static KeyboardButton::Enum x11_translate_key(KeySym x11_key)
 {
 	switch (x11_key)

+ 0 - 3
engine/main/main_windows.cpp

@@ -65,7 +65,6 @@ int32_t func(void* data)
 	return EXIT_SUCCESS;
 }
 
-//-----------------------------------------------------------------------------
 static KeyboardButton::Enum win_translate_key(int32_t winkey)
 {
 	switch (winkey)
@@ -161,7 +160,6 @@ struct WindowsDevice
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	int32_t	run(Filesystem* fs, ConfigSettings* cs)
 	{
 		HINSTANCE instance = (HINSTANCE)GetModuleHandle(NULL);
@@ -217,7 +215,6 @@ struct WindowsDevice
 		return EXIT_SUCCESS;
 	}
 
-	//-----------------------------------------------------------------------------
 	LRESULT pump_events(HWND hwnd, UINT id, WPARAM wparam, LPARAM lparam)
 	{
 		switch (id)

+ 0 - 41
engine/physics/actor.cpp

@@ -82,7 +82,6 @@ using physx::PxVec3;
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 Actor::Actor(PhysicsWorld& pw, const PhysicsResource* res, uint32_t actor_idx, SceneGraph& sg, int32_t node, UnitId unit_id)
 	: m_world(pw)
 	, m_resource(res)
@@ -94,13 +93,11 @@ Actor::Actor(PhysicsWorld& pw, const PhysicsResource* res, uint32_t actor_idx, S
 	create_objects();
 }
 
-//-----------------------------------------------------------------------------
 Actor::~Actor()
 {
 	destroy_objects();
 }
 
-//-----------------------------------------------------------------------------
 void Actor::create_objects()
 {
 	const PhysicsActor* actor = physics_resource::actor(m_resource, m_index);
@@ -221,7 +218,6 @@ void Actor::create_objects()
 	scene->addActor(*m_actor);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::destroy_objects()
 {
 	if (m_actor)
@@ -231,28 +227,24 @@ void Actor::destroy_objects()
 	}
 }
 
-//-----------------------------------------------------------------------------
 Vector3 Actor::world_position() const
 {
 	const PxTransform tr = m_actor->getGlobalPose();
 	return Vector3(tr.p.x, tr.p.y, tr.p.z);
 }
 
-//-----------------------------------------------------------------------------
 Quaternion Actor::world_rotation() const
 {
 	const PxTransform tr = m_actor->getGlobalPose();
 	return Quaternion(tr.q.x, tr.q.y, tr.q.z, tr.q.w);
 }
 
-//-----------------------------------------------------------------------------
 Matrix4x4 Actor::world_pose() const
 {
 	const PxTransform tr = m_actor->getGlobalPose();
 	return Matrix4x4(Quaternion(tr.q.x, tr.q.y, tr.q.z, tr.q.w), Vector3(tr.p.x, tr.p.y, tr.p.z));
 }
 
-//-----------------------------------------------------------------------------
 void Actor::teleport_world_position(const Vector3& p)
 {
 	PxTransform tr = m_actor->getGlobalPose();
@@ -262,7 +254,6 @@ void Actor::teleport_world_position(const Vector3& p)
 	m_actor->setGlobalPose(tr);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::teleport_world_rotation(const Quaternion& r)
 {
 	PxTransform tr = m_actor->getGlobalPose();
@@ -273,7 +264,6 @@ void Actor::teleport_world_rotation(const Quaternion& r)
 	m_actor->setGlobalPose(tr);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::teleport_world_pose(const Matrix4x4& m)
 {
 	using namespace matrix4x4;
@@ -285,7 +275,6 @@ void Actor::teleport_world_pose(const Matrix4x4& m)
 	m_actor->setGlobalPose(PxTransform(PxMat44(x, y, z, t)));
 }
 
-//-----------------------------------------------------------------------------
 Vector3 Actor::center_of_mass() const
 {
 	if (is_static())
@@ -295,19 +284,16 @@ Vector3 Actor::center_of_mass() const
 	return Vector3(tr.p.x, tr.p.y, tr.p.z);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::enable_gravity()
 {
 	m_actor->setActorFlag(PxActorFlag::eDISABLE_GRAVITY, false);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::disable_gravity()
 {
 	m_actor->setActorFlag(PxActorFlag::eDISABLE_GRAVITY, true);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::enable_collision()
 {
 	// const PxU32 num_shapes = m_actor->getNbShapes();
@@ -330,18 +316,15 @@ void Actor::enable_collision()
 	// }
 }
 
-//-----------------------------------------------------------------------------
 void Actor::disable_collision()
 {
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_collision_filter(const char* name)
 {
 	set_collision_filter(string::murmur2_32(name, string::strlen(name)));
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_collision_filter(StringId32 filter)
 {
 	const PhysicsCollisionFilter* pcf = physics_config_resource::filter(m_world.resource(), filter);
@@ -366,7 +349,6 @@ void Actor::set_collision_filter(StringId32 filter)
 	}
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_kinematic(bool kinematic)
 {
 	if (is_static())
@@ -375,7 +357,6 @@ void Actor::set_kinematic(bool kinematic)
 	static_cast<PxRigidBody*>(m_actor)->setRigidBodyFlag(PxRigidBodyFlag::eKINEMATIC, kinematic);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::move(const Vector3& pos)
 {
 	if (!is_kinematic())
@@ -385,19 +366,16 @@ void Actor::move(const Vector3& pos)
 	static_cast<PxRigidDynamic*>(m_actor)->setKinematicTarget(PxTransform(position));
 }
 
-//-----------------------------------------------------------------------------
 bool Actor::is_static() const
 {
 	return m_actor->getType() & PxActorType::eRIGID_STATIC;
 }
 
-//-----------------------------------------------------------------------------
 bool Actor::is_dynamic() const
 {
 	return m_actor->getType() & PxActorType::eRIGID_DYNAMIC;
 }
 
-//-----------------------------------------------------------------------------
 bool Actor::is_kinematic() const
 {
 	if (!is_dynamic())
@@ -406,13 +384,11 @@ bool Actor::is_kinematic() const
 	return static_cast<PxRigidDynamic*>(m_actor)->getRigidDynamicFlags() & PxRigidDynamicFlag::eKINEMATIC;
 }
 
-//-----------------------------------------------------------------------------
 bool Actor::is_nonkinematic() const
 {
 	return is_dynamic() && !is_kinematic();
 }
 
-//-----------------------------------------------------------------------------
 float Actor::linear_damping() const
 {
 	if (is_static())
@@ -421,7 +397,6 @@ float Actor::linear_damping() const
 	return static_cast<PxRigidDynamic*>(m_actor)->getLinearDamping();
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_linear_damping(float rate)
 {
 	if (is_static())
@@ -430,7 +405,6 @@ void Actor::set_linear_damping(float rate)
 	static_cast<PxRigidDynamic*>(m_actor)->setLinearDamping(rate);
 }
 
-//-----------------------------------------------------------------------------
 float Actor::angular_damping() const
 {
 	if (is_static())
@@ -439,7 +413,6 @@ float Actor::angular_damping() const
 	return static_cast<PxRigidDynamic*>(m_actor)->getAngularDamping();
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_angular_damping(float rate)
 {
 	if (is_static())
@@ -448,7 +421,6 @@ void Actor::set_angular_damping(float rate)
 	static_cast<PxRigidDynamic*>(m_actor)->setAngularDamping(rate);
 }
 
-//-----------------------------------------------------------------------------
 Vector3 Actor::linear_velocity() const
 {
 	if (is_static())
@@ -458,7 +430,6 @@ Vector3 Actor::linear_velocity() const
 	return Vector3(vel.x, vel.y, vel.z);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_linear_velocity(const Vector3& vel)
 {
 	if (!is_nonkinematic())
@@ -468,7 +439,6 @@ void Actor::set_linear_velocity(const Vector3& vel)
 	static_cast<PxRigidBody*>(m_actor)->setLinearVelocity(velocity);
 }
 
-//-----------------------------------------------------------------------------
 Vector3 Actor::angular_velocity() const
 {
 	if (is_static())
@@ -478,7 +448,6 @@ Vector3 Actor::angular_velocity() const
 	return Vector3(vel.x, vel.y, vel.z);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::set_angular_velocity(const Vector3& vel)
 {
 	if (!is_nonkinematic())
@@ -488,7 +457,6 @@ void Actor::set_angular_velocity(const Vector3& vel)
 	static_cast<PxRigidBody*>(m_actor)->setAngularVelocity(velocity);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::add_impulse(const Vector3& impulse)
 {
 	if (!is_nonkinematic())
@@ -497,7 +465,6 @@ void Actor::add_impulse(const Vector3& impulse)
 	static_cast<PxRigidDynamic*>(m_actor)->addForce(PxVec3(impulse.x, impulse.y, impulse.z), PxForceMode::eIMPULSE);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::add_impulse_at(const Vector3& impulse, const Vector3& pos)
 {
 	if (!is_nonkinematic())
@@ -509,7 +476,6 @@ void Actor::add_impulse_at(const Vector3& impulse, const Vector3& pos)
 									   PxForceMode::eIMPULSE);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::add_torque_impulse(const Vector3& i)
 {
 	if (!is_nonkinematic())
@@ -518,19 +484,16 @@ void Actor::add_torque_impulse(const Vector3& i)
 	static_cast<PxRigidBody*>(m_actor)->addTorque(PxVec3(i.x, i.y, i.z), PxForceMode::eIMPULSE);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::push(const Vector3& vel, float mass)
 {
 	add_impulse(vel * mass);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::push_at(const Vector3& vel, float mass, const Vector3& pos)
 {
 	add_impulse_at(vel * mass, pos);
 }
 
-//-----------------------------------------------------------------------------
 bool Actor::is_sleeping()
 {
 	if (is_static())
@@ -539,7 +502,6 @@ bool Actor::is_sleeping()
 	return static_cast<PxRigidDynamic*>(m_actor)->isSleeping();
 }
 
-//-----------------------------------------------------------------------------
 void Actor::wake_up()
 {
 	if (is_static())
@@ -548,19 +510,16 @@ void Actor::wake_up()
 	static_cast<PxRigidDynamic*>(m_actor)->wakeUp();
 }
 
-//-----------------------------------------------------------------------------
 UnitId Actor::unit_id() const
 {
 	return m_unit;
 }
 
-//-----------------------------------------------------------------------------
 Unit* Actor::unit()
 {
 	return (m_unit.id == INVALID_ID) ? NULL : m_world.world().get_unit(m_unit);
 }
 
-//-----------------------------------------------------------------------------
 void Actor::update(const Matrix4x4& pose)
 {
 	m_scene_graph.set_world_pose(m_node, pose);

+ 0 - 9
engine/physics/controller.cpp

@@ -45,7 +45,6 @@ using physx::PxVec3;
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 Controller::Controller(const PhysicsResource* pr, SceneGraph& sg, int32_t node, PxPhysics* physics, PxControllerManager* manager)
 	: m_resource(pr)
 	, m_scene_graph(sg)
@@ -74,51 +73,43 @@ Controller::Controller(const PhysicsResource* pr, SceneGraph& sg, int32_t node,
 	CE_ASSERT(m_controller, "Failed to create controller");
 }
 
-//-----------------------------------------------------------------------------
 Controller::~Controller()
 {
 	m_controller->release();
 }
 
-//-----------------------------------------------------------------------------
 void Controller::move(const Vector3& pos)
 {
 	const PxVec3 disp(pos.x, pos.y, pos.z);
 	m_flags = m_controller->move(disp, 0.001, 1.0 / 60.0, PxControllerFilters());
 }
 
-//-----------------------------------------------------------------------------
 void Controller::set_height(float height)
 {
 	m_controller->resize(height);
 }
 
-//-----------------------------------------------------------------------------
 Vector3 Controller::position() const
 {
 	PxExtendedVec3 pos = m_controller->getPosition();
 	return Vector3(pos.x, pos.y, pos.z);
 }
 
-//-----------------------------------------------------------------------------
 bool Controller::collides_up() const
 {
 	return (m_flags & PxControllerFlag::eCOLLISION_UP) != 0;
 }
 
-//-----------------------------------------------------------------------------
 bool Controller::collides_down() const
 {
 	return (m_flags & PxControllerFlag::eCOLLISION_DOWN) != 0;
 }
 
-//-----------------------------------------------------------------------------
 bool Controller::collides_sides() const
 {
 	return (m_flags & PxControllerFlag::eCOLLISION_SIDES) != 0;
 }
 
-//-----------------------------------------------------------------------------
 void Controller::update()
 {
 	m_scene_graph.set_world_position(m_node, position());

+ 0 - 2
engine/physics/joint.cpp

@@ -86,7 +86,6 @@ using physx::PxJointAngularLimitPair;
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 Joint::Joint(PxPhysics* physics, const PhysicsResource* pr, const uint32_t index, const Actor& actor_0, const Actor& actor_1)
 	: m_resource(pr)
 	, m_index(index)
@@ -161,7 +160,6 @@ Joint::Joint(PxPhysics* physics, const PhysicsResource* pr, const uint32_t index
 	if (joint->breakable) m_joint->setBreakForce(joint->break_force, joint->break_torque);
 }
 
-//-----------------------------------------------------------------------------
 Joint::~Joint()
 {
 

+ 0 - 11
engine/physics/physics_callback.h

@@ -63,24 +63,20 @@ namespace crown
 
 class PhysicsWorld;
 
-//-----------------------------------------------------------------------------
 class PhysicsSimulationCallback : public PxSimulationEventCallback
 {
 public:
 
-	//-----------------------------------------------------------------------------
 	PhysicsSimulationCallback(EventStream& stream)
 		: m_events(stream)
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	void onConstraintBreak(PxConstraintInfo* /*constraints*/, PxU32 /*count*/)
 	{
 		// printf("COSTRAINTBREAK\n");
 	}
 
-	//-----------------------------------------------------------------------------
 	void onContact(const PxContactPairHeader& pair_header, const PxContactPair* pairs, PxU32 num_pairs)
 	{
 		// Do not report contact if either actor0 or actor1 or both have been deleted
@@ -120,7 +116,6 @@ public:
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	void onTrigger(PxTriggerPair* pairs, PxU32 count)
 	{
 		for (PxU32 pp = 0; pp < count; pp++)
@@ -138,12 +133,10 @@ public:
 		}
 	}
 
-	//-----------------------------------------------------------------------------
 	void onWake(PxActor** /*actors*/, PxU32 /*count*/)
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	void onSleep(PxActor** /*actors*/, PxU32 /*count*/)
 	{
 	}
@@ -175,20 +168,16 @@ private:
 	EventStream& m_events;
 };
 
-//-----------------------------------------------------------------------------
 class PhysicsControllerCallback : public PxUserControllerHitReport
 {
-	//-----------------------------------------------------------------------------
 	void onShapeHit(const PxControllerShapeHit& /*hit*/)
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	void onControllerHit(const PxControllersHit& /*hit*/)
 	{
 	}
 
-	//-----------------------------------------------------------------------------
 	void onObstacleHit(const PxControllerObstacleHit& /*hit*/)
 	{
 	}

+ 0 - 9
engine/physics/physics_types.h

@@ -42,7 +42,6 @@ struct Joint;
 struct Raycast;
 class PhysicsWorld;
 
-//-----------------------------------------------------------------------------
 struct ActorType
 {
 	enum Enum
@@ -53,7 +52,6 @@ struct ActorType
 	};
 };
 
-//-----------------------------------------------------------------------------
 struct ShapeType
 {
 	enum Enum
@@ -66,7 +64,6 @@ struct ShapeType
 	};
 };
 
-//-----------------------------------------------------------------------------
 struct JointType
 {
 	enum Enum
@@ -80,7 +77,6 @@ struct JointType
 	};
 };
 
-//-----------------------------------------------------------------------------
 struct CollisionGroup
 {
 	enum Enum
@@ -120,7 +116,6 @@ struct CollisionGroup
 	};
 };
 
-//-----------------------------------------------------------------------------
 struct CollisionType
 {
 	enum Enum
@@ -131,7 +126,6 @@ struct CollisionType
 	};
 };
 
-//-----------------------------------------------------------------------------
 struct CollisionMode
 {
 	enum Enum
@@ -144,7 +138,6 @@ struct CollisionMode
 
 namespace physics_world
 {
-//-----------------------------------------------------------------------------
 struct EventType
 {
 	enum Enum
@@ -154,7 +147,6 @@ struct EventType
 	};
 };
 
-//-----------------------------------------------------------------------------
 struct CollisionEvent
 {
 	enum Type { BEGIN_TOUCH, END_TOUCH } type;
@@ -163,7 +155,6 @@ struct CollisionEvent
 	Vector3 normal;
 };
 
-//-----------------------------------------------------------------------------
 struct TriggerEvent
 {
 	enum Type { BEGIN_TOUCH, END_TOUCH } type;

+ 0 - 21
engine/physics/physics_world.cpp

@@ -93,7 +93,6 @@ namespace physics_globals
 	using physx::PxErrorCallback;
 	using physx::PxErrorCode;
 
-	//-----------------------------------------------------------------------------
 	class PhysXAllocator : public PxAllocatorCallback
 	{
 	public:
@@ -118,7 +117,6 @@ namespace physics_globals
 		ProxyAllocator m_backing;
 	};
 
-	//-----------------------------------------------------------------------------
 	class PhysXError : public PxErrorCallback
 	{
 	public:
@@ -156,7 +154,6 @@ namespace physics_globals
 		}
 	};
 
-	//-----------------------------------------------------------------------------
 	PxFilterFlags FilterShader(PxFilterObjectAttributes attributes0, PxFilterData filterData0,
 									PxFilterObjectAttributes attributes1, PxFilterData filterData1,
 									PxPairFlags& pairFlags, const void* constantBlock, PxU32 constantBlockSize)
@@ -236,7 +233,6 @@ namespace physics_globals
 	#endif
 } // namespace physics_globals
 
-//-----------------------------------------------------------------------------
 PhysicsWorld::PhysicsWorld(World& world)
 	: m_world(world)
 	, m_scene(NULL)
@@ -291,7 +287,6 @@ PhysicsWorld::PhysicsWorld(World& world)
 	#endif
 }
 
-//-----------------------------------------------------------------------------
 PhysicsWorld::~PhysicsWorld()
 {
 	m_cpu_dispatcher->release();
@@ -303,94 +298,80 @@ PhysicsWorld::~PhysicsWorld()
 	#endif
 }
 
-//-----------------------------------------------------------------------------
 ActorId	PhysicsWorld::create_actor(const PhysicsResource* res, const uint32_t index, SceneGraph& sg, int32_t node, UnitId unit_id)
 {
 	Actor* actor = CE_NEW(m_actors_pool, Actor)(*this, res, index, sg, node, unit_id);
 	return id_array::create(m_actors, actor);
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::destroy_actor(ActorId id)
 {
 	CE_DELETE(m_actors_pool, id_array::get(m_actors, id));
 	id_array::destroy(m_actors, id);
 }
 
-//-----------------------------------------------------------------------------
 ControllerId PhysicsWorld::create_controller(const PhysicsResource* pr, SceneGraph& sg, int32_t node)
 {
 	Controller* controller = CE_NEW(m_controllers_pool, Controller)(pr, sg, node, physics_globals::s_physics, m_controller_manager);
 	return id_array::create(m_controllers, controller);
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::destroy_controller(ControllerId id)
 {
 	CE_DELETE(m_controllers_pool, id_array::get(m_controllers, id));
 	id_array::destroy(m_controllers, id);
 }
 
-//-----------------------------------------------------------------------------
 JointId	PhysicsWorld::create_joint(const PhysicsResource* pr, const uint32_t index, const Actor& actor_0, const Actor& actor_1)
 {
 	Joint* joint = CE_NEW(m_joints_pool, Joint)(physics_globals::s_physics, pr, index, actor_0, actor_1);
 	return id_array::create(m_joints, joint);
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::destroy_joint(JointId id)
 {
 	CE_DELETE(m_joints_pool, id_array::get(m_joints, id));
 	id_array::destroy(m_joints, id);
 }
 
-//-----------------------------------------------------------------------------
 RaycastId PhysicsWorld::create_raycast(CollisionMode::Enum mode, CollisionType::Enum filter)
 {
 	Raycast* raycast = CE_NEW(m_raycasts_pool, Raycast)(m_scene, mode, filter);
 	return id_array::create(m_raycasts, raycast);
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::destroy_raycast(RaycastId id)
 {
 	CE_DELETE(m_raycasts_pool, id_array::get(m_raycasts, id));
 	id_array::destroy(m_raycasts, id);
 }
 
-//-----------------------------------------------------------------------------
 Actor* PhysicsWorld::get_actor(ActorId id)
 {
 	return id_array::get(m_actors, id);
 }
 
-//-----------------------------------------------------------------------------
 Controller* PhysicsWorld::get_controller(ControllerId id)
 {
 	return id_array::get(m_controllers, id);
 }
 
-//-----------------------------------------------------------------------------
 Raycast* PhysicsWorld::get_raycast(RaycastId id)
 {
 	return id_array::get(m_raycasts, id);
 }
 
-//-----------------------------------------------------------------------------
 Vector3 PhysicsWorld::gravity() const
 {
 	PxVec3 g = m_scene->getGravity();
 	return Vector3(g.x, g.y, g.z);
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::set_gravity(const Vector3& g)
 {
 	m_scene->setGravity(PxVec3(g.x, g.y, g.z));
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::overlap_test(CollisionType::Enum filter, ShapeType::Enum type,
 								const Vector3& pos, const Quaternion& rot, const Vector3& size, Array<Actor*>& actors)
 {
@@ -427,7 +408,6 @@ void PhysicsWorld::overlap_test(CollisionType::Enum filter, ShapeType::Enum type
 	}
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::update(float dt)
 {
 	// Run with fixed timestep
@@ -459,7 +439,6 @@ void PhysicsWorld::update(float dt)
 	}
 }
 
-//-----------------------------------------------------------------------------
 void PhysicsWorld::draw_debug()
 {
 	#if defined(CROWN_DEBUG)

+ 0 - 1
engine/physics/physics_world.h

@@ -55,7 +55,6 @@ using physx::PxCooking;
 namespace crown
 {
 
-//-----------------------------------------------------------------------------
 struct SceneGraph;
 class World;
 struct PhysicsResource;

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff