Browse Source

Update minor branch

--HG--
branch : minor
Bart van Strien 13 years ago
parent
commit
272947ca95
100 changed files with 11175 additions and 20796 deletions
  1. 6 0
      .hgignore
  2. 1 0
      .hgtags
  3. 51 4
      changes.txt
  4. 4 0
      extra/nsis/love.nsi
  5. 1 1
      license.txt
  6. 23 10
      platform/macosx/love.xcodeproj/project.pbxproj
  7. 0 315
      platform/msvc2008/audio/audio.vcproj
  8. 0 400
      platform/msvc2008/common/common.vcproj
  9. 0 235
      platform/msvc2008/event/event.vcproj
  10. 0 331
      platform/msvc2008/filesystem/filesystem.vcproj
  11. 0 371
      platform/msvc2008/font/font.vcproj
  12. 0 661
      platform/msvc2008/graphics/graphics.vcproj
  13. 0 1
      platform/msvc2008/icon.rc
  14. 0 291
      platform/msvc2008/image/image.vcproj
  15. 0 219
      platform/msvc2008/joystick/joystick.vcproj
  16. 0 219
      platform/msvc2008/keyboard/keyboard.vcproj
  17. BIN
      platform/msvc2008/love.ico
  18. 0 163
      platform/msvc2008/love.sln
  19. 0 4052
      platform/msvc2008/love.vcproj
  20. 0 221
      platform/msvc2008/lovedll/lovedll.vcproj
  21. 0 393
      platform/msvc2008/lua/lua.c
  22. 0 178
      platform/msvc2008/lua/lua.vcproj
  23. 0 219
      platform/msvc2008/mouse/mouse.vcproj
  24. 0 1263
      platform/msvc2008/physics/physics.vcproj
  25. 0 343
      platform/msvc2008/sound/sound.vcproj
  26. 0 215
      platform/msvc2008/thread/thread.vcproj
  27. 0 211
      platform/msvc2008/timer/timer.vcproj
  28. BIN
      platform/msvc2010/app.rc
  29. 734 0
      platform/msvc2010/liblove.vcxproj
  30. 1427 0
      platform/msvc2010/liblove.vcxproj.filters
  31. BIN
      platform/msvc2010/love.rc
  32. 34 7
      platform/msvc2010/love.sln
  33. 216 498
      platform/msvc2010/love.vcxproj
  34. 1 1337
      platform/msvc2010/love.vcxproj.filters
  35. 0 0
      platform/unix/Makefile.am
  36. 26 5
      platform/unix/automagic
  37. 27 11
      platform/unix/configure.in
  38. 27 26
      platform/unix/exclude
  39. 9 4
      platform/unix/gen-makefile
  40. 58 56
      src/common/Data.h
  41. 100 99
      src/common/EnumMap.h
  42. 65 62
      src/common/Exception.cpp
  43. 67 64
      src/common/Exception.h
  44. 198 196
      src/common/Matrix.cpp
  45. 167 166
      src/common/Matrix.h
  46. 45 44
      src/common/Memoizer.cpp
  47. 46 46
      src/common/Memoizer.h
  48. 55 55
      src/common/Module.h
  49. 52 52
      src/common/Object.cpp
  50. 76 76
      src/common/Object.h
  51. 82 81
      src/common/Reference.cpp
  52. 88 87
      src/common/Reference.h
  53. 168 167
      src/common/StringMap.h
  54. 175 173
      src/common/Variant.cpp
  55. 76 73
      src/common/Variant.h
  56. 25 25
      src/common/Vector.cpp
  57. 311 310
      src/common/Vector.h
  58. 80 78
      src/common/b64.cpp
  59. 40 38
      src/common/b64.h
  60. 93 81
      src/common/config.h
  61. 42 41
      src/common/delay.cpp
  62. 33 33
      src/common/delay.h
  63. 65 64
      src/common/int.h
  64. 18 31
      src/common/math.h
  65. 481 480
      src/common/runtime.cpp
  66. 384 383
      src/common/runtime.h
  67. 174 173
      src/common/types.h
  68. 61 60
      src/common/utf8.cpp
  69. 47 46
      src/common/utf8.h
  70. 37 36
      src/common/version.h
  71. 58 56
      src/common/wrap_Data.cpp
  72. 38 37
      src/common/wrap_Data.h
  73. 205 312
      src/love.cpp
  74. 52 51
      src/modules/audio/Audio.cpp
  75. 239 234
      src/modules/audio/Audio.h
  76. 74 73
      src/modules/audio/Source.cpp
  77. 119 119
      src/modules/audio/Source.h
  78. 168 167
      src/modules/audio/null/Audio.cpp
  79. 89 87
      src/modules/audio/null/Audio.h
  80. 205 205
      src/modules/audio/null/Source.cpp
  81. 94 93
      src/modules/audio/null/Source.h
  82. 319 316
      src/modules/audio/openal/Audio.cpp
  83. 142 140
      src/modules/audio/openal/Audio.h
  84. 293 286
      src/modules/audio/openal/Pool.cpp
  85. 124 125
      src/modules/audio/openal/Pool.h
  86. 724 698
      src/modules/audio/openal/Source.cpp
  87. 150 151
      src/modules/audio/openal/Source.h
  88. 343 339
      src/modules/audio/wrap_Audio.cpp
  89. 61 60
      src/modules/audio/wrap_Audio.h
  90. 320 318
      src/modules/audio/wrap_Source.cpp
  91. 66 65
      src/modules/audio/wrap_Source.h
  92. 297 295
      src/modules/event/Event.cpp
  93. 83 83
      src/modules/event/Event.h
  94. 314 313
      src/modules/event/sdl/Event.cpp
  95. 82 81
      src/modules/event/sdl/Event.h
  96. 150 148
      src/modules/event/sdl/wrap_Event.cpp
  97. 48 47
      src/modules/event/sdl/wrap_Event.h
  98. 53 52
      src/modules/filesystem/File.cpp
  99. 178 177
      src/modules/filesystem/File.h
  100. 91 88
      src/modules/filesystem/FileData.cpp

+ 6 - 0
.hgignore

@@ -11,6 +11,8 @@ glob:*.o
 glob:*.dirstamp
 glob:*.m4
 glob:*.Po
+glob:*.lo
+glob:*.Plo
 glob:*.dll
 glob:*.user
 glob:*.suo
@@ -35,3 +37,7 @@ relre:platform/msvc2010/(.*)txt
 relre:platform/msvc2010/(.*)suo
 relre:platform/msvc2010/(.*)sdf
 relre:platform/msvc2010/(.*)ipch
+glob:.*.swp
+glob:autom4te.cache/
+glob:src/.libs/
+glob:*~

+ 1 - 0
.hgtags

@@ -4,3 +4,4 @@ db7cd0682883ed357adef013a326bbb26de28c98 0.6.2
 9240be0fe0ea1070bc604954ab2e81320e278ad9 0.7.0
 18d79c306466d188919c238d23e50ea705b07c03 0.7.1
 bcca82b60d0f5cd724edbe4ed65db18ab95d4691 0.7.2
+e0f98d53debb62347c6433ca0534a0f77f15f76f 0.8.0

+ 51 - 4
changes.txt

@@ -1,3 +1,38 @@
+LOVE 0.8.1 [Rubber Piggy]
+--------------
+
+  * Added --fused command line argument, to simulate fusing.
+  * Added liblove.
+  * Added the ability to have exit values.
+  * Added exit value of 1 in case of error by default.
+  * Added love.joystick.reload.
+  * Added basic support for the file:// uri scheme.
+  * Added love.mouse.setX/setY.
+  * Added love.filesystem.getIdentity.
+  * OPTIONAL: Added support for GME.
+
+  * Fixed crashes with font drawing on some ATI cards.
+  * Fixed scaling in several love.physics functions.
+  * Fixed artifacts when drawing lines at huge scale.
+  * Fixed ImageFonts ignoring default image filter.
+  * Fixed getMode and friends returning wrong values when using desktop size.
+  * Fixed memory leak in the mp3 decoder.
+  * Fixed sound issues with some versions of OpenAL soft, by enabling direct channels.
+  * Fixed 'random' hangs in audio.
+  * Fixed love.graphics.getLineWidth returning incorrect values.
+  * Fixed possible memory leak in utf-8 decoder.
+
+  * Moved love's startup to modules/love.
+
+  * Renamed love's boot script to 'love.boot', which can be required.
+
+  * Removed love.joystick.open and friends.
+
+  * Updated allocation for SoundData, it's more efficient and less wasteful.
+  * Updated Source:set* functions to default z to 0.
+  * Updated the windows console, it now tries to re-use an active one first.
+  * Updated love.image memory handling, improves errors and thread-safety.
+
 LOVE 0.8.0 [Rubber Piggy]
 -------------------------
 
@@ -17,7 +52,7 @@ LOVE 0.8.0 [Rubber Piggy]
   * Added origin to font printing.
   * Added love.graphics.getMode.
   * Added per-sprite colors on SpriteBatches.
-  * Added pixel effects.
+  * Added PixelEffects.
   * Added love.graphics.isSupported.
   * Added love.graphics.getCanvas.
   * Added love.event.quit.
@@ -34,6 +69,10 @@ LOVE 0.8.0 [Rubber Piggy]
   * Added new events system, with support for custom events and long event names.
   * Added sound attenuation by distance.
   * Added SpriteBatch:getImage.
+  * Added combine color mode.
+  * Added automatic random seeding to love.run.
+  * Added support for the subtract BlendMode on older graphics cards.
+  * Added love._os field, which contains the OS the game is running on.
 
   * Fixed wrapping for single words.
   * Fixed tracebacks not showing filenames.
@@ -48,18 +87,17 @@ LOVE 0.8.0 [Rubber Piggy]
   * Fixed SoundData allocating the wrong number of samples.
   * Fixed SpriteBatch support on Intel cards.
   * Fixed love.filesystem.lines() leaking.
-  * Fixed Source controls inconsistencies.
   * Fixed most leaking on unclosed File objects.
   * Fixed crashes when operating on non-existent files.
   * Fixed a bug where empty files on windows would never reach eof.
   * Fixed crash when SoundData runs out of memory.
-  * Fixed ordering of loaders, love should have priority over Lua.
+  * Fixed ordering of loaders, love should have priority over lua.
   * Fixed several miscellaneous memory leaks.
-  * Fixed love.filesystem's priority for require.
   * Fixed a few cases where strings with \0 in them would not be stored correctly.
   * Fixed love's startup time being in the first dt.
   * Fixed internal string conversions, they are faster now.
   * Fixed (bad) performance of ImageData:paste.
+  * Fixed love.graphics.toggleFullscreen not maintaining graphics state.
 
   * Renamed SpriteBatch's lock/unlock to bind/unbind.
   * Renamed Framebuffer to Canvas.
@@ -83,6 +121,15 @@ LOVE 0.8.0 [Rubber Piggy]
   * Updated version compatibility system to actually do something.
   * Updated love.run's order, events are checked just before update.
   * Updated Box2D to version 2.2.1.
+  * Updated sdl to 1.2.15 on Windows
+  * Updated freetype to 2.4.9 on Windows
+  * Updated libjpeg to 8d on Windows
+  * Updated libmodplug to 0.8.8.4 on Windows
+  * Updated libogg to 1.3.0 on Windows
+  * Updated libpng to 1.5.10 on Windows
+  * Updated mpg123 to 1.13.7 on Windows
+  * Updated openal-soft to 1.14 on Windows
+  * Updated zlib to 1.2.6 on Windows
 
 LOVE 0.7.2 [Game Slave]
 -----------------------

+ 4 - 0
extra/nsis/love.nsi

@@ -42,6 +42,8 @@ Section "LOVE" MainProg
 	File "${LOVEBINDIR}\DevIL.dll"
 	File "${LOVEBINDIR}\SDL.dll"
 	File "${LOVEBINDIR}\OpenAL32.dll"
+	File "${LOVEBINDIR}\libmpg123.dll"
+	File "${LOVEBINDIR}\gme.dll"
 	# File "${LOVEBINDIR}\lua51.dll"
 	File "${LOVEICODIR}\love.ico"
 	File "${LOVEICODIR}\game.ico"
@@ -89,6 +91,8 @@ Section "Uninstall"
 	Delete $INSTDIR\"SDL.dll"
 	Delete $INSTDIR\"love.exe"
 	Delete $INSTDIR\"OpenAL32.dll"
+	Delete $INSTDIR\"libmpg123.dll"
+	Delete $INSTDIR\"gme.dll"
 	# Delete $INSTDIR\"lua51.dll"
 	Delete $INSTDIR\"game.ico"
 	Delete $INSTDIR\"love.ico"

+ 1 - 1
license.txt

@@ -1,4 +1,4 @@
-Copyright (c) 2006-2011 LOVE Development Team
+Copyright (c) 2006-2012 LOVE Development Team
 
 This software is provided 'as-is', without any express or implied
 warranty. In no event will the authors be held liable for any damages

+ 23 - 10
platform/macosx/love.xcodeproj/project.pbxproj

@@ -232,6 +232,8 @@
 		A9F169AC109E825000FC83D1 /* mpg123.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9F169A6109E824900FC83D1 /* mpg123.framework */; };
 		A9F169AD109E825000FC83D1 /* libmodplug.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A9F16926109E7BAD00FC83D1 /* libmodplug.framework */; };
 		A9F2D09114BA85EC0035D2A5 /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9F2D09014BA85EC0035D2A5 /* Audio.cpp */; };
+		A9F6E6AE15A1080D00C86200 /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9F6E6AC15A1080D00C86200 /* love.cpp */; };
+		A9F6E6B115A1099C00C86200 /* GmeDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9F6E6AF15A1099C00C86200 /* GmeDecoder.cpp */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXCopyFilesBuildPhase section */
@@ -650,7 +652,6 @@
 		A9D5C499142E5F7F0044ECF7 /* b2EdgeShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2EdgeShape.cpp; sourceTree = "<group>"; };
 		A9D5C49A142E5F7F0044ECF7 /* b2EdgeShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2EdgeShape.h; sourceTree = "<group>"; };
 		A9D5C49B142E5F7F0044ECF7 /* b2PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonShape.cpp; sourceTree = "<group>"; };
-		A9D5C49C142E5F7F0044ECF7 /* b2PolygonShape.cpp.orig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = b2PolygonShape.cpp.orig; sourceTree = "<group>"; };
 		A9D5C49D142E5F7F0044ECF7 /* b2PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonShape.h; sourceTree = "<group>"; };
 		A9D5C49E142E5F7F0044ECF7 /* b2Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Shape.h; sourceTree = "<group>"; };
 		A9D5C4A0142E5F7F0044ECF7 /* b2BlockAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BlockAllocator.cpp; sourceTree = "<group>"; };
@@ -726,6 +727,10 @@
 		A9F16926109E7BAD00FC83D1 /* libmodplug.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libmodplug.framework; path = /Library/Frameworks/libmodplug.framework; sourceTree = "<absolute>"; };
 		A9F169A6109E824900FC83D1 /* mpg123.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = mpg123.framework; path = /Library/Frameworks/mpg123.framework; sourceTree = "<absolute>"; };
 		A9F2D09014BA85EC0035D2A5 /* Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Audio.cpp; sourceTree = "<group>"; };
+		A9F6E6AC15A1080D00C86200 /* love.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = love.cpp; sourceTree = "<group>"; };
+		A9F6E6AD15A1080D00C86200 /* love.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = love.h; sourceTree = "<group>"; };
+		A9F6E6AF15A1099C00C86200 /* GmeDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GmeDecoder.cpp; sourceTree = "<group>"; };
+		A9F6E6B015A1099C00C86200 /* GmeDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GmeDecoder.h; sourceTree = "<group>"; };
 		A9F8833511163C8C00831E98 /* audio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lua; path = audio.lua; sourceTree = "<group>"; };
 		A9F8833611163C8C00831E98 /* audio.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio.lua.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
@@ -958,6 +963,7 @@
 				A93E6AA710420AC3007D418B /* image */,
 				A93E6AB410420AC3007D418B /* joystick */,
 				A93E6ABB10420AC3007D418B /* keyboard */,
+				A9F6E6AB15A1080D00C86200 /* love */,
 				A93E6AC210420AC3007D418B /* mouse */,
 				A93E6AE910420AC7007D418B /* physics */,
 				A93E6B7410420ACB007D418B /* sound */,
@@ -1376,6 +1382,8 @@
 				A93E6B7810420ACB007D418B /* Decoder.h */,
 				A93E6B7910420ACB007D418B /* FLACDecoder.cpp */,
 				A93E6B7A10420ACB007D418B /* FLACDecoder.h */,
+				A9F6E6AF15A1099C00C86200 /* GmeDecoder.cpp */,
+				A9F6E6B015A1099C00C86200 /* GmeDecoder.h */,
 				A93E6B7B10420ACB007D418B /* ModPlugDecoder.cpp */,
 				A93E6B7C10420ACB007D418B /* ModPlugDecoder.h */,
 				A93E6B7D10420ACB007D418B /* Mpg123Decoder.cpp */,
@@ -1545,7 +1553,6 @@
 				A9D5C499142E5F7F0044ECF7 /* b2EdgeShape.cpp */,
 				A9D5C49A142E5F7F0044ECF7 /* b2EdgeShape.h */,
 				A9D5C49B142E5F7F0044ECF7 /* b2PolygonShape.cpp */,
-				A9D5C49C142E5F7F0044ECF7 /* b2PolygonShape.cpp.orig */,
 				A9D5C49D142E5F7F0044ECF7 /* b2PolygonShape.h */,
 				A9D5C49E142E5F7F0044ECF7 /* b2Shape.h */,
 			);
@@ -1657,6 +1664,15 @@
 			path = Rope;
 			sourceTree = "<group>";
 		};
+		A9F6E6AB15A1080D00C86200 /* love */ = {
+			isa = PBXGroup;
+			children = (
+				A9F6E6AC15A1080D00C86200 /* love.cpp */,
+				A9F6E6AD15A1080D00C86200 /* love.h */,
+			);
+			path = love;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -1685,7 +1701,7 @@
 		29B97313FDCFA39411CA2CEA /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0420;
+				LastUpgradeCheck = 0430;
 			};
 			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */;
 			compatibilityVersion = "Xcode 3.2";
@@ -1925,6 +1941,8 @@
 				A9A5BE4B149F0B0200D9931C /* Variant.cpp in Sources */,
 				A9F2D09114BA85EC0035D2A5 /* Audio.cpp in Sources */,
 				A9642D7514D1A66000CE0B02 /* OpenGL.cpp in Sources */,
+				A9F6E6AE15A1080D00C86200 /* love.cpp in Sources */,
+				A9F6E6B115A1099C00C86200 /* GmeDecoder.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1962,13 +1980,12 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
-				FRAMEWORK_SEARCH_PATHS = "";
+				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO;
 				GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
 				GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
@@ -1996,7 +2013,6 @@
 					/Library/Frameworks/SDL.framework/Headers,
 				);
 				INFOPLIST_FILE = "love-Info.plist";
-				LIBRARY_SEARCH_PATHS = "";
 				MACOSX_DEPLOYMENT_TARGET = 10.5;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = "";
@@ -2015,12 +2031,11 @@
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
 				DEPLOYMENT_POSTPROCESSING = NO;
-				FRAMEWORK_SEARCH_PATHS = "";
+				FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_INPUT_FILETYPE = automatic;
 				GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO;
 				GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
 				GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 				GCC_WARN_ABOUT_MISSING_NEWLINE = NO;
 				GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
@@ -2051,14 +2066,12 @@
 				);
 				INFOPLIST_FILE = "love-Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks";
-				LIBRARY_SEARCH_PATHS = "";
 				MACOSX_DEPLOYMENT_TARGET = 10.5;
 				ONLY_ACTIVE_ARCH = NO;
 				OTHER_LDFLAGS = "";
 				PRODUCT_NAME = love;
 				SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "";
 				WARNING_CFLAGS = (
 					"-W",
 					"-Wall",

+ 0 - 315
platform/msvc2008/audio/audio.vcproj

@@ -1,315 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="audio"
-	ProjectGUID="{1E405CDD-5FD7-42E0-BCF1-147305DA3EA0}"
-	RootNamespace="audio"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;AUDIO_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="openal32.lib SDL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;AUDIO_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="openal"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\audio\openal\Audio.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\audio\openal\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\openal\Audio.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\openal\Pool.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\audio\openal\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\openal\Pool.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\openal\Source.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\audio\openal\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\openal\Source.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="null"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\audio\null\Audio.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\audio\null\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\null\Audio.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\null\Source.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\audio\null\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\audio\null\Source.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\audio\Audio.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\audio\Source.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\audio\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\audio\Source.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\audio\wrap_Audio.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\audio\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\audio\wrap_Audio.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\audio\wrap_Source.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\audio\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\audio\wrap_Source.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 400
platform/msvc2008/common/common.vcproj

@@ -1,400 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="common"
-	ProjectGUID="{8273822F-45A4-4BE3-82F3-B8B3223C578C}"
-	RootNamespace="common"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalDependencies="lua5.1.lib"
-				AdditionalLibraryDirectories="..\lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath="..\..\..\src\common\config.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Data.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\EnumMap.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Exception.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Exception.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\math.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Matrix.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Matrix.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\MemoryData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\MemoryData.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Module.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Object.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Object.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Reference.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Reference.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\runtime.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\runtime.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\StringMap.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\types.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\utf8.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\utf8.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Vector.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\Vector.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\version.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\wrap_Data.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\common\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\common\wrap_Data.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 235
platform/msvc2008/event/event.vcproj

@@ -1,235 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="event"
-	ProjectGUID="{62C66448-36CB-4350-9D6E-02F49F05EDB4}"
-	RootNamespace="event"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EVENT_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib SDL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EVENT_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="sdl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\event\sdl\Event.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\event\sdl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\event\sdl\Event.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\event\sdl\wrap_Event.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\event\sdl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\event\sdl\wrap_Event.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\event\Event.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\event\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\event\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\event\Event.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 331
platform/msvc2008/filesystem/filesystem.vcproj

@@ -1,331 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="filesystem"
-	ProjectGUID="{0A2BDA60-43BB-4837-921A-2E4955FD8AEC}"
-	RootNamespace="filesystem"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LOVE_FILESYSTEM_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib physfs.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FILESYSTEM_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="physfs"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\File.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\File.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\Filesystem.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\Filesystem.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\wrap_File.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\wrap_File.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\wrap_FileData.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\wrap_FileData.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\filesystem\physfs\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\filesystem\physfs\wrap_Filesystem.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\filesystem\File.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\filesystem\File.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\filesystem\FileData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\filesystem\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\filesystem\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\filesystem\FileData.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 371
platform/msvc2008/font/font.vcproj

@@ -1,371 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="font"
-	ProjectGUID="{0E3ACF52-EEB5-4E35-8631-43B3E9F4577E}"
-	RootNamespace="font"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FONT_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="freetype.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FONT_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="freetype"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\font\freetype\Font.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\font\freetype\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\font\freetype\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\font\freetype\Font.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\font\freetype\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\font\freetype\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\font\freetype\TrueTypeRasterizer.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\font\freetype\wrap_Font.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\font\freetype\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\font\freetype\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\font\freetype\wrap_Font.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\font\GlyphData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\GlyphData.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\ImageRasterizer.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\ImageRasterizer.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\Rasterizer.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\Rasterizer.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\wrap_GlyphData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\wrap_GlyphData.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\wrap_Rasterizer.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\font\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\font\wrap_Rasterizer.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 661
platform/msvc2008/graphics/graphics.vcproj

@@ -1,661 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="graphics"
-	ProjectGUID="{8A97E9E7-8C48-4C33-A3ED-31487FE58E9E}"
-	RootNamespace="graphics"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GRAPHICS_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="opengl32.lib glu32.lib SDL.lib freetype.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GRAPHICS_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="opengl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\Drawable.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Font.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Font.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\GLee.c"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-						WarningLevel="0"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-						WarningLevel="0"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\GLee.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Glyph.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Glyph.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Graphics.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Graphics.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Image.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Image.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\ImageFont.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\ImageFont.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\ParticleSystem.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\ParticleSystem.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Quad.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\Quad.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\SpriteBatch.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\SpriteBatch.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\TrueTypeFont.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\TrueTypeFont.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Font.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Font.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Glyph.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Glyph.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Graphics.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Graphics.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Image.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Image.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Quad.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_Quad.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\graphics\opengl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Drawable.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Graphics.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\graphics\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Graphics.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Image.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\graphics\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Image.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Volatile.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\graphics\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\graphics\Volatile.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 1
platform/msvc2008/icon.rc

@@ -1 +0,0 @@
-100 ICON "love.ico"

+ 0 - 291
platform/msvc2008/image/image.vcproj

@@ -1,291 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="image"
-	ProjectGUID="{55F35AEA-2D84-4A39-BF98-505106A15FF7}"
-	RootNamespace="image"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMAGE_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib DevIL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMAGE_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="devil"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\image\devil\Image.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\image\devil\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\image\devil\Image.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\image\devil\ImageData.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\image\devil\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\image\devil\ImageData.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\image\EncodedImageData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\image\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\EncodedImageData.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\Image.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\ImageData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\image\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\ImageData.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\wrap_EncodedImageData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\image\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\wrap_Image.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\image\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\wrap_Image.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\wrap_ImageData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\image\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\image\wrap_ImageData.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 219
platform/msvc2008/joystick/joystick.vcproj

@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="joystick"
-	ProjectGUID="{C6C174AC-B339-4A39-A353-CFF523327B53}"
-	RootNamespace="joystick"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EVENT_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib SDL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EVENT_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="sdl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\joystick\sdl\Joystick.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\joystick\sdl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\joystick\sdl\Joystick.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\joystick\sdl\wrap_Joystick.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\joystick\sdl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\joystick\sdl\wrap_Joystick.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\joystick\Joystick.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\joystick\Joystick.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 219
platform/msvc2008/keyboard/keyboard.vcproj

@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="keyboard"
-	ProjectGUID="{F84CE42B-BBA4-4E32-824B-1F2CAD9236C3}"
-	RootNamespace="keyboard"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;KEYBOARD_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib SDL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;KEYBOARD_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="sdl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\keyboard\sdl\Keyboard.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\keyboard\sdlkeyboard\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\keyboard\sdl\Keyboard.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\keyboard\sdl\wrap_Keyboard.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\keyboard\sdlkeyboard\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\keyboard\sdl\wrap_Keyboard.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\keyboard\Keyboard.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\keyboard\Keyboard.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

BIN
platform/msvc2008/love.ico


+ 0 - 163
platform/msvc2008/love.sln

@@ -1,163 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio", "audio\audio.vcproj", "{1E405CDD-5FD7-42E0-BCF1-147305DA3EA0}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-		{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3} = {3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcproj", "{8273822F-45A4-4BE3-82F3-B8B3223C578C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystem", "filesystem\filesystem.vcproj", "{0A2BDA60-43BB-4837-921A-2E4955FD8AEC}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "event", "event\event.vcproj", "{62C66448-36CB-4350-9D6E-02F49F05EDB4}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "image", "image\image.vcproj", "{55F35AEA-2D84-4A39-BF98-505106A15FF7}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC} = {0A2BDA60-43BB-4837-921A-2E4955FD8AEC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "joystick", "joystick\joystick.vcproj", "{C6C174AC-B339-4A39-A353-CFF523327B53}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyboard", "keyboard\keyboard.vcproj", "{F84CE42B-BBA4-4E32-824B-1F2CAD9236C3}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua", "lua\lua.vcproj", "{892D9BD8-F38E-40BC-B4E1-FAEBD59AECDE}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mouse", "mouse\mouse.vcproj", "{88881251-6818-485E-A262-DE1283096589}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "physics", "physics\physics.vcproj", "{39CDF8C8-016D-423E-94BA-7DD798CF0E15}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sound", "sound\sound.vcproj", "{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC} = {0A2BDA60-43BB-4837-921A-2E4955FD8AEC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "timer", "timer\timer.vcproj", "{3DFF2849-C47D-4251-B2AC-E60EDBC29511}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "graphics\graphics.vcproj", "{8A97E9E7-8C48-4C33-A3ED-31487FE58E9E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-		{55F35AEA-2D84-4A39-BF98-505106A15FF7} = {55F35AEA-2D84-4A39-BF98-505106A15FF7}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font", "font\font.vcproj", "{0E3ACF52-EEB5-4E35-8631-43B3E9F4577E}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC} = {0A2BDA60-43BB-4837-921A-2E4955FD8AEC}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "love", "love.vcproj", "{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lovedll", "lovedll\lovedll.vcproj", "{2863FF8A-153F-46E0-8E71-2E58F3809E9B}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thread", "thread\thread.vcproj", "{0BD34470-EB9D-4D37-A398-F46FC97C017A}"
-	ProjectSection(ProjectDependencies) = postProject
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C} = {8273822F-45A4-4BE3-82F3-B8B3223C578C}
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{1E405CDD-5FD7-42E0-BCF1-147305DA3EA0}.Debug|Win32.ActiveCfg = Debug|Win32
-		{1E405CDD-5FD7-42E0-BCF1-147305DA3EA0}.Debug|Win32.Build.0 = Debug|Win32
-		{1E405CDD-5FD7-42E0-BCF1-147305DA3EA0}.Release|Win32.ActiveCfg = Release|Win32
-		{1E405CDD-5FD7-42E0-BCF1-147305DA3EA0}.Release|Win32.Build.0 = Release|Win32
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C}.Debug|Win32.Build.0 = Debug|Win32
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C}.Release|Win32.ActiveCfg = Release|Win32
-		{8273822F-45A4-4BE3-82F3-B8B3223C578C}.Release|Win32.Build.0 = Release|Win32
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC}.Debug|Win32.Build.0 = Debug|Win32
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC}.Release|Win32.ActiveCfg = Release|Win32
-		{0A2BDA60-43BB-4837-921A-2E4955FD8AEC}.Release|Win32.Build.0 = Release|Win32
-		{62C66448-36CB-4350-9D6E-02F49F05EDB4}.Debug|Win32.ActiveCfg = Debug|Win32
-		{62C66448-36CB-4350-9D6E-02F49F05EDB4}.Debug|Win32.Build.0 = Debug|Win32
-		{62C66448-36CB-4350-9D6E-02F49F05EDB4}.Release|Win32.ActiveCfg = Release|Win32
-		{62C66448-36CB-4350-9D6E-02F49F05EDB4}.Release|Win32.Build.0 = Release|Win32
-		{55F35AEA-2D84-4A39-BF98-505106A15FF7}.Debug|Win32.ActiveCfg = Debug|Win32
-		{55F35AEA-2D84-4A39-BF98-505106A15FF7}.Debug|Win32.Build.0 = Debug|Win32
-		{55F35AEA-2D84-4A39-BF98-505106A15FF7}.Release|Win32.ActiveCfg = Release|Win32
-		{55F35AEA-2D84-4A39-BF98-505106A15FF7}.Release|Win32.Build.0 = Release|Win32
-		{C6C174AC-B339-4A39-A353-CFF523327B53}.Debug|Win32.ActiveCfg = Debug|Win32
-		{C6C174AC-B339-4A39-A353-CFF523327B53}.Debug|Win32.Build.0 = Debug|Win32
-		{C6C174AC-B339-4A39-A353-CFF523327B53}.Release|Win32.ActiveCfg = Release|Win32
-		{C6C174AC-B339-4A39-A353-CFF523327B53}.Release|Win32.Build.0 = Release|Win32
-		{F84CE42B-BBA4-4E32-824B-1F2CAD9236C3}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F84CE42B-BBA4-4E32-824B-1F2CAD9236C3}.Debug|Win32.Build.0 = Debug|Win32
-		{F84CE42B-BBA4-4E32-824B-1F2CAD9236C3}.Release|Win32.ActiveCfg = Release|Win32
-		{F84CE42B-BBA4-4E32-824B-1F2CAD9236C3}.Release|Win32.Build.0 = Release|Win32
-		{892D9BD8-F38E-40BC-B4E1-FAEBD59AECDE}.Debug|Win32.ActiveCfg = Debug|Win32
-		{892D9BD8-F38E-40BC-B4E1-FAEBD59AECDE}.Debug|Win32.Build.0 = Debug|Win32
-		{892D9BD8-F38E-40BC-B4E1-FAEBD59AECDE}.Release|Win32.ActiveCfg = Release|Win32
-		{892D9BD8-F38E-40BC-B4E1-FAEBD59AECDE}.Release|Win32.Build.0 = Release|Win32
-		{88881251-6818-485E-A262-DE1283096589}.Debug|Win32.ActiveCfg = Debug|Win32
-		{88881251-6818-485E-A262-DE1283096589}.Debug|Win32.Build.0 = Debug|Win32
-		{88881251-6818-485E-A262-DE1283096589}.Release|Win32.ActiveCfg = Release|Win32
-		{88881251-6818-485E-A262-DE1283096589}.Release|Win32.Build.0 = Release|Win32
-		{39CDF8C8-016D-423E-94BA-7DD798CF0E15}.Debug|Win32.ActiveCfg = Debug|Win32
-		{39CDF8C8-016D-423E-94BA-7DD798CF0E15}.Debug|Win32.Build.0 = Debug|Win32
-		{39CDF8C8-016D-423E-94BA-7DD798CF0E15}.Release|Win32.ActiveCfg = Release|Win32
-		{39CDF8C8-016D-423E-94BA-7DD798CF0E15}.Release|Win32.Build.0 = Release|Win32
-		{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}.Debug|Win32.Build.0 = Debug|Win32
-		{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}.Release|Win32.ActiveCfg = Release|Win32
-		{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}.Release|Win32.Build.0 = Release|Win32
-		{3DFF2849-C47D-4251-B2AC-E60EDBC29511}.Debug|Win32.ActiveCfg = Debug|Win32
-		{3DFF2849-C47D-4251-B2AC-E60EDBC29511}.Debug|Win32.Build.0 = Debug|Win32
-		{3DFF2849-C47D-4251-B2AC-E60EDBC29511}.Release|Win32.ActiveCfg = Release|Win32
-		{3DFF2849-C47D-4251-B2AC-E60EDBC29511}.Release|Win32.Build.0 = Release|Win32
-		{8A97E9E7-8C48-4C33-A3ED-31487FE58E9E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{8A97E9E7-8C48-4C33-A3ED-31487FE58E9E}.Debug|Win32.Build.0 = Debug|Win32
-		{8A97E9E7-8C48-4C33-A3ED-31487FE58E9E}.Release|Win32.ActiveCfg = Release|Win32
-		{8A97E9E7-8C48-4C33-A3ED-31487FE58E9E}.Release|Win32.Build.0 = Release|Win32
-		{0E3ACF52-EEB5-4E35-8631-43B3E9F4577E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0E3ACF52-EEB5-4E35-8631-43B3E9F4577E}.Debug|Win32.Build.0 = Debug|Win32
-		{0E3ACF52-EEB5-4E35-8631-43B3E9F4577E}.Release|Win32.ActiveCfg = Release|Win32
-		{0E3ACF52-EEB5-4E35-8631-43B3E9F4577E}.Release|Win32.Build.0 = Release|Win32
-		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Debug|Win32.ActiveCfg = Debug|Win32
-		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Debug|Win32.Build.0 = Debug|Win32
-		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Release|Win32.ActiveCfg = Release|Win32
-		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Release|Win32.Build.0 = Release|Win32
-		{2863FF8A-153F-46E0-8E71-2E58F3809E9B}.Debug|Win32.ActiveCfg = Debug|Win32
-		{2863FF8A-153F-46E0-8E71-2E58F3809E9B}.Debug|Win32.Build.0 = Debug|Win32
-		{2863FF8A-153F-46E0-8E71-2E58F3809E9B}.Release|Win32.ActiveCfg = Release|Win32
-		{2863FF8A-153F-46E0-8E71-2E58F3809E9B}.Release|Win32.Build.0 = Release|Win32
-		{0BD34470-EB9D-4D37-A398-F46FC97C017A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{0BD34470-EB9D-4D37-A398-F46FC97C017A}.Debug|Win32.Build.0 = Debug|Win32
-		{0BD34470-EB9D-4D37-A398-F46FC97C017A}.Release|Win32.ActiveCfg = Release|Win32
-		{0BD34470-EB9D-4D37-A398-F46FC97C017A}.Release|Win32.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

+ 0 - 4052
platform/msvc2008/love.vcproj

@@ -1,4052 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="love"
-	ProjectGUID="{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}"
-	RootNamespace="love"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="include;include\SDL;include\AL;..\..\src;..\..\src\modules"
-				PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;LOVE_DEBUG;FLAC__NO_DLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="true"
-				RuntimeTypeInfo="false"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static_d.lib libFLAC++_static_d.lib kernel32.lib"
-				AdditionalLibraryDirectories="lib;Debug"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				AdditionalIncludeDirectories="include;include\SDL;include\AL;..\..\src;..\..\src\modules"
-				PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FLAC__NO_DLL"
-				RuntimeLibrary="0"
-				EnableFunctionLevelLinking="true"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static.lib libFLAC++_static.lib"
-				AdditionalLibraryDirectories="lib;lib/r;Release"
-				GenerateDebugInformation="false"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="modules"
-			>
-			<Filter
-				Name="audio"
-				>
-				<File
-					RelativePath="..\..\src\modules\audio\Audible.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\Audio.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\Source.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\audio\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\audio\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\Source.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\wrap_Audio.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\audio\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\audio\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\wrap_Audio.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\wrap_Source.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\audio\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\audio\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\audio\wrap_Source.h"
-					>
-				</File>
-				<Filter
-					Name="openal"
-					>
-					<File
-						RelativePath="..\..\src\modules\audio\openal\Audio.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\openal\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\openal\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\openal\Audio.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\openal\Pool.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\openal\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\openal\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\openal\Pool.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\openal\Source.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\openal\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\openal\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\openal\Source.h"
-						>
-					</File>
-				</Filter>
-				<Filter
-					Name="null"
-					>
-					<File
-						RelativePath="..\..\src\modules\audio\null\Audio.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\null\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\null\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\null\Audio.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\null\Source.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\null\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\audio\null\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\audio\null\Source.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="event"
-				>
-				<File
-					RelativePath="..\..\src\modules\event\Event.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\event\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\event\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\event\Event.h"
-					>
-				</File>
-				<Filter
-					Name="sdl"
-					>
-					<File
-						RelativePath="..\..\src\modules\event\sdl\Event.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\event\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\event\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\event\sdl\Event.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\event\sdl\wrap_Event.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\event\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\event\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\event\sdl\wrap_Event.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="filesystem"
-				>
-				<File
-					RelativePath="..\..\src\modules\filesystem\File.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\filesystem\File.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\filesystem\FileData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\filesystem\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\filesystem\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\filesystem\FileData.h"
-					>
-				</File>
-				<Filter
-					Name="physfs"
-					>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\File.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\File.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\Filesystem.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\Filesystem.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\wrap_File.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\wrap_File.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\wrap_FileData.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\wrap_FileData.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\filesystem\physfs\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\filesystem\physfs\wrap_Filesystem.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="graphics"
-				>
-				<File
-					RelativePath="..\..\src\modules\graphics\Drawable.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\graphics\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\graphics\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Drawable.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Graphics.cpp"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Graphics.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Image.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\graphics\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\graphics\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Image.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Volatile.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\graphics\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\graphics\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\graphics\Volatile.h"
-					>
-				</File>
-				<Filter
-					Name="opengl"
-					>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Font.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Font.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Framebuffer.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Framebuffer.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\GLee.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-								WarningLevel="0"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-								WarningLevel="0"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\GLee.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Glyph.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Glyph.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Graphics.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Graphics.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Image.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Image.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\ParticleSystem.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\ParticleSystem.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Quad.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\Quad.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\SpriteBatch.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\SpriteBatch.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Framebuffer.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Framebuffer.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Glyph.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Glyph.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Graphics.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Image.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Image.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Quad.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_Quad.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\graphics\opengl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="image"
-				>
-				<File
-					RelativePath="..\..\src\modules\image\EncodedImageData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\EncodedImageData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\Image.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\ImageData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\ImageData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\wrap_EncodedImageData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\wrap_Image.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\wrap_Image.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\wrap_ImageData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\image\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\image\wrap_ImageData.h"
-					>
-				</File>
-				<Filter
-					Name="devil"
-					>
-					<File
-						RelativePath="..\..\src\modules\image\devil\Image.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\image\devil\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\image\devil\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\image\devil\Image.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\image\devil\ImageData.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\image\devil\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\image\devil\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\image\devil\ImageData.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="joystick"
-				>
-				<File
-					RelativePath="..\..\src\modules\joystick\Joystick.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\joystick\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\joystick\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\joystick\Joystick.h"
-					>
-				</File>
-				<Filter
-					Name="sdl"
-					>
-					<File
-						RelativePath="..\..\src\modules\joystick\sdl\Joystick.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\joystick\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\joystick\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\joystick\sdl\Joystick.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\joystick\sdl\wrap_Joystick.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\joystick\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\joystick\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\joystick\sdl\wrap_Joystick.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="keyboard"
-				>
-				<File
-					RelativePath="..\..\src\modules\keyboard\Keyboard.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\keyboard\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\keyboard\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\keyboard\Keyboard.h"
-					>
-				</File>
-				<Filter
-					Name="sdl"
-					>
-					<File
-						RelativePath="..\..\src\modules\keyboard\sdl\Keyboard.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\keyboard\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\keyboard\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\keyboard\sdl\Keyboard.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\keyboard\sdl\wrap_Keyboard.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\keyboard\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\keyboard\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\keyboard\sdl\wrap_Keyboard.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="mouse"
-				>
-				<File
-					RelativePath="..\..\src\modules\mouse\Mouse.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\mouse\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\mouse\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\mouse\Mouse.h"
-					>
-				</File>
-				<Filter
-					Name="sdl"
-					>
-					<File
-						RelativePath="..\..\src\modules\mouse\sdl\Mouse.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\mouse\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\mouse\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\mouse\sdl\Mouse.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\mouse\sdl\wrap_Mouse.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\mouse\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\mouse\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\mouse\sdl\wrap_Mouse.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="physics"
-				>
-				<File
-					RelativePath="..\..\src\modules\physics\Joint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\physics\Joint.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\physics\Shape.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\physics\Shape.h"
-					>
-				</File>
-				<Filter
-					Name="box2d"
-					>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Body.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Body.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\CircleShape.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\CircleShape.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Contact.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Contact.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\DistanceJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\DistanceJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\GearJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\GearJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Joint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Joint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\MouseJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\MouseJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Physics.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Physics.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\PolygonShape.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\PolygonShape.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\PrismaticJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\PrismaticJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\PulleyJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\PulleyJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\RevoluteJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\RevoluteJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Shape.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\Shape.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\World.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\World.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Body.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Body.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_CircleShape.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_CircleShape.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Contact.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Contact.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_DistanceJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_GearJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_GearJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Joint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Joint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_MouseJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Physics.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Physics.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_PolygonShape.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_PulleyJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Shape.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_Shape.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_World.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\physics\box2d\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\physics\box2d\wrap_World.h"
-						>
-					</File>
-					<Filter
-						Name="libbox2d"
-						>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2BlockAllocator.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2Body.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2BroadPhase.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2CircleContact.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2CircleShape.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2CollideCircle.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2CollidePoly.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2Collision.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2Contact.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2ContactManager.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2ContactSolver.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2Distance.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2DistanceJoint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2GearJoint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2Island.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2Joint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2Math.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2MouseJoint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2PairManager.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2PolyAndCircleContact.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2PolyContact.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2PolygonShape.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2PrismaticJoint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2PulleyJoint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2RevoluteJoint.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2Settings.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2Shape.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2StackAllocator.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2TimeOfImpact.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2World.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2WorldCallbacks.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
-								/>
-							</FileConfiguration>
-						</File>
-					</Filter>
-					<Filter
-						Name="graham"
-						>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\graham\GrahamScanConvexHull.cpp"
-							>
-							<FileConfiguration
-								Name="Debug|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\graham\"
-								/>
-							</FileConfiguration>
-							<FileConfiguration
-								Name="Release|Win32"
-								>
-								<Tool
-									Name="VCCLCompilerTool"
-									ObjectFile="$(IntDir)\physics\graham\"
-								/>
-							</FileConfiguration>
-						</File>
-						<File
-							RelativePath="..\..\src\modules\physics\box2d\graham\GrahamScanConvexHull.h"
-							>
-						</File>
-					</Filter>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="sound"
-				>
-				<File
-					RelativePath="..\..\src\modules\sound\Decoder.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\Sound.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\Sound.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\SoundData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\SoundData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\wrap_Decoder.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\wrap_Decoder.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\wrap_Sound.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\wrap_Sound.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\wrap_SoundData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\sound\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\sound\wrap_SoundData.h"
-					>
-				</File>
-				<Filter
-					Name="lullaby"
-					>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\Decoder.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\Decoder.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\FLACDecoder.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\FLACDecoder.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\ModPlugDecoder.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\Mpg123Decoder.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\Sound.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\Sound.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\sound\lullaby\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\sound\lullaby\VorbisDecoder.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="timer"
-				>
-				<Filter
-					Name="sdl"
-					>
-					<File
-						RelativePath="..\..\src\modules\timer\sdl\Timer.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\timer\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\timer\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\timer\sdl\Timer.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\timer\sdl\wrap_Timer.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\timer\sdl\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\timer\sdl\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\timer\sdl\wrap_Timer.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="thread"
-				>
-				<File
-					RelativePath="..\..\src\modules\thread\ThreadModule.h"
-					>
-				</File>
-				<Filter
-					Name="sdl"
-					>
-					<File
-						RelativePath="..\..\src\modules\thread\sdl\Thread.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\thread\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\thread\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\thread\sdl\Thread.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\thread\sdl\wrap_Thread.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\thread\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\thread\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\thread\sdl\wrap_Thread.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-			<Filter
-				Name="font"
-				>
-				<File
-					RelativePath="..\..\src\modules\font\Font.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\FontData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\FontData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\GlyphData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\GlyphData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\ImageRasterizer.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\ImageRasterizer.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\Rasterizer.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\Rasterizer.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\wrap_FontData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\wrap_FontData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\wrap_GlyphData.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\wrap_GlyphData.h"
-					>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\wrap_Rasterizer.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\font\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\modules\font\wrap_Rasterizer.h"
-					>
-				</File>
-				<Filter
-					Name="freetype"
-					>
-					<File
-						RelativePath="..\..\src\modules\font\freetype\Font.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\font\freetype\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\font\freetype\Font.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\font\freetype\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\font\freetype\TrueTypeRasterizer.h"
-						>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\font\freetype\wrap_Font.cpp"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\font\freetype\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\modules\font\freetype\wrap_Font.h"
-						>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="common"
-			>
-			<File
-				RelativePath="..\..\src\common\b64.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\config.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Data.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\EnumMap.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Exception.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Exception.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\math.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Matrix.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Matrix.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\MemoryData.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\MemoryData.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Module.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Object.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Object.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Reference.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Reference.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\runtime.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\runtime.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\StringMap.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\types.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\utf8.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\utf8.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Vector.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\Vector.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\version.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common\wrap_Data.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\common\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\src\common\wrap_Data.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="libraries"
-			>
-			<Filter
-				Name="luasocket"
-				>
-				<File
-					RelativePath="..\..\src\libraries\luasocket\luasocket.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\libraries\luasocket\"
-						/>
-					</FileConfiguration>
-					<FileConfiguration
-						Name="Release|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\libraries\luasocket\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\src\libraries\luasocket\luasocket.h"
-					>
-				</File>
-				<Filter
-					Name="libluasocket"
-					>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\auxiliar.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\buffer.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\except.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\inet.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\io.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\luasocket.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\mime.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\options.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\select.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\tcp.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\timeout.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\udp.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-					<File
-						RelativePath="..\..\src\libraries\luasocket\libluasocket\wsocket.c"
-						>
-						<FileConfiguration
-							Name="Debug|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-						<FileConfiguration
-							Name="Release|Win32"
-							>
-							<Tool
-								Name="VCCLCompilerTool"
-								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
-							/>
-						</FileConfiguration>
-					</File>
-				</Filter>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="scripts"
-			>
-		</Filter>
-		<File
-			RelativePath=".\icon.rc"
-			>
-		</File>
-		<File
-			RelativePath="..\..\src\love.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\love\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 221
platform/msvc2008/lovedll/lovedll.vcproj

@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="lovedll"
-	ProjectGUID="{2863FF8A-153F-46E0-8E71-2E58F3809E9B}"
-	RootNamespace="lovedll"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LOVEDLL_EXPORTS;LOVE_BUILD;LOVE_BUILD_DLL"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\love.dll"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LOVEDLL_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="resources"
-			>
-			<File
-				RelativePath="..\..\..\src\resources\resources.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\lovedll\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\lovedll\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\resources\resources.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\love.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\lovedll\"
-				/>
-			</FileConfiguration>
-			<FileConfiguration
-				Name="Release|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\lovedll\"
-				/>
-			</FileConfiguration>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 393
platform/msvc2008/lua/lua.c

@@ -1,393 +0,0 @@
-/*
-** $Id: lua.c,v 1.160.1.2 2007/12/28 15:32:23 roberto Exp $
-** Lua stand-alone interpreter
-** See Copyright Notice in lua.h
-*/
-
-
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define lua_c
-
-#include "lua.h"
-
-#include "lauxlib.h"
-#include "lualib.h"
-
-
-
-static lua_State *globalL = NULL;
-
-static const char *progname = LUA_PROGNAME;
-
-
-
-static void lstop (lua_State *L, lua_Debug *ar) {
-  (void)ar;  /* unused arg. */
-  lua_sethook(L, NULL, 0, 0);
-  luaL_error(L, "interrupted!");
-}
-
-
-static void laction (int i) {
-  signal(i, SIG_DFL); /* if another SIGINT happens before lstop,
-                              terminate process (default action) */
-  lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1);
-}
-
-
-static void print_usage (void) {
-  fprintf(stderr,
-  "usage: %s [options] [script [args]].\n"
-  "Available options are:\n"
-  "  -e stat  execute string " LUA_QL("stat") "\n"
-  "  -l name  require library " LUA_QL("name") "\n"
-  "  -i       enter interactive mode after executing " LUA_QL("script") "\n"
-  "  -v       show version information\n"
-  "  --       stop handling options\n"
-  "  -        execute stdin and stop handling options\n"
-  ,
-  progname);
-  fflush(stderr);
-}
-
-
-static void l_message (const char *pname, const char *msg) {
-  if (pname) fprintf(stderr, "%s: ", pname);
-  fprintf(stderr, "%s\n", msg);
-  fflush(stderr);
-}
-
-
-static int report (lua_State *L, int status) {
-  if (status && !lua_isnil(L, -1)) {
-    const char *msg = lua_tostring(L, -1);
-    if (msg == NULL) msg = "(error object is not a string)";
-    l_message(progname, msg);
-    lua_pop(L, 1);
-  }
-  return status;
-}
-
-
-static int traceback (lua_State *L) {
-  if (!lua_isstring(L, 1))  /* 'message' not a string? */
-    return 1;  /* keep it intact */
-  lua_getfield(L, LUA_GLOBALSINDEX, "debug");
-  if (!lua_istable(L, -1)) {
-    lua_pop(L, 1);
-    return 1;
-  }
-  lua_getfield(L, -1, "traceback");
-  if (!lua_isfunction(L, -1)) {
-    lua_pop(L, 2);
-    return 1;
-  }
-  lua_pushvalue(L, 1);  /* pass error message */
-  lua_pushinteger(L, 2);  /* skip this function and traceback */
-  lua_call(L, 2, 1);  /* call debug.traceback */
-  return 1;
-}
-
-
-static int docall (lua_State *L, int narg, int clear) {
-  int status;
-  int base = lua_gettop(L) - narg;  /* function index */
-  lua_pushcfunction(L, traceback);  /* push traceback function */
-  lua_insert(L, base);  /* put it under chunk and args */
-  signal(SIGINT, laction);
-  status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base);
-  signal(SIGINT, SIG_DFL);
-  lua_remove(L, base);  /* remove traceback function */
-  /* force a complete garbage collection in case of errors */
-  if (status != 0) lua_gc(L, LUA_GCCOLLECT, 0);
-  return status;
-}
-
-
-static void print_version (void) {
-  l_message(NULL, LUA_RELEASE "  " LUA_COPYRIGHT);
-}
-
-
-static int getargs (lua_State *L, char **argv, int n) {
-  int narg;
-  int i;
-  int argc = 0;
-  while (argv[argc]) argc++;  /* count total number of arguments */
-  narg = argc - (n + 1);  /* number of arguments to the script */
-  luaL_checkstack(L, narg + 3, "too many arguments to script");
-  for (i=n+1; i < argc; i++)
-    lua_pushstring(L, argv[i]);
-  lua_createtable(L, narg, n + 1);
-  for (i=0; i < argc; i++) {
-    lua_pushstring(L, argv[i]);
-    lua_rawseti(L, -2, i - n);
-  }
-  return narg;
-}
-
-
-static int dofile (lua_State *L, const char *name) {
-  int status = luaL_loadfile(L, name) || docall(L, 0, 1);
-  return report(L, status);
-}
-
-
-static int dostring (lua_State *L, const char *s, const char *name) {
-  int status = luaL_loadbuffer(L, s, strlen(s), name) || docall(L, 0, 1);
-  return report(L, status);
-}
-
-
-static int dolibrary (lua_State *L, const char *name) {
-  lua_getglobal(L, "require");
-  lua_pushstring(L, name);
-  return report(L, docall(L, 1, 1));
-}
-
-
-static const char *get_prompt (lua_State *L, int firstline) {
-  const char *p;
-  lua_getfield(L, LUA_GLOBALSINDEX, firstline ? "_PROMPT" : "_PROMPT2");
-  p = lua_tostring(L, -1);
-  if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);
-  lua_pop(L, 1);  /* remove global */
-  return p;
-}
-
-
-static int incomplete (lua_State *L, int status) {
-  if (status == LUA_ERRSYNTAX) {
-    size_t lmsg;
-    const char *msg = lua_tolstring(L, -1, &lmsg);
-    const char *tp = msg + lmsg - (sizeof(LUA_QL("<eof>")) - 1);
-    if (strstr(msg, LUA_QL("<eof>")) == tp) {
-      lua_pop(L, 1);
-      return 1;
-    }
-  }
-  return 0;  /* else... */
-}
-
-
-static int pushline (lua_State *L, int firstline) {
-  char buffer[LUA_MAXINPUT];
-  char *b = buffer;
-  size_t l;
-  const char *prmt = get_prompt(L, firstline);
-  if (lua_readline(L, b, prmt) == 0)
-    return 0;  /* no input */
-  l = strlen(b);
-  if (l > 0 && b[l-1] == '\n')  /* line ends with newline? */
-    b[l-1] = '\0';  /* remove it */
-  if (firstline && b[0] == '=')  /* first line starts with `=' ? */
-    lua_pushfstring(L, "return %s", b+1);  /* change it to `return' */
-  else
-    lua_pushstring(L, b);
-  lua_freeline(L, b);
-  return 1;
-}
-
-
-static int loadline (lua_State *L) {
-  int status;
-  lua_settop(L, 0);
-  if (!pushline(L, 1))
-    return -1;  /* no input */
-  for (;;) {  /* repeat until gets a complete line */
-    status = luaL_loadbuffer(L, lua_tostring(L, 1), lua_strlen(L, 1), "=stdin");
-    if (!incomplete(L, status)) break;  /* cannot try to add lines? */
-    if (!pushline(L, 0))  /* no more input? */
-      return -1;
-    lua_pushliteral(L, "\n");  /* add a new line... */
-    lua_insert(L, -2);  /* ...between the two lines */
-    lua_concat(L, 3);  /* join them */
-  }
-  lua_saveline(L, 1);
-  lua_remove(L, 1);  /* remove line */
-  return status;
-}
-
-
-static void dotty (lua_State *L) {
-  int status;
-  const char *oldprogname = progname;
-  progname = NULL;
-  while ((status = loadline(L)) != -1) {
-    if (status == 0) status = docall(L, 0, 0);
-    report(L, status);
-    if (status == 0 && lua_gettop(L) > 0) {  /* any result to print? */
-      lua_getglobal(L, "print");
-      lua_insert(L, 1);
-      if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != 0)
-        l_message(progname, lua_pushfstring(L,
-                               "error calling " LUA_QL("print") " (%s)",
-                               lua_tostring(L, -1)));
-    }
-  }
-  lua_settop(L, 0);  /* clear stack */
-  fputs("\n", stdout);
-  fflush(stdout);
-  progname = oldprogname;
-}
-
-
-static int handle_script (lua_State *L, char **argv, int n) {
-  int status;
-  const char *fname;
-  int narg = getargs(L, argv, n);  /* collect arguments */
-  lua_setglobal(L, "arg");
-  fname = argv[n];
-  if (strcmp(fname, "-") == 0 && strcmp(argv[n-1], "--") != 0) 
-    fname = NULL;  /* stdin */
-  status = luaL_loadfile(L, fname);
-  lua_insert(L, -(narg+1));
-  if (status == 0)
-    status = docall(L, narg, 0);
-  else
-    lua_pop(L, narg);      
-  return report(L, status);
-}
-
-
-/* check that argument has no extra characters at the end */
-#define notail(x)	{if ((x)[2] != '\0') return -1;}
-
-
-static int collectargs (char **argv, int *pi, int *pv, int *pe) {
-  int i;
-  for (i = 1; argv[i] != NULL; i++) {
-    if (argv[i][0] != '-')  /* not an option? */
-        return i;
-    switch (argv[i][1]) {  /* option */
-      case '-':
-        notail(argv[i]);
-        return (argv[i+1] != NULL ? i+1 : 0);
-      case '\0':
-        return i;
-      case 'i':
-        notail(argv[i]);
-        *pi = 1;  /* go through */
-      case 'v':
-        notail(argv[i]);
-        *pv = 1;
-        break;
-      case 'e':
-        *pe = 1;  /* go through */
-      case 'l':
-        if (argv[i][2] == '\0') {
-          i++;
-          if (argv[i] == NULL) return -1;
-        }
-        break;
-      default: return -1;  /* invalid option */
-    }
-  }
-  return 0;
-}
-
-
-static int runargs (lua_State *L, char **argv, int n) {
-  int i;
-  for (i = 1; i < n; i++) {
-    if (argv[i] == NULL) continue;
-    lua_assert(argv[i][0] == '-');
-    switch (argv[i][1]) {  /* option */
-      case 'e': {
-        const char *chunk = argv[i] + 2;
-        if (*chunk == '\0') chunk = argv[++i];
-        lua_assert(chunk != NULL);
-        if (dostring(L, chunk, "=(command line)") != 0)
-          return 1;
-        break;
-      }
-      case 'l': {
-        const char *filename = argv[i] + 2;
-        if (*filename == '\0') filename = argv[++i];
-        lua_assert(filename != NULL);
-        if (dolibrary(L, filename))
-          return 1;  /* stop if file fails */
-        break;
-      }
-      default: break;
-    }
-  }
-  return 0;
-}
-
-
-static int handle_luainit (lua_State *L) {
-  const char *init = getenv(LUA_INIT);
-  if (init == NULL) return 0;  /* status OK */
-  else if (init[0] == '@')
-    return dofile(L, init+1);
-  else
-    return dostring(L, init, "=" LUA_INIT);
-}
-
-
-struct Smain {
-  int argc;
-  char **argv;
-  int status;
-};
-
-
-static int pmain (lua_State *L) {
-  struct Smain *s = (struct Smain *)lua_touserdata(L, 1);
-  char **argv = s->argv;
-  int script;
-  int has_i = 0, has_v = 0, has_e = 0;
-  globalL = L;
-  if (argv[0] && argv[0][0]) progname = argv[0];
-  lua_gc(L, LUA_GCSTOP, 0);  /* stop collector during initialization */
-  luaL_openlibs(L);  /* open libraries */
-  lua_gc(L, LUA_GCRESTART, 0);
-  s->status = handle_luainit(L);
-  if (s->status != 0) return 0;
-  script = collectargs(argv, &has_i, &has_v, &has_e);
-  if (script < 0) {  /* invalid args? */
-    print_usage();
-    s->status = 1;
-    return 0;
-  }
-  if (has_v) print_version();
-  s->status = runargs(L, argv, (script > 0) ? script : s->argc);
-  if (s->status != 0) return 0;
-  if (script)
-    s->status = handle_script(L, argv, script);
-  if (s->status != 0) return 0;
-  if (has_i)
-    dotty(L);
-  else if (script == 0 && !has_e && !has_v) {
-    if (lua_stdin_is_tty()) {
-      print_version();
-      dotty(L);
-    }
-    else dofile(L, NULL);  /* executes stdin as a file */
-  }
-  return 0;
-}
-
-
-int main (int argc, char **argv) {
-  int status;
-  struct Smain s;
-  lua_State *L = lua_open();  /* create state */
-  if (L == NULL) {
-    l_message(argv[0], "cannot create state: not enough memory");
-    return EXIT_FAILURE;
-  }
-  s.argc = argc;
-  s.argv = argv;
-  status = lua_cpcall(L, &pmain, &s);
-  report(L, status);
-  lua_close(L);
-  getchar();
-  return (status || s.status) ? EXIT_FAILURE : EXIT_SUCCESS;
-}
-

+ 0 - 178
platform/msvc2008/lua/lua.vcproj

@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="lua"
-	ProjectGUID="{892D9BD8-F38E-40BC-B4E1-FAEBD59AECDE}"
-	RootNamespace="lua"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="1"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<File
-			RelativePath=".\lua.c"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 219
platform/msvc2008/mouse/mouse.vcproj

@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="mouse"
-	ProjectGUID="{88881251-6818-485E-A262-DE1283096589}"
-	RootNamespace="mouse"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOUSE_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib SDL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOUSE_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="sdl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\mouse\sdl\Mouse.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\mouse\sdlmouse\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\mouse\sdl\Mouse.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\mouse\sdl\wrap_Mouse.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\mouse\sdlmouse\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\mouse\sdl\wrap_Mouse.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\mouse\Mouse.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\mouse\Mouse.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 1263
platform/msvc2008/physics/physics.vcproj

@@ -1,1263 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="physics"
-	ProjectGUID="{39CDF8C8-016D-423E-94BA-7DD798CF0E15}"
-	RootNamespace="physics"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PHYSICS_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PHYSICS_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="box2d"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Body.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Body.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\CircleShape.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\CircleShape.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Contact.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Contact.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\DistanceJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\DistanceJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\GearJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\GearJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Joint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Joint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\MouseJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\MouseJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Physics.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Physics.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\PolygonShape.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\PolygonShape.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\PrismaticJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\PrismaticJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\PulleyJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\PulleyJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\RevoluteJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\RevoluteJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Shape.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\Shape.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\World.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\World.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Body.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Body.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_CircleShape.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_CircleShape.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Contact.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Contact.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_DistanceJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_GearJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_GearJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Joint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Joint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_MouseJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Physics.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Physics.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_PolygonShape.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_PulleyJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Shape.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_Shape.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_World.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\physics\box2d\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\physics\box2d\wrap_World.h"
-				>
-			</File>
-			<Filter
-				Name="lib"
-				>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Common\b2BlockAllocator.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\b2Body.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2BroadPhase.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2CircleContact.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2CircleShape.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2CollideCircle.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2CollidePoly.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2Collision.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2Contact.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\b2ContactManager.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2ContactSolver.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2Distance.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2DistanceJoint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2GearJoint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\b2Island.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2Joint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Common\b2Math.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2MouseJoint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2PairManager.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2PolyAndCircleContact.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2PolyContact.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2PolygonShape.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2PrismaticJoint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2PulleyJoint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2RevoluteJoint.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Common\b2Settings.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2Shape.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Common\b2StackAllocator.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Collision\b2TimeOfImpact.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\b2World.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\Source\Dynamics\b2WorldCallbacks.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\lib\"
-						/>
-					</FileConfiguration>
-				</File>
-			</Filter>
-			<Filter
-				Name="graham"
-				>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\graham\GrahamScanConvexHull.cpp"
-					>
-					<FileConfiguration
-						Name="Debug|Win32"
-						>
-						<Tool
-							Name="VCCLCompilerTool"
-							ObjectFile="$(IntDir)\physics\box2d\graham\"
-						/>
-					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\..\src\modules\physics\box2d\graham\GrahamScanConvexHull.h"
-					>
-				</File>
-			</Filter>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\physics\Joint.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\physics\Joint.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\physics\Shape.cpp"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\physics\Shape.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 343
platform/msvc2008/sound/sound.vcproj

@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="sound"
-	ProjectGUID="{3D59D1E2-2682-4317-BB8D-D85E9BBC02E3}"
-	RootNamespace="sound"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SOUND_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SOUND_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="lullaby"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\Decoder.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\sound\lullaby\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\Decoder.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\sound\lullaby\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\ModPlugDecoder.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\sound\lullaby\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\Mpg123Decoder.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\Sound.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\sound\lullaby\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\Sound.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\VorbisDecoder.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\sound\lullaby\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\sound\lullaby\VorbisDecoder.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\sound\Decoder.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\Sound.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\sound\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\Sound.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\SoundData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\sound\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\SoundData.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\wrap_Decoder.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\sound\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\wrap_Decoder.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\wrap_Sound.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\sound\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\wrap_Sound.h"
-			>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\wrap_SoundData.cpp"
-			>
-			<FileConfiguration
-				Name="Debug|Win32"
-				>
-				<Tool
-					Name="VCCLCompilerTool"
-					ObjectFile="$(IntDir)\sound\"
-				/>
-			</FileConfiguration>
-		</File>
-		<File
-			RelativePath="..\..\..\src\modules\sound\wrap_SoundData.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 215
platform/msvc2008/thread/thread.vcproj

@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="thread"
-	ProjectGUID="{0BD34470-EB9D-4D37-A398-F46FC97C017A}"
-	RootNamespace="thread"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;LOVE_BUILD"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib SDL.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="1"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="sdl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\thread\sdl\Thread.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\thread\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\thread\sdl\Thread.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\thread\sdl\wrap_Thread.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\thread\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\thread\sdl\wrap_Thread.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath="..\..\..\src\modules\thread\ThreadModule.h"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

+ 0 - 211
platform/msvc2008/timer/timer.vcproj

@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="9,00"
-	Name="timer"
-	ProjectGUID="{3DFF2849-C47D-4251-B2AC-E60EDBC29511}"
-	RootNamespace="timer"
-	Keyword="Win32Proj"
-	TargetFrameworkVersion="196613"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="../include;../../../src;../../../src/modules;../include/SDL"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EVENT_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="lua5.1.lib SDL.lib kernel32.lib"
-				OutputFile="$(OutDir)\love\$(ProjectName).dll"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\lib"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="2"
-				EnableIntrinsicFunctions="true"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EVENT_EXPORTS"
-				RuntimeLibrary="2"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="sdl"
-			>
-			<File
-				RelativePath="..\..\..\src\modules\timer\sdl\Timer.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\timer\sdl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\timer\sdl\Timer.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\timer\sdl\wrap_Timer.cpp"
-				>
-				<FileConfiguration
-					Name="Debug|Win32"
-					>
-					<Tool
-						Name="VCCLCompilerTool"
-						ObjectFile="$(IntDir)\timer\sdl\"
-					/>
-				</FileConfiguration>
-			</File>
-			<File
-				RelativePath="..\..\..\src\modules\timer\sdl\wrap_Timer.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>

BIN
platform/msvc2010/app.rc


+ 734 - 0
platform/msvc2010/liblove.vcxproj

@@ -0,0 +1,734 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug Dynamic|Win32">
+      <Configuration>Debug Dynamic</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug Dynamic|x64">
+      <Configuration>Debug Dynamic</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Dynamic|Win32">
+      <Configuration>Release Dynamic</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Dynamic|x64">
+      <Configuration>Release Dynamic</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Static|Win32">
+      <Configuration>Release Static</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Static|x64">
+      <Configuration>Release Static</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}</ProjectGuid>
+    <RootNamespace>liblove</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>Windows7.1SDK</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <OutDir>$(SolutionDir)\$(PlatformShortName)\$(Configuration)</OutDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <OutDir>$(SolutionDir)\$(PlatformShortName)\$(Configuration)</OutDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <IntDir>$(ProjectName)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <IntDir>$(ProjectName)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Debug\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Debug\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Debug\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Debug\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MT\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MT\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <ObjectFileName>$(IntDir)obj\obj\obj\%(RelativeDir)</ObjectFileName>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>
+      </IgnoreAllDefaultLibraries>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Debug\MD\</AdditionalLibraryDirectories>
+    </Link>
+    <ResourceCompile>
+      <PreprocessorDefinitions>LOVE_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <ObjectFileName>$(IntDir)obj\obj\obj\%(RelativeDir)</ObjectFileName>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>
+      </IgnoreAllDefaultLibraries>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Debug\MD\</AdditionalLibraryDirectories>
+    </Link>
+    <ResourceCompile>
+      <PreprocessorDefinitions>LOVE_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <OmitFramePointers>true</OmitFramePointers>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <ObjectFileName>$(IntDir)obj\obj\obj\%(RelativeDir)</ObjectFileName>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+    <ResourceCompile>
+      <PreprocessorDefinitions>LOVE_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+    <Lib>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <OmitFramePointers>true</OmitFramePointers>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <ObjectFileName>$(IntDir)obj\obj\obj\%(RelativeDir)</ObjectFileName>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+    <ResourceCompile>
+      <PreprocessorDefinitions>LOVE_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+    <Lib>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <OmitFramePointers>true</OmitFramePointers>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <ObjectFileName>$(IntDir)obj\obj\obj\%(RelativeDir)</ObjectFileName>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>
+      </IgnoreAllDefaultLibraries>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Release\MD\</AdditionalLibraryDirectories>
+    </Link>
+    <ResourceCompile>
+      <PreprocessorDefinitions>LOVE_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <OmitFramePointers>true</OmitFramePointers>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <ObjectFileName>$(IntDir)obj\obj\obj\%(RelativeDir)</ObjectFileName>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalDependencies>kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>
+      </IgnoreAllDefaultLibraries>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Release\MD\</AdditionalLibraryDirectories>
+    </Link>
+    <ResourceCompile>
+      <PreprocessorDefinitions>LOVE_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ResourceCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\common\b64.cpp" />
+    <ClCompile Include="..\..\src\common\delay.cpp" />
+    <ClCompile Include="..\..\src\common\Exception.cpp" />
+    <ClCompile Include="..\..\src\common\Matrix.cpp" />
+    <ClCompile Include="..\..\src\common\Memoizer.cpp" />
+    <ClCompile Include="..\..\src\common\Object.cpp" />
+    <ClCompile Include="..\..\src\common\Reference.cpp" />
+    <ClCompile Include="..\..\src\common\runtime.cpp" />
+    <ClCompile Include="..\..\src\common\utf8.cpp" />
+    <ClCompile Include="..\..\src\common\Variant.cpp" />
+    <ClCompile Include="..\..\src\common\Vector.cpp" />
+    <ClCompile Include="..\..\src\common\wrap_Data.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideCircle.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideEdge.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollidePolygon.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Collision.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Distance.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Draw.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Math.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Settings.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Timer.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Body.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Island.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2World.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.cpp" />
+    <ClCompile Include="..\..\src\libraries\Box2D\Rope\b2Rope.cpp" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\auxiliar.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\buffer.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\except.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\inet.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\io.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\luasocket.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\mime.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\options.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\select.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\tcp.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\timeout.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\udp.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\wsocket.c" />
+    <ClCompile Include="..\..\src\libraries\luasocket\luasocket.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\Audio.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\null\Audio.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\null\Source.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\openal\Audio.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\openal\Pool.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\openal\Source.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\Source.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\wrap_Audio.cpp" />
+    <ClCompile Include="..\..\src\modules\audio\wrap_Source.cpp" />
+    <ClCompile Include="..\..\src\modules\event\Event.cpp" />
+    <ClCompile Include="..\..\src\modules\event\sdl\Event.cpp" />
+    <ClCompile Include="..\..\src\modules\event\sdl\wrap_Event.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\File.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\FileData.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\File.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\Filesystem.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_File.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_FileData.cpp" />
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp" />
+    <ClCompile Include="..\..\src\modules\font\freetype\Font.cpp" />
+    <ClCompile Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp" />
+    <ClCompile Include="..\..\src\modules\font\freetype\wrap_Font.cpp" />
+    <ClCompile Include="..\..\src\modules\font\GlyphData.cpp" />
+    <ClCompile Include="..\..\src\modules\font\ImageRasterizer.cpp" />
+    <ClCompile Include="..\..\src\modules\font\Rasterizer.cpp" />
+    <ClCompile Include="..\..\src\modules\font\wrap_GlyphData.cpp" />
+    <ClCompile Include="..\..\src\modules\font\wrap_Rasterizer.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\Drawable.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\DrawQable.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\Graphics.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\Image.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Canvas.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Font.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\GLee.c" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Graphics.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Image.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\OpenGL.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\ParticleSystem.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\PixelEffect.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Quad.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\SpriteBatch.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\VertexBuffer.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Canvas.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Font.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Image.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Quad.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\Quad.cpp" />
+    <ClCompile Include="..\..\src\modules\graphics\Volatile.cpp" />
+    <ClCompile Include="..\..\src\modules\image\devil\Image.cpp" />
+    <ClCompile Include="..\..\src\modules\image\devil\ImageData.cpp" />
+    <ClCompile Include="..\..\src\modules\image\ImageData.cpp" />
+    <ClCompile Include="..\..\src\modules\image\wrap_Image.cpp" />
+    <ClCompile Include="..\..\src\modules\image\wrap_ImageData.cpp" />
+    <ClCompile Include="..\..\src\modules\joystick\Joystick.cpp" />
+    <ClCompile Include="..\..\src\modules\joystick\sdl\Joystick.cpp" />
+    <ClCompile Include="..\..\src\modules\joystick\sdl\wrap_Joystick.cpp" />
+    <ClCompile Include="..\..\src\modules\keyboard\Keyboard.cpp" />
+    <ClCompile Include="..\..\src\modules\keyboard\sdl\Keyboard.cpp" />
+    <ClCompile Include="..\..\src\modules\keyboard\wrap_Keyboard.cpp" />
+    <ClCompile Include="..\..\src\modules\love\love.cpp" />
+    <ClCompile Include="..\..\src\modules\mouse\Mouse.cpp" />
+    <ClCompile Include="..\..\src\modules\mouse\sdl\Mouse.cpp" />
+    <ClCompile Include="..\..\src\modules\mouse\wrap_Mouse.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\Body.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\Body.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\ChainShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\CircleShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\Contact.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\DistanceJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\EdgeShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\Fixture.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\FrictionJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\GearJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\Joint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\MouseJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\Physics.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\PolygonShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\PrismaticJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\PulleyJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\RevoluteJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\RopeJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\Shape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\WeldJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\WheelJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\World.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Body.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_ChainShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_CircleShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Contact.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Fixture.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_GearJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Joint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Physics.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Shape.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_World.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\Joint.cpp" />
+    <ClCompile Include="..\..\src\modules\physics\Shape.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\lullaby\Decoder.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\lullaby\FLACDecoder.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\lullaby\Sound.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\Sound.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\SoundData.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\wrap_Decoder.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\wrap_Sound.cpp" />
+    <ClCompile Include="..\..\src\modules\sound\wrap_SoundData.cpp" />
+    <ClCompile Include="..\..\src\modules\thread\Thread.cpp" />
+    <ClCompile Include="..\..\src\modules\thread\threads.cpp" />
+    <ClCompile Include="..\..\src\modules\thread\wrap_Thread.cpp" />
+    <ClCompile Include="..\..\src\modules\timer\sdl\Timer.cpp" />
+    <ClCompile Include="..\..\src\modules\timer\wrap_Timer.cpp" />
+    <ClCompile Include="..\..\src\modules\window\sdl\Window.cpp" />
+    <ClCompile Include="..\..\src\modules\window\Window.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\src\scripts\auto.lua" />
+    <None Include="..\..\src\scripts\boot.lua" />
+    <None Include="..\..\src\scripts\graphics.lua" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\common\b64.h" />
+    <ClInclude Include="..\..\src\common\config.h" />
+    <ClInclude Include="..\..\src\common\Data.h" />
+    <ClInclude Include="..\..\src\common\delay.h" />
+    <ClInclude Include="..\..\src\common\EnumMap.h" />
+    <ClInclude Include="..\..\src\common\Exception.h" />
+    <ClInclude Include="..\..\src\common\int.h" />
+    <ClInclude Include="..\..\src\common\math.h" />
+    <ClInclude Include="..\..\src\common\Matrix.h" />
+    <ClInclude Include="..\..\src\common\Memoizer.h" />
+    <ClInclude Include="..\..\src\common\Module.h" />
+    <ClInclude Include="..\..\src\common\Object.h" />
+    <ClInclude Include="..\..\src\common\Reference.h" />
+    <ClInclude Include="..\..\src\common\runtime.h" />
+    <ClInclude Include="..\..\src\common\StringMap.h" />
+    <ClInclude Include="..\..\src\common\types.h" />
+    <ClInclude Include="..\..\src\common\utf8.h" />
+    <ClInclude Include="..\..\src\common\Variant.h" />
+    <ClInclude Include="..\..\src\common\Vector.h" />
+    <ClInclude Include="..\..\src\common\version.h" />
+    <ClInclude Include="..\..\src\common\wrap_Data.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Box2D.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Collision.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Distance.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2Shape.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Draw.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2GrowableStack.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Math.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Settings.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Timer.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Body.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Island.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2TimeStep.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2World.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.h" />
+    <ClInclude Include="..\..\src\libraries\Box2D\Rope\b2Rope.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\auxiliar.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\buffer.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\except.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\inet.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\io.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\luasocket.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\mime.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\options.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\select.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\socket.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\tcp.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\timeout.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\tp.lua.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\udp.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\url.lua.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\wsocket.h" />
+    <ClInclude Include="..\..\src\libraries\luasocket\luasocket.h" />
+    <ClInclude Include="..\..\src\libraries\utf8\utf8.h" />
+    <ClInclude Include="..\..\src\libraries\utf8\utf8\checked.h" />
+    <ClInclude Include="..\..\src\libraries\utf8\utf8\core.h" />
+    <ClInclude Include="..\..\src\libraries\utf8\utf8\unchecked.h" />
+    <ClInclude Include="..\..\src\modules\audio\Audio.h" />
+    <ClInclude Include="..\..\src\modules\audio\null\Audio.h" />
+    <ClInclude Include="..\..\src\modules\audio\null\Source.h" />
+    <ClInclude Include="..\..\src\modules\audio\openal\Audio.h" />
+    <ClInclude Include="..\..\src\modules\audio\openal\Pool.h" />
+    <ClInclude Include="..\..\src\modules\audio\openal\Source.h" />
+    <ClInclude Include="..\..\src\modules\audio\Source.h" />
+    <ClInclude Include="..\..\src\modules\audio\wrap_Audio.h" />
+    <ClInclude Include="..\..\src\modules\audio\wrap_Source.h" />
+    <ClInclude Include="..\..\src\modules\event\Event.h" />
+    <ClInclude Include="..\..\src\modules\event\sdl\Event.h" />
+    <ClInclude Include="..\..\src\modules\event\sdl\wrap_Event.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\File.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\FileData.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\File.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\Filesystem.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_File.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_FileData.h" />
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.h" />
+    <ClInclude Include="..\..\src\modules\font\Font.h" />
+    <ClInclude Include="..\..\src\modules\font\freetype\Font.h" />
+    <ClInclude Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.h" />
+    <ClInclude Include="..\..\src\modules\font\freetype\wrap_Font.h" />
+    <ClInclude Include="..\..\src\modules\font\GlyphData.h" />
+    <ClInclude Include="..\..\src\modules\font\ImageRasterizer.h" />
+    <ClInclude Include="..\..\src\modules\font\Rasterizer.h" />
+    <ClInclude Include="..\..\src\modules\font\wrap_GlyphData.h" />
+    <ClInclude Include="..\..\src\modules\font\wrap_Rasterizer.h" />
+    <ClInclude Include="..\..\src\modules\graphics\Color.h" />
+    <ClInclude Include="..\..\src\modules\graphics\Drawable.h" />
+    <ClInclude Include="..\..\src\modules\graphics\DrawQable.h" />
+    <ClInclude Include="..\..\src\modules\graphics\Graphics.h" />
+    <ClInclude Include="..\..\src\modules\graphics\Image.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Canvas.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Font.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\GLee.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Graphics.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Image.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\OpenGL.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\ParticleSystem.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\PixelEffect.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Quad.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\SpriteBatch.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\VertexBuffer.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Canvas.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Font.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Graphics.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Image.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Quad.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h" />
+    <ClInclude Include="..\..\src\modules\graphics\Quad.h" />
+    <ClInclude Include="..\..\src\modules\graphics\Volatile.h" />
+    <ClInclude Include="..\..\src\modules\image\devil\Image.h" />
+    <ClInclude Include="..\..\src\modules\image\devil\ImageData.h" />
+    <ClInclude Include="..\..\src\modules\image\Image.h" />
+    <ClInclude Include="..\..\src\modules\image\ImageData.h" />
+    <ClInclude Include="..\..\src\modules\image\wrap_Image.h" />
+    <ClInclude Include="..\..\src\modules\image\wrap_ImageData.h" />
+    <ClInclude Include="..\..\src\modules\joystick\Joystick.h" />
+    <ClInclude Include="..\..\src\modules\joystick\sdl\Joystick.h" />
+    <ClInclude Include="..\..\src\modules\joystick\sdl\wrap_Joystick.h" />
+    <ClInclude Include="..\..\src\modules\keyboard\Keyboard.h" />
+    <ClInclude Include="..\..\src\modules\keyboard\sdl\Keyboard.h" />
+    <ClInclude Include="..\..\src\modules\keyboard\wrap_Keyboard.h" />
+    <ClInclude Include="..\..\src\modules\love\love.h" />
+    <ClInclude Include="..\..\src\modules\mouse\Mouse.h" />
+    <ClInclude Include="..\..\src\modules\mouse\sdl\Mouse.h" />
+    <ClInclude Include="..\..\src\modules\mouse\wrap_Mouse.h" />
+    <ClInclude Include="..\..\src\modules\physics\Body.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\Body.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\ChainShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\CircleShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\Contact.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\DistanceJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\EdgeShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\Fixture.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\FrictionJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\GearJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\Joint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\MouseJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\Physics.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\PolygonShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\PrismaticJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\PulleyJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\RevoluteJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\RopeJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\Shape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\WeldJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\WheelJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\World.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Body.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_ChainShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_CircleShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Contact.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Fixture.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_GearJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Joint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Physics.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Shape.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.h" />
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_World.h" />
+    <ClInclude Include="..\..\src\modules\physics\Joint.h" />
+    <ClInclude Include="..\..\src\modules\physics\Shape.h" />
+    <ClInclude Include="..\..\src\modules\sound\Decoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\lullaby\Decoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\lullaby\FLACDecoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\lullaby\ModPlugDecoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\lullaby\Mpg123Decoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\lullaby\Sound.h" />
+    <ClInclude Include="..\..\src\modules\sound\lullaby\VorbisDecoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\Sound.h" />
+    <ClInclude Include="..\..\src\modules\sound\SoundData.h" />
+    <ClInclude Include="..\..\src\modules\sound\wrap_Decoder.h" />
+    <ClInclude Include="..\..\src\modules\sound\wrap_Sound.h" />
+    <ClInclude Include="..\..\src\modules\sound\wrap_SoundData.h" />
+    <ClInclude Include="..\..\src\modules\thread\Thread.h" />
+    <ClInclude Include="..\..\src\modules\thread\threads.h" />
+    <ClInclude Include="..\..\src\modules\thread\wrap_Thread.h" />
+    <ClInclude Include="..\..\src\modules\timer\sdl\Timer.h" />
+    <ClInclude Include="..\..\src\modules\timer\Timer.h" />
+    <ClInclude Include="..\..\src\modules\timer\wrap_Timer.h" />
+    <ClInclude Include="..\..\src\modules\window\sdl\Window.h" />
+    <ClInclude Include="..\..\src\modules\window\Window.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="love.rc" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 1427 - 0
platform/msvc2010/liblove.vcxproj.filters

@@ -0,0 +1,1427 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="libraries">
+      <UniqueIdentifier>{9204b296-06f7-44d4-a739-c7bd2f1b6a10}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="common">
+      <UniqueIdentifier>{8db39aa0-6dd9-454e-83e3-337a250a26a7}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules">
+      <UniqueIdentifier>{c33f8514-328c-435a-83cf-592b907efdf6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="scripts">
+      <UniqueIdentifier>{15622628-c450-48d5-af6d-11a81d9b3453}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D">
+      <UniqueIdentifier>{648d76dd-df9d-458d-beb3-de53e780d07e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\luasocket">
+      <UniqueIdentifier>{67d48dd8-574e-4bdd-bdb1-71af5801e234}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\utf8">
+      <UniqueIdentifier>{b00f9fc5-a6a6-44e7-a52d-84c134de265d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Collision">
+      <UniqueIdentifier>{4ed69d3b-2b3e-4bb1-b756-620816c86916}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Common">
+      <UniqueIdentifier>{3c66e3d3-c2fd-409b-88d9-fd6d67df2edd}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Dynamcis">
+      <UniqueIdentifier>{7eb57e83-24c3-4b47-a9bb-f73adac7c4c2}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Rope">
+      <UniqueIdentifier>{90878f00-844f-453d-a521-76366e3031b2}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Collision\Shapes">
+      <UniqueIdentifier>{7ae21d0a-2dbd-4d89-8ed3-74a0af8e1901}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Dynamcis\Joints">
+      <UniqueIdentifier>{809e6999-08d1-41b5-9536-bcfe7cc09588}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\Box2D\Dynamcis\Contacts">
+      <UniqueIdentifier>{9c1b1395-34b7-4158-b778-56b622c81e37}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="libraries\luasocket\luasocket">
+      <UniqueIdentifier>{5dcd8aac-7614-4d4e-b507-7df82969cb68}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\audio">
+      <UniqueIdentifier>{6f277a7f-c3b8-4eff-bffe-1635d2819c01}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\event">
+      <UniqueIdentifier>{0ceac368-959f-47da-8881-66e22383e2c3}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\filesystem">
+      <UniqueIdentifier>{822de099-663f-46e9-8c22-e2563903b2d1}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\font">
+      <UniqueIdentifier>{374bede6-77d8-4dd9-922c-65ebc1094df4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\graphics">
+      <UniqueIdentifier>{83e8ce99-8a0f-4e64-b5be-3c184026aa52}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\image">
+      <UniqueIdentifier>{d9e2d64e-5fd3-4f49-be70-50d5ae85ee26}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\joystick">
+      <UniqueIdentifier>{679a49ca-08fc-400a-b0ae-30ac2a072b6b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\keyboard">
+      <UniqueIdentifier>{cc6c06ce-6fa1-46fe-9308-f0844d198123}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\mouse">
+      <UniqueIdentifier>{e4a78077-53fd-4f65-bc7b-9357fca59d37}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\physics">
+      <UniqueIdentifier>{44378345-7eb7-45d5-8f32-fe7e3375ca7b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\sound">
+      <UniqueIdentifier>{03c38556-a58d-4a16-bd8a-26da917b73aa}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\thread">
+      <UniqueIdentifier>{a9c040aa-4e09-4a43-b7d4-62ab7e9cde4b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\timer">
+      <UniqueIdentifier>{8ca0aa01-6595-4e00-9257-6668218bfaad}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\window">
+      <UniqueIdentifier>{d0e97654-3e56-4ce0-aa0a-a5b660ade090}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\audio\openal">
+      <UniqueIdentifier>{018b53e4-51ff-41ef-8752-530f7ca83f5f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\audio\null">
+      <UniqueIdentifier>{e3bb8877-dc46-45db-999d-97a3b3482227}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\event\sdl">
+      <UniqueIdentifier>{9a56922c-6ee8-4e4a-af76-c310a3052de6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\filesystem\physfs">
+      <UniqueIdentifier>{6c504e35-8799-4ce8-89e7-b4904095efe5}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\font\freetype">
+      <UniqueIdentifier>{d78871c7-7ca9-4dff-9163-f2a6a97462d7}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\graphics\opengl">
+      <UniqueIdentifier>{72f85e75-dd35-4a93-9c39-258c8aee813b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\image\devil">
+      <UniqueIdentifier>{d39bd4fd-3bea-428a-813f-4b1c55aedac8}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\joystick\sdl">
+      <UniqueIdentifier>{806ac1d0-ed5c-47d5-8cdc-60e3fdbfe412}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\keyboard\sdl">
+      <UniqueIdentifier>{1266e902-11b4-4f0d-afb5-66df65b0429c}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\mouse\sdl">
+      <UniqueIdentifier>{7715d905-5dc6-41ce-9aa1-6f94c707ced5}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\physics\box2d">
+      <UniqueIdentifier>{ad88c2dc-e31c-4362-bd7a-4d76c79d5783}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\sound\lullaby">
+      <UniqueIdentifier>{fe7cb272-ea46-4f31-873a-a8a42e4efd3a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\timer\sdl">
+      <UniqueIdentifier>{ea198321-c3fb-4444-bd1e-608461f7af20}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\window\sdl">
+      <UniqueIdentifier>{d46cbbf1-a76f-4401-83d4-1f20492f9889}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="modules\love">
+      <UniqueIdentifier>{5fb201c1-9b39-48ca-8334-6862da260b43}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\common\Matrix.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\Memoizer.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\Object.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\Reference.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\runtime.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\utf8.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\Variant.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\Vector.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\wrap_Data.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\b64.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\delay.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\common\Exception.cpp">
+      <Filter>common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideCircle.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideEdge.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollidePolygon.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Collision.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Distance.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.cpp">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.cpp">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.cpp">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.cpp">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.cpp">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Draw.cpp">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Math.cpp">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Settings.cpp">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.cpp">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Timer.cpp">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.cpp">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Body.cpp">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.cpp">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.cpp">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Island.cpp">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2World.cpp">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.cpp">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.cpp">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\Box2D\Rope\b2Rope.cpp">
+      <Filter>libraries\Box2D\Rope</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\luasocket.cpp">
+      <Filter>libraries\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\mime.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\options.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\select.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\tcp.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\timeout.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\udp.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\wsocket.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\auxiliar.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\buffer.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\except.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\inet.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\io.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\luasocket.c">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\Audio.cpp">
+      <Filter>modules\audio</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\Source.cpp">
+      <Filter>modules\audio</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\wrap_Audio.cpp">
+      <Filter>modules\audio</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\wrap_Source.cpp">
+      <Filter>modules\audio</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\null\Audio.cpp">
+      <Filter>modules\audio\null</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\null\Source.cpp">
+      <Filter>modules\audio\null</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\openal\Pool.cpp">
+      <Filter>modules\audio\openal</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\openal\Source.cpp">
+      <Filter>modules\audio\openal</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\audio\openal\Audio.cpp">
+      <Filter>modules\audio\openal</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\event\Event.cpp">
+      <Filter>modules\event</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\event\sdl\wrap_Event.cpp">
+      <Filter>modules\event\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\event\sdl\Event.cpp">
+      <Filter>modules\event\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\File.cpp">
+      <Filter>modules\filesystem</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\FileData.cpp">
+      <Filter>modules\filesystem</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\Filesystem.cpp">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_File.cpp">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_FileData.cpp">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\filesystem\physfs\File.cpp">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\GlyphData.cpp">
+      <Filter>modules\font</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\ImageRasterizer.cpp">
+      <Filter>modules\font</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\Rasterizer.cpp">
+      <Filter>modules\font</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\wrap_GlyphData.cpp">
+      <Filter>modules\font</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\wrap_Rasterizer.cpp">
+      <Filter>modules\font</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp">
+      <Filter>modules\font\freetype</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\freetype\wrap_Font.cpp">
+      <Filter>modules\font\freetype</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\font\freetype\Font.cpp">
+      <Filter>modules\font\freetype</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\Drawable.cpp">
+      <Filter>modules\graphics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\DrawQable.cpp">
+      <Filter>modules\graphics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\Graphics.cpp">
+      <Filter>modules\graphics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\Image.cpp">
+      <Filter>modules\graphics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\Quad.cpp">
+      <Filter>modules\graphics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\Volatile.cpp">
+      <Filter>modules\graphics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\PixelEffect.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Quad.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\SpriteBatch.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\VertexBuffer.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Canvas.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Font.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Image.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Quad.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Canvas.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Font.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\GLee.c">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Graphics.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\Image.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\OpenGL.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\ParticleSystem.cpp">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\image\ImageData.cpp">
+      <Filter>modules\image</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\image\wrap_Image.cpp">
+      <Filter>modules\image</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\image\wrap_ImageData.cpp">
+      <Filter>modules\image</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\image\devil\ImageData.cpp">
+      <Filter>modules\image\devil</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\image\devil\Image.cpp">
+      <Filter>modules\image\devil</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\joystick\Joystick.cpp">
+      <Filter>modules\joystick</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\joystick\sdl\wrap_Joystick.cpp">
+      <Filter>modules\joystick\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\joystick\sdl\Joystick.cpp">
+      <Filter>modules\joystick\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\keyboard\Keyboard.cpp">
+      <Filter>modules\keyboard</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\keyboard\wrap_Keyboard.cpp">
+      <Filter>modules\keyboard</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\keyboard\sdl\Keyboard.cpp">
+      <Filter>modules\keyboard\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\mouse\Mouse.cpp">
+      <Filter>modules\mouse</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\mouse\wrap_Mouse.cpp">
+      <Filter>modules\mouse</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\mouse\sdl\Mouse.cpp">
+      <Filter>modules\mouse\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\Body.cpp">
+      <Filter>modules\physics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\Joint.cpp">
+      <Filter>modules\physics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\Shape.cpp">
+      <Filter>modules\physics</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\CircleShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\Contact.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\DistanceJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\EdgeShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\Fixture.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\FrictionJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\GearJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\Joint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\MouseJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\Physics.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\PolygonShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\PrismaticJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\PulleyJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\RevoluteJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\RopeJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\Shape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\WeldJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\WheelJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\World.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Body.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_ChainShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_CircleShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Contact.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Fixture.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_GearJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Joint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Physics.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Shape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_World.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\Body.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\physics\box2d\ChainShape.cpp">
+      <Filter>modules\physics\box2d</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\Sound.cpp">
+      <Filter>modules\sound</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\SoundData.cpp">
+      <Filter>modules\sound</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\wrap_Decoder.cpp">
+      <Filter>modules\sound</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\wrap_Sound.cpp">
+      <Filter>modules\sound</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\wrap_SoundData.cpp">
+      <Filter>modules\sound</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\lullaby\Sound.cpp">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\lullaby\Decoder.cpp">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\sound\lullaby\FLACDecoder.cpp">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\thread\Thread.cpp">
+      <Filter>modules\thread</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\thread\threads.cpp">
+      <Filter>modules\thread</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\thread\wrap_Thread.cpp">
+      <Filter>modules\thread</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\timer\wrap_Timer.cpp">
+      <Filter>modules\timer</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\timer\sdl\Timer.cpp">
+      <Filter>modules\timer\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\window\Window.cpp">
+      <Filter>modules\window</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\window\sdl\Window.cpp">
+      <Filter>modules\window\sdl</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\modules\love\love.cpp">
+      <Filter>modules\love</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\src\scripts\boot.lua">
+      <Filter>scripts</Filter>
+    </None>
+    <None Include="..\..\src\scripts\graphics.lua">
+      <Filter>scripts</Filter>
+    </None>
+    <None Include="..\..\src\scripts\auto.lua">
+      <Filter>scripts</Filter>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\src\common\Matrix.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Memoizer.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Module.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Object.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Reference.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\runtime.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\StringMap.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\types.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\utf8.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Variant.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Vector.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\version.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\wrap_Data.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\b64.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\config.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Data.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\delay.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\EnumMap.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\Exception.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\int.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\common\math.h">
+      <Filter>common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Box2D.h">
+      <Filter>libraries\Box2D</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.h">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Collision.h">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Distance.h">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.h">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.h">
+      <Filter>libraries\Box2D\Collision</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.h">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.h">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.h">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2Shape.h">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.h">
+      <Filter>libraries\Box2D\Collision\Shapes</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Draw.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2GrowableStack.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Math.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Settings.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Timer.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.h">
+      <Filter>libraries\Box2D\Common</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Body.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Island.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2TimeStep.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2World.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.h">
+      <Filter>libraries\Box2D\Dynamcis</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.h">
+      <Filter>libraries\Box2D\Dynamcis\Contacts</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.h">
+      <Filter>libraries\Box2D\Dynamcis\Joints</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\Box2D\Rope\b2Rope.h">
+      <Filter>libraries\Box2D\Rope</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\luasocket.h">
+      <Filter>libraries\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\auxiliar.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\buffer.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\except.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\inet.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\io.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\luasocket.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\mime.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\options.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\select.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\socket.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\tcp.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\timeout.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\tp.lua.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\udp.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\url.lua.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\luasocket\libluasocket\wsocket.h">
+      <Filter>libraries\luasocket\luasocket</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\utf8\utf8.h">
+      <Filter>libraries\utf8</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\utf8\utf8\core.h">
+      <Filter>libraries\utf8</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\utf8\utf8\unchecked.h">
+      <Filter>libraries\utf8</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\libraries\utf8\utf8\checked.h">
+      <Filter>libraries\utf8</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\Audio.h">
+      <Filter>modules\audio</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\Source.h">
+      <Filter>modules\audio</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\wrap_Audio.h">
+      <Filter>modules\audio</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\wrap_Source.h">
+      <Filter>modules\audio</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\null\Audio.h">
+      <Filter>modules\audio\null</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\null\Source.h">
+      <Filter>modules\audio\null</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\openal\Pool.h">
+      <Filter>modules\audio\openal</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\openal\Source.h">
+      <Filter>modules\audio\openal</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\audio\openal\Audio.h">
+      <Filter>modules\audio\openal</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\event\Event.h">
+      <Filter>modules\event</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\event\sdl\Event.h">
+      <Filter>modules\event\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\event\sdl\wrap_Event.h">
+      <Filter>modules\event\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\File.h">
+      <Filter>modules\filesystem</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\FileData.h">
+      <Filter>modules\filesystem</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\Filesystem.h">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_File.h">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_FileData.h">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.h">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\filesystem\physfs\File.h">
+      <Filter>modules\filesystem\physfs</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\GlyphData.h">
+      <Filter>modules\font</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\ImageRasterizer.h">
+      <Filter>modules\font</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\Rasterizer.h">
+      <Filter>modules\font</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\wrap_GlyphData.h">
+      <Filter>modules\font</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\wrap_Rasterizer.h">
+      <Filter>modules\font</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\Font.h">
+      <Filter>modules\font</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.h">
+      <Filter>modules\font\freetype</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\freetype\wrap_Font.h">
+      <Filter>modules\font\freetype</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\font\freetype\Font.h">
+      <Filter>modules\font\freetype</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\Drawable.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\DrawQable.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\Graphics.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\Image.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\Quad.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\Volatile.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\Color.h">
+      <Filter>modules\graphics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\ParticleSystem.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\PixelEffect.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Quad.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\SpriteBatch.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\VertexBuffer.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Canvas.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Font.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Graphics.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Image.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Quad.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Canvas.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Font.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\GLee.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Graphics.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\Image.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\OpenGL.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\image\Image.h">
+      <Filter>modules\image</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\image\ImageData.h">
+      <Filter>modules\image</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\image\wrap_Image.h">
+      <Filter>modules\image</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\image\wrap_ImageData.h">
+      <Filter>modules\image</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\image\devil\Image.h">
+      <Filter>modules\image\devil</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\image\devil\ImageData.h">
+      <Filter>modules\image\devil</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\joystick\Joystick.h">
+      <Filter>modules\joystick</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\joystick\sdl\wrap_Joystick.h">
+      <Filter>modules\joystick\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\joystick\sdl\Joystick.h">
+      <Filter>modules\joystick\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\keyboard\Keyboard.h">
+      <Filter>modules\keyboard</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\keyboard\wrap_Keyboard.h">
+      <Filter>modules\keyboard</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\keyboard\sdl\Keyboard.h">
+      <Filter>modules\keyboard\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\mouse\Mouse.h">
+      <Filter>modules\mouse</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\mouse\wrap_Mouse.h">
+      <Filter>modules\mouse</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\mouse\sdl\Mouse.h">
+      <Filter>modules\mouse\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\Body.h">
+      <Filter>modules\physics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\Joint.h">
+      <Filter>modules\physics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\Shape.h">
+      <Filter>modules\physics</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\ChainShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\CircleShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\Contact.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\DistanceJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\EdgeShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\Fixture.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\FrictionJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\GearJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\Joint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\MouseJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\Physics.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\PolygonShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\PrismaticJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\PulleyJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\RevoluteJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\RopeJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\Shape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\WeldJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\WheelJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\World.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Body.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_ChainShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_CircleShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Contact.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Fixture.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_GearJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Joint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Physics.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Shape.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_World.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\physics\box2d\Body.h">
+      <Filter>modules\physics\box2d</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\Decoder.h">
+      <Filter>modules\sound</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\Sound.h">
+      <Filter>modules\sound</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\SoundData.h">
+      <Filter>modules\sound</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\wrap_Decoder.h">
+      <Filter>modules\sound</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\wrap_Sound.h">
+      <Filter>modules\sound</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\wrap_SoundData.h">
+      <Filter>modules\sound</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\lullaby\ModPlugDecoder.h">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\lullaby\Mpg123Decoder.h">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\lullaby\Sound.h">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\lullaby\VorbisDecoder.h">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\lullaby\Decoder.h">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\sound\lullaby\FLACDecoder.h">
+      <Filter>modules\sound\lullaby</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\thread\Thread.h">
+      <Filter>modules\thread</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\thread\threads.h">
+      <Filter>modules\thread</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\thread\wrap_Thread.h">
+      <Filter>modules\thread</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\timer\Timer.h">
+      <Filter>modules\timer</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\timer\wrap_Timer.h">
+      <Filter>modules\timer</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\timer\sdl\Timer.h">
+      <Filter>modules\timer\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\window\Window.h">
+      <Filter>modules\window</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\window\sdl\Window.h">
+      <Filter>modules\window\sdl</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\modules\love\love.h">
+      <Filter>modules\love</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="love.rc" />
+  </ItemGroup>
+</Project>

BIN
platform/msvc2010/love.rc


+ 34 - 7
platform/msvc2010/love.sln

@@ -1,18 +1,45 @@
 
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual C++ Express 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "love", "love.vcxproj", "{AED6D87B-9F81-49D0-8C6B-1C9F64421ECC}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "love", "love.vcxproj", "{0078B97A-F6DB-E014-BED9-BE378D93CEA4}"
+	ProjectSection(ProjectDependencies) = postProject
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8} = {A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblove", "liblove.vcxproj", "{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Win32 = Debug|Win32
-		Release|Win32 = Release|Win32
+		Debug Dynamic|Win32 = Debug Dynamic|Win32
+		Debug Dynamic|x64 = Debug Dynamic|x64
+		Release Dynamic|Win32 = Release Dynamic|Win32
+		Release Dynamic|x64 = Release Dynamic|x64
+		Release Static|Win32 = Release Static|Win32
+		Release Static|x64 = Release Static|x64
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{AED6D87B-9F81-49D0-8C6B-1C9F64421ECC}.Debug|Win32.ActiveCfg = Debug|Win32
-		{AED6D87B-9F81-49D0-8C6B-1C9F64421ECC}.Debug|Win32.Build.0 = Debug|Win32
-		{AED6D87B-9F81-49D0-8C6B-1C9F64421ECC}.Release|Win32.ActiveCfg = Release|Win32
-		{AED6D87B-9F81-49D0-8C6B-1C9F64421ECC}.Release|Win32.Build.0 = Release|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Debug Dynamic|Win32.ActiveCfg = Debug Dynamic|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Debug Dynamic|Win32.Build.0 = Debug Dynamic|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Debug Dynamic|x64.ActiveCfg = Debug Dynamic|x64
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Dynamic|Win32.ActiveCfg = Release Dynamic|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Dynamic|Win32.Build.0 = Release Dynamic|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Dynamic|x64.ActiveCfg = Release Dynamic|x64
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Dynamic|x64.Build.0 = Release Dynamic|x64
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Static|Win32.ActiveCfg = Release Static|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Static|Win32.Build.0 = Release Static|Win32
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Static|x64.ActiveCfg = Release Static|x64
+		{0078B97A-F6DB-E014-BED9-BE378D93CEA4}.Release Static|x64.Build.0 = Release Static|x64
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Debug Dynamic|Win32.ActiveCfg = Debug Dynamic|Win32
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Debug Dynamic|Win32.Build.0 = Debug Dynamic|Win32
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Debug Dynamic|x64.ActiveCfg = Debug Dynamic|x64
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Dynamic|Win32.ActiveCfg = Release Dynamic|Win32
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Dynamic|Win32.Build.0 = Release Dynamic|Win32
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Dynamic|x64.ActiveCfg = Release Dynamic|x64
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Dynamic|x64.Build.0 = Release Dynamic|x64
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Static|Win32.ActiveCfg = Release Static|Win32
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Static|Win32.Build.0 = Release Static|Win32
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Static|x64.ActiveCfg = Release Static|x64
+		{A3FCC735-3E18-4D6B-9DA9-01D9E910B7F8}.Release Static|x64.Build.0 = Release Static|x64
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 216 - 498
platform/msvc2010/love.vcxproj

@@ -1,547 +1,265 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
+    <ProjectConfiguration Include="Debug Dynamic|Win32">
+      <Configuration>Debug Dynamic</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
+    <ProjectConfiguration Include="Debug Dynamic|x64">
+      <Configuration>Debug Dynamic</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Dynamic|Win32">
+      <Configuration>Release Dynamic</Configuration>
       <Platform>Win32</Platform>
     </ProjectConfiguration>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\src\common\b64.cpp" />
-    <ClCompile Include="..\..\src\common\delay.cpp" />
-    <ClCompile Include="..\..\src\common\Exception.cpp" />
-    <ClCompile Include="..\..\src\common\Matrix.cpp" />
-    <ClCompile Include="..\..\src\common\Memoizer.cpp" />
-    <ClCompile Include="..\..\src\common\Object.cpp" />
-    <ClCompile Include="..\..\src\common\Reference.cpp" />
-    <ClCompile Include="..\..\src\common\runtime.cpp" />
-    <ClCompile Include="..\..\src\common\utf8.cpp" />
-    <ClCompile Include="..\..\src\common\Variant.cpp" />
-    <ClCompile Include="..\..\src\common\Vector.cpp" />
-    <ClCompile Include="..\..\src\common\wrap_Data.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideCircle.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideEdge.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollidePolygon.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Collision.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Distance.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Draw.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Math.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Settings.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Timer.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Body.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Island.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2World.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.cpp" />
-    <ClCompile Include="..\..\src\libraries\Box2D\Rope\b2Rope.cpp" />
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\auxiliar.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\buffer.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\except.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\inet.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\io.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\luasocket.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\mime.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\options.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\select.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\tcp.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\timeout.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\udp.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\wsocket.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\luasocket.cpp" />
-    <ClCompile Include="..\..\src\love.cpp">
-      <ShowIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ShowIncludes>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\Audio.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\null\Audio.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\null\Source.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\openal\Audio.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\openal\Pool.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\openal\Source.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\Source.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\wrap_Audio.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\wrap_Source.cpp" />
-    <ClCompile Include="..\..\src\modules\event\Event.cpp" />
-    <ClCompile Include="..\..\src\modules\event\sdl\Event.cpp" />
-    <ClCompile Include="..\..\src\modules\event\sdl\wrap_Event.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\File.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\FileData.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\File.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\Filesystem.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_File.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_FileData.cpp" />
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp" />
-    <ClCompile Include="..\..\src\modules\font\freetype\Font.cpp" />
-    <ClCompile Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp" />
-    <ClCompile Include="..\..\src\modules\font\freetype\wrap_Font.cpp" />
-    <ClCompile Include="..\..\src\modules\font\GlyphData.cpp" />
-    <ClCompile Include="..\..\src\modules\font\ImageRasterizer.cpp" />
-    <ClCompile Include="..\..\src\modules\font\Rasterizer.cpp" />
-    <ClCompile Include="..\..\src\modules\font\wrap_GlyphData.cpp" />
-    <ClCompile Include="..\..\src\modules\font\wrap_Rasterizer.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\Drawable.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\DrawQable.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\Graphics.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\Image.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Canvas.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Font.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\GLee.c">
-      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Graphics.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Image.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\OpenGL.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\ParticleSystem.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\PixelEffect.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Quad.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\SpriteBatch.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\VertexBuffer.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Canvas.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Font.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Image.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Quad.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\Quad.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\Volatile.cpp" />
-    <ClCompile Include="..\..\src\modules\image\devil\Image.cpp" />
-    <ClCompile Include="..\..\src\modules\image\devil\ImageData.cpp" />
-    <ClCompile Include="..\..\src\modules\image\ImageData.cpp" />
-    <ClCompile Include="..\..\src\modules\image\wrap_Image.cpp" />
-    <ClCompile Include="..\..\src\modules\image\wrap_ImageData.cpp" />
-    <ClCompile Include="..\..\src\modules\joystick\Joystick.cpp" />
-    <ClCompile Include="..\..\src\modules\joystick\sdl\Joystick.cpp" />
-    <ClCompile Include="..\..\src\modules\joystick\sdl\wrap_Joystick.cpp" />
-    <ClCompile Include="..\..\src\modules\keyboard\Keyboard.cpp" />
-    <ClCompile Include="..\..\src\modules\keyboard\sdl\Keyboard.cpp" />
-    <ClCompile Include="..\..\src\modules\keyboard\wrap_Keyboard.cpp" />
-    <ClCompile Include="..\..\src\modules\mouse\Mouse.cpp" />
-    <ClCompile Include="..\..\src\modules\mouse\sdl\Mouse.cpp" />
-    <ClCompile Include="..\..\src\modules\mouse\wrap_Mouse.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\Body.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\Body.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\ChainShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\CircleShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\Contact.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\DistanceJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\EdgeShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\Fixture.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\FrictionJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\GearJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\Joint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\MouseJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\Physics.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\PolygonShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\PrismaticJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\PulleyJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\RevoluteJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\RopeJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\Shape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\WeldJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\WheelJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\World.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Body.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_ChainShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_CircleShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Contact.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Fixture.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_GearJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Joint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Physics.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Shape.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_World.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\Joint.cpp" />
-    <ClCompile Include="..\..\src\modules\physics\Shape.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\lullaby\Decoder.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\lullaby\FLACDecoder.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\lullaby\Sound.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\Sound.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\SoundData.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\wrap_Decoder.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\wrap_Sound.cpp" />
-    <ClCompile Include="..\..\src\modules\sound\wrap_SoundData.cpp" />
-    <ClCompile Include="..\..\src\modules\thread\posix\threads.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\sdl\threads.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\Thread.cpp" />
-    <ClCompile Include="..\..\src\modules\thread\threads.cpp" />
-    <ClCompile Include="..\..\src\modules\thread\win32\threads.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\wrap_Thread.cpp" />
-    <ClCompile Include="..\..\src\modules\timer\sdl\Timer.cpp" />
-    <ClCompile Include="..\..\src\modules\timer\wrap_Timer.cpp" />
-    <ClCompile Include="..\..\src\modules\window\sdl\Window.cpp" />
-    <ClCompile Include="..\..\src\modules\window\Window.cpp" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\src\common\b64.h" />
-    <ClInclude Include="..\..\src\common\config.h" />
-    <ClInclude Include="..\..\src\common\Data.h" />
-    <ClInclude Include="..\..\src\common\delay.h" />
-    <ClInclude Include="..\..\src\common\EnumMap.h" />
-    <ClInclude Include="..\..\src\common\Exception.h" />
-    <ClInclude Include="..\..\src\common\math.h" />
-    <ClInclude Include="..\..\src\common\Matrix.h" />
-    <ClInclude Include="..\..\src\common\Memoizer.h" />
-    <ClInclude Include="..\..\src\common\Module.h" />
-    <ClInclude Include="..\..\src\common\Object.h" />
-    <ClInclude Include="..\..\src\common\Reference.h" />
-    <ClInclude Include="..\..\src\common\runtime.h" />
-    <ClInclude Include="..\..\src\common\StringMap.h" />
-    <ClInclude Include="..\..\src\common\types.h" />
-    <ClInclude Include="..\..\src\common\utf8.h" />
-    <ClInclude Include="..\..\src\common\Variant.h" />
-    <ClInclude Include="..\..\src\common\Vector.h" />
-    <ClInclude Include="..\..\src\common\version.h" />
-    <ClInclude Include="..\..\src\common\wrap_Data.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Box2D.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Collision.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Distance.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2Shape.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Draw.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2GrowableStack.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Math.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Settings.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Timer.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Body.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Island.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2TimeStep.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2World.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.h" />
-    <ClInclude Include="..\..\src\libraries\Box2D\Rope\b2Rope.h" />
-    <ClInclude Include="..\..\src\libraries\luasocket\luasocket.h" />
-    <ClInclude Include="..\..\src\libraries\utf8\utf8.h" />
-    <ClInclude Include="..\..\src\libraries\utf8\utf8\checked.h" />
-    <ClInclude Include="..\..\src\libraries\utf8\utf8\core.h" />
-    <ClInclude Include="..\..\src\libraries\utf8\utf8\unchecked.h" />
-    <ClInclude Include="..\..\src\modules\audio\Audio.h" />
-    <ClInclude Include="..\..\src\modules\audio\null\Audio.h" />
-    <ClInclude Include="..\..\src\modules\audio\null\Source.h" />
-    <ClInclude Include="..\..\src\modules\audio\openal\Audio.h" />
-    <ClInclude Include="..\..\src\modules\audio\openal\Pool.h" />
-    <ClInclude Include="..\..\src\modules\audio\openal\Source.h" />
-    <ClInclude Include="..\..\src\modules\audio\Source.h" />
-    <ClInclude Include="..\..\src\modules\audio\wrap_Audio.h" />
-    <ClInclude Include="..\..\src\modules\audio\wrap_Source.h" />
-    <ClInclude Include="..\..\src\modules\event\Event.h" />
-    <ClInclude Include="..\..\src\modules\event\sdl\Event.h" />
-    <ClInclude Include="..\..\src\modules\event\sdl\wrap_Event.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\File.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\FileData.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\File.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\Filesystem.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_File.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_FileData.h" />
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.h" />
-    <ClInclude Include="..\..\src\modules\font\Font.h" />
-    <ClInclude Include="..\..\src\modules\font\freetype\Font.h" />
-    <ClInclude Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.h" />
-    <ClInclude Include="..\..\src\modules\font\freetype\wrap_Font.h" />
-    <ClInclude Include="..\..\src\modules\font\GlyphData.h" />
-    <ClInclude Include="..\..\src\modules\font\ImageRasterizer.h" />
-    <ClInclude Include="..\..\src\modules\font\Rasterizer.h" />
-    <ClInclude Include="..\..\src\modules\font\wrap_GlyphData.h" />
-    <ClInclude Include="..\..\src\modules\font\wrap_Rasterizer.h" />
-    <ClInclude Include="..\..\src\modules\graphics\Drawable.h" />
-    <ClInclude Include="..\..\src\modules\graphics\DrawQable.h" />
-    <ClInclude Include="..\..\src\modules\graphics\Graphics.h" />
-    <ClInclude Include="..\..\src\modules\graphics\Image.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Canvas.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Font.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\GLee.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Graphics.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Image.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\OpenGL.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\ParticleSystem.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\PixelEffect.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Quad.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\SpriteBatch.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\VertexBuffer.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Canvas.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Font.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Graphics.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Image.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Quad.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h" />
-    <ClInclude Include="..\..\src\modules\graphics\Quad.h" />
-    <ClInclude Include="..\..\src\modules\graphics\Volatile.h" />
-    <ClInclude Include="..\..\src\modules\image\devil\Image.h" />
-    <ClInclude Include="..\..\src\modules\image\devil\ImageData.h" />
-    <ClInclude Include="..\..\src\modules\image\Image.h" />
-    <ClInclude Include="..\..\src\modules\image\ImageData.h" />
-    <ClInclude Include="..\..\src\modules\image\wrap_Image.h" />
-    <ClInclude Include="..\..\src\modules\image\wrap_ImageData.h" />
-    <ClInclude Include="..\..\src\modules\joystick\Joystick.h" />
-    <ClInclude Include="..\..\src\modules\joystick\sdl\Joystick.h" />
-    <ClInclude Include="..\..\src\modules\joystick\sdl\wrap_Joystick.h" />
-    <ClInclude Include="..\..\src\modules\keyboard\Keyboard.h" />
-    <ClInclude Include="..\..\src\modules\keyboard\sdl\Keyboard.h" />
-    <ClInclude Include="..\..\src\modules\keyboard\wrap_Keyboard.h" />
-    <ClInclude Include="..\..\src\modules\mouse\Mouse.h" />
-    <ClInclude Include="..\..\src\modules\mouse\sdl\Mouse.h" />
-    <ClInclude Include="..\..\src\modules\mouse\wrap_Mouse.h" />
-    <ClInclude Include="..\..\src\modules\physics\Body.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\Body.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\ChainShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\CircleShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\Contact.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\DistanceJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\EdgeShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\Fixture.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\FrictionJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\GearJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\Joint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\MouseJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\Physics.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\PolygonShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\PrismaticJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\PulleyJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\RevoluteJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\RopeJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\Shape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\WeldJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\WheelJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\World.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Body.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_ChainShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_CircleShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Contact.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Fixture.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_GearJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Joint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Physics.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Shape.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.h" />
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_World.h" />
-    <ClInclude Include="..\..\src\modules\physics\Joint.h" />
-    <ClInclude Include="..\..\src\modules\physics\Shape.h" />
-    <ClInclude Include="..\..\src\modules\thread\posix\threads.h">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\sdl\threads.h">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\Thread.h" />
-    <ClInclude Include="..\..\src\modules\thread\threads.h" />
-    <ClInclude Include="..\..\src\modules\thread\win32\threads.h">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\wrap_Thread.h" />
-    <ClInclude Include="..\..\src\modules\timer\sdl\Timer.h" />
-    <ClInclude Include="..\..\src\modules\timer\Timer.h" />
-    <ClInclude Include="..\..\src\modules\timer\wrap_Timer.h" />
-    <ClInclude Include="..\..\src\modules\window\sdl\Window.h" />
-    <ClInclude Include="..\..\src\modules\window\Window.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="app.rc" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="love.ico" />
+    <ProjectConfiguration Include="Release Dynamic|x64">
+      <Configuration>Release Dynamic</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Static|Win32">
+      <Configuration>Release Static</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release Static|x64">
+      <Configuration>Release Static</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
   </ItemGroup>
   <PropertyGroup Label="Globals">
-    <ProjectGuid>{AED6D87B-9F81-49D0-8C6B-1C9F64421ECC}</ProjectGuid>
-    <RootNamespace>love</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>Windows7.1SDK</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
     <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="Configuration">
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'" Label="Configuration">
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>Windows7.1SDK</PlatformToolset>
+  </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'" Label="PropertySheets">
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   </ImportGroup>
   <PropertyGroup Label="UserMacros" />
-  <PropertyGroup />
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <GenerateManifest>false</GenerateManifest>
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Debug\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Debug\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <GenerateManifest>false</GenerateManifest>
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Debug\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Debug\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MD\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MT\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'">
+    <OutDir>$(SolutionDir)\bin\$(PlatformShortName)\Release\MT\</OutDir>
+    <IntDir>$(ProjectName)\$(PlatformShortName)\Release\</IntDir>
+    <GenerateManifest>false</GenerateManifest>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|Win32'">
     <ClCompile>
+      <PreprocessorDefinitions>DEBUG;_DEBUG%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
-      <ObjectFileName>%(Identity)_d.obj</ObjectFileName>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
-      <PrecompiledHeader>NotUsing</PrecompiledHeader>
-      <PrecompiledHeaderFile>
-      </PrecompiledHeaderFile>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;VC_EXTRALEAN;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>include\SDL;..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>
+      </MultiProcessorCompilation>
+      <MinimalRebuild>false</MinimalRebuild>
     </ClCompile>
     <Link>
+      <TargetMachine>MachineX86</TargetMachine>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>lib</AdditionalLibraryDirectories>
-      <AdditionalDependencies>opengl32.lib;glu32.lib;DevIL.lib;freetype244MT.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua.lib;modplug_d.lib;OpenAL32.lib;physfs.lib;SDL.lib;SDLmain.lib;libFLAC_static_D.lib;libFLAC++_static_D.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <SubSystem>Console</SubSystem>
-      <AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
+      <SubSystem>Windows</SubSystem>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Debug\MD\</AdditionalLibraryDirectories>
+      <AdditionalDependencies>msvcrtd.lib;msvcprtd.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
     </Link>
   </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dynamic|x64'">
     <ClCompile>
+      <PreprocessorDefinitions>DEBUG;_DEBUG%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
-      <Optimization>MaxSpeed</Optimization>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>include\SDL;..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <MultiProcessorCompilation>
+      </MultiProcessorCompilation>
+      <MinimalRebuild>false</MinimalRebuild>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Debug\MT\</AdditionalLibraryDirectories>
+      <AdditionalDependencies>msvcrtd.lib;msvcprtd.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua5.1.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|Win32'">
+    <ClCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <WarningLevel>Level1</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <AdditionalIncludeDirectories>include\SDL;..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <OmitFramePointers>true</OmitFramePointers>
+      <StringPooling>true</StringPooling>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
       <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>include;include\SDL;include\AL;..\..\src;..\..\src\libraries;..\..\src\modules;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
-      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
-      <ObjectFileName>%(Identity).obj</ObjectFileName>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;VC_EXTRALEAN;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <StringPooling>
-      </StringPooling>
-      <MinimalRebuild>
-      </MinimalRebuild>
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>
     </ClCompile>
     <Link>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <TargetMachine>MachineX86</TargetMachine>
+      <GenerateDebugInformation>
+      </GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>opengl32.lib;glu32.lib;DevIL.lib;freetype244MT.lib;libmpg123.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua.lib;modplug.lib;OpenAL32.lib;physfs.lib;SDL.lib;SDLmain.lib;ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>lib</AdditionalLibraryDirectories>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Release\MD\</AdditionalLibraryDirectories>
+      <AdditionalDependencies>msvcrt.lib;msvcprt.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Dynamic|x64'">
+    <ClCompile>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <WarningLevel>Level1</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <AdditionalIncludeDirectories>include\SDL;..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <OmitFramePointers>true</OmitFramePointers>
+      <StringPooling>true</StringPooling>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+    </ClCompile>
+    <Link>
+      <GenerateDebugInformation>
+      </GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
-      <AdditionalOptions>/FORCE:MULTIPLE %(AdditionalOptions)</AdditionalOptions>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Release\MD\</AdditionalLibraryDirectories>
+      <AdditionalDependencies>msvcrt.lib;msvcprt.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua51.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
     </Link>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>include\SDL;..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <OmitFramePointers>true</OmitFramePointers>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <AdditionalDependencies>libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua5.1.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Release\MT\</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>include\SDL;..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <OmitFramePointers>true</OmitFramePointers>
+      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <AdditionalDependencies>libcmt.lib;libcpmt.lib;kernel32.lib;user32.lib;shell32.lib;uuid.lib;advapi32.lib;ws2_32.lib;opengl32.lib;oldnames.lib;freetype2.lib;libmodplug.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;lua5.1.lib;physfs.lib;SDLmain.lib;zlib.lib;DevIL.lib;mpg123.lib;OpenAL.lib;SDL.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>lib\$(PlatformShortName)\Release\MT\</AdditionalLibraryDirectories>
+      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ResourceCompile Include="love.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="liblove.vcxproj">
+      <Project>{a3fcc735-3e18-4d6b-9da9-01d9e910b7f8}</Project>
+      <Private>false</Private>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+      <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\src\love.cpp" />
+  </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>

+ 1 - 1337
platform/msvc2010/love.vcxproj.filters

@@ -1,1345 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <Filter Include="modules">
-      <UniqueIdentifier>{21718f2d-1708-4f8c-b2d9-5ae941335ff3}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\audio">
-      <UniqueIdentifier>{ecb80393-e4ce-4834-83f8-915bb862560a}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\audio\openal">
-      <UniqueIdentifier>{1d0f91d8-db76-41da-a979-b8bd256db3b7}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\audio\null">
-      <UniqueIdentifier>{e3b813a1-6543-4d8c-8ab7-7807a18f4546}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\event">
-      <UniqueIdentifier>{78e32753-6494-4461-aaa9-6ec0e25fdcd4}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\event\sdl">
-      <UniqueIdentifier>{0c933c63-8eb2-403f-996c-fa1b5694ee03}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\filesystem">
-      <UniqueIdentifier>{7f415639-3adb-4f8e-bb46-942e6633bc85}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\filesystem\physfs">
-      <UniqueIdentifier>{f5f66e7d-0a53-47d7-afde-b6e8c8c2804b}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\font">
-      <UniqueIdentifier>{a48d663f-75c0-4657-b183-82e6d41d5506}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\font\freetype">
-      <UniqueIdentifier>{04d149f3-1be7-41f6-9f9d-a450bec64a1e}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\graphics">
-      <UniqueIdentifier>{bbd5a94c-216d-4452-80d2-e2645e6b4b5b}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\graphics\opengl">
-      <UniqueIdentifier>{c98a73f4-6459-4b2a-b9bc-1fd7fc9a0c51}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\image">
-      <UniqueIdentifier>{faaaf964-6808-4899-afb6-dc3954498a3e}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\image\devil">
-      <UniqueIdentifier>{12e62a4f-46c5-4fe9-8f5c-a235e23704f2}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\joystick">
-      <UniqueIdentifier>{f5345130-0ff7-4e15-8471-ec14276e19bc}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\joystick\sdl">
-      <UniqueIdentifier>{332a13ce-79f1-4142-8212-030384e9c3bf}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\keyboard">
-      <UniqueIdentifier>{2230709f-88b8-4823-8f6e-9ebd6541759a}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\keyboard\sdl">
-      <UniqueIdentifier>{daa485cb-5ede-46df-99e4-a91053d4363c}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\mouse">
-      <UniqueIdentifier>{4efc297b-8e3d-4841-9cbf-6bb638ff699e}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\mouse\sdl">
-      <UniqueIdentifier>{14139ad0-f290-44d2-9524-2813458c1347}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\physics">
-      <UniqueIdentifier>{b1d3e8d2-4ac9-4f6a-b69d-7ac42113d87f}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\sound">
-      <UniqueIdentifier>{cee682a4-e85e-49e5-b67c-c7ee37cca3aa}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\sound\lullaby">
-      <UniqueIdentifier>{a16246b7-cfc9-4888-9a29-42297595f663}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\thread">
-      <UniqueIdentifier>{6e32c8cf-d49d-4a78-a1d8-21240da24dab}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\timer">
-      <UniqueIdentifier>{60308813-dcf2-47cb-869b-f3d7bb7c805d}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\timer\sdl">
-      <UniqueIdentifier>{71bb9eb2-9e5c-41a9-af64-77ab6b81e98e}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="luasocket">
-      <UniqueIdentifier>{9faf15c8-bcff-4445-ba8b-009038f01ebb}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="luasocket\libluasocket">
-      <UniqueIdentifier>{d8b037d0-25fe-47df-bdbb-a85bd556231c}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="common">
-      <UniqueIdentifier>{f4054111-5d0f-40d9-90a9-da5da444bc50}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="utf8">
-      <UniqueIdentifier>{1aa85882-2a85-47c7-8d4b-19b41feb6b82}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="utf8\utf8">
-      <UniqueIdentifier>{014c1d0d-8028-42fc-a870-19f78d93b083}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\thread\win32">
-      <UniqueIdentifier>{07055354-8f1c-4db7-8129-87e07b6da216}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\thread\sdl">
-      <UniqueIdentifier>{ef6d45be-dfa4-4260-9152-d671571e93d1}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\thread\posix">
-      <UniqueIdentifier>{58b00bbb-5c09-4510-8a23-5c3f869354b2}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D">
-      <UniqueIdentifier>{5e41ee66-11e1-479f-8937-b14436a34de1}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Collision">
-      <UniqueIdentifier>{997022df-9fb8-4c89-9030-669d180c5a98}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Common">
-      <UniqueIdentifier>{e757e102-2b56-4802-9a6d-03be5d69be25}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Dynamics">
-      <UniqueIdentifier>{31f30224-9040-4f55-b5fa-3e5a288e75d0}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Rope">
-      <UniqueIdentifier>{33235938-7b0c-451e-be82-8fe0cdb5a7be}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Collision\Shapes">
-      <UniqueIdentifier>{31ed03bf-a64f-4508-8de3-de81c295a31f}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Dynamics\Contacts">
-      <UniqueIdentifier>{12990be8-e8f2-4b22-994e-edd15c2b1cdd}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Box2D\Dynamics\Joints">
-      <UniqueIdentifier>{0af6f9d5-64f5-4d97-bc07-502d9c7c6f7b}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\physics\box2d">
-      <UniqueIdentifier>{9282b1b4-0df5-4180-8840-ea58561dc7b8}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\window">
-      <UniqueIdentifier>{d3e343d0-39a3-4144-884b-dc37d5f12c6c}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="modules\window\sdl">
-      <UniqueIdentifier>{240a0dac-971b-43f6-829c-b06e54bddd7a}</UniqueIdentifier>
-    </Filter>
+    <ResourceCompile Include="love.rc" />
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\src\love.cpp" />
-    <ClCompile Include="..\..\src\modules\audio\Source.cpp">
-      <Filter>modules\audio</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\wrap_Audio.cpp">
-      <Filter>modules\audio</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\wrap_Source.cpp">
-      <Filter>modules\audio</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\openal\Audio.cpp">
-      <Filter>modules\audio\openal</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\openal\Pool.cpp">
-      <Filter>modules\audio\openal</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\openal\Source.cpp">
-      <Filter>modules\audio\openal</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\null\Audio.cpp">
-      <Filter>modules\audio\null</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\null\Source.cpp">
-      <Filter>modules\audio\null</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\event\Event.cpp">
-      <Filter>modules\event</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\event\sdl\Event.cpp">
-      <Filter>modules\event\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\event\sdl\wrap_Event.cpp">
-      <Filter>modules\event\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\File.cpp">
-      <Filter>modules\filesystem</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\FileData.cpp">
-      <Filter>modules\filesystem</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\File.cpp">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\Filesystem.cpp">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_File.cpp">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_FileData.cpp">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\GlyphData.cpp">
-      <Filter>modules\font</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\ImageRasterizer.cpp">
-      <Filter>modules\font</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\Rasterizer.cpp">
-      <Filter>modules\font</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\wrap_GlyphData.cpp">
-      <Filter>modules\font</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\wrap_Rasterizer.cpp">
-      <Filter>modules\font</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\freetype\Font.cpp">
-      <Filter>modules\font\freetype</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.cpp">
-      <Filter>modules\font\freetype</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\font\freetype\wrap_Font.cpp">
-      <Filter>modules\font\freetype</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\Drawable.cpp">
-      <Filter>modules\graphics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\Graphics.cpp">
-      <Filter>modules\graphics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\Image.cpp">
-      <Filter>modules\graphics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\Volatile.cpp">
-      <Filter>modules\graphics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Font.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\GLee.c">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Graphics.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Image.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\ParticleSystem.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Quad.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\SpriteBatch.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Font.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Image.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Quad.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\image\ImageData.cpp">
-      <Filter>modules\image</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\image\wrap_Image.cpp">
-      <Filter>modules\image</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\image\wrap_ImageData.cpp">
-      <Filter>modules\image</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\image\devil\Image.cpp">
-      <Filter>modules\image\devil</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\image\devil\ImageData.cpp">
-      <Filter>modules\image\devil</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\joystick\Joystick.cpp">
-      <Filter>modules\joystick</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\joystick\sdl\Joystick.cpp">
-      <Filter>modules\joystick\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\joystick\sdl\wrap_Joystick.cpp">
-      <Filter>modules\joystick\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\SoundData.cpp">
-      <Filter>modules\sound</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\wrap_Decoder.cpp">
-      <Filter>modules\sound</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\wrap_Sound.cpp">
-      <Filter>modules\sound</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\wrap_SoundData.cpp">
-      <Filter>modules\sound</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\lullaby\Decoder.cpp">
-      <Filter>modules\sound\lullaby</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\lullaby\FLACDecoder.cpp">
-      <Filter>modules\sound\lullaby</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp">
-      <Filter>modules\sound\lullaby</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp">
-      <Filter>modules\sound\lullaby</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\lullaby\Sound.cpp">
-      <Filter>modules\sound\lullaby</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp">
-      <Filter>modules\sound\lullaby</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\luasocket.cpp">
-      <Filter>luasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\udp.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\wsocket.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\auxiliar.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\buffer.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\except.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\inet.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\io.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\luasocket.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\mime.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\options.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\select.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\tcp.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\luasocket\libluasocket\timeout.c">
-      <Filter>luasocket\libluasocket</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Exception.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Matrix.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Object.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Reference.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\runtime.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\utf8.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Vector.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\wrap_Data.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\b64.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\delay.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\PixelEffect.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\VertexBuffer.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\Thread.cpp">
-      <Filter>modules\thread</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\threads.cpp">
-      <Filter>modules\thread</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\wrap_Thread.cpp">
-      <Filter>modules\thread</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\win32\threads.cpp">
-      <Filter>modules\thread\win32</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\sdl\threads.cpp">
-      <Filter>modules\thread\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\thread\posix\threads.cpp">
-      <Filter>modules\thread\posix</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\DrawQable.cpp">
-      <Filter>modules\graphics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\Canvas.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\wrap_Canvas.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\Quad.cpp">
-      <Filter>modules\graphics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.cpp">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.cpp">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.cpp">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.cpp">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideCircle.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollideEdge.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2CollidePolygon.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Collision.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2Distance.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.cpp">
-      <Filter>Box2D\Collision</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.cpp">
-      <Filter>Box2D\Common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Draw.cpp">
-      <Filter>Box2D\Common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Math.cpp">
-      <Filter>Box2D\Common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Settings.cpp">
-      <Filter>Box2D\Common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.cpp">
-      <Filter>Box2D\Common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Common\b2Timer.cpp">
-      <Filter>Box2D\Common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.cpp">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.cpp">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Body.cpp">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.cpp">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.cpp">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2Island.cpp">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2World.cpp">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.cpp">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\libraries\Box2D\Rope\b2Rope.cpp">
-      <Filter>Box2D\Rope</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\Body.cpp">
-      <Filter>modules\physics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\Joint.cpp">
-      <Filter>modules\physics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\Shape.cpp">
-      <Filter>modules\physics</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\Body.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\ChainShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\CircleShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\Contact.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\DistanceJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\EdgeShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\Fixture.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\FrictionJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\GearJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\Joint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\MouseJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\Physics.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\PolygonShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\PrismaticJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\PulleyJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\RevoluteJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\RopeJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\Shape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\WeldJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\WheelJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\World.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Body.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_ChainShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_CircleShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Contact.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Fixture.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_GearJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Joint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Physics.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_Shape.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\physics\box2d\wrap_World.cpp">
-      <Filter>modules\physics\box2d</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Memoizer.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\timer\sdl\Timer.cpp">
-      <Filter>modules\timer\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\timer\wrap_Timer.cpp">
-      <Filter>modules\timer</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\mouse\wrap_Mouse.cpp">
-      <Filter>modules\mouse</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\mouse\Mouse.cpp">
-      <Filter>modules\mouse</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\mouse\sdl\Mouse.cpp">
-      <Filter>modules\mouse\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\keyboard\wrap_Keyboard.cpp">
-      <Filter>modules\keyboard</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\keyboard\Keyboard.cpp">
-      <Filter>modules\keyboard</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\keyboard\sdl\Keyboard.cpp">
-      <Filter>modules\keyboard\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\common\Variant.cpp">
-      <Filter>common</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\sound\Sound.cpp">
-      <Filter>modules\sound</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\window\Window.cpp">
-      <Filter>modules\window</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\window\sdl\Window.cpp">
-      <Filter>modules\window\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\audio\Audio.cpp">
-      <Filter>modules\audio</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\OpenGL.cpp">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\src\modules\audio\Audio.h">
-      <Filter>modules\audio</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\Source.h">
-      <Filter>modules\audio</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\wrap_Audio.h">
-      <Filter>modules\audio</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\wrap_Source.h">
-      <Filter>modules\audio</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\openal\Audio.h">
-      <Filter>modules\audio\openal</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\openal\Pool.h">
-      <Filter>modules\audio\openal</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\openal\Source.h">
-      <Filter>modules\audio\openal</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\null\Audio.h">
-      <Filter>modules\audio\null</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\audio\null\Source.h">
-      <Filter>modules\audio\null</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\event\Event.h">
-      <Filter>modules\event</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\event\sdl\Event.h">
-      <Filter>modules\event\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\event\sdl\wrap_Event.h">
-      <Filter>modules\event\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\File.h">
-      <Filter>modules\filesystem</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\FileData.h">
-      <Filter>modules\filesystem</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\File.h">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\Filesystem.h">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_File.h">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_FileData.h">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\filesystem\physfs\wrap_Filesystem.h">
-      <Filter>modules\filesystem\physfs</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\Font.h">
-      <Filter>modules\font</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\GlyphData.h">
-      <Filter>modules\font</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\ImageRasterizer.h">
-      <Filter>modules\font</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\Rasterizer.h">
-      <Filter>modules\font</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\wrap_GlyphData.h">
-      <Filter>modules\font</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\wrap_Rasterizer.h">
-      <Filter>modules\font</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\freetype\Font.h">
-      <Filter>modules\font\freetype</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\freetype\TrueTypeRasterizer.h">
-      <Filter>modules\font\freetype</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\font\freetype\wrap_Font.h">
-      <Filter>modules\font\freetype</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\Drawable.h">
-      <Filter>modules\graphics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\Graphics.h">
-      <Filter>modules\graphics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\Image.h">
-      <Filter>modules\graphics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\Volatile.h">
-      <Filter>modules\graphics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Font.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\GLee.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Graphics.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Image.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\ParticleSystem.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Quad.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\SpriteBatch.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Font.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Graphics.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Image.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Quad.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\image\Image.h">
-      <Filter>modules\image</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\image\ImageData.h">
-      <Filter>modules\image</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\image\wrap_Image.h">
-      <Filter>modules\image</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\image\wrap_ImageData.h">
-      <Filter>modules\image</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\image\devil\Image.h">
-      <Filter>modules\image\devil</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\image\devil\ImageData.h">
-      <Filter>modules\image\devil</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\joystick\Joystick.h">
-      <Filter>modules\joystick</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\joystick\sdl\Joystick.h">
-      <Filter>modules\joystick\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\joystick\sdl\wrap_Joystick.h">
-      <Filter>modules\joystick\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\luasocket\luasocket.h">
-      <Filter>luasocket</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\config.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Data.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\EnumMap.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Exception.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\math.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Matrix.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Module.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Object.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Reference.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\runtime.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\StringMap.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\types.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\utf8.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Vector.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\version.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\wrap_Data.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\b64.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\utf8\utf8.h">
-      <Filter>utf8</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\utf8\utf8\checked.h">
-      <Filter>utf8\utf8</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\utf8\utf8\core.h">
-      <Filter>utf8\utf8</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\utf8\utf8\unchecked.h">
-      <Filter>utf8\utf8</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\delay.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\PixelEffect.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_PixelEffect.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\VertexBuffer.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\Thread.h">
-      <Filter>modules\thread</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\threads.h">
-      <Filter>modules\thread</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\wrap_Thread.h">
-      <Filter>modules\thread</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\win32\threads.h">
-      <Filter>modules\thread\win32</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\sdl\threads.h">
-      <Filter>modules\thread\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\thread\posix\threads.h">
-      <Filter>modules\thread\posix</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\DrawQable.h">
-      <Filter>modules\graphics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\Canvas.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\wrap_Canvas.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\Quad.h">
-      <Filter>modules\graphics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Box2D.h">
-      <Filter>Box2D</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2ChainShape.h">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2CircleShape.h">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2EdgeShape.h">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2PolygonShape.h">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\Shapes\b2Shape.h">
-      <Filter>Box2D\Collision\Shapes</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2BroadPhase.h">
-      <Filter>Box2D\Collision</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Collision.h">
-      <Filter>Box2D\Collision</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2Distance.h">
-      <Filter>Box2D\Collision</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2DynamicTree.h">
-      <Filter>Box2D\Collision</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Collision\b2TimeOfImpact.h">
-      <Filter>Box2D\Collision</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2BlockAllocator.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Draw.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2GrowableStack.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Math.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Settings.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2StackAllocator.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Common\b2Timer.h">
-      <Filter>Box2D\Common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndPolygonContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2CircleContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2Contact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ContactSolver.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndCircleContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2EdgeAndPolygonContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonAndCircleContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2PolygonContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Contacts\b2ChainAndCircleContact.h">
-      <Filter>Box2D\Dynamics\Contacts</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RevoluteJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2RopeJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WeldJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2WheelJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2DistanceJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2FrictionJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2GearJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2Joint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2MouseJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PrismaticJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\Joints\b2PulleyJoint.h">
-      <Filter>Box2D\Dynamics\Joints</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Body.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2ContactManager.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Fixture.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2Island.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2TimeStep.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2World.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Dynamics\b2WorldCallbacks.h">
-      <Filter>Box2D\Dynamics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\libraries\Box2D\Rope\b2Rope.h">
-      <Filter>Box2D\Rope</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\Body.h">
-      <Filter>modules\physics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\Joint.h">
-      <Filter>modules\physics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\Shape.h">
-      <Filter>modules\physics</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\Body.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\ChainShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\CircleShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\Contact.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\DistanceJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\EdgeShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\Fixture.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\FrictionJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\GearJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\Joint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\MouseJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\Physics.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\PolygonShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\PrismaticJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\PulleyJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\RevoluteJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\RopeJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\Shape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\WeldJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\WheelJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\World.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Body.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_ChainShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_CircleShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Contact.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_DistanceJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_EdgeShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Fixture.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_FrictionJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_GearJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Joint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_MouseJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Physics.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PolygonShape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_PulleyJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_RopeJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_Shape.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WeldJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_WheelJoint.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\physics\box2d\wrap_World.h">
-      <Filter>modules\physics\box2d</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Memoizer.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\timer\sdl\Timer.h">
-      <Filter>modules\timer\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\timer\Timer.h">
-      <Filter>modules\timer</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\timer\wrap_Timer.h">
-      <Filter>modules\timer</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\mouse\Mouse.h">
-      <Filter>modules\mouse</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\mouse\wrap_Mouse.h">
-      <Filter>modules\mouse</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\mouse\sdl\Mouse.h">
-      <Filter>modules\mouse\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\keyboard\Keyboard.h">
-      <Filter>modules\keyboard</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\keyboard\wrap_Keyboard.h">
-      <Filter>modules\keyboard</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\keyboard\sdl\Keyboard.h">
-      <Filter>modules\keyboard\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\common\Variant.h">
-      <Filter>common</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\window\Window.h">
-      <Filter>modules\window</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\window\sdl\Window.h">
-      <Filter>modules\window\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\OpenGL.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="app.rc" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="love.ico" />
   </ItemGroup>
 </Project>

+ 0 - 0
Makefile.am → platform/unix/Makefile.am


+ 26 - 5
platform/unix/automagic

@@ -1,15 +1,36 @@
 #!/bin/bash
 
+die() {
+	echo "Fatal: "$@
+	exit 1
+}
+
+AUTOHEADER=$(which autoheader)
+AUTOCONF=$(which autoconf)
+LIBTOOLIZE=$(which libtoolize)
+ACLOCAL=$(which aclocal)
+AUTOMAKE=$(which automake)
+
+[[ -x ${AUTOHEADER} ]] || die "Could not find autoheader. Install autoconf."
+[[ -x ${AUTOCONF} ]]   || die "Could not find autoconf."
+[[ -x ${LIBTOOLIZE} ]] || die "Could not find libtoolize. Install libtool."
+[[ -x ${ACLOCAL} ]]    || die "Could not find aclocal. Install automake."
+[[ -x ${AUTOMAKE} ]]   || die "Could not find automake."
+
 automagic() {
+	cp platform/unix/configure.in .
+	cp platform/unix/Makefile.am .
+
 	if ! sh platform/unix/gen-makefile; then
 		echo "You should be doing this from the root directory of the project."
 		exit 1
 	fi
-	autoheader 2>&1 || return 1 # Gimmie config.h.in
-	libtoolize --force 2>&1 || return 1
-	aclocal 2>&1 || return 1
-	autoconf 2>&1 || return 1
-	automake -a 2>&1 || return 1
+
+	${AUTOHEADER} 2>&1 || return 1 # Gimmie config.h.in
+	${LIBTOOLIZE} --force 2>&1 || return 1
+	${ACLOCAL} 2>&1 || return 1
+	${AUTOCONF} 2>&1 || return 1
+	${AUTOMAKE} -a 2>&1 || return 1
 }
 
 if [[ $1 == "-d" ]]; then

+ 27 - 11
configure.in → platform/unix/configure.in

@@ -3,11 +3,14 @@ AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([platform/unix])
 AC_CONFIG_MACRO_DIR([platform/unix/m4])
 AC_CONFIG_SRCDIR([src/love.cpp])
-AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar])
+AM_INIT_AUTOMAKE([foreign -Wall foreign tar-ustar silent-rules])
+AM_SILENT_RULES
 AC_PREFIX_DEFAULT([/usr])
+AM_PROG_AR
 AC_PROG_LIBTOOL
 AC_PROG_CC
 AC_PROG_CXX
+AC_C_BIGENDIAN
 AC_SEARCH_LIBS([sqrt], [m], [], AC_MSG_ERROR([Can't LÖVE without C math library]))
 AC_SEARCH_LIBS([SDL_Init], [SDL], [], AC_MSG_ERROR([Can't LÖVE without SDL]))
 AC_SEARCH_LIBS([glLoadIdentity], [GL], [], AC_MSG_ERROR([Can't LÖVE without OpenGL]))
@@ -23,7 +26,7 @@ AC_ARG_WITH([llvm-lua],
 	    [lua=llvm-lua],
 	    [])
 
-AS_IF([test "$lua" == "lua"],
+AS_IF([test "$lua" = "lua"],
 	AC_SEARCH_LIBS(
 		[lua_pcall],
 		[lua lua5.1],
@@ -33,7 +36,7 @@ AS_IF([test "$lua" == "lua"],
 		AC_MSG_ERROR([Can't LÖVE without Lua])
 	)
       )
-AS_IF([test "$lua" == "luajit"],
+AS_IF([test "$lua" = "luajit"],
 	AC_SEARCH_LIBS(
 		[lua_pcall],
 		[luajit luajit-5.1],
@@ -41,7 +44,7 @@ AS_IF([test "$lua" == "luajit"],
 		AC_MSG_ERROR([Can't LÖVE without LuaJIT])
 	)
       )
-AS_IF([test "$lua" == "llvm-lua"],
+AS_IF([test "$lua" = "llvm-lua"],
 	AC_SEARCH_LIBS(
 		[lua_pcall],
 		[llvm-lua],
@@ -51,17 +54,30 @@ AS_IF([test "$lua" == "llvm-lua"],
       )
 
 AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL]))
-AC_SEARCH_LIBS([mng_initialize], [mng], [], AC_MSG_ERROR([DevIL needs MNG]))
-AC_SEARCH_LIBS([TIFFOpen], [tiff], [], AC_MSG_ERROR([DevIL needs TIFF]))
 AC_SEARCH_LIBS([FT_Load_Glyph], [freetype], [], AC_MSG_ERROR([Can't LÖVE without FreeType]))
 AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS]))
 AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug]))
-AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123]))
-AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[]))
 AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile]))
-AC_ARG_ENABLE([headless],
-	      [  --enable-headless Build with less SDL],
-	      AC_DEFINE([LOVE_HEADLESS], [], [Build with less SDL]), [])
+
+AC_ARG_ENABLE([mpg123], AC_HELP_STRING([--disable-mpg123], [Disable mp3 support, for patent-free builds]), [], [enable_mpg123=yes])
+AS_IF([test "x$enable_mpg123" != xno],
+	AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123])))
+AS_IF([test "x$enable_mpg123" != xno],
+	AC_DEFINE([LOVE_NOMPG123], [], [Build without mpg123]))
+AS_IF([test "x$enable_mpg123" != xno],
+	AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[])))
+
+AC_ARG_ENABLE([exe], AC_HELP_STRING([--disable-exe], [Disable building of executable launcher]), [], [enable_exe=yes])
+AS_IF([test "x$enable_exe" != xno],
+	  AC_DEFINE([LOVE_BUILD_EXE], [], [Don't build launcher]))
+AM_CONDITIONAL([LOVE_BUILD_EXE], [test "x$enable_exe" != xno])
+
+AC_ARG_ENABLE([gme], AC_HELP_STRING([--enable-gme], [Enable GME support, for more chiptuney goodness]), [], [enable_gme=no])
+AS_IF([test "x$enable_gme" == xyes],
+	  AC_SEARCH_LIBS([gme_open_data], [gme], [], AC_MSG_ERROR([Can't LÖVE without gme])))
+AS_IF([test "x$enable_gme" == xyes],
+	  AC_DEFINE([LOVE_SUPPORT_GME], [], [Enable gme]))
+
 AC_CONFIG_FILES([
 	Makefile
 	src/Makefile

+ 27 - 26
platform/unix/exclude

@@ -1,26 +1,27 @@
-./modules/native/tcc/libtcc/tccelf.c
-./modules/native/tcc/libtcc/x86_64-gen.c
-./modules/native/tcc/libtcc/tccasm.c
-./modules/native/tcc/libtcc/tccpp.c
-./modules/native/tcc/libtcc/il-gen.c
-./modules/native/tcc/libtcc/c67-gen.c
-./modules/native/tcc/libtcc/tcc.c
-./modules/native/tcc/libtcc/elf.h
-./modules/native/tcc/libtcc/tcccoff.c
-./modules/native/tcc/libtcc/config.h
-./modules/native/tcc/libtcc/i386-asm.h
-./modules/native/tcc/libtcc/tccpe.c
-./modules/native/tcc/libtcc/tcctok.h
-./modules/native/tcc/libtcc/arm-gen.c
-./modules/native/tcc/libtcc/i386-asm.c
-./modules/native/tcc/libtcc/i386-gen.c
-./modules/native/tcc/libtcc/tccgen.c
-./modules/native/tcc/libtcc/tcc.h
-./modules/native/tcc/libtcc/il-opcodes.h
-./modules/native/tcc/libtcc/coff.h
-./modules/native/tcc/libtcc/stab.h
-./libraries/luasocket/libluasocket/wsocket.*
-./modules/sound/lullaby/FLACDecoder.*
-./modules/thread/sdl/*
-./modules/thread/win32/*
-./modules/thread/posix/*
+\./modules/native/tcc/libtcc/tccelf\.c
+\./modules/native/tcc/libtcc/x86_64-gen\.c
+\./modules/native/tcc/libtcc/tccasm\.c
+\./modules/native/tcc/libtcc/tccpp\.c
+\./modules/native/tcc/libtcc/il-gen\.c
+\./modules/native/tcc/libtcc/c67-gen\.c
+\./modules/native/tcc/libtcc/tcc\.c
+\./modules/native/tcc/libtcc/elf\.h
+\./modules/native/tcc/libtcc/tcccoff\.c
+\./modules/native/tcc/libtcc/config\.h
+\./modules/native/tcc/libtcc/i386-asm\.h
+\./modules/native/tcc/libtcc/tccpe\.c
+\./modules/native/tcc/libtcc/tcctok\.h
+\./modules/native/tcc/libtcc/arm-gen\.c
+\./modules/native/tcc/libtcc/i386-asm\.c
+\./modules/native/tcc/libtcc/i386-gen\.c
+\./modules/native/tcc/libtcc/tccgen\.c
+\./modules/native/tcc/libtcc/tcc\.h
+\./modules/native/tcc/libtcc/il-opcodes\.h
+\./modules/native/tcc/libtcc/coff\.h
+\./modules/native/tcc/libtcc/stab\.h
+\./libraries/luasocket/libluasocket/wsocket\.*
+\./modules/sound/lullaby/FLACDecoder\.*
+\./modules/thread/sdl/*
+\./modules/thread/win32/*
+\./modules/thread/posix/*
+\./love\.cpp

+ 9 - 4
platform/unix/gen-makefile

@@ -4,17 +4,22 @@ cd src
 inc_current=.
 inc_modules="$inc_current/modules"
 inc_libraries="$inc_current/libraries"
-echo "AM_CPPFLAGS = -I$inc_current -I$inc_modules -I$inc_libraries -I/usr/include/AL -I/usr/include/freetype2  \$(INCLUDE_LUA) -I/usr/include/SDL \$(FILE_OFFSET)
+echo "AM_CPPFLAGS = -I$inc_current -I$inc_modules -I$inc_libraries -I/usr/include/AL -I/usr/include/freetype2  \$(INCLUDE_LUA) -I/usr/include/SDL \$(FILE_OFFSET) -I/usr/include/gme
 AUTOMAKE_OPTIONS = subdir-objects
-DEFAULT_INCLUDES =
 SUBDIRS =
 
+if LOVE_BUILD_EXE
 # LÖVE executable
 bin_PROGRAMS = love
 #love_LDFLAGS =
-#love_LDADD =
+love_LDADD = liblove.la
+love_SOURCES = love.cpp
+endif
 
-love_SOURCES = \\" > Makefile.am.tmp
+# libLÖVE
+lib_LTLIBRARIES = liblove.la
+liblove_la_LDFLAGS = -module -export-dynamic \$(LDFLAGS)
+liblove_la_SOURCES = \\" > Makefile.am.tmp
 find . \( \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" -o -iname "*.lch" \) \) -exec echo '{}' \\ \; >> Makefile.am.tmp
 cat Makefile.am.tmp | grep -v -f"../platform/unix/exclude" | head -c -3 > Makefile.am
 #head -c -3 Makefile.am.tmp > Makefile.am

+ 58 - 56
src/common/Data.h

@@ -1,56 +1,58 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_DATA_H
-#define LOVE_DATA_H
-
-// LOVE
-#include "config.h"
-#include "Object.h"
-
-namespace love
-{
-	/**
-	* This class is a simple abstraction over all objects which contain data.
-	**/
-	class Data : public Object
-	{
-	public:
-
-		/**
-		* Destructor.
-		**/
-		virtual ~Data() {};
-
-		/**
-		* Gets a pointer to the data. This pointer will obviously not
-		* be valid if the Data object is destroyed.
-		**/
-		virtual void * getData() const = 0 ;
-
-		/**
-		* Gets the size of the Data in bytes.
-		**/
-		virtual int getSize() const = 0;
-
-	}; // Data
-} // love
-
-#endif // LOVE_DATA_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_DATA_H
+#define LOVE_DATA_H
+
+// LOVE
+#include "config.h"
+#include "Object.h"
+
+namespace love
+{
+
+/**
+ * This class is a simple abstraction over all objects which contain data.
+ **/
+class Data : public Object
+{
+public:
+
+	/**
+	 * Destructor.
+	 **/
+	virtual ~Data() {};
+
+	/**
+	 * Gets a pointer to the data. This pointer will obviously not
+	 * be valid if the Data object is destroyed.
+	 **/
+	virtual void *getData() const = 0 ;
+
+	/**
+	 * Gets the size of the Data in bytes.
+	 **/
+	virtual int getSize() const = 0;
+
+}; // Data
+
+} // love
+
+#endif // LOVE_DATA_H

+ 100 - 99
src/common/EnumMap.h

@@ -1,99 +1,100 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_ENUM_MAP_H
-#define LOVE_ENUM_MAP_H
-
-#include "Exception.h"
-
-namespace love
-{
-	template<typename T, typename U, unsigned PEAK>
-	class EnumMap
-	{
-	private:
-
-		struct Value
-		{
-			unsigned v;
-			bool set;
-			Value() : set(false) {}
-		};
-
-		Value values_t[PEAK];
-		Value values_u[PEAK];
-
-	public:
-
-		struct Entry
-		{
-			T t;
-			U u;
-		};
-
-		EnumMap(Entry * entries, unsigned size)
-		{
-			unsigned n = size/sizeof(Entry);
-
-			for (unsigned i = 0; i<n; ++i)
-			{
-				unsigned e_t = (unsigned)entries[i].t;
-				unsigned e_u = (unsigned)entries[i].u;
-
-				if (e_t < PEAK)
-				{
-					values_u[e_t].v = e_u;
-					values_u[e_t].set = true;
-				}
-				if (e_u < PEAK)
-				{
-					values_t[e_u].v = e_t;
-					values_t[e_u].set = true;
-				}
-			}
-		}
-
-		bool find(T t, U & u)
-		{
-			if ((unsigned)t < PEAK && values_u[(unsigned)t].set)
-			{
-				u = (U)values_u[(unsigned)t].v;
-				return true;
-			}
-
-			return false;
-		}
-
-		bool find(U u, T & t)
-		{
-			if ((unsigned)u < PEAK && values_t[(unsigned)u].set)
-			{
-				t = (T)values_t[(unsigned)u].v;
-				return true;
-			}
-
-			return false;
-		}
-
-	}; // EnumMap
-
-} // love
-
-#endif // LOVE_ENUM_MAP_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_ENUM_MAP_H
+#define LOVE_ENUM_MAP_H
+
+#include "Exception.h"
+
+namespace love
+{
+
+template<typename T, typename U, unsigned PEAK>
+class EnumMap
+{
+public:
+
+	struct Entry
+	{
+		T t;
+		U u;
+	};
+
+	EnumMap(Entry *entries, unsigned size)
+	{
+		unsigned n = size/sizeof(Entry);
+
+		for (unsigned i = 0; i<n; ++i)
+		{
+			unsigned e_t = (unsigned)entries[i].t;
+			unsigned e_u = (unsigned)entries[i].u;
+
+			if (e_t < PEAK)
+			{
+				values_u[e_t].v = e_u;
+				values_u[e_t].set = true;
+			}
+			if (e_u < PEAK)
+			{
+				values_t[e_u].v = e_t;
+				values_t[e_u].set = true;
+			}
+		}
+	}
+
+	bool find(T t, U &u)
+	{
+		if ((unsigned)t < PEAK && values_u[(unsigned)t].set)
+		{
+			u = (U)values_u[(unsigned)t].v;
+			return true;
+		}
+
+		return false;
+	}
+
+	bool find(U u, T &t)
+	{
+		if ((unsigned)u < PEAK && values_t[(unsigned)u].set)
+		{
+			t = (T)values_t[(unsigned)u].v;
+			return true;
+		}
+
+		return false;
+	}
+
+private:
+
+	struct Value
+	{
+		unsigned v;
+		bool set;
+		Value() : set(false) {}
+	};
+
+	Value values_t[PEAK];
+	Value values_u[PEAK];
+
+}; // EnumMap
+
+} // love
+
+#endif // LOVE_ENUM_MAP_H

+ 65 - 62
src/common/Exception.cpp

@@ -1,62 +1,65 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Exception.h"
-#include <common/config.h>
-#include <iostream>
-using namespace std;
-
-namespace love
-{
-	Exception::Exception(const char * fmt, ...)
-	{
-		va_list args;
-		int size_buffer = 256, size_out;
-		char * buffer;
-		while (true)
-		{
-			buffer = new char[size_buffer];
-			memset(buffer, 0, size_buffer);
-
-			va_start(args, fmt);
-			size_out = vsnprintf(buffer, size_buffer, fmt, args);
-			va_end(args);
-
-			// see http://perfec.to/vsnprintf/pasprintf.c
-			// if size_out ...
-			//      == -1             --> output was truncated
-			//      == size_buffer    --> output was truncated
-			//      == size_buffer-1  --> ambiguous, /may/ have been truncated
-			//       > size_buffer    --> output was truncated, and size_out
-			//                            bytes would have been written
-			if (size_out == size_buffer || size_out == -1 || size_out == size_buffer-1)
-				size_buffer *= 2;
-			else if (size_out > size_buffer)
-				size_buffer = size_out + 2; // to avoid the ambiguous case
-			else
-				break;
-
-			delete[] buffer;
-		}
-		message = std::string(buffer);
-		delete[] buffer;
-	}
-
-}
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Exception.h"
+#include "common/config.h"
+
+#include <iostream>
+
+using namespace std;
+
+namespace love
+{
+
+Exception::Exception(const char *fmt, ...)
+{
+	va_list args;
+	int size_buffer = 256, size_out;
+	char *buffer;
+	while (true)
+	{
+		buffer = new char[size_buffer];
+		memset(buffer, 0, size_buffer);
+
+		va_start(args, fmt);
+		size_out = vsnprintf(buffer, size_buffer, fmt, args);
+		va_end(args);
+
+		// see http://perfec.to/vsnprintf/pasprintf.c
+		// if size_out ...
+		//      == -1             --> output was truncated
+		//      == size_buffer    --> output was truncated
+		//      == size_buffer-1  --> ambiguous, /may/ have been truncated
+		//       > size_buffer    --> output was truncated, and size_out
+		//                            bytes would have been written
+		if (size_out == size_buffer || size_out == -1 || size_out == size_buffer-1)
+			size_buffer *= 2;
+		else if (size_out > size_buffer)
+			size_buffer = size_out + 2; // to avoid the ambiguous case
+		else
+			break;
+
+		delete[] buffer;
+	}
+	message = std::string(buffer);
+	delete[] buffer;
+}
+
+}

+ 67 - 64
src/common/Exception.h

@@ -1,64 +1,67 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_EXCEPTION_H
-#define LOVE_EXCEPTION_H
-
-#include <exception>
-#include <cstdarg> // vararg
-#include <cstdio> // vsnprintf
-#include <cstring> // strncpy
-#include <string>
-
-namespace love
-{
-	/**
-	* A convenient vararg-enabled exception class.
-	**/
-	class Exception : public std::exception
-	{
-	private:
-
-		std::string message;
-
-	public:
-
-		/**
-		* Creates a new Exception according to printf-rules.
-		*
-		* See: http://www.cplusplus.com/reference/clibrary/cstdio/printf/
-		*
-		* @param fmt The format string (see printf).
-		**/
-		Exception(const char * fmt, ...);
-		virtual ~Exception() throw() {}
-
-		/**
-		* Returns a string containing reason for the exception.
-		* @return A description of the exception.
-		**/
-		inline virtual const char * what() const throw()
-		{ return message.c_str(); }
-
-	}; // class
-
-} // love
-
-#endif // LOVE_EXCEPTION_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_EXCEPTION_H
+#define LOVE_EXCEPTION_H
+
+#include <exception>
+#include <cstdarg> // vararg
+#include <cstdio> // vsnprintf
+#include <cstring> // strncpy
+#include <string>
+
+namespace love
+{
+
+/**
+ * A convenient vararg-enabled exception class.
+ **/
+class Exception : public std::exception
+{
+public:
+
+	/**
+	 * Creates a new Exception according to printf-rules.
+	 *
+	 * See: http://www.cplusplus.com/reference/clibrary/cstdio/printf/
+	 *
+	 * @param fmt The format string (see printf).
+	 **/
+	Exception(const char *fmt, ...);
+	virtual ~Exception() throw() {}
+
+	/**
+	 * Returns a string containing reason for the exception.
+	 * @return A description of the exception.
+	 **/
+	inline virtual const char *what() const throw()
+	{
+		return message.c_str();
+	}
+
+private:
+
+	std::string message;
+
+}; // Exception
+
+} // love
+
+#endif // LOVE_EXCEPTION_H

+ 198 - 196
src/common/Matrix.cpp

@@ -1,196 +1,198 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Matrix.h"
-
-// STD
-#include <cstring> // memcpy
-#include <cmath>
-
-namespace love
-{
-
-	// | e0 e4 e8  e12 |
-	// | e1 e5 e9  e13 |
-	// | e2 e6 e10 e14 |
-	// | e3 e7 e11 e15 |
-
-	Matrix::Matrix()
-	{
-		setIdentity();
-	}
-
-	Matrix::~Matrix()
-	{
-	}
-
-	//                 | e0 e4 e8  e12 |
-	//                 | e1 e5 e9  e13 |
-	//                 | e2 e6 e10 e14 |
-	//                 | e3 e7 e11 e15 |
-	// | e0 e4 e8  e12 |
-	// | e1 e5 e9  e13 |
-	// | e2 e6 e10 e14 |
-	// | e3 e7 e11 e15 |
-
-	Matrix Matrix::operator * (const Matrix & m) const
-	{
-		Matrix t;
-
-		t.e[0] = (e[0]*m.e[0]) + (e[4]*m.e[1]) + (e[8]*m.e[2]) + (e[12]*m.e[3]);
-		t.e[4] = (e[0]*m.e[4]) + (e[4]*m.e[5]) + (e[8]*m.e[6]) + (e[12]*m.e[7]);
-		t.e[8] = (e[0]*m.e[8]) + (e[4]*m.e[9]) + (e[8]*m.e[10]) + (e[12]*m.e[11]);
-		t.e[12] = (e[0]*m.e[12]) + (e[4]*m.e[13]) + (e[8]*m.e[14]) + (e[12]*m.e[15]);
-
-		t.e[1] = (e[1]*m.e[0]) + (e[5]*m.e[1]) + (e[9]*m.e[2]) + (e[13]*m.e[3]);
-		t.e[5] = (e[1]*m.e[4]) + (e[5]*m.e[5]) + (e[9]*m.e[6]) + (e[13]*m.e[7]);
-		t.e[9] = (e[1]*m.e[8]) + (e[5]*m.e[9]) + (e[9]*m.e[10]) + (e[13]*m.e[11]);
-		t.e[13] = (e[1]*m.e[12]) + (e[5]*m.e[13]) + (e[9]*m.e[14]) + (e[13]*m.e[15]);
-
-		t.e[2] = (e[2]*m.e[0]) + (e[6]*m.e[1]) + (e[10]*m.e[2]) + (e[14]*m.e[3]);
-		t.e[6] = (e[2]*m.e[4]) + (e[6]*m.e[5]) + (e[10]*m.e[6]) + (e[14]*m.e[7]);
-		t.e[10] = (e[2]*m.e[8]) + (e[6]*m.e[9]) + (e[10]*m.e[10]) + (e[14]*m.e[11]);
-		t.e[14] = (e[2]*m.e[12]) + (e[6]*m.e[13]) + (e[10]*m.e[14]) + (e[14]*m.e[15]);
-
-		t.e[3] = (e[3]*m.e[0]) + (e[7]*m.e[1]) + (e[11]*m.e[2]) + (e[15]*m.e[3]);
-		t.e[7] = (e[3]*m.e[4]) + (e[7]*m.e[5]) + (e[11]*m.e[6]) + (e[15]*m.e[7]);
-		t.e[11] = (e[3]*m.e[8]) + (e[7]*m.e[9]) + (e[11]*m.e[10]) + (e[15]*m.e[11]);
-		t.e[15] = (e[3]*m.e[12]) + (e[7]*m.e[13]) + (e[11]*m.e[14]) + (e[15]*m.e[15]);
-
-		return t;
-	}
-
-	void Matrix::operator *= (const Matrix & m)
-	{
-		Matrix t = (*this) * m;
-		memcpy((void*)this->e, (void*)t.e, sizeof(float)*16);
-	}
-
-	const float * Matrix::getElements() const
-	{
-		return e;
-	}
-
-	void Matrix::setIdentity()
-	{
-		memset(e, 0, sizeof(float)*16);
-		e[0] = e[5] = e[10] = e[15] = 1;
-	}
-
-	void Matrix::setTranslation(float x, float y)
-	{
-		setIdentity();
-		e[12] = x;
-		e[13] = y;
-	}
-
-	void Matrix::setRotation(float rad)
-	{
-		setIdentity();
-		float c = cos(rad), s = sin(rad);
-		e[0] = c; e[4] = -s;
-		e[1] = s; e[5] = c;
-	}
-
-	void Matrix::setScale(float sx, float sy)
-	{
-		setIdentity();
-		e[0] = sx;
-		e[5] = sy;
-	}
-
-	void Matrix::setShear(float kx, float ky)
-	{
-		setIdentity();
-		e[1] = ky;
-		e[4] = kx;
-	}
-
-	void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
-	{
-		memset(e, 0, sizeof(float)*16); // zero out matrix
-		float c = cos(angle), s = sin(angle);
-		// matrix multiplication carried out on paper:
-		// |1     x| |c -s    | |sx       | | 1 ky    | |1     -ox|
-		// |  1   y| |s  c    | |   sy    | |kx  1    | |  1   -oy|
-		// |    1  | |     1  | |      1  | |      1  | |    1    |
-		// |      1| |       1| |        1| |        1| |       1 |
-		//   move      rotate      scale       skew       origin
-		e[10] = e[15] = 1.0f;
-		e[0]  = c * sx - ky * s * sy; // = a
-		e[1]  = s * sx + ky * c * sy; // = b
-		e[4]  = kx * c * sx - s * sy; // = c
-		e[5]  = kx * s * sx + c * sy; // = d
-		e[12] = x - ox * e[0] - oy * e[4];
-		e[13] = y - ox * e[1] - oy * e[5];
-	}
-
-	void Matrix::translate(float x, float y)
-	{
-		Matrix t;
-		t.setTranslation(x, y);
-		this->operator *=(t);
-	}
-
-	void Matrix::rotate(float rad)
-	{
-		Matrix t;
-		t.setRotation(rad);
-		this->operator *=(t);
-	}
-
-	void Matrix::scale(float sx, float sy)
-	{
-		Matrix t;
-		t.setScale(sx, sy);
-		this->operator *=(t);
-	}
-
-	void Matrix::shear(float kx, float ky)
-	{
-		Matrix t;
-		t.setShear(kx,ky);
-		this->operator *=(t);
-	}
-
-	//                 | x |
-	//                 | y |
-	//                 | 0 |
-	//                 | 1 |
-	// | e0 e4 e8  e12 |
-	// | e1 e5 e9  e13 |
-	// | e2 e6 e10 e14 |
-	// | e3 e7 e11 e15 |
-
-	void Matrix::transform(vertex * dst, const vertex * src, int size) const
-	{
-		for (int i = 0;i<size;i++)
-		{
-			// Store in temp variables in case src = dst
-			float x = (e[0]*src[i].x) + (e[4]*src[i].y) + (0) + (e[12]);
-			float y = (e[1]*src[i].x) + (e[5]*src[i].y) + (0) + (e[13]);
-
-			dst[i].x = x;
-			dst[i].y = y;
-		}
-	}
-
-
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Matrix.h"
+
+// STD
+#include <cstring> // memcpy
+#include <cmath>
+
+namespace love
+{
+
+// | e0 e4 e8  e12 |
+// | e1 e5 e9  e13 |
+// | e2 e6 e10 e14 |
+// | e3 e7 e11 e15 |
+
+Matrix::Matrix()
+{
+	setIdentity();
+}
+
+Matrix::~Matrix()
+{
+}
+
+//                 | e0 e4 e8  e12 |
+//                 | e1 e5 e9  e13 |
+//                 | e2 e6 e10 e14 |
+//                 | e3 e7 e11 e15 |
+// | e0 e4 e8  e12 |
+// | e1 e5 e9  e13 |
+// | e2 e6 e10 e14 |
+// | e3 e7 e11 e15 |
+
+Matrix Matrix::operator * (const Matrix &m) const
+{
+	Matrix t;
+
+	t.e[0] = (e[0]*m.e[0]) + (e[4]*m.e[1]) + (e[8]*m.e[2]) + (e[12]*m.e[3]);
+	t.e[4] = (e[0]*m.e[4]) + (e[4]*m.e[5]) + (e[8]*m.e[6]) + (e[12]*m.e[7]);
+	t.e[8] = (e[0]*m.e[8]) + (e[4]*m.e[9]) + (e[8]*m.e[10]) + (e[12]*m.e[11]);
+	t.e[12] = (e[0]*m.e[12]) + (e[4]*m.e[13]) + (e[8]*m.e[14]) + (e[12]*m.e[15]);
+
+	t.e[1] = (e[1]*m.e[0]) + (e[5]*m.e[1]) + (e[9]*m.e[2]) + (e[13]*m.e[3]);
+	t.e[5] = (e[1]*m.e[4]) + (e[5]*m.e[5]) + (e[9]*m.e[6]) + (e[13]*m.e[7]);
+	t.e[9] = (e[1]*m.e[8]) + (e[5]*m.e[9]) + (e[9]*m.e[10]) + (e[13]*m.e[11]);
+	t.e[13] = (e[1]*m.e[12]) + (e[5]*m.e[13]) + (e[9]*m.e[14]) + (e[13]*m.e[15]);
+
+	t.e[2] = (e[2]*m.e[0]) + (e[6]*m.e[1]) + (e[10]*m.e[2]) + (e[14]*m.e[3]);
+	t.e[6] = (e[2]*m.e[4]) + (e[6]*m.e[5]) + (e[10]*m.e[6]) + (e[14]*m.e[7]);
+	t.e[10] = (e[2]*m.e[8]) + (e[6]*m.e[9]) + (e[10]*m.e[10]) + (e[14]*m.e[11]);
+	t.e[14] = (e[2]*m.e[12]) + (e[6]*m.e[13]) + (e[10]*m.e[14]) + (e[14]*m.e[15]);
+
+	t.e[3] = (e[3]*m.e[0]) + (e[7]*m.e[1]) + (e[11]*m.e[2]) + (e[15]*m.e[3]);
+	t.e[7] = (e[3]*m.e[4]) + (e[7]*m.e[5]) + (e[11]*m.e[6]) + (e[15]*m.e[7]);
+	t.e[11] = (e[3]*m.e[8]) + (e[7]*m.e[9]) + (e[11]*m.e[10]) + (e[15]*m.e[11]);
+	t.e[15] = (e[3]*m.e[12]) + (e[7]*m.e[13]) + (e[11]*m.e[14]) + (e[15]*m.e[15]);
+
+	return t;
+}
+
+void Matrix::operator *= (const Matrix &m)
+{
+	Matrix t = (*this) * m;
+	memcpy((void *)this->e, (void *)t.e, sizeof(float)*16);
+}
+
+const float *Matrix::getElements() const
+{
+	return e;
+}
+
+void Matrix::setIdentity()
+{
+	memset(e, 0, sizeof(float)*16);
+	e[0] = e[5] = e[10] = e[15] = 1;
+}
+
+void Matrix::setTranslation(float x, float y)
+{
+	setIdentity();
+	e[12] = x;
+	e[13] = y;
+}
+
+void Matrix::setRotation(float rad)
+{
+	setIdentity();
+	float c = cos(rad), s = sin(rad);
+	e[0] = c;
+	e[4] = -s;
+	e[1] = s;
+	e[5] = c;
+}
+
+void Matrix::setScale(float sx, float sy)
+{
+	setIdentity();
+	e[0] = sx;
+	e[5] = sy;
+}
+
+void Matrix::setShear(float kx, float ky)
+{
+	setIdentity();
+	e[1] = ky;
+	e[4] = kx;
+}
+
+void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky)
+{
+	memset(e, 0, sizeof(float)*16); // zero out matrix
+	float c = cos(angle), s = sin(angle);
+	// matrix multiplication carried out on paper:
+	// |1     x| |c -s    | |sx       | | 1 ky    | |1     -ox|
+	// |  1   y| |s  c    | |   sy    | |kx  1    | |  1   -oy|
+	// |    1  | |     1  | |      1  | |      1  | |    1    |
+	// |      1| |       1| |        1| |        1| |       1 |
+	//   move      rotate      scale       skew       origin
+	e[10] = e[15] = 1.0f;
+	e[0]  = c * sx - ky * s * sy; // = a
+	e[1]  = s * sx + ky * c * sy; // = b
+	e[4]  = kx * c * sx - s * sy; // = c
+	e[5]  = kx * s * sx + c * sy; // = d
+	e[12] = x - ox * e[0] - oy * e[4];
+	e[13] = y - ox * e[1] - oy * e[5];
+}
+
+void Matrix::translate(float x, float y)
+{
+	Matrix t;
+	t.setTranslation(x, y);
+	this->operator *=(t);
+}
+
+void Matrix::rotate(float rad)
+{
+	Matrix t;
+	t.setRotation(rad);
+	this->operator *=(t);
+}
+
+void Matrix::scale(float sx, float sy)
+{
+	Matrix t;
+	t.setScale(sx, sy);
+	this->operator *=(t);
+}
+
+void Matrix::shear(float kx, float ky)
+{
+	Matrix t;
+	t.setShear(kx,ky);
+	this->operator *=(t);
+}
+
+//                 | x |
+//                 | y |
+//                 | 0 |
+//                 | 1 |
+// | e0 e4 e8  e12 |
+// | e1 e5 e9  e13 |
+// | e2 e6 e10 e14 |
+// | e3 e7 e11 e15 |
+
+void Matrix::transform(vertex *dst, const vertex *src, int size) const
+{
+	for (int i = 0; i<size; i++)
+	{
+		// Store in temp variables in case src = dst
+		float x = (e[0]*src[i].x) + (e[4]*src[i].y) + (0) + (e[12]);
+		float y = (e[1]*src[i].x) + (e[5]*src[i].y) + (0) + (e[13]);
+
+		dst[i].x = x;
+		dst[i].y = y;
+	}
+}
+
+
+} // love

+ 167 - 166
src/common/Matrix.h

@@ -1,166 +1,167 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_MATRIX_H
-#define LOVE_MATRIX_H
-
-// LOVE
-#include "math.h"
-
-namespace love
-{
-	/**
-	* This class is the basis for all transformations in LOVE. Althought not
-	* really needed for 2D, it contains 4x4 elements to be compatible with
-	* OpenGL without conversions.
-	**/
-	class Matrix
-	{
-	private:
-
-		/**
-		* | e0 e4 e8  e12 |
-		* | e1 e5 e9  e13 |
-		* | e2 e6 e10 e14 |
-		* | e3 e7 e11 e15 |
-		**/
-		float e[16];
-
-	public:
-
-		/**
-		* Creates a new identity matrix.
-		**/
-		Matrix();
-
-		/**
-		* Destructor.
-		**/
-		~Matrix();
-
-		/**
-		* Multiplies this Matrix with another Matrix, changing neither.
-		* @param m The Matrix to multiply with this Matrix.
-		* @return The combined matrix.
-		**/
-		Matrix operator * (const Matrix & m) const;
-
-		/**
-		* Multiplies a Matrix into this Matrix.
-		* @param m The Matrix to combine into this Matrix.
-		**/
-		void operator *= (const Matrix & m);
-
-		/**
-		* Gets a pointer to the 16 array elements.
-		* @return The array elements.
-		**/
-		const float * getElements() const;
-
-		/**
-		* Resets this Matrix to the identity matrix.
-		**/
-		void setIdentity();
-
-		/**
-		* Resets this Matrix to a translation.
-		* @param x Translation along x-axis.
-		* @param y Translation along y-axis.
-		**/
-		void setTranslation(float x, float y);
-
-		/**
-		* Resets this Matrix to a rotation.
-		* @param r The angle in radians.
-		**/
-		void setRotation(float r);
-
-		/**
-		* Resets this Matrix to a scale transformation.
-		* @param sx Scale factor along the x-axis.
-		* @param sy Scale factor along the y-axis.
-		**/
-		void setScale(float sx, float sy);
-
-		/**
-		* Resets this Matrix to a shear transformation.
-		* @param kx Shear along x-axis.
-		* @param ky Shear along y-axis.
-		**/
-		void setShear(float kx, float ky);
-
-		/**
-		* Creates a transformation with a certain position, orientation, scale
-		* and offset. Perfect for Drawables -- what a coincidence!
-		*
-		* @param x The translation along the x-axis.
-		* @param y The translation along the y-axis.
-		* @param angle The rotation (rad) around the center with offset (ox,oy).
-		* @param sx Scale along x-axis.
-		* @param sy Scale along y-axis.
-		* @param ox The offset for rotation along the x-axis.
-		* @param oy The offset for rotation along the y-axis.
-		* @param kx Shear along x-axis
-		* @param ky Shear along y-axis
-		**/
-		void setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
-
-		/**
-		* Multiplies this Matrix with a translation.
-		* @param x Translation along x-axis.
-		* @param y Translation along y-axis.
-		**/
-		void translate(float x, float y);
-
-		/**
-		* Multiplies this Matrix with a rotation.
-		* @param r Angle in radians.
-		**/
-		void rotate(float r);
-
-		/**
-		* Multiplies this Matrix with a scale transformation.
-		* @param sx Scale factor along the x-axis.
-		* @param sy Scale factor along the y-axis.
-		**/
-		void scale(float sx, float sy);
-
-		/**
-		* Multiplies this Matrix with a shear transformation.
-		* @param kx Shear along the x-axis.
-		* @param ky Shear along the y-axis.
-		**/
-		void shear(float kx, float ky);
-
-		/**
-		* Transforms an array of vertices by this Matrix. The sources and
-		* destination arrays may be the same.
-		*
-		* @param dst Storage for the transformed vertices.
-		* @param src The source vertices.
-		* @param size The number of vertices.
-		**/
-		void transform(vertex * dst, const vertex * src, int size) const;
-
-	}; // Matrix
-
-} //love
-
-#endif// LOVE_MATRIX_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_MATRIX_H
+#define LOVE_MATRIX_H
+
+// LOVE
+#include "math.h"
+
+namespace love
+{
+
+/**
+ * This class is the basis for all transformations in LOVE. Althought not
+ * really needed for 2D, it contains 4x4 elements to be compatible with
+ * OpenGL without conversions.
+ **/
+class Matrix
+{
+public:
+
+	/**
+	 * Creates a new identity matrix.
+	 **/
+	Matrix();
+
+	/**
+	 * Destructor.
+	 **/
+	~Matrix();
+
+	/**
+	 * Multiplies this Matrix with another Matrix, changing neither.
+	 * @param m The Matrix to multiply with this Matrix.
+	 * @return The combined matrix.
+	 **/
+	Matrix operator * (const Matrix &m) const;
+
+	/**
+	 * Multiplies a Matrix into this Matrix.
+	 * @param m The Matrix to combine into this Matrix.
+	 **/
+	void operator *= (const Matrix &m);
+
+	/**
+	 * Gets a pointer to the 16 array elements.
+	 * @return The array elements.
+	 **/
+	const float *getElements() const;
+
+	/**
+	 * Resets this Matrix to the identity matrix.
+	 **/
+	void setIdentity();
+
+	/**
+	 * Resets this Matrix to a translation.
+	 * @param x Translation along x-axis.
+	 * @param y Translation along y-axis.
+	 **/
+	void setTranslation(float x, float y);
+
+	/**
+	 * Resets this Matrix to a rotation.
+	 * @param r The angle in radians.
+	 **/
+	void setRotation(float r);
+
+	/**
+	 * Resets this Matrix to a scale transformation.
+	 * @param sx Scale factor along the x-axis.
+	 * @param sy Scale factor along the y-axis.
+	 **/
+	void setScale(float sx, float sy);
+
+	/**
+	 * Resets this Matrix to a shear transformation.
+	 * @param kx Shear along x-axis.
+	 * @param ky Shear along y-axis.
+	 **/
+	void setShear(float kx, float ky);
+
+	/**
+	 * Creates a transformation with a certain position, orientation, scale
+	 * and offset. Perfect for Drawables -- what a coincidence!
+	 *
+	 * @param x The translation along the x-axis.
+	 * @param y The translation along the y-axis.
+	 * @param angle The rotation (rad) around the center with offset (ox,oy).
+	 * @param sx Scale along x-axis.
+	 * @param sy Scale along y-axis.
+	 * @param ox The offset for rotation along the x-axis.
+	 * @param oy The offset for rotation along the y-axis.
+	 * @param kx Shear along x-axis
+	 * @param ky Shear along y-axis
+	 **/
+	void setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky);
+
+	/**
+	 * Multiplies this Matrix with a translation.
+	 * @param x Translation along x-axis.
+	 * @param y Translation along y-axis.
+	 **/
+	void translate(float x, float y);
+
+	/**
+	 * Multiplies this Matrix with a rotation.
+	 * @param r Angle in radians.
+	 **/
+	void rotate(float r);
+
+	/**
+	 * Multiplies this Matrix with a scale transformation.
+	 * @param sx Scale factor along the x-axis.
+	 * @param sy Scale factor along the y-axis.
+	 **/
+	void scale(float sx, float sy);
+
+	/**
+	 * Multiplies this Matrix with a shear transformation.
+	 * @param kx Shear along the x-axis.
+	 * @param ky Shear along the y-axis.
+	 **/
+	void shear(float kx, float ky);
+
+	/**
+	 * Transforms an array of vertices by this Matrix. The sources and
+	 * destination arrays may be the same.
+	 *
+	 * @param dst Storage for the transformed vertices.
+	 * @param src The source vertices.
+	 * @param size The number of vertices.
+	 **/
+	void transform(vertex *dst, const vertex *src, int size) const;
+
+private:
+
+	/**
+	 * | e0 e4 e8  e12 |
+	 * | e1 e5 e9  e13 |
+	 * | e2 e6 e10 e14 |
+	 * | e3 e7 e11 e15 |
+	 **/
+	float e[16];
+
+}; // Matrix
+
+} //love
+
+#endif// LOVE_MATRIX_H

+ 45 - 44
src/common/Memoizer.cpp

@@ -1,44 +1,45 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-#include "Memoizer.h"
-#include <cstddef>
-
-namespace love
-{
-
-	std::map<void *, void *> Memoizer::objectMap;
-
-	void Memoizer::add(void * key, void * val)
-	{
-		objectMap[key] = val;
-	}
-
-	void Memoizer::remove(void * key)
-	{
-		objectMap.erase(key);
-	}
-
-	void * Memoizer::find(void * key)
-	{
-		if (objectMap.count(key)) return objectMap[key];
-		return NULL;
-	}
-
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+ 
+#include "Memoizer.h"
+#include <cstddef>
+
+namespace love
+{
+
+std::map<void *, void *> Memoizer::objectMap;
+
+void Memoizer::add(void *key, void *val)
+{
+	objectMap[key] = val;
+}
+
+void Memoizer::remove(void *key)
+{
+	objectMap.erase(key);
+}
+
+void *Memoizer::find(void *key)
+{
+	if (objectMap.count(key)) return objectMap[key];
+	return NULL;
+}
+
+} // love

+ 46 - 46
src/common/Memoizer.h

@@ -1,46 +1,46 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_MEMOIZER_H
-#define LOVE_MEMOIZER_H
-
-#include <map>
-
-namespace love
-{
-	class Memoizer
-	{
-	private:
-
-		static std::map<void *, void *> objectMap;
-
-	public:
-
-		static void add(void * key, void * val);
-
-		static void remove(void * key);
-
-		static void * find(void * key);
-
-	}; // Memoizer
-
-} // love
-
-#endif // LOVE_MEMOIZER_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_MEMOIZER_H
+#define LOVE_MEMOIZER_H
+
+#include <map>
+
+namespace love
+{
+
+class Memoizer
+{
+public:
+
+	static void add(void *key, void *val);
+
+	static void remove(void *key);
+
+	static void *find(void *key);
+
+private:
+
+	static std::map<void *, void *> objectMap;
+}; // Memoizer
+
+} // love
+
+#endif // LOVE_MEMOIZER_H

+ 55 - 55
src/common/Module.h

@@ -1,55 +1,55 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_MODULE_H
-#define LOVE_MODULE_H
-
-// LOVE
-#include "runtime.h"
-#include "Exception.h"
-#include "Object.h"
-
-namespace love
-{
-	/**
-	* Abstract superclass for all modules.
-	**/
-	class Module : public Object
-	{
-	public:
-
-		/**
-		* Destructor.
-		**/
-		virtual ~Module(){};
-
-		/**
-		* Gets the name of the module. This is used in case of errors
-		* and other messages.
-		*
-		* @return The full name of the module, eg. love.graphics.opengl.
-		**/
-		virtual const char * getName() const = 0;
-
-	}; // Module
-
-} // love
-
-#endif // LOVE_MODULE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_MODULE_H
+#define LOVE_MODULE_H
+
+// LOVE
+#include "runtime.h"
+#include "Exception.h"
+#include "Object.h"
+
+namespace love
+{
+/**
+ * Abstract superclass for all modules.
+ **/
+class Module : public Object
+{
+public:
+
+	/**
+	 * Destructor.
+	 **/
+	virtual ~Module() {};
+
+	/**
+	 * Gets the name of the module. This is used in case of errors
+	 * and other messages.
+	 *
+	 * @return The full name of the module, eg. love.graphics.opengl.
+	 **/
+	virtual const char *getName() const = 0;
+
+}; // Module
+
+} // love
+
+#endif // LOVE_MODULE_H

+ 52 - 52
src/common/Object.cpp

@@ -1,52 +1,52 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-// LOVE
-#include "Object.h"
-
-namespace love
-{
-
-	Object::Object()
-		: count(1)
-	{
-	}
-
-	Object::~Object()
-	{
-	}
-
-	int Object::getReferenceCount() const
-	{
-		return count;
-	}
-
-	void Object::retain()
-	{
-		++count;
-	}
-
-	void Object::release()
-	{
-		if (--count <= 0)
-			delete this;
-	}
-
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+// LOVE
+#include "Object.h"
+
+namespace love
+{
+
+Object::Object()
+	: count(1)
+{
+}
+
+Object::~Object()
+{
+}
+
+int Object::getReferenceCount() const
+{
+	return count;
+}
+
+void Object::retain()
+{
+	++count;
+}
+
+void Object::release()
+{
+	if (--count <= 0)
+		delete this;
+}
+
+} // love

+ 76 - 76
src/common/Object.h

@@ -1,76 +1,76 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_OBJECT_H
-#define LOVE_OBJECT_H
-
-namespace love
-{
-	/**
-	* Superclass for all object that should be able to  cross the Lua/C border
-	* (this pertains to most objects).
-	*
-	* This class is an alternative to using smart pointers; it contains retain/release
-	* methods, and will delete itself with the reference count hits zero. The wrapper
-	* code assumes that all userdata inherits from this class.
-	**/
-	class Object
-	{
-	private:
-
-		// The reference count.
-		int count;
-
-	public:
-
-		/**
-		* Constructor. Sets reference count to one.
-		**/
-		Object();
-
-		/**
-		* Destructor.
-		**/
-		virtual ~Object() = 0;
-
-		/**
-		* Gets the reference count of this Object.
-		* @returns The reference count.
-		**/
-		int getReferenceCount() const;
-
-		/**
-		* Retains the Object, i.e. increases the
-		* reference count by one.
-		**/
-		void retain();
-
-		/**
-		* Releases one reference to the Object, i.e. decrements the
-		* reference count by one, and potentially deletes the Object
-		* if there are no more references.
-		**/
-		void release();
-
-	}; // Object
-
-} // love
-
-#endif // LOVE_OBJECT_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_OBJECT_H
+#define LOVE_OBJECT_H
+
+namespace love
+{
+
+/**
+ * Superclass for all object that should be able to  cross the Lua/C border
+ * (this pertains to most objects).
+ *
+ * This class is an alternative to using smart pointers; it contains retain/release
+ * methods, and will delete itself with the reference count hits zero. The wrapper
+ * code assumes that all userdata inherits from this class.
+ **/
+class Object
+{
+public:
+
+	/**
+	 * Constructor. Sets reference count to one.
+	 **/
+	Object();
+
+	/**
+	 * Destructor.
+	 **/
+	virtual ~Object() = 0;
+
+	/**
+	 * Gets the reference count of this Object.
+	 * @returns The reference count.
+	 **/
+	int getReferenceCount() const;
+
+	/**
+	 * Retains the Object, i.e. increases the
+	 * reference count by one.
+	 **/
+	void retain();
+
+	/**
+	 * Releases one reference to the Object, i.e. decrements the
+	 * reference count by one, and potentially deletes the Object
+	 * if there are no more references.
+	 **/
+	void release();
+
+private:
+
+	// The reference count.
+	int count;
+}; // Object
+
+} // love
+
+#endif // LOVE_OBJECT_H

+ 82 - 81
src/common/Reference.cpp

@@ -1,81 +1,82 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Reference.h"
-
-namespace love
-{
-	const char REFERENCE_TABLE_NAME[] = "love-references";
-
-	Reference::Reference()
-		: L(0), idx(LUA_REFNIL)
-	{
-	}
-
-	Reference::Reference(lua_State * L)
-		: L(0), idx(LUA_REFNIL)
-	{
-		ref(L);
-	}
-
-	Reference::~Reference()
-	{
-		unref();
-	}
-
-	void Reference::ref(lua_State * L)
-	{
-		unref(); // Just to be safe.
-		this->L = L;
-		luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
-		lua_insert(L, -2); // Move reference table behind value.
-		idx = luaL_ref(L, -2);
-		lua_pop(L, 1);
-	}
-
-	void Reference::unref()
-	{
-		if (idx != LUA_REFNIL)
-		{
-			luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
-			luaL_unref(L, -1, idx);
-			lua_pop(L, 1);
-			idx = LUA_REFNIL;
-		}
-	}
-
-	void Reference::push()
-	{
-		if (idx != LUA_REFNIL)
-		{
-			luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
-			lua_rawgeti(L, -1, idx);
-			lua_remove(L, -2);
-		}
-		else
-			lua_pushnil(L);
-	}
-
-	lua_State * Reference::getL()
-	{
-		return L;
-	}
-
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Reference.h"
+
+namespace love
+{
+
+const char REFERENCE_TABLE_NAME[] = "love-references";
+
+Reference::Reference()
+	: L(0), idx(LUA_REFNIL)
+{
+}
+
+Reference::Reference(lua_State *L)
+	: L(0), idx(LUA_REFNIL)
+{
+	ref(L);
+}
+
+Reference::~Reference()
+{
+	unref();
+}
+
+void Reference::ref(lua_State *L)
+{
+	unref(); // Just to be safe.
+	this->L = L;
+	luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
+	lua_insert(L, -2); // Move reference table behind value.
+	idx = luaL_ref(L, -2);
+	lua_pop(L, 1);
+}
+
+void Reference::unref()
+{
+	if (idx != LUA_REFNIL)
+	{
+		luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
+		luaL_unref(L, -1, idx);
+		lua_pop(L, 1);
+		idx = LUA_REFNIL;
+	}
+}
+
+void Reference::push()
+{
+	if (idx != LUA_REFNIL)
+	{
+		luax_insist(L, LUA_REGISTRYINDEX, REFERENCE_TABLE_NAME);
+		lua_rawgeti(L, -1, idx);
+		lua_remove(L, -2);
+	}
+	else
+		lua_pushnil(L);
+}
+
+lua_State *Reference::getL()
+{
+	return L;
+}
+
+} // love

+ 88 - 87
src/common/Reference.h

@@ -1,87 +1,88 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_REFERENCE_H
-#define LOVE_REFERENCE_H
-
-// LOVE
-#include "runtime.h"
-
-namespace love
-{
-	/**
-	* This class wraps the reference functionality built into
-	* Lua, which allows C++ code to refer to Lua variables.
-	**/
-	class Reference
-	{
-	private:
-
-		// The Lua state in which the reference resides.
-		lua_State * L;
-
-		// Index to the Lua reference.
-		int idx;
-
-	public:
-
-		/**
-		* Creates the reference object, but does not create
-		* the actual reference.
-		**/
-		Reference();
-
-		/**
-		* Creates the object and a reference to the value
-		* on the top of the stack.
-		**/
-		Reference(lua_State * L);
-
-		/**
-		* Deletes the reference, if any.
-		**/
-		virtual ~Reference();
-
-		/**
-		* Creates a reference to the value on the
-		* top of the stack.
-		**/
-		void ref(lua_State * L);
-
-		/**
-		* Unrefs the reference, if any.
-		**/
-		void unref();
-
-		/**
-		* Pushes the referred value onto the stack.
-		**/
-		void push();
-
-		/**
-		* Gets the Lua state associated with this
-		* reference.
-		**/
-		lua_State * getL();
-	};
-
-} // love
-
-#endif // LOVE_REFERENCE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_REFERENCE_H
+#define LOVE_REFERENCE_H
+
+// LOVE
+#include "runtime.h"
+
+namespace love
+{
+
+/**
+ * This class wraps the reference functionality built into
+ * Lua, which allows C++ code to refer to Lua variables.
+ **/
+class Reference
+{
+public:
+
+	/**
+	 * Creates the reference object, but does not create
+	 * the actual reference.
+	 **/
+	Reference();
+
+	/**
+	 * Creates the object and a reference to the value
+	 * on the top of the stack.
+	 **/
+	Reference(lua_State *L);
+
+	/**
+	 * Deletes the reference, if any.
+	 **/
+	virtual ~Reference();
+
+	/**
+	 * Creates a reference to the value on the
+	 * top of the stack.
+	 **/
+	void ref(lua_State *L);
+
+	/**
+	 * Unrefs the reference, if any.
+	 **/
+	void unref();
+
+	/**
+	 * Pushes the referred value onto the stack.
+	 **/
+	void push();
+
+	/**
+	 * Gets the Lua state associated with this
+	 * reference.
+	 **/
+	lua_State *getL();
+
+private:
+
+	// The Lua state in which the reference resides.
+	lua_State *L;
+
+	// Index to the Lua reference.
+	int idx;
+};
+
+} // love
+
+#endif // LOVE_REFERENCE_H

+ 168 - 167
src/common/StringMap.h

@@ -1,167 +1,168 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_STRING_MAP_H
-#define LOVE_STRING_MAP_H
-
-#include "Exception.h"
-
-namespace love
-{
-	template<typename T, unsigned SIZE>
-	class StringMap
-	{
-	private:
-
-		struct Record
-		{
-			const char * key;
-			T value;
-			bool set;
-			Record() : set(false) {}
-		};
-
-		const static unsigned MAX = SIZE*2;
-
-		Record records[MAX];
-		const char * reverse[SIZE];
-
-	public:
-
-		struct Entry
-		{
-			const char * key;
-			T value;
-		};
-
-		StringMap(Entry * entries, unsigned num)
-		{
-
-			for (unsigned i = 0; i < SIZE; ++i)
-				reverse[i] = 0;
-
-			unsigned n = num/sizeof(Entry);
-
-			for (unsigned i = 0; i < n; ++i)
-			{
-				add(entries[i].key, entries[i].value);
-			}
-		}
-
-		bool streq(const char * a, const char * b)
-		{
-			while (*a != 0 && *b != 0)
-			{
-				if (*a != *b)
-					return false;
-				++a;
-				++b;
-			}
-
-			return (*a == 0 && *b == 0);
-		}
-
-		bool find(const char * key, T & t)
-		{
-			unsigned str_hash = djb2(key);
-
-			for (unsigned i = 0; i < MAX; ++i)
-			{
-				unsigned str_i = (str_hash + i) % MAX; //this isn't used, is this intentional?
-
-				if (!records[str_i].set)
-					return false;
-
-				if (streq(records[str_i].key, key))
-				{
-					t = records[str_i].value;
-					return true;
-				}
-			}
-
-			return false;
-		}
-
-		bool find(T key, const char *& str)
-		{
-			unsigned index = (unsigned)key;
-
-			if (index >= SIZE)
-				return false;
-
-			if (reverse[index] != 0)
-			{
-				str = reverse[index];
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-
-		bool add(const char * key, T value)
-		{
-			unsigned str_hash = djb2(key);
-			bool inserted = false;
-
-			for (unsigned i = 0; i < MAX; ++i)
-			{
-				unsigned str_i = (str_hash + i) % MAX;
-
-				if (!records[str_i].set)
-				{
-					inserted = true;
-					records[str_i].set = true;
-					records[str_i].key = key;
-					records[str_i].value = value;
-					break;
-				}
-			}
-
-			unsigned index = (unsigned)value;
-
-			if (index >= SIZE)
-			{
-				printf("\nConstant %s out of bounds with %i!\n", key, index);
-				return false;
-			}
-
-			reverse[index] = key;
-
-			return inserted;
-		}
-
-		unsigned djb2(const char * key)
-		{
-			unsigned hash = 5381;
-			int c;
-
-			while ((c = *key++))
-				hash = ((hash << 5) + hash) + c;
-
-			return hash;
-		}
-
-	}; // StringMap
-
-} // love
-
-#endif // LOVE_STRING_MAP_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_STRING_MAP_H
+#define LOVE_STRING_MAP_H
+
+#include "Exception.h"
+
+namespace love
+{
+
+template<typename T, unsigned SIZE>
+class StringMap
+{
+public:
+
+	struct Entry
+	{
+		const char *key;
+		T value;
+	};
+
+	StringMap(Entry *entries, unsigned num)
+	{
+
+		for (unsigned i = 0; i < SIZE; ++i)
+			reverse[i] = 0;
+
+		unsigned n = num/sizeof(Entry);
+
+		for (unsigned i = 0; i < n; ++i)
+		{
+			add(entries[i].key, entries[i].value);
+		}
+	}
+
+	bool streq(const char *a, const char *b)
+	{
+		while (*a != 0 && *b != 0)
+		{
+			if (*a != *b)
+				return false;
+			++a;
+			++b;
+		}
+
+		return (*a == 0 && *b == 0);
+	}
+
+	bool find(const char *key, T &t)
+	{
+		unsigned str_hash = djb2(key);
+
+		for (unsigned i = 0; i < MAX; ++i)
+		{
+			unsigned str_i = (str_hash + i) % MAX; //this isn't used, is this intentional?
+
+			if (!records[str_i].set)
+				return false;
+
+			if (streq(records[str_i].key, key))
+			{
+				t = records[str_i].value;
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	bool find(T key, const char  *&str)
+	{
+		unsigned index = (unsigned)key;
+
+		if (index >= SIZE)
+			return false;
+
+		if (reverse[index] != 0)
+		{
+			str = reverse[index];
+			return true;
+		}
+		else
+		{
+			return false;
+		}
+	}
+
+	bool add(const char *key, T value)
+	{
+		unsigned str_hash = djb2(key);
+		bool inserted = false;
+
+		for (unsigned i = 0; i < MAX; ++i)
+		{
+			unsigned str_i = (str_hash + i) % MAX;
+
+			if (!records[str_i].set)
+			{
+				inserted = true;
+				records[str_i].set = true;
+				records[str_i].key = key;
+				records[str_i].value = value;
+				break;
+			}
+		}
+
+		unsigned index = (unsigned)value;
+
+		if (index >= SIZE)
+		{
+			printf("\nConstant %s out of bounds with %i!\n", key, index);
+			return false;
+		}
+
+		reverse[index] = key;
+
+		return inserted;
+	}
+
+	unsigned djb2(const char *key)
+	{
+		unsigned hash = 5381;
+		int c;
+
+		while ((c = *key++))
+			hash = ((hash << 5) + hash) + c;
+
+		return hash;
+	}
+
+private:
+
+	struct Record
+	{
+		const char *key;
+		T value;
+		bool set;
+		Record() : set(false) {}
+	};
+
+	const static unsigned MAX = SIZE*2;
+
+	Record records[MAX];
+	const char *reverse[SIZE];
+
+}; // StringMap
+
+} // love
+
+#endif // LOVE_STRING_MAP_H

+ 175 - 173
src/common/Variant.cpp

@@ -1,173 +1,175 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Variant.h"
-#include <common/StringMap.h>
-
-namespace love
-{
-	extern StringMap<Type, TYPE_MAX_ENUM> types;
-
-	love::Type extractudatatype(lua_State * L, int idx)
-	{
-		Type t = INVALID_ID;
-		if (!lua_isuserdata(L, idx))
-			return t;
-		if (luaL_getmetafield (L, idx, "__tostring") == 0)
-			return t;
-		lua_pushvalue(L, idx);
-		int result = lua_pcall(L, 1, 1, 0);
-		if (result == 0)
-			types.find(lua_tostring(L, -1), t);
-		if (result == 0 || result == LUA_ERRRUN)
-			lua_pop(L, 1);
-		return t;
-	}
-
-	Variant::Variant(bool boolean)
-	{
-		type = BOOLEAN;
-		data.boolean = boolean;
-	}
-
-	Variant::Variant(double number)
-	{
-		type = NUMBER;
-		data.number = number;
-	}
-
-	Variant::Variant(const char *string, size_t len)
-	{
-		type = STRING;
-		char *buf = new char[len+1];
-		memset(buf, 0, len+1);
-		memcpy(buf, string, len);
-		data.string.str = buf;
-		data.string.len = len;
-	}
-
-	Variant::Variant(char c)
-	{
-		type = CHARACTER;
-		data.character = c;
-	}
-
-	Variant::Variant(void *userdata)
-	{
-		type = LUSERDATA;
-		data.userdata = userdata;
-	}
-
-	Variant::Variant(love::Type udatatype, void *userdata)
-	{
-		type = FUSERDATA;
-		this->udatatype = udatatype;
-		if (udatatype != INVALID_ID)
-		{
-			Proxy *p = (Proxy *) userdata;
-			flags = p->flags;
-			data.userdata = p->data;
-			((love::Object *) data.userdata)->retain();
-		}
-		else
-			data.userdata = userdata;
-	}
-
-	Variant::~Variant()
-	{
-		switch(type)
-		{
-			case STRING:
-				delete[] data.string.str;
-				break;
-			case FUSERDATA:
-				((love::Object *) data.userdata)->release();
-				break;
-			default:
-				break;
-		}
-	}
-
-	Variant *Variant::fromLua(lua_State *L, int n)
-	{
-		Variant *v = NULL;
-		size_t len;
-		const char *str;
-		switch(lua_type(L, n))
-		{
-			case LUA_TBOOLEAN:
-				v = new Variant(luax_toboolean(L, n));
-				break;
-			case LUA_TNUMBER:
-				v = new Variant(lua_tonumber(L, n));
-				break;
-			case LUA_TSTRING:
-				str = lua_tolstring(L, n, &len);
-				v = new Variant(str, len);
-				break;
-			case LUA_TLIGHTUSERDATA:
-				v = new Variant(lua_touserdata(L, n));
-				break;
-			case LUA_TUSERDATA:
-				v = new Variant(extractudatatype(L, n), lua_touserdata(L, n));
-				break;
-		}
-		return v;
-	}
-
-	void Variant::toLua(lua_State *L)
-	{
-		switch(type)
-		{
-			case BOOLEAN:
-				lua_pushboolean(L, data.boolean);
-				break;
-			case CHARACTER:
-				lua_pushlstring(L, &data.character, 1);
-				break;
-			case NUMBER:
-				lua_pushnumber(L, data.number);
-				break;
-			case STRING:
-				lua_pushlstring(L, data.string.str, data.string.len);
-				break;
-			case LUSERDATA:
-				lua_pushlightuserdata(L, data.userdata);
-				break;
-			case FUSERDATA:
-				if (udatatype != INVALID_ID)
-				{
-					const char *name = NULL;
-					love::types.find(udatatype, name);
-					((love::Object *) data.userdata)->retain();
-					luax_newtype(L, name, flags, data.userdata);
-				}
-				else
-					lua_pushlightuserdata(L, data.userdata);
-				// I know this is not the same
-				// sadly, however, it's the most
-				// I can do (at the moment).
-				break;
-			default:
-				lua_pushnil(L);
-				break;
-		}
-	}
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Variant.h"
+#include "common/StringMap.h"
+
+namespace love
+{
+
+extern StringMap<Type, TYPE_MAX_ENUM> types;
+
+love::Type extractudatatype(lua_State *L, int idx)
+{
+	Type t = INVALID_ID;
+	if (!lua_isuserdata(L, idx))
+		return t;
+	if (luaL_getmetafield(L, idx, "__tostring") == 0)
+		return t;
+	lua_pushvalue(L, idx);
+	int result = lua_pcall(L, 1, 1, 0);
+	if (result == 0)
+		types.find(lua_tostring(L, -1), t);
+	if (result == 0 || result == LUA_ERRRUN)
+		lua_pop(L, 1);
+	return t;
+}
+
+Variant::Variant(bool boolean)
+{
+	type = BOOLEAN;
+	data.boolean = boolean;
+}
+
+Variant::Variant(double number)
+{
+	type = NUMBER;
+	data.number = number;
+}
+
+Variant::Variant(const char *string, size_t len)
+{
+	type = STRING;
+	char *buf = new char[len+1];
+	memset(buf, 0, len+1);
+	memcpy(buf, string, len);
+	data.string.str = buf;
+	data.string.len = len;
+}
+
+Variant::Variant(char c)
+{
+	type = CHARACTER;
+	data.character = c;
+}
+
+Variant::Variant(void *userdata)
+{
+	type = LUSERDATA;
+	data.userdata = userdata;
+}
+
+Variant::Variant(love::Type udatatype, void *userdata)
+{
+	type = FUSERDATA;
+	this->udatatype = udatatype;
+	if (udatatype != INVALID_ID)
+	{
+		Proxy *p = (Proxy *) userdata;
+		flags = p->flags;
+		data.userdata = p->data;
+		((love::Object *) data.userdata)->retain();
+	}
+	else
+		data.userdata = userdata;
+}
+
+Variant::~Variant()
+{
+	switch (type)
+	{
+	case STRING:
+		delete[] data.string.str;
+		break;
+	case FUSERDATA:
+		((love::Object *) data.userdata)->release();
+		break;
+	default:
+		break;
+	}
+}
+
+Variant *Variant::fromLua(lua_State *L, int n)
+{
+	Variant *v = NULL;
+	size_t len;
+	const char *str;
+	switch (lua_type(L, n))
+	{
+	case LUA_TBOOLEAN:
+		v = new Variant(luax_toboolean(L, n));
+		break;
+	case LUA_TNUMBER:
+		v = new Variant(lua_tonumber(L, n));
+		break;
+	case LUA_TSTRING:
+		str = lua_tolstring(L, n, &len);
+		v = new Variant(str, len);
+		break;
+	case LUA_TLIGHTUSERDATA:
+		v = new Variant(lua_touserdata(L, n));
+		break;
+	case LUA_TUSERDATA:
+		v = new Variant(extractudatatype(L, n), lua_touserdata(L, n));
+		break;
+	}
+	return v;
+}
+
+void Variant::toLua(lua_State *L)
+{
+	switch (type)
+	{
+	case BOOLEAN:
+		lua_pushboolean(L, data.boolean);
+		break;
+	case CHARACTER:
+		lua_pushlstring(L, &data.character, 1);
+		break;
+	case NUMBER:
+		lua_pushnumber(L, data.number);
+		break;
+	case STRING:
+		lua_pushlstring(L, data.string.str, data.string.len);
+		break;
+	case LUSERDATA:
+		lua_pushlightuserdata(L, data.userdata);
+		break;
+	case FUSERDATA:
+		if (udatatype != INVALID_ID)
+		{
+			const char *name = NULL;
+			love::types.find(udatatype, name);
+			((love::Object *) data.userdata)->retain();
+			luax_newtype(L, name, flags, data.userdata);
+		}
+		else
+			lua_pushlightuserdata(L, data.userdata);
+		// I know this is not the same
+		// sadly, however, it's the most
+		// I can do (at the moment).
+		break;
+	default:
+		lua_pushnil(L);
+		break;
+	}
+}
+
+} // love

+ 76 - 73
src/common/Variant.h

@@ -1,73 +1,76 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_VARIANT_H
-#define LOVE_VARIANT_H
-
-#include <common/runtime.h>
-#include <common/Object.h>
-
-#include <cstring>
-
-namespace love
-{
-	class Variant : public love::Object
-	{
-	private:
-		enum Type
-		{
-			UNKNOWN = 0,
-			BOOLEAN,
-			NUMBER,
-			CHARACTER,
-			STRING,
-			LUSERDATA,
-			FUSERDATA
-		} type;
-		union
-		{
-			bool boolean;
-			char character;
-			double number;
-			struct {
-				const char *str;
-				size_t len;
-			} string;
-			void *userdata;
-		} data;
-		love::Type udatatype;
-		bits flags;
-
-	public:
-		
-		Variant(bool boolean);
-		Variant(double number);
-		Variant(const char *string, size_t len);
-		Variant(char c);
-		Variant(void *userdata);
-		Variant(love::Type udatatype, void *userdata);
-		virtual ~Variant();
-
-		static Variant *fromLua(lua_State *L, int n);
-		void toLua(lua_State *L);
-	}; // Variant
-} // love
-
-#endif // LOVE_VARIANT_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_VARIANT_H
+#define LOVE_VARIANT_H
+
+#include "common/runtime.h"
+#include "common/Object.h"
+
+#include <cstring>
+
+namespace love
+{
+
+class Variant : public love::Object
+{
+public:
+
+	Variant(bool boolean);
+	Variant(double number);
+	Variant(const char *string, size_t len);
+	Variant(char c);
+	Variant(void *userdata);
+	Variant(love::Type udatatype, void *userdata);
+	virtual ~Variant();
+
+	static Variant *fromLua(lua_State *L, int n);
+	void toLua(lua_State *L);
+
+private:
+	enum Type
+	{
+		UNKNOWN = 0,
+		BOOLEAN,
+		NUMBER,
+		CHARACTER,
+		STRING,
+		LUSERDATA,
+		FUSERDATA
+	} type;
+	union
+	{
+		bool boolean;
+		char character;
+		double number;
+		struct
+		{
+			const char *str;
+			size_t len;
+		} string;
+		void *userdata;
+	} data;
+	love::Type udatatype;
+	bits flags;
+
+}; // Variant
+} // love
+
+#endif // LOVE_VARIANT_H

+ 25 - 25
src/common/Vector.cpp

@@ -1,26 +1,26 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Vector.h"
-
-namespace love
-{
-	// Implementation in header.
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Vector.h"
+
+namespace love
+{
+// Implementation in header.
 }

+ 311 - 310
src/common/Vector.h

@@ -1,310 +1,311 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_VECTOR_H
-#define LOVE_VECTOR_H
-
-// STD
-#include <cmath>
-
-// LOVE
-#include "Matrix.h"
-
-namespace love
-{
-	/**
-	* 2D Vector class.
-	*
-	* @author Anders Ruud
-	* @date 2006-05-13
-	**/
-	class Vector
-	{
-	public:
-
-		// The components.
-		float x, y;
-
-		/**
-		* Creates a new (1,1) Vector.
-		**/
-		Vector();
-
-		/**
-		* Creates a new Vector.
-		* @param x The x position/dimension.
-		* @param y The y position/dimension.
-		**/
-		Vector(float x, float y);
-
-		/**
-		* Gets the length of the Vector.
-		* @return The length of the Vector.
-		*
-		* This method requires sqrt() and should be used
-		* carefully.
-		**/
-		float getLength() const;
-
-		/**
-		* Normalizes the Vector.
-		* @return The old length of the Vector.
-		**/
-		float normalize();
-
-		/**
-		* Gets a normal to the Vector.
-		* @return A normal to the Vector.
-		**/
-
-		Vector getNormal() const;
-
-		/**
-		* Adds a Vector to this Vector.
-		* @param v The Vector we want to add to this Vector.
-		* @return The resulting Vector.
-		**/
-		Vector operator + (const Vector & v) const;
-
-		/**
-		* Substracts a Vector to this Vector.
-		* @param v The Vector we want to subtract to this Vector.
-		* @return The resulting Vector.
-		**/
-		Vector operator - (const Vector & v) const;
-
-		/**
-		* Resizes a Vector by a scalar.
-		* @param s The scalar with which to resize the Vector.
-		* @return The resulting Vector.
-		**/
-		Vector operator * (float s) const;
-
-		/**
-		* Resizes a Vector by a scalar.
-		* @param s The scalar with which to resize the Vector.
-		* @return The resulting Vector.
-		**/
-		Vector operator / (float s) const;
-
-		/**
-		* Reverses the Vector.
-		* @return The reversed Vector.
-		**/
-		Vector operator - () const;
-
-		/**
-		* Adds a Vector to this Vector, and also saves changes in the first Vector.
-		* @param v The Vector we want to add to this Vector.
-		**/
-		void operator += (const Vector & v);
-
-		/**
-		* Subtracts a Vector to this Vector, and also saves changes in the first Vector.
-		* @param v The Vector we want to subtract to this Vector.
-		**/
-		void operator -= (const Vector & v);
-
-		/**
-		* Resizes the Vector, and also saves changes in the first Vector.
-		* @param s The scalar by which we want to resize the Vector.
-		**/
-		void operator *= (float s);
-
-		/**
-		* Resizes the Vector, and also saves changes in the first Vector.
-		* @param s The scalar by which we want to resize the Vector.
-		**/
-		void operator /= (float s);
-
-		/**
-		* Calculates the dot product of two Vectors.
-		* @return The dot product of the two Vectors.
-		**/
-		float operator * (const Vector & v) const;
-
-		/**
-		* Calculates the cross product of two Vectors.
-		* @return The cross product of the two Vectors.
-		**/
-		float operator ^ (const Vector & v) const;
-
-		bool operator == (const Vector & v) const;
-
-		bool operator < (const Vector & v) const;
-		/**
-		* Gets the x value of the Vector.
-		* @return The x value of the Vector.
-		**/
-		float getX() const;
-
-		/**
-		* Gets the x value of the Vector.
-		* @return The x value of the Vector.
-		**/
-		float getY() const;
-
-		/**
-		* Sets the x value of the Vector.
-		* @param The x value of the Vector.
-		**/
-		void setX(float x);
-
-		/**
-		* Sets the x value of the Vector.
-		* @param The x value of the Vector.
-		**/
-		void setY(float y);
-
-	};
-
-	inline float Vector::getLength() const
-	{
-		return sqrt(x*x + y*y);
-	}
-
-	inline Vector Vector::getNormal() const
-	{
-		return Vector(-y, x);
-	}
-
-	inline float Vector::normalize()
-	{
-
-		float len = getLength();
-
-		if (len > 0)
-			(*this) /= len;
-
-		return len;
-	}
-
-	/**
-	* Inline methods must have body in header.
-	**/
-
-	inline Vector::Vector()
-	{
-		x = 1;
-		y = 1;
-	}
-
-	inline Vector::Vector(float x, float y)
-	{
-		this->x = x;
-		this->y = y;
-	}
-
-	inline Vector Vector::operator + (const Vector & v) const
-	{
-		return Vector(x + v.x, y + v.y);
-	}
-
-	inline Vector Vector::operator - (const Vector & v) const
-	{
-		return Vector(x - v.getX(), y - v.getY());
-	}
-
-	inline Vector Vector::operator * (float s) const
-	{
-		return Vector(x*s, y*s);
-	}
-
-	inline Vector Vector::operator / (float s) const
-	{
-		return Vector(x/s, y/s);
-	}
-
-	inline Vector Vector::operator - () const
-	{
-		return Vector(-x, -y);
-	}
-
-	inline void Vector::operator += (const Vector & v)
-	{
-		x += v.getX();
-		y += v.getY();
-	}
-
-	inline void Vector::operator -= (const Vector & v)
-	{
-		x -= v.getX();
-		y -= v.getY();
-	}
-
-	inline void Vector::operator *= (float s)
-	{
-		x *= s;
-		y *= s;
-	}
-
-	inline void Vector::operator /= (float s)
-	{
-		x /= s;
-		y /= s;
-	}
-
-	inline float Vector::operator * (const Vector & v) const
-	{
-		return x * v.getX() + y * v.getY();
-	}
-
-	inline float Vector::operator ^ (const Vector & v) const
-	{
-		return x * v.getY() - y * v.getX();
-	}
-
-	inline bool Vector::operator == (const Vector & v) const
-	{
-		return getLength() == v.getLength();
-	}
-
-	inline bool Vector::operator < (const Vector & v) const
-	{
-		return getLength() < v.getLength();
-	}
-
-	/**
-	* Accessor methods
-	**/
-
-	inline float Vector::getX() const
-	{
-		return x;
-	}
-
-	inline float Vector::getY() const
-	{
-		return y;
-	}
-
-	inline void Vector::setX(float x)
-	{
-		this->x = x;
-	}
-
-	inline void Vector::setY(float y)
-	{
-		this->y = y;
-	}
-
-} //love
-
-#endif// LOVE_VECTOR_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_VECTOR_H
+#define LOVE_VECTOR_H
+
+// STD
+#include <cmath>
+
+// LOVE
+#include "Matrix.h"
+
+namespace love
+{
+
+/**
+ * 2D Vector class.
+ *
+ * @author Anders Ruud
+ * @date 2006-05-13
+ **/
+class Vector
+{
+public:
+
+	// The components.
+	float x, y;
+
+	/**
+	 * Creates a new (1,1) Vector.
+	 **/
+	Vector();
+
+	/**
+	 * Creates a new Vector.
+	 * @param x The x position/dimension.
+	 * @param y The y position/dimension.
+	 **/
+	Vector(float x, float y);
+
+	/**
+	 * Gets the length of the Vector.
+	 * @return The length of the Vector.
+	 *
+	 * This method requires sqrt() and should be used
+	 * carefully.
+	 **/
+	float getLength() const;
+
+	/**
+	 * Normalizes the Vector.
+	 * @return The old length of the Vector.
+	 **/
+	float normalize();
+
+	/**
+	 * Gets a normal to the Vector.
+	 * @return A normal to the Vector.
+	 **/
+
+	Vector getNormal() const;
+
+	/**
+	 * Adds a Vector to this Vector.
+	 * @param v The Vector we want to add to this Vector.
+	 * @return The resulting Vector.
+	 **/
+	Vector operator + (const Vector &v) const;
+
+	/**
+	 * Substracts a Vector to this Vector.
+	 * @param v The Vector we want to subtract to this Vector.
+	 * @return The resulting Vector.
+	 **/
+	Vector operator - (const Vector &v) const;
+
+	/**
+	 * Resizes a Vector by a scalar.
+	 * @param s The scalar with which to resize the Vector.
+	 * @return The resulting Vector.
+	 **/
+	Vector operator * (float s) const;
+
+	/**
+	 * Resizes a Vector by a scalar.
+	 * @param s The scalar with which to resize the Vector.
+	 * @return The resulting Vector.
+	 **/
+	Vector operator / (float s) const;
+
+	/**
+	 * Reverses the Vector.
+	 * @return The reversed Vector.
+	 **/
+	Vector operator - () const;
+
+	/**
+	 * Adds a Vector to this Vector, and also saves changes in the first Vector.
+	 * @param v The Vector we want to add to this Vector.
+	 **/
+	void operator += (const Vector &v);
+
+	/**
+	 * Subtracts a Vector to this Vector, and also saves changes in the first Vector.
+	 * @param v The Vector we want to subtract to this Vector.
+	 **/
+	void operator -= (const Vector &v);
+
+	/**
+	 * Resizes the Vector, and also saves changes in the first Vector.
+	 * @param s The scalar by which we want to resize the Vector.
+	 **/
+	void operator *= (float s);
+
+	/**
+	 * Resizes the Vector, and also saves changes in the first Vector.
+	 * @param s The scalar by which we want to resize the Vector.
+	 **/
+	void operator /= (float s);
+
+	/**
+	 * Calculates the dot product of two Vectors.
+	 * @return The dot product of the two Vectors.
+	 **/
+	float operator * (const Vector &v) const;
+
+	/**
+	 * Calculates the cross product of two Vectors.
+	 * @return The cross product of the two Vectors.
+	 **/
+	float operator ^ (const Vector &v) const;
+
+	bool operator == (const Vector &v) const;
+
+	bool operator < (const Vector &v) const;
+	/**
+	 * Gets the x value of the Vector.
+	 * @return The x value of the Vector.
+	 **/
+	float getX() const;
+
+	/**
+	 * Gets the x value of the Vector.
+	 * @return The x value of the Vector.
+	 **/
+	float getY() const;
+
+	/**
+	 * Sets the x value of the Vector.
+	 * @param The x value of the Vector.
+	 **/
+	void setX(float x);
+
+	/**
+	 * Sets the x value of the Vector.
+	 * @param The x value of the Vector.
+	 **/
+	void setY(float y);
+
+};
+
+inline float Vector::getLength() const
+{
+	return sqrt(x*x + y*y);
+}
+
+inline Vector Vector::getNormal() const
+{
+	return Vector(-y, x);
+}
+
+inline float Vector::normalize()
+{
+
+	float len = getLength();
+
+	if (len > 0)
+		(*this) /= len;
+
+	return len;
+}
+
+/**
+ * Inline methods must have body in header.
+ **/
+
+inline Vector::Vector()
+{
+	x = 1;
+	y = 1;
+}
+
+inline Vector::Vector(float x, float y)
+{
+	this->x = x;
+	this->y = y;
+}
+
+inline Vector Vector::operator + (const Vector &v) const
+{
+	return Vector(x + v.x, y + v.y);
+}
+
+inline Vector Vector::operator - (const Vector &v) const
+{
+	return Vector(x - v.getX(), y - v.getY());
+}
+
+inline Vector Vector::operator * (float s) const
+{
+	return Vector(x*s, y*s);
+}
+
+inline Vector Vector::operator / (float s) const
+{
+	return Vector(x/s, y/s);
+}
+
+inline Vector Vector::operator - () const
+{
+	return Vector(-x, -y);
+}
+
+inline void Vector::operator += (const Vector &v)
+{
+	x += v.getX();
+	y += v.getY();
+}
+
+inline void Vector::operator -= (const Vector &v)
+{
+	x -= v.getX();
+	y -= v.getY();
+}
+
+inline void Vector::operator *= (float s)
+{
+	x *= s;
+	y *= s;
+}
+
+inline void Vector::operator /= (float s)
+{
+	x /= s;
+	y /= s;
+}
+
+inline float Vector::operator * (const Vector &v) const
+{
+	return x * v.getX() + y * v.getY();
+}
+
+inline float Vector::operator ^ (const Vector &v) const
+{
+	return x * v.getY() - y * v.getX();
+}
+
+inline bool Vector::operator == (const Vector &v) const
+{
+	return getLength() == v.getLength();
+}
+
+inline bool Vector::operator < (const Vector &v) const
+{
+	return getLength() < v.getLength();
+}
+
+/**
+ * Accessor methods
+ **/
+
+inline float Vector::getX() const
+{
+	return x;
+}
+
+inline float Vector::getY() const
+{
+	return y;
+}
+
+inline void Vector::setX(float x)
+{
+	this->x = x;
+}
+
+inline void Vector::setY(float y)
+{
+	this->y = y;
+}
+
+} //love
+
+#endif// LOVE_VECTOR_H

+ 80 - 78
src/common/b64.cpp

@@ -1,78 +1,80 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "b64.h"
-
-namespace love
-{
-	static const char cd64[]="|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq";
-
-	void b64_decode_block(char in[4], char out[3])
-	{
-		out[0] = (char)(in[0] << 2 | in[1] >> 4);
-		out[1] = (char)(in[1] << 4 | in[2] >> 2);
-		out[2] = (char)(((in[2] << 6) & 0xc0) | in[3]);
-	}
-
-	char * b64_decode(const char * src, int slen, int & size)
-	{
-		size = (slen / 4) * 3;
-
-		char * dst = new char[size];
-		char * d = dst;
-
-		char in[4], out[3], v;
-		int i, len, pos = 0;
-
-		while (pos <= slen)
-		{
-			for (len = 0, i = 0; i < 4 && pos <= slen; i++ )
-			{
-				v = 0;
-
-				while (pos <= slen && v == 0 )
-				{
-					v = src[pos++];
-					v = (char)((v < 43 || v > 122) ? 0 : cd64[v - 43]);
-					if (v)
-						v = (char)((v == '$') ? 0 : v - 61);
-				}
-
-				if (pos <= slen)
-				{
-					len++;
-					if (v)
-						in[i] = (char)(v - 1);
-				}
-				else
-					in[i] = 0;
-			}
-
-			if (len)
-			{
-				b64_decode_block(in, out);
-				for (i = 0; i < len - 1; i++)
-					*(d++) = out[i];
-			}
-		}
-
-		return dst;
-	}
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "b64.h"
+
+namespace love
+{
+
+static const char cd64[]="|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq";
+
+void b64_decode_block(char in[4], char out[3])
+{
+	out[0] = (char)(in[0] << 2 | in[1] >> 4);
+	out[1] = (char)(in[1] << 4 | in[2] >> 2);
+	out[2] = (char)(((in[2] << 6) & 0xc0) | in[3]);
+}
+
+char *b64_decode(const char *src, int slen, int &size)
+{
+	size = (slen / 4) * 3;
+
+	char *dst = new char[size];
+	char *d = dst;
+
+	char in[4], out[3], v;
+	int i, len, pos = 0;
+
+	while (pos <= slen)
+	{
+		for (len = 0, i = 0; i < 4 && pos <= slen; i++)
+		{
+			v = 0;
+
+			while (pos <= slen && v == 0)
+			{
+				v = src[pos++];
+				v = (char)((v < 43 || v > 122) ? 0 : cd64[v - 43]);
+				if (v)
+					v = (char)((v == '$') ? 0 : v - 61);
+			}
+
+			if (pos <= slen)
+			{
+				len++;
+				if (v)
+					in[i] = (char)(v - 1);
+			}
+			else
+				in[i] = 0;
+		}
+
+		if (len)
+		{
+			b64_decode_block(in, out);
+			for (i = 0; i < len - 1; i++)
+				 *(d++) = out[i];
+		}
+	}
+
+	return dst;
+}
+
+} // love

+ 40 - 38
src/common/b64.h

@@ -1,39 +1,41 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "config.h"
-
-#ifndef LOVE_B64_H
-#define LOVE_B64_H
-
-namespace love
-{
-	/**
-	* Decode base64 encoded data.
-	*
-	* @param src The string containing the base64 data.
-	* @param slen The length of the string.
-	* @param size The size of the binary data is stored here.
-	* @return A chunk of memory containing the binary data (allocated with new[]).
-	*/
-	char * b64_decode(const char * src, int slen, int & size);
-} // love
-
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "config.h"
+
+#ifndef LOVE_B64_H
+#define LOVE_B64_H
+
+namespace love
+{
+
+/**
+ * Decode base64 encoded data.
+ *
+ * @param src The string containing the base64 data.
+ * @param slen The length of the string.
+ * @param size The size of the binary data is stored here.
+ * @return A chunk of memory containing the binary data (allocated with new[]).
+ */
+char *b64_decode(const char *src, int slen, int &size);
+
+} // love
+
 #endif // LOVE_B64_H

+ 93 - 81
src/common/config.h

@@ -1,81 +1,93 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_CONFIG_H
-#define LOVE_CONFIG_H
-
-// Platform stuff.
-#if defined(WIN32) || defined(_WIN32)
-#	define LOVE_WINDOWS 1
-#endif
-#if defined(linux) || defined(__linux) || defined(__linux__)
-#	define LOVE_LINUX 1
-#endif
-#if defined(__APPLE__)
-#	define LOVE_MACOSX 1
-#endif
-#if defined(macintosh)
-#	define LOVE_MACOS 1
-#endif
-
-// Endianness.
-#if defined(__i386__) || defined(__i386)
-#	define LOVE_LITTLE_ENDIAN 1
-#endif
-#if defined(__ppc__) || defined(__ppc)
-#	define LOVE_BIG_ENDIAN 1
-#endif
-
-// Warnings.
-#ifndef _CRT_SECURE_NO_WARNINGS
-#	define _CRT_SECURE_NO_WARNINGS
-#endif
-
-#ifndef LOVE_UNUSED
-#	define LOVE_UNUSED(x) (void)sizeof(x)
-#endif
-
-#ifndef LOVE_BUILD
-#	define LOVE_BUILD
-#	define LOVE_BUILD_STANDALONE
-#	define LOVE_BUILD_EXE
-//#	define LOVE_BUILD_DLL
-#endif
-
-// DLL-stuff.
-#ifdef LOVE_WINDOWS
-#	define LOVE_EXPORT __declspec(dllexport)
-#else
-#	define LOVE_EXPORT
-#endif
-
-#if defined(LOVE_WINDOWS)
-#	define LOVE_LEGENDARY_UTF8_ARGV_HACK
-#	define LOVE_LEGENDARY_CONSOLE_IO_HACK
-#	define NOMINMAX
-#endif
-
-// Autotools config.h
-#ifdef HAVE_CONFIG_H
-#	include <../config.h>
-#	undef VERSION
-#endif
-
-#endif // LOVE_CONFIG_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_CONFIG_H
+#define LOVE_CONFIG_H
+
+// Platform stuff.
+#if defined(WIN32) || defined(_WIN32)
+#	define LOVE_WINDOWS 1
+#endif
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#	define LOVE_LINUX 1
+#endif
+#if defined(__APPLE__)
+#	define LOVE_MACOSX 1
+#endif
+#if defined(macintosh)
+#	define LOVE_MACOS 1
+#endif
+
+// Endianness.
+#if defined(__i386__) || defined(__i386)
+#	define LOVE_LITTLE_ENDIAN 1
+#endif
+#if defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(__powerpc)
+#	define LOVE_BIG_ENDIAN 1
+#endif
+
+// Warnings.
+#ifndef _CRT_SECURE_NO_WARNINGS
+#	define _CRT_SECURE_NO_WARNINGS
+#endif
+
+// Preferably, and ironically, this macro should go unused.
+#ifndef LOVE_UNUSED
+#	define LOVE_UNUSED(x) (void)sizeof(x)
+#endif
+
+#ifndef LOVE_BUILD
+#	define LOVE_BUILD
+#	define LOVE_BUILD_STANDALONE
+#	define LOVE_BUILD_EXE
+//#	define LOVE_BUILD_DLL
+#endif
+
+// DLL-stuff.
+#ifdef LOVE_WINDOWS
+#	define LOVE_EXPORT __declspec(dllexport)
+#else
+#	define LOVE_EXPORT
+#endif
+
+#if defined(LOVE_WINDOWS)
+#	define LOVE_LEGENDARY_UTF8_ARGV_HACK
+#	define LOVE_LEGENDARY_CONSOLE_IO_HACK
+#	define NOMINMAX
+#endif
+
+#if defined(LOVE_MACOSX)
+#	define LOVE_LEGENDARY_LIBSTDCXX_HACK
+#endif
+
+// Autotools config.h
+#ifdef HAVE_CONFIG_H
+#	include <../config.h>
+#	undef VERSION
+#	ifdef WORDS_BIGENDIAN
+#		undef LOVE_LITTLE_ENDIAN
+#		define LOVE_BIG_ENDIAN 1
+#	else
+#		undef LOVE_BIG_ENDIAN
+#		define LOVE_LITTLE_ENDIAN 1
+#	endif
+#endif
+
+#endif // LOVE_CONFIG_H

+ 42 - 41
src/common/delay.cpp

@@ -1,41 +1,42 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-
-#include "delay.h"
-
-namespace love {
-
-	void delay(unsigned int ms) {
-#if LOVE_THREADS == LOVE_THREADS_POSIX
-		struct timespec ts1, ts2;
-
-		ts1.tv_sec = ms / 1000;
-		ts1.tv_nsec = (ms % 1000) * 1000000;
-		// FIXME: handle signals
-		nanosleep(&ts1, &ts2);
-#elif LOVE_THREADS == LOVE_THREADS_WIN32
-		Sleep(ms);
-#elif LOVE_THREADS == LOVE_THREADS_SDL
-		SDL_Delay(ms);
-#endif
-	}
-
-} // namespace love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "delay.h"
+
+namespace love
+{
+
+void delay(unsigned int ms)
+{
+#if LOVE_THREADS == LOVE_THREADS_POSIX
+	struct timespec ts1, ts2;
+
+	ts1.tv_sec = ms / 1000;
+	ts1.tv_nsec = (ms % 1000) * 1000000;
+	// FIXME: handle signals
+	nanosleep(&ts1, &ts2);
+#elif LOVE_THREADS == LOVE_THREADS_WIN32
+	Sleep(ms);
+#elif LOVE_THREADS == LOVE_THREADS_SDL
+	SDL_Delay(ms);
+#endif
+}
+
+} // love

+ 33 - 33
src/common/delay.h

@@ -1,33 +1,33 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef DELAY_H_
-#define DELAY_H_
-
-#include <thread/threads.h>
-
-
-namespace love {
-
-	void delay(unsigned int ms);
-
-}; // namespace love
-
-#endif /* DELAY_H_ */
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef DELAY_H_
+#define DELAY_H_
+
+#include <thread/threads.h>
+
+namespace love
+{
+
+void delay(unsigned int ms);
+
+}; // namespace love
+
+#endif // DELAY_H_

+ 65 - 64
src/common/int.h

@@ -1,64 +1,65 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_INT_H
-#define LOVE_INT_H
-
-#include <common/config.h>
-
-#ifndef LOVE_WINDOWS
-#include <stdint.h>
-#endif
-
-#define LOVE_INT8_MAX   0x7F
-#define LOVE_UINT8_MAX  0xFF
-#define LOVE_INT16_MAX  0x7FFF
-#define LOVE_UINT16_MAX 0xFFFF
-#define LOVE_INT32_MAX  0x7FFFFFFF
-#define LOVE_UINT32_MAX 0xFFFFFFFF
-#define LOVE_INT64_MAX  0x7FFFFFFFFFFFFFFF
-#define LOVE_UINT64_MAX 0xFFFFFFFFFFFFFFFF
-
-namespace love
-{
-// Blame Microsoft
-#ifdef LOVE_WINDOWS
-	typedef __int8 int8;
-	typedef unsigned __int8 uint8;
-	typedef __int16 int16;
-	typedef unsigned __int16 uint16;
-	typedef __int32 int32;
-	typedef unsigned __int32 uint32;
-	typedef __int64 int64;
-	typedef unsigned __int64 uint64;
-
-#else
-	typedef int8_t int8;
-	typedef uint8_t uint8;
-	typedef int16_t int16;
-	typedef uint16_t uint16;
-	typedef int32_t int32;
-	typedef uint32_t uint32;
-	typedef int64_t int64;
-	typedef uint64_t uint64;
-#endif
-} // love
-
-#endif // LOVE_INT_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_INT_H
+#define LOVE_INT_H
+
+#include "common/config.h"
+
+#ifndef LOVE_WINDOWS
+#include <stdint.h>
+#endif
+
+#define LOVE_INT8_MAX   0x7F
+#define LOVE_UINT8_MAX  0xFF
+#define LOVE_INT16_MAX  0x7FFF
+#define LOVE_UINT16_MAX 0xFFFF
+#define LOVE_INT32_MAX  0x7FFFFFFF
+#define LOVE_UINT32_MAX 0xFFFFFFFF
+#define LOVE_INT64_MAX  0x7FFFFFFFFFFFFFFF
+#define LOVE_UINT64_MAX 0xFFFFFFFFFFFFFFFF
+
+namespace love
+{
+
+// Blame Microsoft
+#ifdef LOVE_WINDOWS
+	typedef __int8 int8;
+	typedef unsigned __int8 uint8;
+	typedef __int16 int16;
+	typedef unsigned __int16 uint16;
+	typedef __int32 int32;
+	typedef unsigned __int32 uint32;
+	typedef __int64 int64;
+	typedef unsigned __int64 uint64;
+#else // LOVE_WINDOWS
+	typedef int8_t int8;
+	typedef uint8_t uint8;
+	typedef int16_t int16;
+	typedef uint16_t uint16;
+	typedef int32_t int32;
+	typedef uint32_t uint32;
+	typedef int64_t int64;
+	typedef uint64_t uint64;
+#endif // LOVE_WINDOWS
+
+} // love
+
+#endif // LOVE_INT_H

+ 18 - 31
src/common/math.h

@@ -1,28 +1,27 @@
 /**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
 
 #ifndef LOVE_MATH_H
 #define LOVE_MATH_H
 
 #include <climits> // for CHAR_BIT
-#include <cstdlib> // for rand()
 
 /* Definitions of useful mathematical constants
  * M_E        - e
@@ -81,18 +80,6 @@ inline float next_p2(float x)
 	return static_cast<float>(next_p2(static_cast<int>(x)));
 }
 
-template<typename T>
-inline T random()
-{
-	return T(rand()) / (T(RAND_MAX)+T(1));
-}
-
-template<typename T>
-inline T random(T min, T max)
-{
-	return random<T>() * (max - min) + min;
-}
-
 } // love
 
 #endif // LOVE_MATH_H

+ 481 - 480
src/common/runtime.cpp

@@ -1,480 +1,481 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "runtime.h"
-
-// LOVE
-#include "Module.h"
-#include "Object.h"
-#include "Reference.h"
-#include "StringMap.h"
-#include <thread/threads.h>
-
-// STD
-#include <iostream>
-
-
-namespace love
-{
-	static thread::Mutex *gcmutex = 0;
-	void *_gcmutex = 0;
-	unsigned int _gcthread = 0;
-	/**
-	* Called when an object is collected. The object is released
-	* once in this function, possibly deleting it.
-	**/
-	static int w__gc(lua_State * L)
-	{
-		if (!gcmutex)
-		{
-			gcmutex = new thread::Mutex();
-			_gcmutex = (void*) gcmutex;
-		}
-		Proxy * p = (Proxy *)lua_touserdata(L, 1);
-		Object * t = (Object *)p->data;
-		if (p->own)
-		{
-			thread::Lock lock(gcmutex);
-			_gcthread = thread::ThreadBase::threadId();
-			t->release();
-		}
-		return 0;
-	}
-
-	static int w__tostring(lua_State * L)
-	{
-		lua_pushvalue(L, lua_upvalueindex(1));
-		return 1;
-	}
-
-	static int w__typeOf(lua_State * L)
-	{
-		Proxy * p = (Proxy *)lua_touserdata(L, 1);
-		Type t = luax_type(L, 2);
-		luax_pushboolean(L, p->flags[t]);
-		return 1;
-	}
-
-	static int w__eq(lua_State * L)
-	{
-		Proxy * p1 = (Proxy *)lua_touserdata(L, 1);
-		Proxy * p2 = (Proxy *)lua_touserdata(L, 2);
-		luax_pushboolean(L, p1->data == p2->data);
-		return 1;
-	}
-
-	Reference * luax_refif(lua_State * L, int type)
-	{
-		Reference * r = 0;
-
-		// Create a reference only if the test succeeds.
-		if (lua_type(L, -1) == type)
-			r = new Reference(L);
-		else // Pop the value even if it fails (but also if it succeeds).
-			lua_pop(L, 1);
-
-		return r;
-	}
-
-	void luax_printstack(lua_State * L)
-	{
-		for (int i = 1;i<=lua_gettop(L);i++)
-		{
-			std::cout << i << " - " << luaL_typename(L, i) << std::endl;
-		}
-	}
-
-	bool luax_toboolean(lua_State * L, int idx)
-	{
-		return (lua_toboolean(L, idx) != 0);
-	}
-
-	void luax_pushboolean(lua_State * L, bool b)
-	{
-		lua_pushboolean(L, b ? 1 : 0);
-	}
-
-	bool luax_optboolean(lua_State * L, int idx, bool b)
-	{
-		if (lua_isboolean(L, idx) == 1)
-			return (lua_toboolean(L, idx) == 1 ? true : false);
-		return b;
-	}
-
-	std::string luax_checkstring(lua_State * L, int idx)
-	{
-		size_t len;
-		const char * str = luaL_checklstring(L, idx, &len);
-		return std::string(str, len);
-	}
-
-	void luax_pushstring(lua_State * L, std::string str)
-	{
-		lua_pushlstring(L, str.data(), str.size());
-	}
-
-	int luax_assert_argc(lua_State * L, int min)
-	{
-		int argc = lua_gettop(L);
-		if ( argc < min )
-			return luaL_error(L, "Incorrect number of arguments. Got [%d], expected at least [%d]", argc, min);
-		return 0;
-	}
-
-	int luax_assert_argc(lua_State * L, int min, int max)
-	{
-		int argc = lua_gettop(L);
-		if ( argc < min || argc > max)
-			return luaL_error(L, "Incorrect number of arguments. Got [%d], expected [%d-%d]", argc, min, max);
-		return 0;
-	}
-
-	int luax_assert_function(lua_State * L, int n)
-	{
-		if (!lua_isfunction(L, n))
-			return luaL_error(L, "Argument must be of type \"function\".");
-		return 0;
-	}
-
-	int luax_register_module(lua_State * L, const WrappedModule & m)
-	{
-		// Put a reference to the C++ module in Lua.
-		luax_getregistry(L, REGISTRY_MODULES);
-
-		Proxy * p = (Proxy *)lua_newuserdata(L, sizeof(Proxy));
-		p->own = true;
-		p->data = m.module;
-		p->flags = m.flags;
-
-		luaL_newmetatable(L, m.module->getName());
-		lua_pushvalue(L, -1);
-		lua_setfield(L, -2, "__index");
-		lua_pushcfunction(L, w__gc);
-		lua_setfield(L, -2, "__gc");
-
-		lua_setmetatable(L, -2);
-		lua_setfield(L, -2, m.name); // _modules[name] = proxy
-		lua_pop(L, 1);
-
-		// Gets the love table.
-		luax_insistglobal(L, "love");
-
-		// Create new table for module.
-		lua_newtable(L);
-
-		// Register all the functions.
-		luaL_register(L, 0, m.functions);
-
-		// Register types.
-		if (m.types != 0)
-			for (const lua_CFunction * t = m.types; *t != 0; t++)
-				(*t)(L);
-
-		lua_pushvalue(L, -1);
-		lua_setfield(L, -3, m.name); // love.graphics = table
-		lua_remove(L, -2); // love
-
-		return 1;
-	}
-
-	int luax_preload(lua_State * L, lua_CFunction f, const char * name)
-	{
-		lua_getglobal(L, "package");
-		lua_getfield(L, -1, "preload");
-		lua_pushcfunction(L, f);
-		lua_setfield(L, -2, name);
-		lua_pop(L, 2);
-		return 0;
-	}
-
-	int luax_register_type(lua_State * L, const char * tname, const luaL_Reg * f)
-	{
-		luaL_newmetatable(L, tname);
-
-		// m.__index = m
-		lua_pushvalue(L, -1);
-		lua_setfield(L, -2, "__index");
-
-		// setup gc
-		lua_pushcfunction(L, w__gc);
-		lua_setfield(L, -2, "__gc");
-
-		// Add equality
-		lua_pushcfunction(L, w__eq);
-		lua_setfield(L, -2, "__eq");
-
-		// Add tostring function.
-		lua_pushstring(L, tname);
-		lua_pushcclosure(L, w__tostring, 1);
-		lua_setfield(L, -2, "__tostring");
-
-		// Add tostring to as type() as well.
-		lua_pushstring(L, tname);
-		lua_pushcclosure(L, w__tostring, 1);
-		lua_setfield(L, -2, "type");
-
-		// Add typeOf
-		lua_pushcfunction(L, w__typeOf);
-		lua_setfield(L, -2, "typeOf");
-
-		if (f != 0)
-			luaL_register(L, 0, f);
-
-		lua_pop(L, 1); // Pops metatable.
-		return 0;
-	}
-
-	int luax_table_insert(lua_State * L, int tindex, int vindex, int pos)
-	{
-		if (tindex < 0)
-			tindex = lua_gettop(L)+1+tindex;
-		if (vindex < 0)
-			vindex = lua_gettop(L)+1+vindex;
-		if (pos == -1)
-		{
-			lua_pushvalue(L, vindex);
-			lua_rawseti(L, tindex, lua_objlen(L, tindex)+1);
-			return 0;
-		}
-		else if (pos < 0)
-			pos = lua_objlen(L, tindex)+1+pos;
-		for (int i = lua_objlen(L, tindex)+1; i > pos; i--)
-		{
-			lua_rawgeti(L, tindex, i-1);
-			lua_rawseti(L, tindex, i);
-		}
-		lua_pushvalue(L, vindex);
-		lua_rawseti(L, tindex, pos);
-		return 0;
-	}
-
-	int luax_register_searcher(lua_State * L, lua_CFunction f, int pos)
-	{
-		// Add the package loader to the package.loaders table.
-		lua_getglobal(L, "package");
-
-		if (lua_isnil(L, -1))
-			return luaL_error(L, "Can't register searcher: package table does not exist.");
-
-		lua_getfield(L, -1, "loaders");
-
-		if (lua_isnil(L, -1))
-			return luaL_error(L, "Can't register searcher: package.loaders table does not exist.");
-
-		lua_pushcfunction(L, f);
-		luax_table_insert(L, -2, -1, pos);
-		lua_pop(L, 3);
-		return 0;
-	}
-
-	void luax_newtype(lua_State * L, const char * name, bits flags, void * data, bool own)
-	{
-		Proxy * u = (Proxy *)lua_newuserdata(L, sizeof(Proxy));
-
-		u->data = data;
-		u->flags = flags;
-		u->own = own;
-
-		luaL_newmetatable(L, name);
-		lua_setmetatable(L, -2);
-	}
-
-	bool luax_istype(lua_State * L, int idx, love::bits type)
-	{
-		if (lua_isuserdata(L, idx) == 0)
-			return false;
-
-		return ((((Proxy *)lua_touserdata(L, idx))->flags & type) == type);
-	}
-
-	int luax_getfunction(lua_State * L, const char * mod, const char * fn)
-	{
-		lua_getglobal(L, "love");
-		if (lua_isnil(L, -1)) return luaL_error(L, "Could not find global love!");
-		lua_getfield(L, -1, mod);
-		if (lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s!", mod);
-		lua_getfield(L, -1, fn);
-		if (lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s.%s!", mod, fn);
-
-		lua_remove(L, -2); // remove mod
-		lua_remove(L, -2); // remove fn
-		return 0;
-	}
-
-	int luax_convobj(lua_State * L, int idx, const char * mod, const char * fn)
-	{
-		// Convert string to a file.
-		luax_getfunction(L, mod, fn);
-		lua_pushvalue(L, idx); // The initial argument.
-		lua_call(L, 1, 1); // Call the function, one arg, one return value.
-		lua_replace(L, idx); // Replace the initial argument with the new object.
-		return 0;
-	}
-
-	int luax_convobj(lua_State * L, int idxs[], int n, const char * mod, const char * fn)
-	{
-		luax_getfunction(L, mod, fn);
-		for (int i = 0; i < n; i++)
-		{
-			lua_pushvalue(L, idxs[i]); // The arguments.
-		}
-		lua_call(L, n, 1); // Call the function, n args, one return value.
-		lua_replace(L, idxs[0]); // Replace the initial argument with the new object.
-		return 0;
-	}
-
-	int luax_strtofile(lua_State * L, int idx)
-	{
-		return luax_convobj(L, idx, "filesystem", "newFile");
-	}
-
-	int luax_filetodata(lua_State * L, int idx)
-	{
-		return luax_convobj(L, idx, "filesystem", "read");
-	}
-
-	int luax_insist(lua_State * L, int idx, const char * k)
-	{
-		// Convert to absolute index if necessary.
-		if (idx < 0 && idx > LUA_REGISTRYINDEX)
-			idx = lua_gettop(L) + ++idx;
-
-		lua_getfield(L, idx, k);
-
-		// Create if necessary.
-		if (!lua_istable(L, -1))
-		{
-			lua_pop(L, 1); // Pop the non-table.
-			lua_newtable(L);
-			lua_pushvalue(L, -1); // Duplicate the table to leave on top.
-			lua_setfield(L, idx, k); // lua_stack[idx][k] = lua_stack[-1] (table)
-		}
-
-		return 1;
-	}
-
-	int luax_insistglobal(lua_State * L, const char * k)
-	{
-		lua_getglobal(L, k);
-
-		if (!lua_istable(L, -1))
-		{
-			lua_pop(L, 1); // Pop the non-table.
-			lua_newtable(L);
-			lua_pushvalue(L, -1);
-			lua_setglobal(L, k);
-		}
-
-		return 1;
-	}
-
-	int luax_insistlove(lua_State * L, const char * k)
-	{
-		luax_insistglobal(L, "love");
-		luax_insist(L, -1, k);
-
-		// The love table should be replaced with the top stack
-		// item. Only the reqested table should remain on the stack.
-		lua_replace(L, -2);
-
-		return 1;
-	}
-
-	int luax_getregistry(lua_State * L, Registry r)
-	{
-		switch(r)
-		{
-		case REGISTRY_GC:
-			return luax_insistlove(L, "_gc");
-		case REGISTRY_MODULES:
-			return luax_insistlove(L, "_modules");
-		default:
-			return luaL_error(L, "Attempted to use invalid registry.");
-		}
-	}
-
-	StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[] =
-	{
-		{"Invalid", INVALID_ID},
-
-		{"Object", OBJECT_ID},
-		{"Data", DATA_ID},
-		{"Module", MODULE_ID},
-
-		// Filesystem
-		{"File", FILESYSTEM_FILE_ID},
-		{"FileData", FILESYSTEM_FILE_DATA_ID},
-
-		// Font
-		{"GlyphData", FONT_GLYPH_DATA_ID},
-		{"Rasterizer", FONT_RASTERIZER_ID},
-
-		// Graphics
-		{"Drawable", GRAPHICS_DRAWABLE_ID},
-		{"Image", GRAPHICS_IMAGE_ID},
-		{"Quad", GRAPHICS_QUAD_ID},
-		{"Font", GRAPHICS_FONT_ID},
-		{"ParticleSystem", GRAPHICS_PARTICLE_SYSTEM_ID},
-		{"SpriteBatch", GRAPHICS_SPRITE_BATCH_ID},
-		{"Canvas", GRAPHICS_CANVAS_ID},
-
-		// Image
-		{"ImageData", IMAGE_IMAGE_DATA_ID},
-
-		// Audio
-		{"Source", AUDIO_SOURCE_ID},
-
-		// Sound
-		{"SoundData", SOUND_SOUND_DATA_ID},
-		{"Decoder", SOUND_DECODER_ID},
-
-		// Physics
-		{"World", PHYSICS_WORLD_ID},
-		{"Contact", PHYSICS_CONTACT_ID},
-		{"Body", PHYSICS_BODY_ID},
-		{"Shape", PHYSICS_SHAPE_ID},
-		{"CircleShape", PHYSICS_CIRCLE_SHAPE_ID},
-		{"PolygonShape", PHYSICS_POLYGON_SHAPE_ID},
-		{"Joint", PHYSICS_JOINT_ID},
-		{"MouseJoint", PHYSICS_MOUSE_JOINT_ID},
-		{"DistanceJoint", PHYSICS_DISTANCE_JOINT_ID},
-		{"PrismaticJoint", PHYSICS_PRISMATIC_JOINT_ID},
-		{"RevoluteJoint", PHYSICS_REVOLUTE_JOINT_ID},
-		{"PulleyJoint", PHYSICS_PULLEY_JOINT_ID},
-		{"GearJoint", PHYSICS_GEAR_JOINT_ID},
-
-		// Thread
-		{"Thread", THREAD_THREAD_ID},
-
-		// The modules themselves. Only add abstracted modules here.
-		{"filesystem", MODULE_FILESYSTEM_ID},
-		{"image", MODULE_IMAGE_ID},
-		{"sound", MODULE_SOUND_ID},
-	};
-
-	StringMap<Type, TYPE_MAX_ENUM> types(typeEntries, sizeof(typeEntries));
-
-	Type luax_type(lua_State * L, int idx)
-	{
-		Type t = INVALID_ID;
-		types.find(luaL_checkstring(L, idx), t);
-		return t;
-	}
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "runtime.h"
+
+// LOVE
+#include "Module.h"
+#include "Object.h"
+#include "Reference.h"
+#include "StringMap.h"
+#include "thread/threads.h"
+
+// STD
+#include <iostream>
+
+namespace love
+{
+
+static thread::Mutex *gcmutex = 0;
+void *_gcmutex = 0;
+unsigned int _gcthread = 0;
+/**
+ * Called when an object is collected. The object is released
+ * once in this function, possibly deleting it.
+ **/
+static int w__gc(lua_State *L)
+{
+	if (!gcmutex)
+	{
+		gcmutex = new thread::Mutex();
+		_gcmutex = (void *) gcmutex;
+	}
+	Proxy *p = (Proxy *)lua_touserdata(L, 1);
+	Object *t = (Object *)p->data;
+	if (p->own)
+	{
+		thread::Lock lock(gcmutex);
+		_gcthread = thread::ThreadBase::threadId();
+		t->release();
+	}
+	return 0;
+}
+
+static int w__tostring(lua_State *L)
+{
+	lua_pushvalue(L, lua_upvalueindex(1));
+	return 1;
+}
+
+static int w__typeOf(lua_State *L)
+{
+	Proxy *p = (Proxy *)lua_touserdata(L, 1);
+	Type t = luax_type(L, 2);
+	luax_pushboolean(L, p->flags[t]);
+	return 1;
+}
+
+static int w__eq(lua_State *L)
+{
+	Proxy *p1 = (Proxy *)lua_touserdata(L, 1);
+	Proxy *p2 = (Proxy *)lua_touserdata(L, 2);
+	luax_pushboolean(L, p1->data == p2->data);
+	return 1;
+}
+
+Reference *luax_refif (lua_State *L, int type)
+{
+	Reference *r = 0;
+
+	// Create a reference only if the test succeeds.
+	if (lua_type(L, -1) == type)
+		r = new Reference(L);
+	else // Pop the value even if it fails (but also if it succeeds).
+		lua_pop(L, 1);
+
+	return r;
+}
+
+void luax_printstack(lua_State *L)
+{
+	for (int i = 1; i<=lua_gettop(L); i++)
+	{
+		std::cout << i << " - " << luaL_typename(L, i) << std::endl;
+	}
+}
+
+bool luax_toboolean(lua_State *L, int idx)
+{
+	return (lua_toboolean(L, idx) != 0);
+}
+
+void luax_pushboolean(lua_State *L, bool b)
+{
+	lua_pushboolean(L, b ? 1 : 0);
+}
+
+bool luax_optboolean(lua_State *L, int idx, bool b)
+{
+	if (lua_isboolean(L, idx) == 1)
+		return (lua_toboolean(L, idx) == 1 ? true : false);
+	return b;
+}
+
+std::string luax_checkstring(lua_State *L, int idx)
+{
+	size_t len;
+	const char *str = luaL_checklstring(L, idx, &len);
+	return std::string(str, len);
+}
+
+void luax_pushstring(lua_State *L, std::string str)
+{
+	lua_pushlstring(L, str.data(), str.size());
+}
+
+int luax_assert_argc(lua_State *L, int min)
+{
+	int argc = lua_gettop(L);
+	if (argc < min)
+		return luaL_error(L, "Incorrect number of arguments. Got [%d], expected at least [%d]", argc, min);
+	return 0;
+}
+
+int luax_assert_argc(lua_State *L, int min, int max)
+{
+	int argc = lua_gettop(L);
+	if (argc < min || argc > max)
+		return luaL_error(L, "Incorrect number of arguments. Got [%d], expected [%d-%d]", argc, min, max);
+	return 0;
+}
+
+int luax_assert_function(lua_State *L, int n)
+{
+	if (!lua_isfunction(L, n))
+		return luaL_error(L, "Argument must be of type \"function\".");
+	return 0;
+}
+
+int luax_register_module(lua_State *L, const WrappedModule &m)
+{
+	// Put a reference to the C++ module in Lua.
+	luax_getregistry(L, REGISTRY_MODULES);
+
+	Proxy *p = (Proxy *)lua_newuserdata(L, sizeof(Proxy));
+	p->own = true;
+	p->data = m.module;
+	p->flags = m.flags;
+
+	luaL_newmetatable(L, m.module->getName());
+	lua_pushvalue(L, -1);
+	lua_setfield(L, -2, "__index");
+	lua_pushcfunction(L, w__gc);
+	lua_setfield(L, -2, "__gc");
+
+	lua_setmetatable(L, -2);
+	lua_setfield(L, -2, m.name); // _modules[name] = proxy
+	lua_pop(L, 1);
+
+	// Gets the love table.
+	luax_insistglobal(L, "love");
+
+	// Create new table for module.
+	lua_newtable(L);
+
+	// Register all the functions.
+	luaL_register(L, 0, m.functions);
+
+	// Register types.
+	if (m.types != 0)
+		for (const lua_CFunction *t = m.types; *t != 0; t++)
+			(*t)(L);
+
+	lua_pushvalue(L, -1);
+	lua_setfield(L, -3, m.name); // love.graphics = table
+	lua_remove(L, -2); // love
+
+	return 1;
+}
+
+int luax_preload(lua_State *L, lua_CFunction f, const char *name)
+{
+	lua_getglobal(L, "package");
+	lua_getfield(L, -1, "preload");
+	lua_pushcfunction(L, f);
+	lua_setfield(L, -2, name);
+	lua_pop(L, 2);
+	return 0;
+}
+
+int luax_register_type(lua_State *L, const char *tname, const luaL_Reg *f)
+{
+	luaL_newmetatable(L, tname);
+
+	// m.__index = m
+	lua_pushvalue(L, -1);
+	lua_setfield(L, -2, "__index");
+
+	// setup gc
+	lua_pushcfunction(L, w__gc);
+	lua_setfield(L, -2, "__gc");
+
+	// Add equality
+	lua_pushcfunction(L, w__eq);
+	lua_setfield(L, -2, "__eq");
+
+	// Add tostring function.
+	lua_pushstring(L, tname);
+	lua_pushcclosure(L, w__tostring, 1);
+	lua_setfield(L, -2, "__tostring");
+
+	// Add tostring to as type() as well.
+	lua_pushstring(L, tname);
+	lua_pushcclosure(L, w__tostring, 1);
+	lua_setfield(L, -2, "type");
+
+	// Add typeOf
+	lua_pushcfunction(L, w__typeOf);
+	lua_setfield(L, -2, "typeOf");
+
+	if (f != 0)
+		luaL_register(L, 0, f);
+
+	lua_pop(L, 1); // Pops metatable.
+	return 0;
+}
+
+int luax_table_insert(lua_State *L, int tindex, int vindex, int pos)
+{
+	if (tindex < 0)
+		tindex = lua_gettop(L)+1+tindex;
+	if (vindex < 0)
+		vindex = lua_gettop(L)+1+vindex;
+	if (pos == -1)
+	{
+		lua_pushvalue(L, vindex);
+		lua_rawseti(L, tindex, lua_objlen(L, tindex)+1);
+		return 0;
+	}
+	else if (pos < 0)
+		pos = lua_objlen(L, tindex)+1+pos;
+	for (int i = lua_objlen(L, tindex)+1; i > pos; i--)
+	{
+		lua_rawgeti(L, tindex, i-1);
+		lua_rawseti(L, tindex, i);
+	}
+	lua_pushvalue(L, vindex);
+	lua_rawseti(L, tindex, pos);
+	return 0;
+}
+
+int luax_register_searcher(lua_State *L, lua_CFunction f, int pos)
+{
+	// Add the package loader to the package.loaders table.
+	lua_getglobal(L, "package");
+
+	if (lua_isnil(L, -1))
+		return luaL_error(L, "Can't register searcher: package table does not exist.");
+
+	lua_getfield(L, -1, "loaders");
+
+	if (lua_isnil(L, -1))
+		return luaL_error(L, "Can't register searcher: package.loaders table does not exist.");
+
+	lua_pushcfunction(L, f);
+	luax_table_insert(L, -2, -1, pos);
+	lua_pop(L, 3);
+	return 0;
+}
+
+void luax_newtype(lua_State *L, const char *name, bits flags, void *data, bool own)
+{
+	Proxy *u = (Proxy *)lua_newuserdata(L, sizeof(Proxy));
+
+	u->data = data;
+	u->flags = flags;
+	u->own = own;
+
+	luaL_newmetatable(L, name);
+	lua_setmetatable(L, -2);
+}
+
+bool luax_istype(lua_State *L, int idx, love::bits type)
+{
+	if (lua_isuserdata(L, idx) == 0)
+		return false;
+
+	return ((((Proxy *)lua_touserdata(L, idx))->flags & type) == type);
+}
+
+int luax_getfunction(lua_State *L, const char *mod, const char *fn)
+{
+	lua_getglobal(L, "love");
+	if (lua_isnil(L, -1)) return luaL_error(L, "Could not find global love!");
+	lua_getfield(L, -1, mod);
+	if (lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s!", mod);
+	lua_getfield(L, -1, fn);
+	if (lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s.%s!", mod, fn);
+
+	lua_remove(L, -2); // remove mod
+	lua_remove(L, -2); // remove fn
+	return 0;
+}
+
+int luax_convobj(lua_State *L, int idx, const char *mod, const char *fn)
+{
+	// Convert string to a file.
+	luax_getfunction(L, mod, fn);
+	lua_pushvalue(L, idx); // The initial argument.
+	lua_call(L, 1, 1); // Call the function, one arg, one return value.
+	lua_replace(L, idx); // Replace the initial argument with the new object.
+	return 0;
+}
+
+int luax_convobj(lua_State *L, int idxs[], int n, const char *mod, const char *fn)
+{
+	luax_getfunction(L, mod, fn);
+	for (int i = 0; i < n; i++)
+	{
+		lua_pushvalue(L, idxs[i]); // The arguments.
+	}
+	lua_call(L, n, 1); // Call the function, n args, one return value.
+	lua_replace(L, idxs[0]); // Replace the initial argument with the new object.
+	return 0;
+}
+
+int luax_strtofile(lua_State *L, int idx)
+{
+	return luax_convobj(L, idx, "filesystem", "newFile");
+}
+
+int luax_filetodata(lua_State *L, int idx)
+{
+	return luax_convobj(L, idx, "filesystem", "read");
+}
+
+int luax_insist(lua_State *L, int idx, const char *k)
+{
+	// Convert to absolute index if necessary.
+	if (idx < 0 && idx > LUA_REGISTRYINDEX)
+		idx = lua_gettop(L) + ++idx;
+
+	lua_getfield(L, idx, k);
+
+	// Create if necessary.
+	if (!lua_istable(L, -1))
+	{
+		lua_pop(L, 1); // Pop the non-table.
+		lua_newtable(L);
+		lua_pushvalue(L, -1); // Duplicate the table to leave on top.
+		lua_setfield(L, idx, k); // lua_stack[idx][k] = lua_stack[-1] (table)
+	}
+
+	return 1;
+}
+
+int luax_insistglobal(lua_State *L, const char *k)
+{
+	lua_getglobal(L, k);
+
+	if (!lua_istable(L, -1))
+	{
+		lua_pop(L, 1); // Pop the non-table.
+		lua_newtable(L);
+		lua_pushvalue(L, -1);
+		lua_setglobal(L, k);
+	}
+
+	return 1;
+}
+
+int luax_insistlove(lua_State *L, const char *k)
+{
+	luax_insistglobal(L, "love");
+	luax_insist(L, -1, k);
+
+	// The love table should be replaced with the top stack
+	// item. Only the reqested table should remain on the stack.
+	lua_replace(L, -2);
+
+	return 1;
+}
+
+int luax_getregistry(lua_State *L, Registry r)
+{
+	switch (r)
+	{
+	case REGISTRY_GC:
+		return luax_insistlove(L, "_gc");
+	case REGISTRY_MODULES:
+		return luax_insistlove(L, "_modules");
+	default:
+		return luaL_error(L, "Attempted to use invalid registry.");
+	}
+}
+
+StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[] =
+{
+	{"Invalid", INVALID_ID},
+
+	{"Object", OBJECT_ID},
+	{"Data", DATA_ID},
+	{"Module", MODULE_ID},
+
+	// Filesystem
+	{"File", FILESYSTEM_FILE_ID},
+	{"FileData", FILESYSTEM_FILE_DATA_ID},
+
+	// Font
+	{"GlyphData", FONT_GLYPH_DATA_ID},
+	{"Rasterizer", FONT_RASTERIZER_ID},
+
+	// Graphics
+	{"Drawable", GRAPHICS_DRAWABLE_ID},
+	{"Image", GRAPHICS_IMAGE_ID},
+	{"Quad", GRAPHICS_QUAD_ID},
+	{"Font", GRAPHICS_FONT_ID},
+	{"ParticleSystem", GRAPHICS_PARTICLE_SYSTEM_ID},
+	{"SpriteBatch", GRAPHICS_SPRITE_BATCH_ID},
+	{"Canvas", GRAPHICS_CANVAS_ID},
+
+	// Image
+	{"ImageData", IMAGE_IMAGE_DATA_ID},
+
+	// Audio
+	{"Source", AUDIO_SOURCE_ID},
+
+	// Sound
+	{"SoundData", SOUND_SOUND_DATA_ID},
+	{"Decoder", SOUND_DECODER_ID},
+
+	// Physics
+	{"World", PHYSICS_WORLD_ID},
+	{"Contact", PHYSICS_CONTACT_ID},
+	{"Body", PHYSICS_BODY_ID},
+	{"Shape", PHYSICS_SHAPE_ID},
+	{"CircleShape", PHYSICS_CIRCLE_SHAPE_ID},
+	{"PolygonShape", PHYSICS_POLYGON_SHAPE_ID},
+	{"Joint", PHYSICS_JOINT_ID},
+	{"MouseJoint", PHYSICS_MOUSE_JOINT_ID},
+	{"DistanceJoint", PHYSICS_DISTANCE_JOINT_ID},
+	{"PrismaticJoint", PHYSICS_PRISMATIC_JOINT_ID},
+	{"RevoluteJoint", PHYSICS_REVOLUTE_JOINT_ID},
+	{"PulleyJoint", PHYSICS_PULLEY_JOINT_ID},
+	{"GearJoint", PHYSICS_GEAR_JOINT_ID},
+
+	// Thread
+	{"Thread", THREAD_THREAD_ID},
+
+	// The modules themselves. Only add abstracted modules here.
+	{"filesystem", MODULE_FILESYSTEM_ID},
+	{"image", MODULE_IMAGE_ID},
+	{"sound", MODULE_SOUND_ID},
+};
+
+StringMap<Type, TYPE_MAX_ENUM> types(typeEntries, sizeof(typeEntries));
+
+Type luax_type(lua_State *L, int idx)
+{
+	Type t = INVALID_ID;
+	types.find(luaL_checkstring(L, idx), t);
+	return t;
+}
+
+} // love

+ 384 - 383
src/common/runtime.h

@@ -1,383 +1,384 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_RUNTIME_H
-#define LOVE_RUNTIME_H
-
-// LOVE
-#include "types.h"
-
-// Lua
-extern "C" {
-	#include <lua.h>
-	#include <lualib.h>
-	#include <lauxlib.h>
-}
-
-namespace love
-{
-	// Forward declarations.
-	class Module;
-	class Reference;
-
-	// Exposed mutex of the GC
-	extern void *_gcmutex;
-	extern unsigned int _gcthread;
-
-	/**
-	* Registries represent special tables which can be accessed with
-	* luax_getregistry.
-	**/
-	enum Registry
-	{
-		REGISTRY_GC = 1,
-		REGISTRY_MODULES,
-	};
-
-	/**
-	* This structure wraps all Lua-exposed objects. It exists in the
-	* Lua state as a full userdata (so we can catch __gc "events"),
-	* though the Object it refers to is light userdata in the sense
-	* that it is not allocated by the Lua VM.
-	**/
-	struct Proxy
-	{
-		// Holds type information (see types.h).
-		bits flags;
-
-		// The light userdata.
-		void * data;
-
-		// True if Lua should delete on GC.
-		bool own;
-	};
-
-	/**
-	* A Module with Lua wrapper functions and other data.
-	**/
-	struct WrappedModule
-	{
-		// The module containing the functions.
-		Module * module;
-
-		// The name for the table to put the functions in, without the 'love'-prefix.
-		const char * name;
-
-		// The type flags of this module.
-		love::bits flags;
-
-		// The functions of the module (last element {0,0}).
-		const luaL_Reg * functions;
-
-		// A list of functions which expose the types of the modules (last element 0).
-		const lua_CFunction * types;
-
-	};
-
-	/**
-	* Returns a reference to the top stack element (-1) if the value
-	* is of the specified type. If the value is incorrect, zero is returned.
-	*
-	* In any case, the top stack element is popped, regardless of its type.
-	**/
-	Reference * luax_refif(lua_State * L, int type);
-
-	/**
-	* Prints the current contents of the stack. Only useful for debugging.
-	* @param L The Lua state.
-	**/
-	void luax_printstack(lua_State * L);
-
-	/**
-	* Converts the value at idx to a bool. It follow the same rules
-	* as lua_toboolean, but returns a bool instead of an int.
-	* @param L The Lua state.
-	* @param idx The index on the Lua stack.
-	* @return True if the value evaluates to true, false otherwise.
-	**/
-	bool luax_toboolean(lua_State * L, int idx);
-
-	/**
-	* Pushes a bool onto the stack. It's the same as lua_pushboolean,
-	* but with bool instead of int.
-	* @param L The Lua state.
-	* @param b The bool to push.
-	**/
-	void luax_pushboolean(lua_State * L, bool b);
-
-	/**
-	* Converts the value at idx to a bool, or if not present, b is returned.
-	* @param L The Lua state.
-	* @param idx The index of the Lua stack.
-	* @param b The value to return if no value exist at the specified index.
-	* @return True if the value evaluates to true, false otherwise.
-	**/
-	bool luax_optboolean(lua_State * L, int idx, bool b);
-
-	/**
-	* Converts the value at idx to a std::string. It takes care of the string
-	* size and possible embedded nulls.
-	* @param L The Lua state.
-	* @param idx The index on the Lua stack.
-	* @return Copy of the string at the specified index.
-	**/
-	std::string luax_checkstring(lua_State * L, int idx);
-
-	/**
-	* Pushes a std::string onto the stack. It uses the length of the string
-	* for lua_pushlstring's len argument.
-	* @param L The Lua state.
-	* @param str The string to push.
-	**/
-	void luax_pushstring(lua_State * L, std::string str);
-
-	/**
-	* Require at least 'min' number of items on the stack.
-	* @param L The Lua state.
-	* @param min The minimum number of items on the stack.
-	* @return Zero if conditions are met, otherwise a Lua error (longjmp).
-	**/
-	int luax_assert_argc(lua_State * L, int min);
-
-	/**
-	* Require at least 'min', but more than 'max' items on the stack.
-	* @param L The Lua state.
-	* @param min The minimum number of items on the stack.
-	* @param max The maximum number of items on the stack.
-	* @return Zero if conditions are met, otherwise a Lua error (longjmp).
-	**/
-	int luax_assert_argc(lua_State * L, int min, int max);
-
-	/**
-	* Require that the value at idx is a function.
-	* @param L The Lua state.
-	 *@param idx The index on the stack.
-	**/
-	int luax_assert_function(lua_State * L, int idx);
-
-	/**
-	* Register a module in the love table. The love table will be created if it does not exist.
-	* @param L The Lua state.
-	**/
-	int luax_register_module(lua_State * L, const WrappedModule & m);
-
-	/**
-	* Inserts a module with 'name' into the package.preloaded table.
-	* @param f The function to be called when the module is opened.
-	* @param name The name of the module, with 'love'-prefix, for instance 'love.graphics'.
-	**/
-	int luax_preload(lua_State * L, lua_CFunction f, const char * name);
-
-	/**
-	* Register a new type.
-	* @param tname The name of the type. This must not conflict with other type names,
-	* even from other modules.
-	* @param f The list of member functions for the type.
-	**/
-	int luax_register_type(lua_State * L, const char * tname, const luaL_Reg * f = 0);
-
-	/**
-	 * Do a table.insert from C
-	 * @param L the state
-	 * @param tindex the stack index of the table
-	 * @param vindex the stack index of the value
-	 * @param pos the position to insert it in
-	 **/
-	int luax_table_insert(lua_State * L, int tindex, int vindex, int pos = -1);
-
-	/**
-	* Register a new searcher function for package.loaders. This can for instance enable
-	* loading of files through love.filesystem using standard require.
-	* @param L The Lua state.
-	* @param f The searcher function.
-	* @param pos The position to insert the loader in.
-	**/
-	int luax_register_searcher(lua_State * L, lua_CFunction f, int pos = -1);
-
-	/**
-	* Creates a new Lua-accessible object of the given type, and put it on the stack.
-	* @param L The Lua state.
-	* @param name The name of the type. This must match the used earlier with luax_register_type.
-	* @param flags The type information.
-	* @param data The pointer to the actual object.
-	* @own Set this to true (default) if the object should be released upon garbage collection.
-	**/
-	void luax_newtype(lua_State * L, const char * name, bits flags, void * data, bool own = true);
-
-	/**
-	* Checks whether the value at idx is a certain type.
-	* @param L The Lua state.
-	* @param idx The index on the stack.
-	* @param type The type to check for.
-	* @return True if the value is Proxy of the specified type, false otherwise.
-	**/
-	bool luax_istype(lua_State * L, int idx, love::bits type);
-
-	/**
-	* Gets the function love.module.function and puts it on top of the stack (alone). If the
-	* love table, the module, or the function does not exist, an error is returned.
-	* @return An error if nonexistent, or 1 if successful.
-	**/
-	int luax_getfunction(lua_State * L, const char * module, const char * function);
-
-	/**
-	* Converts an object into another object by the specified function love.module.function.
-	* The conversion function must accept a single object of the relevant type as a parameter,
-	* and returnone value. If the function does not exist (see luax_getfunction), an error is returned.
-	*
-	* Note that the initial object at idx is replaced by the new object.
-	*
-	* @param L The Lua state.
-	* @param idx The index on the stack.
-	* @param module The module in the love table.
-	* @param function The function in the module.
-	**/
-	int luax_convobj(lua_State * L, int idx, const char * module, const char * function);
-
-	/**
-	* Converts an object into another object by the specified function love.module.function.
-	* The conversion function must accept a single object of the relevant type as its first parameter,
-	* and return one value. If the function does not exist (see luax_getfunction), an error is returned.
-	*
-	* Note that the initial object at idx is replaced by the new object.
-	*
-	* @param L The Lua state.
-	* @param idxs An array of indices on the stack.
-	* @param n How many arguments are being passed.
-	* @param module The module in the love table.
-	* @param function The function in the module.
-	**/
-	int luax_convobj(lua_State * L, int idxs[], int n, const char * module, const char * function);
-
-	/**
-	* 'Insist' that a table 'k' exists in the table at idx. Insistence involves that the
-	* table (k) is created if it does not exist in the table at idx. The table at idx must
-	* pre-exist, however. Also note that if the a non-table value exists at the specified
-	* location, it will be overwritten with a new table. The insisted table, and only the
-	* insisted table, will be placed on top of the stack.
-	*
-	* @param idx The index on the stack containing a table.
-	* @param k The name of the table we are insisting exist.
-	**/
-	int luax_insist(lua_State * L, int idx, const char * k);
-
-	/**
-	* Insist that a global table 'k' exists. See luax_insist.
-	* @param k The name of the table we are insisting exist.
-	**/
-	int luax_insistglobal(lua_State * L, const char * k);
-
-	/**
-	* Insists that a table 'k' exists inside the 'love' table. See luax_insist.
-	* @param k The name of the table we are insisting exist.
-	**/
-	int luax_insistlove(lua_State * L, const char * k);
-
-	/**
-	* Gets (creates if needed) the specified Registry, and puts it on top
-	* of the stack.
-	* @param L The Lua state.
-	* @param r The Registry to get.
-	**/
-	int luax_getregistry(lua_State * L, Registry r);
-
-	Type luax_type(lua_State * L, int idx);
-
-	/**
-	 * Convert the value at the specified index to an Lua number, and then
-	 * convert to a float.
-	 *
-	 * @param L The Lua state.
-	 * @param idx The index on the stack.
-	 */
-	inline float luax_tofloat(lua_State *L, int idx)
-	{
-		return static_cast<float>(lua_tonumber(L, idx));
-	}
-
-	/**
-	 * Like luax_tofloat, but checks that the value is a number.
-	 *
-	 * @see luax_tofloat
-	 */
-	inline float luax_checkfloat(lua_State *L, int idx)
-	{
-		return static_cast<float>(luaL_checknumber(L, idx));
-	}
-
-	/**
-	* Converts the value at idx to the specified type without checking that
-	* this conversion is valid. If the type has been previously verified with
-	* luax_istype, then this can be safely used. Otherwise, use luax_checktype.
-	* @param L The Lua state.
-	* @param idx The index on the stack.
-	* @param name The name of the type.
-	* @param type The type bit.
-	**/
-	template <typename T>
-	T * luax_totype(lua_State * L, int idx, const char *, love::bits)
-	{
-		return (T*)(((Proxy *)lua_touserdata(L, idx))->data);
-	}
-
-	/**
-	* Like luax_totype, but causes an error if the value at idx is not Proxy,
-	* or is not the specified type.
-	* @param L The Lua state.
-	* @param idx The index on the stack.
-	* @param name The name of the type.
-	* @param type The type bit.
-	**/
-	template <typename T>
-	T * luax_checktype(lua_State * L, int idx, const char * name, love::bits type)
-	{
-		if (lua_isuserdata(L, idx) == 0)
-			luaL_error(L, "Incorrect parameter type: expected userdata.");
-
-		Proxy * u = (Proxy *)lua_touserdata(L, idx);
-
-		if ((u->flags & type) != type)
-			luaL_error(L, "Incorrect parameter type: expected %s", name);
-
-		return (T *)u->data;
-	}
-
-	template <typename T>
-	T * luax_getmodule(lua_State * L, const char * k, love::bits type)
-	{
-		luax_getregistry(L, REGISTRY_MODULES);
-		lua_getfield(L, -1, k);
-
-		if (!lua_isuserdata(L, -1))
-			luaL_error(L, "Tried to get nonexisting module %s.", k);
-
-		Proxy * u = (Proxy *)lua_touserdata(L, -1);
-
-		if ((u->flags & type) != type)
-			luaL_error(L, "Incorrect module %s", k);
-
-		lua_pop(L, 2);
-
-		return (T*)u->data;
-	}
-
-} // love
-
-#endif // LOVE_RUNTIME_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_RUNTIME_H
+#define LOVE_RUNTIME_H
+
+// LOVE
+#include "types.h"
+
+// Lua
+extern "C" {
+	#include <lua.h>
+	#include <lualib.h>
+	#include <lauxlib.h>
+}
+
+namespace love
+{
+
+// Forward declarations.
+class Module;
+class Reference;
+
+// Exposed mutex of the GC
+extern void *_gcmutex;
+extern unsigned int _gcthread;
+
+/**
+ * Registries represent special tables which can be accessed with
+ * luax_getregistry.
+ **/
+enum Registry
+{
+	REGISTRY_GC = 1,
+	REGISTRY_MODULES,
+};
+
+/**
+ * This structure wraps all Lua-exposed objects. It exists in the
+ * Lua state as a full userdata (so we can catch __gc "events"),
+ * though the Object it refers to is light userdata in the sense
+ * that it is not allocated by the Lua VM.
+ **/
+struct Proxy
+{
+	// Holds type information (see types.h).
+	bits flags;
+
+	// The light userdata.
+	void *data;
+
+	// True if Lua should delete on GC.
+	bool own;
+};
+
+/**
+ * A Module with Lua wrapper functions and other data.
+ **/
+struct WrappedModule
+{
+	// The module containing the functions.
+	Module *module;
+
+	// The name for the table to put the functions in, without the 'love'-prefix.
+	const char *name;
+
+	// The type flags of this module.
+	love::bits flags;
+
+	// The functions of the module (last element {0,0}).
+	const luaL_Reg *functions;
+
+	// A list of functions which expose the types of the modules (last element 0).
+	const lua_CFunction *types;
+
+};
+
+/**
+ * Returns a reference to the top stack element (-1) if the value
+ * is of the specified type. If the value is incorrect, zero is returned.
+ *
+ * In any case, the top stack element is popped, regardless of its type.
+ **/
+Reference *luax_refif (lua_State *L, int type);
+
+/**
+ * Prints the current contents of the stack. Only useful for debugging.
+ * @param L The Lua state.
+ **/
+void luax_printstack(lua_State *L);
+
+/**
+ * Converts the value at idx to a bool. It follow the same rules
+ * as lua_toboolean, but returns a bool instead of an int.
+ * @param L The Lua state.
+ * @param idx The index on the Lua stack.
+ * @return True if the value evaluates to true, false otherwise.
+ **/
+bool luax_toboolean(lua_State *L, int idx);
+
+/**
+ * Pushes a bool onto the stack. It's the same as lua_pushboolean,
+ * but with bool instead of int.
+ * @param L The Lua state.
+ * @param b The bool to push.
+ **/
+void luax_pushboolean(lua_State *L, bool b);
+
+/**
+ * Converts the value at idx to a bool, or if not present, b is returned.
+ * @param L The Lua state.
+ * @param idx The index of the Lua stack.
+ * @param b The value to return if no value exist at the specified index.
+ * @return True if the value evaluates to true, false otherwise.
+ **/
+bool luax_optboolean(lua_State *L, int idx, bool b);
+
+/**
+ * Converts the value at idx to a std::string. It takes care of the string
+ * size and possible embedded nulls.
+ * @param L The Lua state.
+ * @param idx The index on the Lua stack.
+ * @return Copy of the string at the specified index.
+ **/
+std::string luax_checkstring(lua_State *L, int idx);
+
+/**
+ * Pushes a std::string onto the stack. It uses the length of the string
+ * for lua_pushlstring's len argument.
+ * @param L The Lua state.
+ * @param str The string to push.
+ **/
+void luax_pushstring(lua_State *L, std::string str);
+
+/**
+ * Require at least 'min' number of items on the stack.
+ * @param L The Lua state.
+ * @param min The minimum number of items on the stack.
+ * @return Zero if conditions are met, otherwise a Lua error (longjmp).
+ **/
+int luax_assert_argc(lua_State *L, int min);
+
+/**
+ * Require at least 'min', but more than 'max' items on the stack.
+ * @param L The Lua state.
+ * @param min The minimum number of items on the stack.
+ * @param max The maximum number of items on the stack.
+ * @return Zero if conditions are met, otherwise a Lua error (longjmp).
+ **/
+int luax_assert_argc(lua_State *L, int min, int max);
+
+/**
+ * Require that the value at idx is a function.
+ * @param L The Lua state.
+ *@param idx The index on the stack.
+ **/
+int luax_assert_function(lua_State *L, int idx);
+
+/**
+ * Register a module in the love table. The love table will be created if it does not exist.
+ * @param L The Lua state.
+ **/
+int luax_register_module(lua_State *L, const WrappedModule &m);
+
+/**
+ * Inserts a module with 'name' into the package.preloaded table.
+ * @param f The function to be called when the module is opened.
+ * @param name The name of the module, with 'love'-prefix, for instance 'love.graphics'.
+ **/
+int luax_preload(lua_State *L, lua_CFunction f, const char *name);
+
+/**
+ * Register a new type.
+ * @param tname The name of the type. This must not conflict with other type names,
+ * even from other modules.
+ * @param f The list of member functions for the type.
+ **/
+int luax_register_type(lua_State *L, const char *tname, const luaL_Reg *f = 0);
+
+/**
+ * Do a table.insert from C
+ * @param L the state
+ * @param tindex the stack index of the table
+ * @param vindex the stack index of the value
+ * @param pos the position to insert it in
+ **/
+int luax_table_insert(lua_State *L, int tindex, int vindex, int pos = -1);
+
+/**
+ * Register a new searcher function for package.loaders. This can for instance enable
+ * loading of files through love.filesystem using standard require.
+ * @param L The Lua state.
+ * @param f The searcher function.
+ * @param pos The position to insert the loader in.
+ **/
+int luax_register_searcher(lua_State *L, lua_CFunction f, int pos = -1);
+
+/**
+ * Creates a new Lua-accessible object of the given type, and put it on the stack.
+ * @param L The Lua state.
+ * @param name The name of the type. This must match the used earlier with luax_register_type.
+ * @param flags The type information.
+ * @param data The pointer to the actual object.
+ * @own Set this to true (default) if the object should be released upon garbage collection.
+ **/
+void luax_newtype(lua_State *L, const char *name, bits flags, void *data, bool own = true);
+
+/**
+ * Checks whether the value at idx is a certain type.
+ * @param L The Lua state.
+ * @param idx The index on the stack.
+ * @param type The type to check for.
+ * @return True if the value is Proxy of the specified type, false otherwise.
+ **/
+bool luax_istype(lua_State *L, int idx, love::bits type);
+
+/**
+ * Gets the function love.module.function and puts it on top of the stack (alone). If the
+ * love table, the module, or the function does not exist, an error is returned.
+ * @return An error if nonexistent, or 1 if successful.
+ **/
+int luax_getfunction(lua_State *L, const char *module, const char *function);
+
+/**
+ * Converts an object into another object by the specified function love.module.function.
+ * The conversion function must accept a single object of the relevant type as a parameter,
+ * and returnone value. If the function does not exist (see luax_getfunction), an error is returned.
+ *
+ * Note that the initial object at idx is replaced by the new object.
+ *
+ * @param L The Lua state.
+ * @param idx The index on the stack.
+ * @param module The module in the love table.
+ * @param function The function in the module.
+ **/
+int luax_convobj(lua_State *L, int idx, const char *module, const char *function);
+
+/**
+ * Converts an object into another object by the specified function love.module.function.
+ * The conversion function must accept a single object of the relevant type as its first parameter,
+ * and return one value. If the function does not exist (see luax_getfunction), an error is returned.
+ *
+ * Note that the initial object at idx is replaced by the new object.
+ *
+ * @param L The Lua state.
+ * @param idxs An array of indices on the stack.
+ * @param n How many arguments are being passed.
+ * @param module The module in the love table.
+ * @param function The function in the module.
+ **/
+int luax_convobj(lua_State *L, int idxs[], int n, const char *module, const char *function);
+
+/**
+ * 'Insist' that a table 'k' exists in the table at idx. Insistence involves that the
+ * table (k) is created if it does not exist in the table at idx. The table at idx must
+ * pre-exist, however. Also note that if the a non-table value exists at the specified
+ * location, it will be overwritten with a new table. The insisted table, and only the
+ * insisted table, will be placed on top of the stack.
+ *
+ * @param idx The index on the stack containing a table.
+ * @param k The name of the table we are insisting exist.
+ **/
+int luax_insist(lua_State *L, int idx, const char *k);
+
+/**
+ * Insist that a global table 'k' exists. See luax_insist.
+ * @param k The name of the table we are insisting exist.
+ **/
+int luax_insistglobal(lua_State *L, const char *k);
+
+/**
+ * Insists that a table 'k' exists inside the 'love' table. See luax_insist.
+ * @param k The name of the table we are insisting exist.
+ **/
+int luax_insistlove(lua_State *L, const char *k);
+
+/**
+ * Gets (creates if needed) the specified Registry, and puts it on top
+ * of the stack.
+ * @param L The Lua state.
+ * @param r The Registry to get.
+ **/
+int luax_getregistry(lua_State *L, Registry r);
+
+Type luax_type(lua_State *L, int idx);
+
+/**
+ * Convert the value at the specified index to an Lua number, and then
+ * convert to a float.
+ *
+ * @param L The Lua state.
+ * @param idx The index on the stack.
+ */
+inline float luax_tofloat(lua_State *L, int idx)
+{
+	return static_cast<float>(lua_tonumber(L, idx));
+}
+
+/**
+ * Like luax_tofloat, but checks that the value is a number.
+ *
+ * @see luax_tofloat
+ */
+inline float luax_checkfloat(lua_State *L, int idx)
+{
+	return static_cast<float>(luaL_checknumber(L, idx));
+}
+
+/**
+ * Converts the value at idx to the specified type without checking that
+ * this conversion is valid. If the type has been previously verified with
+ * luax_istype, then this can be safely used. Otherwise, use luax_checktype.
+ * @param L The Lua state.
+ * @param idx The index on the stack.
+ * @param name The name of the type.
+ * @param type The type bit.
+ **/
+template <typename T>
+T *luax_totype(lua_State *L, int idx, const char *, love::bits)
+{
+	return (T *)(((Proxy *)lua_touserdata(L, idx))->data);
+}
+
+/**
+ * Like luax_totype, but causes an error if the value at idx is not Proxy,
+ * or is not the specified type.
+ * @param L The Lua state.
+ * @param idx The index on the stack.
+ * @param name The name of the type.
+ * @param type The type bit.
+ **/
+template <typename T>
+T *luax_checktype(lua_State *L, int idx, const char *name, love::bits type)
+{
+	if (lua_isuserdata(L, idx) == 0)
+		luaL_error(L, "Incorrect parameter type: expected userdata.");
+
+	Proxy *u = (Proxy *)lua_touserdata(L, idx);
+
+	if ((u->flags & type) != type)
+		luaL_error(L, "Incorrect parameter type: expected %s", name);
+
+	return (T *)u->data;
+}
+
+template <typename T>
+T *luax_getmodule(lua_State *L, const char *k, love::bits type)
+{
+	luax_getregistry(L, REGISTRY_MODULES);
+	lua_getfield(L, -1, k);
+
+	if (!lua_isuserdata(L, -1))
+		luaL_error(L, "Tried to get nonexisting module %s.", k);
+
+	Proxy *u = (Proxy *)lua_touserdata(L, -1);
+
+	if ((u->flags & type) != type)
+		luaL_error(L, "Incorrect module %s", k);
+
+	lua_pop(L, 2);
+
+	return (T *)u->data;
+}
+
+} // love
+
+#endif // LOVE_RUNTIME_H

+ 174 - 173
src/common/types.h

@@ -1,173 +1,174 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_TYPES_H
-#define LOVE_TYPES_H
-
-// STD
-#include <bitset>
-
-namespace love
-{
-	enum Type
-	{
-		INVALID_ID = 0,
-		// Cross-module types.
-		OBJECT_ID,
-		DATA_ID,
-		MODULE_ID,
-
-		// Filesystem.
-		FILESYSTEM_FILE_ID,
-		FILESYSTEM_FILE_DATA_ID,
-
-		// Font
-		FONT_GLYPH_DATA_ID,
-		FONT_RASTERIZER_ID,
-
-		// Graphics
-		GRAPHICS_DRAWABLE_ID,
-		GRAPHICS_DRAWQABLE_ID,
-		GRAPHICS_IMAGE_ID,
-		GRAPHICS_QUAD_ID,
-		GRAPHICS_FONT_ID,
-		GRAPHICS_PARTICLE_SYSTEM_ID,
-		GRAPHICS_SPRITE_BATCH_ID,
-		GRAPHICS_CANVAS_ID,
-		GRAPHICS_PIXELEFFECT_ID,
-
-		// Image
-		IMAGE_IMAGE_DATA_ID,
-		IMAGE_ENCODED_IMAGE_DATA_ID,
-
-		// Audio
-		AUDIO_SOURCE_ID,
-
-		// Sound
-		SOUND_SOUND_DATA_ID,
-		SOUND_DECODER_ID,
-
-		// Physics
-		PHYSICS_WORLD_ID,
-		PHYSICS_CONTACT_ID,
-		PHYSICS_BODY_ID,
-		PHYSICS_FIXTURE_ID,
-		PHYSICS_SHAPE_ID,
-		PHYSICS_CIRCLE_SHAPE_ID,
-		PHYSICS_POLYGON_SHAPE_ID,
-		PHYSICS_EDGE_SHAPE_ID,
-		PHYSICS_CHAIN_SHAPE_ID,
-		PHYSICS_JOINT_ID,
-		PHYSICS_MOUSE_JOINT_ID,
-		PHYSICS_DISTANCE_JOINT_ID,
-		PHYSICS_PRISMATIC_JOINT_ID,
-		PHYSICS_REVOLUTE_JOINT_ID,
-		PHYSICS_PULLEY_JOINT_ID,
-		PHYSICS_GEAR_JOINT_ID,
-		PHYSICS_FRICTION_JOINT_ID,
-		PHYSICS_WELD_JOINT_ID,
-		PHYSICS_ROPE_JOINT_ID,
-		PHYSICS_WHEEL_JOINT_ID,
-
-		// Thread
-		THREAD_THREAD_ID,
-
-		// The modules themselves. Only add abstracted modules here.
-		MODULE_FILESYSTEM_ID,
-		MODULE_IMAGE_ID,
-		MODULE_SOUND_ID,
-
-		// Count the number of bits needed.
-		TYPE_MAX_ENUM
-	};
-
-	typedef std::bitset<TYPE_MAX_ENUM> bits;
-
-	const bits INVALID_T = bits(1) << INVALID_ID;
-
-	const bits OBJECT_T = bits(1) << OBJECT_ID;
-	const bits DATA_T = (bits(1) << DATA_ID) | OBJECT_T;
-	const bits MODULE_T = (bits(1) << MODULE_ID) | OBJECT_T;
-
-	// Filesystem.
-	const bits FILESYSTEM_FILE_T = (bits(1) << FILESYSTEM_FILE_ID) | OBJECT_T;
-	const bits FILESYSTEM_FILE_DATA_T = (bits(1) << FILESYSTEM_FILE_DATA_ID) | DATA_T;
-
-	const bits FONT_GLYPH_DATA_T = (bits(1) << FONT_GLYPH_DATA_ID) | DATA_T;
-	const bits FONT_RASTERIZER_T = (bits(1) << FONT_RASTERIZER_ID) | OBJECT_T;
-
-	// Graphics.
-	const bits GRAPHICS_DRAWABLE_T = (bits(1) << GRAPHICS_DRAWABLE_ID) | OBJECT_T;
-	const bits GRAPHICS_DRAWQABLE_T = (bits(1) << GRAPHICS_DRAWQABLE_ID) | GRAPHICS_DRAWABLE_T;
-	const bits GRAPHICS_IMAGE_T = (bits(1) << GRAPHICS_IMAGE_ID) | GRAPHICS_DRAWQABLE_T;
-	const bits GRAPHICS_QUAD_T = (bits(1) << GRAPHICS_QUAD_ID) | OBJECT_T;
-	const bits GRAPHICS_FONT_T = (bits(1) << GRAPHICS_FONT_ID) | OBJECT_T;
-	const bits GRAPHICS_PARTICLE_SYSTEM_T = (bits(1) << GRAPHICS_PARTICLE_SYSTEM_ID) | GRAPHICS_DRAWABLE_T;
-	const bits GRAPHICS_SPRITE_BATCH_T = (bits(1) << GRAPHICS_SPRITE_BATCH_ID) | GRAPHICS_DRAWABLE_T;
-	const bits GRAPHICS_CANVAS_T = (bits(1) << GRAPHICS_CANVAS_ID) | GRAPHICS_DRAWQABLE_T;
-	const bits GRAPHICS_PIXELEFFECT_T = (bits(1) << GRAPHICS_PIXELEFFECT_ID) | OBJECT_T;
-
-	// Image.
-	const bits IMAGE_IMAGE_DATA_T = (bits(1) << IMAGE_IMAGE_DATA_ID) | DATA_T;
-	const bits IMAGE_ENCODED_IMAGE_DATA_T = (bits(1) << IMAGE_ENCODED_IMAGE_DATA_ID) | DATA_T;
-
-	// Audio.
-	const bits AUDIO_SOURCE_T = (bits(1) << AUDIO_SOURCE_ID) | OBJECT_T;
-
-	// Sound.
-	const bits SOUND_SOUND_DATA_T = (bits(1) << SOUND_SOUND_DATA_ID) | DATA_T;
-	const bits SOUND_DECODER_T = bits(1) << SOUND_DECODER_ID;
-
-	// Physics.
-	const bits PHYSICS_WORLD_T = (bits(1) << PHYSICS_WORLD_ID) | OBJECT_T;
-	const bits PHYSICS_CONTACT_T = (bits(1) << PHYSICS_CONTACT_ID) | OBJECT_T;
-	const bits PHYSICS_BODY_T = (bits(1) << PHYSICS_BODY_ID) | OBJECT_T;
-	const bits PHYSICS_FIXTURE_T = (bits(1) << PHYSICS_FIXTURE_ID) | OBJECT_T;
-	const bits PHYSICS_SHAPE_T = (bits(1) << PHYSICS_SHAPE_ID) | OBJECT_T;
-	const bits PHYSICS_CIRCLE_SHAPE_T = (bits(1) << PHYSICS_CIRCLE_SHAPE_ID) | PHYSICS_SHAPE_T;
-	const bits PHYSICS_POLYGON_SHAPE_T = (bits(1) << PHYSICS_POLYGON_SHAPE_ID) | PHYSICS_SHAPE_T;
-	const bits PHYSICS_EDGE_SHAPE_T = (bits(1) << PHYSICS_EDGE_SHAPE_ID) | PHYSICS_SHAPE_T;
-	const bits PHYSICS_CHAIN_SHAPE_T = (bits(1) << PHYSICS_CHAIN_SHAPE_ID) | PHYSICS_SHAPE_T;
-	const bits PHYSICS_JOINT_T = (bits(1) << PHYSICS_JOINT_ID) | OBJECT_T;
-	const bits PHYSICS_MOUSE_JOINT_T = (bits(1) << PHYSICS_MOUSE_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_DISTANCE_JOINT_T = (bits(1) << PHYSICS_DISTANCE_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_PRISMATIC_JOINT_T = (bits(1) << PHYSICS_PRISMATIC_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_REVOLUTE_JOINT_T = (bits(1) << PHYSICS_REVOLUTE_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_PULLEY_JOINT_T = (bits(1) << PHYSICS_PULLEY_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_GEAR_JOINT_T = (bits(1) << PHYSICS_GEAR_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_FRICTION_JOINT_T = (bits(1) << PHYSICS_FRICTION_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_WELD_JOINT_T = (bits(1) << PHYSICS_WELD_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_ROPE_JOINT_T = (bits(1) << PHYSICS_ROPE_JOINT_ID) | PHYSICS_JOINT_T;
-	const bits PHYSICS_WHEEL_JOINT_T = (bits(1) << PHYSICS_WHEEL_JOINT_ID) | PHYSICS_JOINT_T;
-
-	// Thread.
-	const bits THREAD_THREAD_T = (bits(1) << THREAD_THREAD_ID) | OBJECT_T;
-
-	// Modules.
-	const bits MODULE_FILESYSTEM_T = (bits(1) << MODULE_FILESYSTEM_ID) | MODULE_T;
-	const bits MODULE_IMAGE_T = (bits(1) << MODULE_IMAGE_ID) | MODULE_T;
-	const bits MODULE_SOUND_T = (bits(1) << MODULE_SOUND_ID) | MODULE_T;
-
-	bool getType(const char * in, Type & out);
-	bool getType(Type in, const char *& out);
-
-} // love
-
-#endif // LOVE_TYPES_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_TYPES_H
+#define LOVE_TYPES_H
+
+// STD
+#include <bitset>
+
+namespace love
+{
+
+enum Type
+{
+	INVALID_ID = 0,
+	// Cross-module types.
+	OBJECT_ID,
+	DATA_ID,
+	MODULE_ID,
+
+	// Filesystem.
+	FILESYSTEM_FILE_ID,
+	FILESYSTEM_FILE_DATA_ID,
+
+	// Font
+	FONT_GLYPH_DATA_ID,
+	FONT_RASTERIZER_ID,
+
+	// Graphics
+	GRAPHICS_DRAWABLE_ID,
+	GRAPHICS_DRAWQABLE_ID,
+	GRAPHICS_IMAGE_ID,
+	GRAPHICS_QUAD_ID,
+	GRAPHICS_FONT_ID,
+	GRAPHICS_PARTICLE_SYSTEM_ID,
+	GRAPHICS_SPRITE_BATCH_ID,
+	GRAPHICS_CANVAS_ID,
+	GRAPHICS_PIXELEFFECT_ID,
+
+	// Image
+	IMAGE_IMAGE_DATA_ID,
+	IMAGE_ENCODED_IMAGE_DATA_ID,
+
+	// Audio
+	AUDIO_SOURCE_ID,
+
+	// Sound
+	SOUND_SOUND_DATA_ID,
+	SOUND_DECODER_ID,
+
+	// Physics
+	PHYSICS_WORLD_ID,
+	PHYSICS_CONTACT_ID,
+	PHYSICS_BODY_ID,
+	PHYSICS_FIXTURE_ID,
+	PHYSICS_SHAPE_ID,
+	PHYSICS_CIRCLE_SHAPE_ID,
+	PHYSICS_POLYGON_SHAPE_ID,
+	PHYSICS_EDGE_SHAPE_ID,
+	PHYSICS_CHAIN_SHAPE_ID,
+	PHYSICS_JOINT_ID,
+	PHYSICS_MOUSE_JOINT_ID,
+	PHYSICS_DISTANCE_JOINT_ID,
+	PHYSICS_PRISMATIC_JOINT_ID,
+	PHYSICS_REVOLUTE_JOINT_ID,
+	PHYSICS_PULLEY_JOINT_ID,
+	PHYSICS_GEAR_JOINT_ID,
+	PHYSICS_FRICTION_JOINT_ID,
+	PHYSICS_WELD_JOINT_ID,
+	PHYSICS_ROPE_JOINT_ID,
+	PHYSICS_WHEEL_JOINT_ID,
+
+	// Thread
+	THREAD_THREAD_ID,
+
+	// The modules themselves. Only add abstracted modules here.
+	MODULE_FILESYSTEM_ID,
+	MODULE_IMAGE_ID,
+	MODULE_SOUND_ID,
+
+	// Count the number of bits needed.
+	TYPE_MAX_ENUM
+};
+
+typedef std::bitset<TYPE_MAX_ENUM> bits;
+
+const bits INVALID_T = bits(1) << INVALID_ID;
+
+const bits OBJECT_T = bits(1) << OBJECT_ID;
+const bits DATA_T = (bits(1) << DATA_ID) | OBJECT_T;
+const bits MODULE_T = (bits(1) << MODULE_ID) | OBJECT_T;
+
+// Filesystem.
+const bits FILESYSTEM_FILE_T = (bits(1) << FILESYSTEM_FILE_ID) | OBJECT_T;
+const bits FILESYSTEM_FILE_DATA_T = (bits(1) << FILESYSTEM_FILE_DATA_ID) | DATA_T;
+
+const bits FONT_GLYPH_DATA_T = (bits(1) << FONT_GLYPH_DATA_ID) | DATA_T;
+const bits FONT_RASTERIZER_T = (bits(1) << FONT_RASTERIZER_ID) | OBJECT_T;
+
+// Graphics.
+const bits GRAPHICS_DRAWABLE_T = (bits(1) << GRAPHICS_DRAWABLE_ID) | OBJECT_T;
+const bits GRAPHICS_DRAWQABLE_T = (bits(1) << GRAPHICS_DRAWQABLE_ID) | GRAPHICS_DRAWABLE_T;
+const bits GRAPHICS_IMAGE_T = (bits(1) << GRAPHICS_IMAGE_ID) | GRAPHICS_DRAWQABLE_T;
+const bits GRAPHICS_QUAD_T = (bits(1) << GRAPHICS_QUAD_ID) | OBJECT_T;
+const bits GRAPHICS_FONT_T = (bits(1) << GRAPHICS_FONT_ID) | OBJECT_T;
+const bits GRAPHICS_PARTICLE_SYSTEM_T = (bits(1) << GRAPHICS_PARTICLE_SYSTEM_ID) | GRAPHICS_DRAWABLE_T;
+const bits GRAPHICS_SPRITE_BATCH_T = (bits(1) << GRAPHICS_SPRITE_BATCH_ID) | GRAPHICS_DRAWABLE_T;
+const bits GRAPHICS_CANVAS_T = (bits(1) << GRAPHICS_CANVAS_ID) | GRAPHICS_DRAWQABLE_T;
+const bits GRAPHICS_PIXELEFFECT_T = (bits(1) << GRAPHICS_PIXELEFFECT_ID) | OBJECT_T;
+
+// Image.
+const bits IMAGE_IMAGE_DATA_T = (bits(1) << IMAGE_IMAGE_DATA_ID) | DATA_T;
+const bits IMAGE_ENCODED_IMAGE_DATA_T = (bits(1) << IMAGE_ENCODED_IMAGE_DATA_ID) | DATA_T;
+
+// Audio.
+const bits AUDIO_SOURCE_T = (bits(1) << AUDIO_SOURCE_ID) | OBJECT_T;
+
+// Sound.
+const bits SOUND_SOUND_DATA_T = (bits(1) << SOUND_SOUND_DATA_ID) | DATA_T;
+const bits SOUND_DECODER_T = bits(1) << SOUND_DECODER_ID;
+
+// Physics.
+const bits PHYSICS_WORLD_T = (bits(1) << PHYSICS_WORLD_ID) | OBJECT_T;
+const bits PHYSICS_CONTACT_T = (bits(1) << PHYSICS_CONTACT_ID) | OBJECT_T;
+const bits PHYSICS_BODY_T = (bits(1) << PHYSICS_BODY_ID) | OBJECT_T;
+const bits PHYSICS_FIXTURE_T = (bits(1) << PHYSICS_FIXTURE_ID) | OBJECT_T;
+const bits PHYSICS_SHAPE_T = (bits(1) << PHYSICS_SHAPE_ID) | OBJECT_T;
+const bits PHYSICS_CIRCLE_SHAPE_T = (bits(1) << PHYSICS_CIRCLE_SHAPE_ID) | PHYSICS_SHAPE_T;
+const bits PHYSICS_POLYGON_SHAPE_T = (bits(1) << PHYSICS_POLYGON_SHAPE_ID) | PHYSICS_SHAPE_T;
+const bits PHYSICS_EDGE_SHAPE_T = (bits(1) << PHYSICS_EDGE_SHAPE_ID) | PHYSICS_SHAPE_T;
+const bits PHYSICS_CHAIN_SHAPE_T = (bits(1) << PHYSICS_CHAIN_SHAPE_ID) | PHYSICS_SHAPE_T;
+const bits PHYSICS_JOINT_T = (bits(1) << PHYSICS_JOINT_ID) | OBJECT_T;
+const bits PHYSICS_MOUSE_JOINT_T = (bits(1) << PHYSICS_MOUSE_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_DISTANCE_JOINT_T = (bits(1) << PHYSICS_DISTANCE_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_PRISMATIC_JOINT_T = (bits(1) << PHYSICS_PRISMATIC_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_REVOLUTE_JOINT_T = (bits(1) << PHYSICS_REVOLUTE_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_PULLEY_JOINT_T = (bits(1) << PHYSICS_PULLEY_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_GEAR_JOINT_T = (bits(1) << PHYSICS_GEAR_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_FRICTION_JOINT_T = (bits(1) << PHYSICS_FRICTION_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_WELD_JOINT_T = (bits(1) << PHYSICS_WELD_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_ROPE_JOINT_T = (bits(1) << PHYSICS_ROPE_JOINT_ID) | PHYSICS_JOINT_T;
+const bits PHYSICS_WHEEL_JOINT_T = (bits(1) << PHYSICS_WHEEL_JOINT_ID) | PHYSICS_JOINT_T;
+
+// Thread.
+const bits THREAD_THREAD_T = (bits(1) << THREAD_THREAD_ID) | OBJECT_T;
+
+// Modules.
+const bits MODULE_FILESYSTEM_T = (bits(1) << MODULE_FILESYSTEM_ID) | MODULE_T;
+const bits MODULE_IMAGE_T = (bits(1) << MODULE_IMAGE_ID) | MODULE_T;
+const bits MODULE_SOUND_T = (bits(1) << MODULE_SOUND_ID) | MODULE_T;
+
+bool getType(const char *in, Type &out);
+bool getType(Type in, const char  *&out);
+
+} // love
+
+#endif // LOVE_TYPES_H

+ 61 - 60
src/common/utf8.cpp

@@ -1,60 +1,61 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "utf8.h"
-
-#ifdef LOVE_WINDOWS
-
-namespace love
-{
-	std::string to_utf8(LPCWSTR wstr)
-	{
-		size_t wide_len = wcslen(wstr)+1;
-
-		// Get size in UTF-8.
-		int utf8_size = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, 0, 0, 0, 0);
-
-		char * utf8_str = new char[utf8_size];
-
-		// Convert to UTF-8.
-		int ok = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, utf8_str, utf8_size, 0, 0);
-
-		std::string ret;
-		if (ok)
-			ret = utf8_str;
-
-		delete utf8_str;
-		return ret;
-	}
-
-	void replace_char(std::string & str, char find, char replace)
-	{
-		int length = str.length();
-
-		for (int i = 0; i<length; i++)
-		{
-			if (str[i] == find)
-				str[i] = replace;
-		}
-	}
-
-} // love
-
-#endif // LOVE_WINDOWS
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "utf8.h"
+
+#ifdef LOVE_WINDOWS
+
+namespace love
+{
+
+std::string to_utf8(LPCWSTR wstr)
+{
+	size_t wide_len = wcslen(wstr)+1;
+
+	// Get size in UTF-8.
+	int utf8_size = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, 0, 0, 0, 0);
+
+	char *utf8_str = new char[utf8_size];
+
+	// Convert to UTF-8.
+	int ok = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, utf8_str, utf8_size, 0, 0);
+
+	std::string ret;
+	if (ok)
+		ret = utf8_str;
+
+	delete[] utf8_str;
+	return ret;
+}
+
+void replace_char(std::string &str, char find, char replace)
+{
+	int length = str.length();
+
+	for (int i = 0; i<length; i++)
+	{
+		if (str[i] == find)
+			str[i] = replace;
+	}
+}
+
+} // love
+
+#endif // LOVE_WINDOWS

+ 47 - 46
src/common/utf8.h

@@ -1,47 +1,48 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "config.h"
-
-#ifdef LOVE_WINDOWS
-
-#include <string>
-#include <windows.h>
-
-namespace love
-{
-	/**
-	* Convert the wide string to a UTF-8 encoded string.
-	* @param wstr The wide-char string.
-	* @return A UTF-8 string.
-	**/
-	std::string to_utf8(LPCWSTR wstr);
-
-	/**
-	* Replace all occurences of 'find' with 'replace' in a string.
-	* @param str The string to modify.
-	* @param find The character to match.
-	* @param replace The character to replace matches.
-	**/
-	void replace_char(std::string & str, char find, char replace);
-
-} // love
-
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "config.h"
+
+#ifdef LOVE_WINDOWS
+
+#include <string>
+#include <windows.h>
+
+namespace love
+{
+
+/**
+ * Convert the wide string to a UTF-8 encoded string.
+ * @param wstr The wide-char string.
+ * @return A UTF-8 string.
+ **/
+std::string to_utf8(LPCWSTR wstr);
+
+/**
+ * Replace all occurences of 'find' with 'replace' in a string.
+ * @param str The string to modify.
+ * @param find The character to match.
+ * @param replace The character to replace matches.
+ **/
+void replace_char(std::string &str, char find, char replace);
+
+} // love
+
 #endif // LOVE_WINDOWS

+ 37 - 36
src/common/version.h

@@ -1,36 +1,37 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_VERSION_H
-#define LOVE_VERSION_H
-
-namespace love
-{
-	// Version stuff.
-	const int VERSION_MAJOR = 0;
-	const int VERSION_MINOR = 8;
-	const int VERSION_REV = 0;
-	const char * VERSION = "0.8.0";
-	const char * VERSION_COMPATIBILITY[] =  { VERSION, 0 };
-	const char * VERSION_CODENAME = "Rubber Piggy";
-
-} // love
-
-#endif // LOVE_VERSION_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_VERSION_H
+#define LOVE_VERSION_H
+
+namespace love
+{
+
+// Version stuff.
+const int VERSION_MAJOR = 0;
+const int VERSION_MINOR = 8;
+const int VERSION_REV = 0;
+const char *VERSION = "0.8.0";
+const char *VERSION_COMPATIBILITY[] =  { VERSION, 0 };
+const char *VERSION_CODENAME = "Rubber Piggy";
+
+} // love
+
+#endif // LOVE_VERSION_H

+ 58 - 56
src/common/wrap_Data.cpp

@@ -1,56 +1,58 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "wrap_Data.h"
-
-namespace love
-{
-	Data * luax_checkdata(lua_State * L, int idx)
-	{
-		return luax_checktype<Data>(L, idx, "Data", DATA_T);
-	}
-
-	int w_Data_getPointer(lua_State * L)
-	{
-		Data * t = luax_checkdata(L, 1);
-		lua_pushlightuserdata(L, t->getData());
-		return 1;
-	}
-
-	int w_Data_getSize(lua_State * L)
-	{
-		Data * t = luax_checkdata(L, 1);
-		lua_pushinteger(L, t->getSize());
-		return 1;
-	}
-
-	const luaL_Reg w_Data_functions[] = {
-		{ "getPointer", w_Data_getPointer },
-		{ "getSize", w_Data_getSize },
-		{ 0, 0 }
-	};
-
-	int w_Data_open(lua_State * L)
-	{
-		luax_register_type(L, "Data", w_Data_functions);
-		return 0;
-	}
-
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "wrap_Data.h"
+
+namespace love
+{
+
+Data *luax_checkdata(lua_State *L, int idx)
+{
+	return luax_checktype<Data>(L, idx, "Data", DATA_T);
+}
+
+int w_Data_getPointer(lua_State *L)
+{
+	Data *t = luax_checkdata(L, 1);
+	lua_pushlightuserdata(L, t->getData());
+	return 1;
+}
+
+int w_Data_getSize(lua_State *L)
+{
+	Data *t = luax_checkdata(L, 1);
+	lua_pushinteger(L, t->getSize());
+	return 1;
+}
+
+const luaL_Reg w_Data_functions[] =
+{
+	{ "getPointer", w_Data_getPointer },
+	{ "getSize", w_Data_getSize },
+	{ 0, 0 }
+};
+
+int w_Data_open(lua_State *L)
+{
+	luax_register_type(L, "Data", w_Data_functions);
+	return 0;
+}
+
+} // love

+ 38 - 37
src/common/wrap_Data.h

@@ -1,37 +1,38 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_WRAP_DATA_H
-#define LOVE_WRAP_DATA_H
-
-// LOVE
-#include "runtime.h"
-#include "Data.h"
-
-namespace love
-{
-	Data * luax_checkdata(lua_State * L, int idx);
-	int w_Data_getPointer(lua_State * L);
-	int w_Data_getSize(lua_State * L);
-	int w_Data_open(lua_State * L);
-
-} // love
-
-#endif // LOVE_WRAP_DATA_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_WRAP_DATA_H
+#define LOVE_WRAP_DATA_H
+
+// LOVE
+#include "runtime.h"
+#include "Data.h"
+
+namespace love
+{
+
+Data *luax_checkdata(lua_State *L, int idx);
+int w_Data_getPointer(lua_State *L);
+int w_Data_getSize(lua_State *L);
+int w_Data_open(lua_State *L);
+
+} // love
+
+#endif // LOVE_WRAP_DATA_H

+ 205 - 312
src/love.cpp

@@ -1,312 +1,205 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-// LOVE
-#include <common/config.h>
-#include <common/version.h>
-#include <common/runtime.h>
-
-#ifdef LOVE_WINDOWS
-#include <windows.h>
-#endif // LOVE_WINDOWS
-
-#ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK
-#include <fcntl.h>
-#include <io.h>
-#include <iostream>
-#include <fstream>
-#endif // LOVE_LEGENDARY_CONSOLE_IO_HACK
-
-#ifdef LOVE_BUILD_EXE
-
-// SDL
-#include <SDL.h>
-
-// Libraries.
-#include "libraries/luasocket/luasocket.h"
-
-// Scripts
-#include "scripts/boot.lua.h"
-
-#endif // LOVE_BUILD_EXE
-
-#ifdef LOVE_BUILD_STANDALONE
-
-// All modules define a c-accessible luaopen
-// so let's make use of those, instead
-// of addressing implementations directly.
-extern "C"
-{
-	extern int luaopen_love_audio(lua_State*);
-	extern int luaopen_love_event(lua_State*);
-	extern int luaopen_love_filesystem(lua_State*);
-	extern int luaopen_love_font(lua_State*);
-	extern int luaopen_love_graphics(lua_State*);
-	extern int luaopen_love_image(lua_State*);
-	extern int luaopen_love_joystick(lua_State*);
-	extern int luaopen_love_keyboard(lua_State*);
-	extern int luaopen_love_mouse(lua_State*);
-	extern int luaopen_love_physics(lua_State*);
-	extern int luaopen_love_sound(lua_State*);
-	extern int luaopen_love_timer(lua_State*);
-	extern int luaopen_love_thread(lua_State*);
-}
-
-static const luaL_Reg modules[] = {
-	{ "love.audio", luaopen_love_audio },
-	{ "love.event", luaopen_love_event },
-	{ "love.filesystem", luaopen_love_filesystem },
-	{ "love.font", luaopen_love_font },
-	{ "love.graphics", luaopen_love_graphics },
-	{ "love.image", luaopen_love_image },
-	{ "love.joystick", luaopen_love_joystick },
-	{ "love.keyboard", luaopen_love_keyboard },
-	{ "love.mouse", luaopen_love_mouse },
-	{ "love.physics", luaopen_love_physics },
-	{ "love.sound", luaopen_love_sound },
-	{ "love.timer", luaopen_love_timer },
-	{ "love.thread", luaopen_love_thread },
-	{ 0, 0 }
-};
-
-#endif // LOVE_BUILD_STANDALONE
-
-#ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK
-int w__openConsole(lua_State * L);
-#endif // LOVE_LEGENDARY_CONSOLE_IO_HACK
-
-extern "C" LOVE_EXPORT int luaopen_love(lua_State * L)
-{
-	love::luax_insistglobal(L, "love");
-
-	// Set version information.
-	lua_pushstring(L, love::VERSION);
-	lua_setfield(L, -2, "_version");
-
-	lua_pushnumber(L, love::VERSION_MAJOR);
-	lua_setfield(L, -2, "_version_major");
-	lua_pushnumber(L, love::VERSION_MINOR);
-	lua_setfield(L, -2, "_version_minor");
-	lua_pushnumber(L, love::VERSION_REV);
-	lua_setfield(L, -2, "_version_revision");
-
-	lua_pushstring(L, love::VERSION_CODENAME);
-	lua_setfield(L, -2, "_version_codename");
-
-#ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK
-	lua_pushcfunction(L, w__openConsole);
-	lua_setfield(L, -2, "_openConsole");
-#endif // LOVE_LEGENDARY_CONSOLE_IO_HACK
-
-	lua_newtable(L);
-
-	for (int i = 0; love::VERSION_COMPATIBILITY[i] != 0; ++i)
-	{
-		lua_pushstring(L, love::VERSION_COMPATIBILITY[i]);
-		lua_rawseti(L, -2, i+1);
-	}
-
-	lua_setfield(L, -2, "_version_compat");
-
-#ifdef LOVE_BUILD_STANDALONE
-
-	// Preload module loaders.
-	for (int i = 0; modules[i].name != 0; i++)
-	{
-		love::luax_preload(L, modules[i].func, modules[i].name);
-	}
-
-	love::luasocket::__open(L);
-
-#endif // LOVE_BUILD_STANDALONE
-
-	return 1;
-}
-
-#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
-
-void get_utf8_arguments(int & argc, char **& argv)
-{
-	LPWSTR cmd = GetCommandLineW();
-
-	if (!cmd)
-		return;
-
-	LPWSTR * argv_w = CommandLineToArgvW(cmd, &argc);
-
-	argv = new char*[argc];
-
-	for (int i = 0; i<argc; ++i)
-	{
-		// Size of wide char buffer (plus one for trailing '\0').
-		size_t wide_len = wcslen(argv_w[i])+1;
-
-		// Get size in UTF-8.
-		int utf8_size = WideCharToMultiByte(CP_UTF8, 0, argv_w[i], wide_len, argv[i], 0, 0, 0);
-
-		argv[i] = new char[utf8_size];
-
-		// Convert to UTF-8.
-		int ok = WideCharToMultiByte(CP_UTF8, 0, argv_w[i], wide_len, argv[i], utf8_size, 0, 0);
-
-		int len = strlen(argv[i]);
-
-		if (!ok)
-			printf("Warning: could not convert to UTF8.\n");
-	}
-
-	LocalFree(argv_w);
-}
-
-#endif // LOVE_LEGENDARY_UTF8_ARGV_HACK
-
-#ifdef LOVE_LEGENDARY_CONSOLE_IO_HACK
-
-int w__openConsole(lua_State * L)
-{
-	static bool is_open = false;
-
-	if (is_open)
-		return 0;
-
-	static const int MAX_CONSOLE_LINES = 5000;
-	long std_handle;
-	int console_handle;
-	CONSOLE_SCREEN_BUFFER_INFO console_info;
-	FILE *fp;
-
-	AllocConsole();
-
-	// Set size.
-	GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &console_info);
-	console_info.dwSize.Y = MAX_CONSOLE_LINES;
-	SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), console_info.dwSize);
-
-	SetConsoleTitle(TEXT("LOVE Console"));
-
-	// Redirect stdout.
-	std_handle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
-	console_handle = _open_osfhandle(std_handle, _O_TEXT);
-	fp = _fdopen(console_handle, "w");
-	*stdout = *fp;
-	setvbuf(stdout, NULL, _IONBF, 0);
-
-	// Redirect stdin.
-	std_handle = (long)GetStdHandle(STD_INPUT_HANDLE);
-	console_handle = _open_osfhandle(std_handle, _O_TEXT);
-	fp = _fdopen(console_handle, "r");
-	*stdin = *fp;
-	setvbuf(stdin, NULL, _IONBF, 0);
-
-	// Redirect stderr.
-	std_handle = (long)GetStdHandle(STD_ERROR_HANDLE);
-	console_handle = _open_osfhandle(std_handle, _O_TEXT);
-	fp = _fdopen(console_handle, "w");
-	*stderr = *fp;
-	setvbuf(stderr, NULL, _IONBF, 0);
-
-	// Sync std::cout, std::cerr, etc.
-	std::ios::sync_with_stdio();
-
-	is_open = true;
-
-	return 0;
-}
-
-#endif // LOVE_LEGENDARY_CONSOLE_IO_HACK
-
-#ifdef LOVE_BUILD_EXE
-
-int main(int argc, char ** argv)
-{
-#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
-	int hack_argc = 0;
-	char ** hack_argv = 0;
-	get_utf8_arguments(hack_argc, hack_argv);
-	argc = hack_argc;
-	argv = hack_argv;
-#endif // LOVE_LEGENDARY_UTF8_ARGV_HACK
-
-	// Oh, you just want the version? Okay!
-	if (argc > 1 && strcmp(argv[1],"--version") == 0)
-	{
-		printf("LOVE %s (%s)\n", love::VERSION, love::VERSION_CODENAME);
-		return 0;
-	}
-
-	// Create the virtual machine.
-	lua_State * L = lua_open();
-	luaL_openlibs(L);
-
-	love::luax_preload(L, luaopen_love, "love");
-
-	luaopen_love(L);
-
-	// Add command line arguments to global arg (like stand-alone Lua).
-	{
-		lua_newtable(L);
-
-		if (argc > 0)
-		{
-			lua_pushstring(L, argv[0]);
-			lua_rawseti(L, -2, -2);
-		}
-
-		lua_pushstring(L, "embedded boot.lua");
-		lua_rawseti(L, -2, -1);
-
-		for (int i = 1; i<argc; i++)
-		{
-			lua_pushstring(L, argv[i]);
-			lua_rawseti(L, -2, i);
-		}
-
-		lua_setglobal(L, "arg");
-	}
-
-	// Add love.__exe = true.
-	// This indicates that we're running the
-	// standalone version of love, and not the
-	// DLL version.
-	{
-		lua_getglobal(L, "love");
-		lua_pushboolean(L, 1);
-		lua_setfield(L, -2, "_exe");
-		lua_pop(L, 1);
-	}
-
-	// Boot
-	if (luaL_loadbuffer(L, (const char *)love::boot_lua, sizeof(love::boot_lua), "boot.lua") == 0)
-		lua_call(L, 0, 0);
-
-	lua_close(L);
-
-#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
-	if (hack_argv)
-	{
-		for (int i = 0; i<hack_argc; ++i)
-			delete [] hack_argv[i];
-		delete [] hack_argv;
-	}
-#endif // LOVE_LEGENDARY_UTF8_ARGV_HACK
-	return 0;
-}
-
-#endif // LOVE_BUILD_EXE
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "modules/love/love.h"
+#include <SDL.h>
+
+#ifdef LOVE_BUILD_EXE
+
+// Lua
+extern "C" {
+	#include <lua.h>
+	#include <lualib.h>
+	#include <lauxlib.h>
+}
+
+#ifdef LOVE_WINDOWS
+#include <windows.h>
+#endif // LOVE_WINDOWS
+
+#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
+
+void get_utf8_arguments(int &argc, char **&argv)
+{
+	LPWSTR cmd = GetCommandLineW();
+
+	if (!cmd)
+		return;
+
+	LPWSTR *argv_w = CommandLineToArgvW(cmd, &argc);
+
+	argv = new char *[argc];
+
+	for (int i = 0; i < argc; ++i)
+	{
+		// Size of wide char buffer (plus one for trailing '\0').
+		size_t wide_len = wcslen(argv_w[i]) + 1;
+
+		// Get size in UTF-8.
+		int utf8_size = WideCharToMultiByte(CP_UTF8, 0, argv_w[i], wide_len, argv[i], 0, 0, 0);
+
+		argv[i] = new char[utf8_size];
+
+		// Convert to UTF-8.
+		int ok = WideCharToMultiByte(CP_UTF8, 0, argv_w[i], wide_len, argv[i], utf8_size, 0, 0);
+
+		int len = strlen(argv[i]);
+
+		if (!ok)
+			printf("Warning: could not convert to UTF8.\n");
+	}
+
+	LocalFree(argv_w);
+}
+
+#endif // LOVE_LEGENDARY_UTF8_ARGV_HACK
+
+#ifdef LOVE_LEGENDARY_LIBSTDCXX_HACK
+
+#include <iostream>
+
+// Workarounds for symbols that are missing from Leopard stdlibc++.dylib.
+// http://stackoverflow.com/questions/3484043/os-x-program-runs-on-dev-machine-crashing-horribly-on-others
+_GLIBCXX_BEGIN_NAMESPACE(std)
+// From ostream_insert.h
+template ostream& __ostream_insert(ostream&, const char*, streamsize);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize);
+#endif
+
+// From ostream.tcc
+template ostream& ostream::_M_insert(long);
+template ostream& ostream::_M_insert(unsigned long);
+template ostream& ostream::_M_insert(bool);
+#ifdef _GLIBCXX_USE_LONG_LONG
+template ostream& ostream::_M_insert(long long);
+template ostream& ostream::_M_insert(unsigned long long);
+#endif
+template ostream& ostream::_M_insert(double);
+template ostream& ostream::_M_insert(long double);
+template ostream& ostream::_M_insert(const void*);
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+template wostream& wostream::_M_insert(long);
+template wostream& wostream::_M_insert(unsigned long);
+template wostream& wostream::_M_insert(bool);
+#ifdef _GLIBCXX_USE_LONG_LONG
+template wostream& wostream::_M_insert(long long);
+template wostream& wostream::_M_insert(unsigned long long);
+#endif
+template wostream& wostream::_M_insert(double);
+template wostream& wostream::_M_insert(long double);
+template wostream& wostream::_M_insert(const void*);
+#endif
+
+_GLIBCXX_END_NAMESPACE
+
+#endif // LOVE_LEGENDARY_LIBSTDCXX_HACK
+
+static int love_preload(lua_State *L, lua_CFunction f, const char *name)
+{
+	lua_getglobal(L, "package");
+	lua_getfield(L, -1, "preload");
+	lua_pushcfunction(L, f);
+	lua_setfield(L, -2, name);
+	lua_pop(L, 2);
+	return 0;
+}
+
+int main(int argc, char **argv)
+{
+#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
+	int hack_argc = 0;	char **hack_argv = 0;
+	get_utf8_arguments(hack_argc, hack_argv);
+	argc = hack_argc;
+	argv = hack_argv;
+#endif // LOVE_LEGENDARY_UTF8_ARGV_HACK
+
+	// Oh, you just want the version? Okay!
+	if (argc > 1 && strcmp(argv[1],"--version") == 0)
+	{
+		printf("LOVE %s (%s)\n", love_version(), love_codename());
+		return 0;
+	}
+
+	// Create the virtual machine.
+	lua_State *L = lua_open();
+	luaL_openlibs(L);
+
+	love_preload(L, luaopen_love, "love");
+
+	luaopen_love(L);
+
+	// Add command line arguments to global arg (like stand-alone Lua).
+	{
+		lua_newtable(L);
+
+		if (argc > 0)
+		{
+			lua_pushstring(L, argv[0]);
+			lua_rawseti(L, -2, -2);
+		}
+
+		lua_pushstring(L, "embedded boot.lua");
+		lua_rawseti(L, -2, -1);
+
+		for (int i = 1; i<argc; i++)
+		{
+			lua_pushstring(L, argv[i]);
+			lua_rawseti(L, -2, i);
+		}
+
+		lua_setglobal(L, "arg");
+	}
+
+	// Add love.__exe = true.
+	// This indicates that we're running the
+	// standalone version of love, and not the
+	// DLL version.
+	{
+		lua_getglobal(L, "love");
+		lua_pushboolean(L, 1);
+		lua_setfield(L, -2, "_exe");
+		lua_pop(L, 1);
+	}
+
+	// Boot
+	luaopen_love_boot(L);
+	lua_call(L, 0, 1);
+
+	int retval = 0;
+	if (lua_isnumber(L, 1))
+		retval = (int) lua_tonumber(L, 1);
+
+	lua_close(L);
+
+#ifdef LOVE_LEGENDARY_UTF8_ARGV_HACK
+	if (hack_argv)
+	{
+		for (int i = 0; i<hack_argc; ++i)
+			delete [] hack_argv[i];
+		delete [] hack_argv;
+	}
+#endif // LOVE_LEGENDARY_UTF8_ARGV_HACK
+	return retval;
+}
+
+#endif // LOVE_BUILD_EXE

+ 52 - 51
src/modules/audio/Audio.cpp

@@ -1,51 +1,52 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered Audio versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any Audio distribution.
-**/
-
-#include "Audio.h"
-
-namespace love
-{
-namespace audio
-{
-	StringMap<Audio::DistanceModel, Audio::DISTANCE_MAX_ENUM>::Entry Audio::distanceModelEntries[] =
-	{
-		{"none", Audio::DISTANCE_NONE},
-		{"inverse", Audio::DISTANCE_INVERSE},
-		{"inverse clamped", Audio::DISTANCE_INVERSE_CLAMPED},
-		{"linear", Audio::DISTANCE_LINEAR},
-		{"linear clamped", Audio::DISTANCE_LINEAR_CLAMPED},
-		{"exponent", Audio::DISTANCE_EXPONENT},
-		{"exponent clamped", Audio::DISTANCE_EXPONENT_CLAMPED}
-	};
-
-	StringMap<Audio::DistanceModel, Audio::DISTANCE_MAX_ENUM> Audio::distanceModels(Audio::distanceModelEntries, sizeof(Audio::distanceModelEntries));
-
-	bool Audio::getConstant(const char * in, DistanceModel & out)
-	{
-		return distanceModels.find(in, out);
-	}
-
-	bool Audio::getConstant(DistanceModel in, const char *& out)
-	{
-		return distanceModels.find(in, out);
-	}
-
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered Audio versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any Audio distribution.
+ **/
+
+#include "Audio.h"
+
+namespace love
+{
+namespace audio
+{
+
+StringMap<Audio::DistanceModel, Audio::DISTANCE_MAX_ENUM>::Entry Audio::distanceModelEntries[] =
+{
+	{"none", Audio::DISTANCE_NONE},
+	{"inverse", Audio::DISTANCE_INVERSE},
+	{"inverse clamped", Audio::DISTANCE_INVERSE_CLAMPED},
+	{"linear", Audio::DISTANCE_LINEAR},
+	{"linear clamped", Audio::DISTANCE_LINEAR_CLAMPED},
+	{"exponent", Audio::DISTANCE_EXPONENT},
+	{"exponent clamped", Audio::DISTANCE_EXPONENT_CLAMPED}
+};
+
+StringMap<Audio::DistanceModel, Audio::DISTANCE_MAX_ENUM> Audio::distanceModels(Audio::distanceModelEntries, sizeof(Audio::distanceModelEntries));
+
+bool Audio::getConstant(const char *in, DistanceModel &out)
+{
+	return distanceModels.find(in, out);
+}
+
+bool Audio::getConstant(DistanceModel in, const char  *&out)
+{
+	return distanceModels.find(in, out);
+}
+
+} // audio
+} // love

+ 239 - 234
src/modules/audio/Audio.h

@@ -1,234 +1,239 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented = 0; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_AUDIO_H
-#define LOVE_AUDIO_AUDIO_H
-
-#include <common/Module.h>
-#include <common/StringMap.h>
-#include "Source.h"
-
-namespace love
-{
-namespace sound
-{
-	class Decoder;
-	class SoundData;
-}
-namespace audio
-{
-	/**
-	* The Audio module is responsible for playing back raw sound samples.
-	**/
-	class Audio : public Module
-	{
-	public:
-
-		/**
-		* Attenuation by distance.
-		*/
-		enum DistanceModel
-		{
-			DISTANCE_NONE = 1,
-			DISTANCE_INVERSE,
-			DISTANCE_INVERSE_CLAMPED,
-			DISTANCE_LINEAR,
-			DISTANCE_LINEAR_CLAMPED,
-			DISTANCE_EXPONENT,
-			DISTANCE_EXPONENT_CLAMPED,
-			DISTANCE_MAX_ENUM
-		};
-		
-		static bool getConstant(const char * in, DistanceModel & out);
-		static bool getConstant(DistanceModel in, const char *& out);
-
-		/**
-		* Destructor.
-		**/
-		virtual ~Audio(){};
-
-		virtual Source * newSource(love::sound::Decoder * decoder) = 0;
-		virtual Source * newSource(love::sound::SoundData * soundData) = 0;
-
-		/**
-		* Gets the current number of simultaneous playing sources.
-		* @return The current number of simultaneous playing sources.
-		**/
-		virtual int getNumSources() const = 0;
-
-		/**
-		* Gets the maximum supported number of simultaneous playing sources.
-		* @return The maximum supported number of simultaneous playing sources.
-		**/
-		virtual int getMaxSources() const = 0;
-
-		/**
-		* Play the specified Source.
-		* @param source The Source to play.
-		**/
-		virtual void play(Source * source) = 0;
-
-		/**
-		* Stops playback on the specified source.
-		* @param source The source on which to stop the playback.
-		**/
-		virtual void stop(Source * source) = 0;
-
-		/**
-		* Stops all playing audio.
-		**/
-		virtual void stop() = 0;
-
-		/**
-		* Pauses playback on the specified source.
-		* @param source The source on which to pause the playback.
-		**/
-		virtual void pause(Source * source) = 0;
-
-		/**
-		* Pauses all audio.
-		**/
-		virtual void pause() = 0;
-
-		/**
-		* Resumes playback on the specified source.
-		* @param source The source on which to resume the playback.
-		**/
-		virtual void resume(Source * source) = 0;
-
-		/**
-		* Resumes all audio.
-		**/
-		virtual void resume() = 0;
-
-		/**
-		* Rewinds the specified source. Whatever is playing on this
-		* source gets rewound to the start.
-		* @param source The source to rewind.
-		**/
-		virtual void rewind(Source * source) = 0;
-
-		/**
-		* Rewinds all playing audio.
-		**/
-		virtual void rewind() = 0;
-
-		/**
-		* Sets the master volume, where 0.0f is min (off) and 1.0f is max.
-		* @param volume The new master volume.
-		**/
-		virtual void setVolume(float volume) = 0;
-
-		/**
-		* Gets the master volume.
-		* @return The current master volume.
-		**/
-		virtual float getVolume() const = 0;
-
-		/**
-		* Gets the position of the listener.
-		* @param v A float array of size 3 containing (x,y,z) in that order.
-		**/
-		virtual void getPosition(float * v) const = 0;
-
-		/**
-		* Sets the position of the listener.
-		* @param v A float array of size 3 containing [x,y,z] in that order.
-		**/
-		virtual void setPosition(float * v) = 0;
-
-		/**
-		* Gets the orientation of the listener.
-		* @param v A float array of size 6 containing [x,y,z] for the forward
-		* vector, followed by [x,y,z] for the up vector.
-		**/
-		virtual void getOrientation(float * v) const = 0;
-
-		/**
-		* Sets the orientation of the listener.
-		* @param v A float array of size 6 containing [x,y,z] for the forward
-		* vector, followed by [x,y,z] for the up vector.
-		**/
-		virtual void setOrientation(float * v) = 0;
-
-		/**
-		* Gets the velocity of the listener.
-		* @param v A float array of size 3 containing [x,y,z] in that order.
-		**/
-		virtual void getVelocity(float * v) const = 0;
-
-		/**
-		* Sets the velocity of the listener.
-		* @param v A float array of size 3 containing [x,y,z] in that order.
-		**/
-		virtual void setVelocity(float * v) = 0;
-
-		/**
-		* Begins recording audio input from the microphone.
-		**/
-		virtual void record() = 0;
-
-		/**
-		* Gets a section of recorded audio.
-		* Per OpenAL, the measurement begins from the start of the
-		* audio data in memory, which is after the last time this function
-		* was called. If this function has not been called yet this recording
-		* session, it just grabs from the beginning.
-		* @return All the recorded SoundData thus far.
-		**/
-		virtual love::sound::SoundData * getRecordedData() = 0;
-
-		/**
-		* Stops recording and, if passed true, returns all the recorded audio
-		* not already gotten by getRecordedData.
-		* @param returnData Whether to return recorded audio.
-		* @return if returnData, all the recorded audio yet to be gotten,
-		* otherwise NULL.
-		**/
-		virtual love::sound::SoundData * stopRecording(bool returnData) = 0;
-
-		/**
-		* Checks whether LOVE is able to record audio input.
-		* @return hasMic Whether LOVE has a microphone enabled.
-		**/
-		virtual bool canRecord() = 0;
-
-		/**
-		* Gets the distance model used for attenuation.
-		* @return Distance model.
-		*/
-		virtual DistanceModel getDistanceModel() const = 0;
-
-		/**
-		* Sets the distance model used for attenuation.
-		* @param distanceModel Distance model.
-		*/
-		virtual void setDistanceModel(DistanceModel distanceModel) = 0;
-
-	private:
-			
-		static StringMap<DistanceModel, DISTANCE_MAX_ENUM>::Entry distanceModelEntries[];
-		static StringMap<DistanceModel, DISTANCE_MAX_ENUM> distanceModels;
-	}; // Audio
-
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_AUDIO_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented = 0; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_AUDIO_H
+#define LOVE_AUDIO_AUDIO_H
+
+#include "common/Module.h"
+#include "common/StringMap.h"
+#include "Source.h"
+
+namespace love
+{
+
+namespace sound
+{
+
+class Decoder;
+class SoundData;
+
+} // sound
+
+namespace audio
+{
+
+/**
+ * The Audio module is responsible for playing back raw sound samples.
+ **/
+class Audio : public Module
+{
+public:
+
+	/**
+	 * Attenuation by distance.
+	 */
+	enum DistanceModel
+	{
+		DISTANCE_NONE = 1,
+		DISTANCE_INVERSE,
+		DISTANCE_INVERSE_CLAMPED,
+		DISTANCE_LINEAR,
+		DISTANCE_LINEAR_CLAMPED,
+		DISTANCE_EXPONENT,
+		DISTANCE_EXPONENT_CLAMPED,
+		DISTANCE_MAX_ENUM
+	};
+
+	static bool getConstant(const char *in, DistanceModel &out);
+	static bool getConstant(DistanceModel in, const char  *&out);
+
+	/**
+	 * Destructor.
+	 **/
+	virtual ~Audio() {};
+
+	virtual Source *newSource(love::sound::Decoder *decoder) = 0;
+	virtual Source *newSource(love::sound::SoundData *soundData) = 0;
+
+	/**
+	 * Gets the current number of simultaneous playing sources.
+	 * @return The current number of simultaneous playing sources.
+	 **/
+	virtual int getNumSources() const = 0;
+
+	/**
+	 * Gets the maximum supported number of simultaneous playing sources.
+	 * @return The maximum supported number of simultaneous playing sources.
+	 **/
+	virtual int getMaxSources() const = 0;
+
+	/**
+	 * Play the specified Source.
+	 * @param source The Source to play.
+	 **/
+	virtual void play(Source *source) = 0;
+
+	/**
+	 * Stops playback on the specified source.
+	 * @param source The source on which to stop the playback.
+	 **/
+	virtual void stop(Source *source) = 0;
+
+	/**
+	 * Stops all playing audio.
+	 **/
+	virtual void stop() = 0;
+
+	/**
+	 * Pauses playback on the specified source.
+	 * @param source The source on which to pause the playback.
+	 **/
+	virtual void pause(Source *source) = 0;
+
+	/**
+	 * Pauses all audio.
+	 **/
+	virtual void pause() = 0;
+
+	/**
+	 * Resumes playback on the specified source.
+	 * @param source The source on which to resume the playback.
+	 **/
+	virtual void resume(Source *source) = 0;
+
+	/**
+	 * Resumes all audio.
+	 **/
+	virtual void resume() = 0;
+
+	/**
+	 * Rewinds the specified source. Whatever is playing on this
+	 * source gets rewound to the start.
+	 * @param source The source to rewind.
+	 **/
+	virtual void rewind(Source *source) = 0;
+
+	/**
+	 * Rewinds all playing audio.
+	 **/
+	virtual void rewind() = 0;
+
+	/**
+	 * Sets the master volume, where 0.0f is min (off) and 1.0f is max.
+	 * @param volume The new master volume.
+	 **/
+	virtual void setVolume(float volume) = 0;
+
+	/**
+	 * Gets the master volume.
+	 * @return The current master volume.
+	 **/
+	virtual float getVolume() const = 0;
+
+	/**
+	 * Gets the position of the listener.
+	 * @param v A float array of size 3 containing (x,y,z) in that order.
+	 **/
+	virtual void getPosition(float *v) const = 0;
+
+	/**
+	 * Sets the position of the listener.
+	 * @param v A float array of size 3 containing [x,y,z] in that order.
+	 **/
+	virtual void setPosition(float *v) = 0;
+
+	/**
+	 * Gets the orientation of the listener.
+	 * @param v A float array of size 6 containing [x,y,z] for the forward
+	 * vector, followed by [x,y,z] for the up vector.
+	 **/
+	virtual void getOrientation(float *v) const = 0;
+
+	/**
+	 * Sets the orientation of the listener.
+	 * @param v A float array of size 6 containing [x,y,z] for the forward
+	 * vector, followed by [x,y,z] for the up vector.
+	 **/
+	virtual void setOrientation(float *v) = 0;
+
+	/**
+	 * Gets the velocity of the listener.
+	 * @param v A float array of size 3 containing [x,y,z] in that order.
+	 **/
+	virtual void getVelocity(float *v) const = 0;
+
+	/**
+	 * Sets the velocity of the listener.
+	 * @param v A float array of size 3 containing [x,y,z] in that order.
+	 **/
+	virtual void setVelocity(float *v) = 0;
+
+	/**
+	 * Begins recording audio input from the microphone.
+	 **/
+	virtual void record() = 0;
+
+	/**
+	 * Gets a section of recorded audio.
+	 * Per OpenAL, the measurement begins from the start of the
+	 * audio data in memory, which is after the last time this function
+	 * was called. If this function has not been called yet this recording
+	 * session, it just grabs from the beginning.
+	 * @return All the recorded SoundData thus far.
+	 **/
+	virtual love::sound::SoundData *getRecordedData() = 0;
+
+	/**
+	 * Stops recording and, if passed true, returns all the recorded audio
+	 * not already gotten by getRecordedData.
+	 * @param returnData Whether to return recorded audio.
+	 * @return if returnData, all the recorded audio yet to be gotten,
+	 * otherwise NULL.
+	 **/
+	virtual love::sound::SoundData *stopRecording(bool returnData) = 0;
+
+	/**
+	 * Checks whether LOVE is able to record audio input.
+	 * @return hasMic Whether LOVE has a microphone enabled.
+	 **/
+	virtual bool canRecord() = 0;
+
+	/**
+	 * Gets the distance model used for attenuation.
+	 * @return Distance model.
+	 */
+	virtual DistanceModel getDistanceModel() const = 0;
+
+	/**
+	 * Sets the distance model used for attenuation.
+	 * @param distanceModel Distance model.
+	 */
+	virtual void setDistanceModel(DistanceModel distanceModel) = 0;
+
+private:
+
+	static StringMap<DistanceModel, DISTANCE_MAX_ENUM>::Entry distanceModelEntries[];
+	static StringMap<DistanceModel, DISTANCE_MAX_ENUM> distanceModels;
+}; // Audio
+
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_AUDIO_H

+ 74 - 73
src/modules/audio/Source.cpp

@@ -1,73 +1,74 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Source.h"
-
-namespace love
-{
-namespace audio
-{
-	Source::Source(Type type)
-		: type(type)
-	{
-	}
-
-	Source::~Source()
-	{
-	}
-
-	bool Source::getConstant(const char * in, Type & out)
-	{
-		return types.find(in, out);
-	}
-
-	bool Source::getConstant(Type in, const char *& out)
-	{
-		return types.find(in, out);
-	}
-
-	bool Source::getConstant(const char * in, Unit & out)
-	{
-		return units.find(in, out);
-	}
-
-	bool Source::getConstant(Unit in, const char *& out)
-	{
-		return units.find(in, out);
-	}
-
-	StringMap<Source::Type, Source::TYPE_MAX_ENUM>::Entry Source::typeEntries[] =
-	{
-		{"static", Source::TYPE_STATIC},
-		{"stream", Source::TYPE_STREAM},
-	};
-
-	StringMap<Source::Type, Source::TYPE_MAX_ENUM> Source::types(Source::typeEntries, sizeof(Source::typeEntries));
-
-	StringMap<Source::Unit, Source::UNIT_MAX_ENUM>::Entry Source::unitEntries[] =
-	{
-		{"seconds", Source::UNIT_SECONDS},
-		{"samples", Source::UNIT_SAMPLES},
-	};
-
-	StringMap<Source::Unit, Source::UNIT_MAX_ENUM> Source::units(Source::unitEntries, sizeof(Source::unitEntries));
-
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Source.h"
+
+namespace love
+{
+namespace audio
+{
+
+Source::Source(Type type)
+	: type(type)
+{
+}
+
+Source::~Source()
+{
+}
+
+bool Source::getConstant(const char *in, Type &out)
+{
+	return types.find(in, out);
+}
+
+bool Source::getConstant(Type in, const char  *&out)
+{
+	return types.find(in, out);
+}
+
+bool Source::getConstant(const char *in, Unit &out)
+{
+	return units.find(in, out);
+}
+
+bool Source::getConstant(Unit in, const char  *&out)
+{
+	return units.find(in, out);
+}
+
+StringMap<Source::Type, Source::TYPE_MAX_ENUM>::Entry Source::typeEntries[] =
+{
+	{"static", Source::TYPE_STATIC},
+	{"stream", Source::TYPE_STREAM},
+};
+
+StringMap<Source::Type, Source::TYPE_MAX_ENUM> Source::types(Source::typeEntries, sizeof(Source::typeEntries));
+
+StringMap<Source::Unit, Source::UNIT_MAX_ENUM>::Entry Source::unitEntries[] =
+{
+	{"seconds", Source::UNIT_SECONDS},
+	{"samples", Source::UNIT_SAMPLES},
+};
+
+StringMap<Source::Unit, Source::UNIT_MAX_ENUM> Source::units(Source::unitEntries, sizeof(Source::unitEntries));
+
+} // audio
+} // love

+ 119 - 119
src/modules/audio/Source.h

@@ -1,119 +1,119 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_SOURCE_H
-#define LOVE_AUDIO_SOURCE_H
-
-// LOVE
-#include <common/Object.h>
-#include <common/StringMap.h>
-
-namespace love
-{
-namespace audio
-{
-	class Source : public Object
-	{
-	public:
-
-		enum Type
-		{
-			TYPE_STATIC = 1,
-			TYPE_STREAM,
-			TYPE_MAX_ENUM
-		}; // Type
-
-		enum Unit
-		{
-			UNIT_SECONDS = 1,
-			UNIT_SAMPLES,
-			UNIT_MAX_ENUM
-		};
-
-	protected:
-		Type type;
-	public:
-
-		Source(Type type);
-		virtual ~Source();
-
-		virtual Source * copy() = 0;
-
-		virtual void play() = 0;
-		virtual void stop() = 0;
-		virtual void pause() = 0;
-		virtual void resume() = 0;
-		virtual void rewind() = 0;
-		virtual bool isStopped() const = 0;
-		virtual bool isPaused() const = 0;
-		virtual bool isFinished() const = 0;
-		virtual bool update() = 0;
-
-		virtual void setPitch(float pitch) = 0;
-		virtual float getPitch() const = 0;
-
-		virtual void setVolume(float volume) = 0;
-		virtual float getVolume() const = 0;
-
-		virtual void seek(float offset, Unit unit) = 0;
-		virtual float tell(Unit unit) = 0;
-
-		// all float * v must be of size 3
-		virtual void setPosition(float * v) = 0;
-		virtual void getPosition(float * v) const = 0;
-		virtual void setVelocity(float * v) = 0;
-		virtual void getVelocity(float * v) const = 0;
-		virtual void setDirection(float * v) = 0;
-		virtual void getDirection(float * v) const = 0;
-
-		virtual void setLooping(bool looping) = 0;
-		virtual bool isLooping() const = 0;
-		virtual bool isStatic() const = 0;
-		
-		virtual void setMinVolume(float volume) = 0;
-		virtual float getMinVolume() const = 0;
-		virtual void setMaxVolume(float volume) = 0;
-		virtual float getMaxVolume() const = 0;
-
-		virtual void setReferenceDistance(float distance) = 0;
-		virtual float getReferenceDistance() const = 0;
-		virtual void setRolloffFactor(float factor) = 0;
-		virtual float getRolloffFactor() const = 0;
-		virtual void setMaxDistance(float distance) = 0;
-		virtual float getMaxDistance() const = 0;
-
-		static bool getConstant(const char * in, Type & out);
-		static bool getConstant(Type in, const char *& out);
-		static bool getConstant(const char * in, Unit & out);
-		static bool getConstant(Unit in, const char *& out);
-
-	private:
-
-		static StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[];
-		static StringMap<Type, TYPE_MAX_ENUM> types;
-		static StringMap<Unit, UNIT_MAX_ENUM>::Entry unitEntries[];
-		static StringMap<Unit, UNIT_MAX_ENUM> units;
-
-	}; // Source
-
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_SOURCE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_SOURCE_H
+#define LOVE_AUDIO_SOURCE_H
+
+// LOVE
+#include "common/Object.h"
+#include "common/StringMap.h"
+
+namespace love
+{
+namespace audio
+{
+
+class Source : public Object
+{
+public:
+
+	enum Type
+	{
+		TYPE_STATIC = 1,
+		TYPE_STREAM,
+		TYPE_MAX_ENUM
+	}; // Type
+
+	enum Unit
+	{
+		UNIT_SECONDS = 1,
+		UNIT_SAMPLES,
+		UNIT_MAX_ENUM
+	};
+
+	Source(Type type);
+	virtual ~Source();
+
+	virtual Source *copy() = 0;
+
+	virtual void play() = 0;
+	virtual void stop() = 0;
+	virtual void pause() = 0;
+	virtual void resume() = 0;
+	virtual void rewind() = 0;
+	virtual bool isStopped() const = 0;
+	virtual bool isPaused() const = 0;
+	virtual bool isFinished() const = 0;
+	virtual bool update() = 0;
+
+	virtual void setPitch(float pitch) = 0;
+	virtual float getPitch() const = 0;
+
+	virtual void setVolume(float volume) = 0;
+	virtual float getVolume() const = 0;
+
+	virtual void seek(float offset, Unit unit) = 0;
+	virtual float tell(Unit unit) = 0;
+
+	// all float * v must be of size 3
+	virtual void setPosition(float *v) = 0;
+	virtual void getPosition(float *v) const = 0;
+	virtual void setVelocity(float *v) = 0;
+	virtual void getVelocity(float *v) const = 0;
+	virtual void setDirection(float *v) = 0;
+	virtual void getDirection(float *v) const = 0;
+
+	virtual void setLooping(bool looping) = 0;
+	virtual bool isLooping() const = 0;
+	virtual bool isStatic() const = 0;
+
+	virtual void setMinVolume(float volume) = 0;
+	virtual float getMinVolume() const = 0;
+	virtual void setMaxVolume(float volume) = 0;
+	virtual float getMaxVolume() const = 0;
+
+	virtual void setReferenceDistance(float distance) = 0;
+	virtual float getReferenceDistance() const = 0;
+	virtual void setRolloffFactor(float factor) = 0;
+	virtual float getRolloffFactor() const = 0;
+	virtual void setMaxDistance(float distance) = 0;
+	virtual float getMaxDistance() const = 0;
+
+	static bool getConstant(const char *in, Type &out);
+	static bool getConstant(Type in, const char  *&out);
+	static bool getConstant(const char *in, Unit &out);
+	static bool getConstant(Unit in, const char  *&out);
+
+protected:
+	Type type;
+
+private:
+
+	static StringMap<Type, TYPE_MAX_ENUM>::Entry typeEntries[];
+	static StringMap<Type, TYPE_MAX_ENUM> types;
+	static StringMap<Unit, UNIT_MAX_ENUM>::Entry unitEntries[];
+	static StringMap<Unit, UNIT_MAX_ENUM> units;
+
+}; // Source
+
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_SOURCE_H

+ 168 - 167
src/modules/audio/null/Audio.cpp

@@ -1,167 +1,168 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Audio.h"
-
-namespace love
-{
-namespace audio
-{
-namespace null
-{
-	Audio::Audio() : distanceModel(DISTANCE_NONE)
-	{
-	}
-
-	Audio::~Audio()
-	{
-	}
-
-	const char * Audio::getName() const
-	{
-		return "love.audio.null";
-	}
-
-	love::audio::Source * Audio::newSource(love::sound::Decoder *)
-	{
-		return new Source();
-	}
-
-	love::audio::Source * Audio::newSource(love::sound::SoundData *)
-	{
-		return new Source();
-	}
-
-	int Audio::getNumSources() const
-	{
-		return 0;
-	}
-
-	int Audio::getMaxSources() const
-	{
-		return 0;
-	}
-
-	void Audio::play(love::audio::Source *)
-	{
-	}
-
-	void Audio::play()
-	{
-	}
-
-	void Audio::stop(love::audio::Source *)
-	{
-	}
-
-	void Audio::stop()
-	{
-	}
-
-	void Audio::pause(love::audio::Source *)
-	{
-	}
-
-	void Audio::pause()
-	{
-	}
-
-	void Audio::resume(love::audio::Source *)
-	{
-	}
-
-	void Audio::resume()
-	{
-	}
-
-	void Audio::rewind(love::audio::Source *)
-	{
-	}
-
-	void Audio::rewind()
-	{
-	}
-
-	void Audio::setVolume(float volume)
-	{
-		this->volume = volume;
-	}
-
-	float Audio::getVolume() const
-	{
-		return volume;
-	}
-
-	void Audio::getPosition(float *) const
-	{
-	}
-
-	void Audio::setPosition(float *)
-	{
-	}
-
-	void Audio::getOrientation(float *) const
-	{
-	}
-
-	void Audio::setOrientation(float *)
-	{
-	}
-
-	void Audio::getVelocity(float *) const
-	{
-	}
-
-	void Audio::setVelocity(float *)
-	{
-	}
-
-	void Audio::record()
-	{
-	}
-
-	love::sound::SoundData * Audio::getRecordedData()
-	{
-		return NULL;
-	}
-
-	love::sound::SoundData * Audio::stopRecording(bool)
-	{
-		return NULL;
-	}
-
-	bool Audio::canRecord()
-	{
-		return false;
-	}
-	
-	Audio::DistanceModel Audio::getDistanceModel() const
-	{
-		return this->distanceModel;
-	}
-
-	void Audio::setDistanceModel(DistanceModel distanceModel)
-	{
-		this->distanceModel = distanceModel;
-	}
-
-} // null
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Audio.h"
+
+namespace love
+{
+namespace audio
+{
+namespace null
+{
+
+Audio::Audio() : distanceModel(DISTANCE_NONE)
+{
+}
+
+Audio::~Audio()
+{
+}
+
+const char *Audio::getName() const
+{
+	return "love.audio.null";
+}
+
+love::audio::Source *Audio::newSource(love::sound::Decoder *)
+{
+	return new Source();
+}
+
+love::audio::Source *Audio::newSource(love::sound::SoundData *)
+{
+	return new Source();
+}
+
+int Audio::getNumSources() const
+{
+	return 0;
+}
+
+int Audio::getMaxSources() const
+{
+	return 0;
+}
+
+void Audio::play(love::audio::Source *)
+{
+}
+
+void Audio::play()
+{
+}
+
+void Audio::stop(love::audio::Source *)
+{
+}
+
+void Audio::stop()
+{
+}
+
+void Audio::pause(love::audio::Source *)
+{
+}
+
+void Audio::pause()
+{
+}
+
+void Audio::resume(love::audio::Source *)
+{
+}
+
+void Audio::resume()
+{
+}
+
+void Audio::rewind(love::audio::Source *)
+{
+}
+
+void Audio::rewind()
+{
+}
+
+void Audio::setVolume(float volume)
+{
+	this->volume = volume;
+}
+
+float Audio::getVolume() const
+{
+	return volume;
+}
+
+void Audio::getPosition(float *) const
+{
+}
+
+void Audio::setPosition(float *)
+{
+}
+
+void Audio::getOrientation(float *) const
+{
+}
+
+void Audio::setOrientation(float *)
+{
+}
+
+void Audio::getVelocity(float *) const
+{
+}
+
+void Audio::setVelocity(float *)
+{
+}
+
+void Audio::record()
+{
+}
+
+love::sound::SoundData *Audio::getRecordedData()
+{
+	return NULL;
+}
+
+love::sound::SoundData *Audio::stopRecording(bool)
+{
+	return NULL;
+}
+
+bool Audio::canRecord()
+{
+	return false;
+}
+
+Audio::DistanceModel Audio::getDistanceModel() const
+{
+	return this->distanceModel;
+}
+
+void Audio::setDistanceModel(DistanceModel distanceModel)
+{
+	this->distanceModel = distanceModel;
+}
+
+} // null
+} // audio
+} // love

+ 89 - 87
src/modules/audio/null/Audio.h

@@ -1,87 +1,89 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_NULL_AUDIO_H
-#define LOVE_AUDIO_NULL_AUDIO_H
-
-// LOVE
-#include <audio/Audio.h>
-
-#include "Source.h"
-
-namespace love
-{
-namespace audio
-{
-namespace null
-{
-	class Audio : public love::audio::Audio
-	{
-	private:
-		float volume;
-		DistanceModel distanceModel;
-	public:
-
-		Audio();
-		virtual ~Audio();
-
-		// Implements Module.
-		const char * getName() const;
-
-		// Implements Audio.
-		love::audio::Source * newSource(love::sound::Decoder * decoder);
-		love::audio::Source * newSource(love::sound::SoundData * soundData);
-		int getNumSources() const;
-		int getMaxSources() const;
-		void play(love::audio::Source * source);
-		void play();
-		void stop(love::audio::Source * source);
-		void stop();
-		void pause(love::audio::Source * source);
-		void pause();
-		void resume(love::audio::Source * source);
-		void resume();
-		void rewind(love::audio::Source * source);
-		void rewind();
-		void setVolume(float volume);
-		float getVolume() const;
-
-		void getPosition(float * v) const;
-		void setPosition(float * v);
-		void getOrientation(float * v) const;
-		void setOrientation(float * v);
-		void getVelocity(float * v) const;
-		void setVelocity(float * v);
-
-		void record();
-		love::sound::SoundData * getRecordedData();
-		love::sound::SoundData * stopRecording(bool returnData);
-		bool canRecord();
-
-		DistanceModel getDistanceModel() const;
-		void setDistanceModel(DistanceModel distanceModel);
-
-	}; // Audio
-
-} // null
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_NULL_AUDIO_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_NULL_AUDIO_H
+#define LOVE_AUDIO_NULL_AUDIO_H
+
+// LOVE
+#include "audio/Audio.h"
+
+#include "Source.h"
+
+namespace love
+{
+namespace audio
+{
+namespace null
+{
+
+class Audio : public love::audio::Audio
+{
+public:
+
+	Audio();
+	virtual ~Audio();
+
+	// Implements Module.
+	const char *getName() const;
+
+	// Implements Audio.
+	love::audio::Source *newSource(love::sound::Decoder *decoder);
+	love::audio::Source *newSource(love::sound::SoundData *soundData);
+	int getNumSources() const;
+	int getMaxSources() const;
+	void play(love::audio::Source *source);
+	void play();
+	void stop(love::audio::Source *source);
+	void stop();
+	void pause(love::audio::Source *source);
+	void pause();
+	void resume(love::audio::Source *source);
+	void resume();
+	void rewind(love::audio::Source *source);
+	void rewind();
+	void setVolume(float volume);
+	float getVolume() const;
+
+	void getPosition(float *v) const;
+	void setPosition(float *v);
+	void getOrientation(float *v) const;
+	void setOrientation(float *v);
+	void getVelocity(float *v) const;
+	void setVelocity(float *v);
+
+	void record();
+	love::sound::SoundData *getRecordedData();
+	love::sound::SoundData *stopRecording(bool returnData);
+	bool canRecord();
+
+	DistanceModel getDistanceModel() const;
+	void setDistanceModel(DistanceModel distanceModel);
+
+private:
+	float volume;
+	DistanceModel distanceModel;
+
+}; // Audio
+
+} // null
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_NULL_AUDIO_H

+ 205 - 205
src/modules/audio/null/Source.cpp

@@ -1,205 +1,205 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Source.h"
-
-namespace love
-{
-namespace audio
-{
-namespace null
-{
-
-	Source::Source()
-		: love::audio::Source(Source::TYPE_STATIC)
-	{
-	}
-
-	Source::~Source()
-	{
-	}
-
-	love::audio::Source * Source::copy()
-	{
-		this->retain();
-		return this;
-	}
-
-	void Source::play()
-	{
-	}
-
-	void Source::stop()
-	{
-	}
-
-	void Source::pause()
-	{
-	}
-
-	void Source::resume()
-	{
-	}
-
-	void Source::rewind()
-	{
-	}
-
-	bool Source::isStopped() const
-	{
-		return true;
-	}
-
-	bool Source::isPaused() const
-	{
-		return false;
-	}
-
-	bool Source::isFinished() const
-	{
-		return true;
-	}
-
-	bool Source::update()
-	{
-		return false;
-	}
-
-	void Source::setPitch(float pitch)
-	{
-		this->pitch = pitch;
-	}
-
-	float Source::getPitch() const
-	{
-		return pitch;
-	}
-
-	void Source::setVolume(float volume)
-	{
-		this->volume = volume;
-	}
-
-	float Source::getVolume() const
-	{
-		return volume;
-	}
-
-	void Source::seek(float, Source::Unit)
-	{
-	}
-
-	float Source::tell(Source::Unit)
-	{
-		return 0.0f;
-	}
-
-	void Source::setPosition(float *)
-	{
-	}
-
-	void Source::getPosition(float *) const
-	{
-	}
-
-	void Source::setVelocity(float *)
-	{
-	}
-
-	void Source::getVelocity(float *) const
-	{
-	}
-
-	void Source::setDirection(float *)
-	{
-	}
-
-	void Source::getDirection(float *) const
-	{
-	}
-
-	void Source::setLooping(bool looping)
-	{
-		this->looping = looping;
-	}
-
-	bool Source::isLooping() const
-	{
-		return looping;
-	}
-
-	bool Source::isStatic() const
-	{
-		return (type == TYPE_STATIC);
-	}
-	
-	void Source::setMinVolume(float volume)
-	{
-		this->minVolume = volume;
-	}
-
-	float Source::getMinVolume() const
-	{
-		return this->minVolume;
-	}
-
-	void Source::setMaxVolume(float volume)
-	{
-		this->maxVolume = volume;
-	}
-
-	float Source::getMaxVolume() const
-	{
-		return this->maxVolume;
-	}
-
-	void Source::setReferenceDistance(float distance)
-	{
-		this->referenceDistance = distance;
-	}
-
-	float Source::getReferenceDistance() const
-	{
-		return this->referenceDistance;
-	}
-
-	void Source::setRolloffFactor(float factor)
-	{
-		this->rolloffFactor = factor;
-	}
-
-	float Source::getRolloffFactor() const
-	{
-		return this->rolloffFactor;
-	}
-
-	void Source::setMaxDistance(float distance)
-	{
-		this->maxDistance = distance;
-	}
-
-	float Source::getMaxDistance() const
-	{
-		return this->maxDistance;
-	}
-
-} // null
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Source.h"
+
+namespace love
+{
+namespace audio
+{
+namespace null
+{
+
+Source::Source()
+	: love::audio::Source(Source::TYPE_STATIC)
+{
+}
+
+Source::~Source()
+{
+}
+
+love::audio::Source *Source::copy()
+{
+	this->retain();
+	return this;
+}
+
+void Source::play()
+{
+}
+
+void Source::stop()
+{
+}
+
+void Source::pause()
+{
+}
+
+void Source::resume()
+{
+}
+
+void Source::rewind()
+{
+}
+
+bool Source::isStopped() const
+{
+	return true;
+}
+
+bool Source::isPaused() const
+{
+	return false;
+}
+
+bool Source::isFinished() const
+{
+	return true;
+}
+
+bool Source::update()
+{
+	return false;
+}
+
+void Source::setPitch(float pitch)
+{
+	this->pitch = pitch;
+}
+
+float Source::getPitch() const
+{
+	return pitch;
+}
+
+void Source::setVolume(float volume)
+{
+	this->volume = volume;
+}
+
+float Source::getVolume() const
+{
+	return volume;
+}
+
+void Source::seek(float, Source::Unit)
+{
+}
+
+float Source::tell(Source::Unit)
+{
+	return 0.0f;
+}
+
+void Source::setPosition(float *)
+{
+}
+
+void Source::getPosition(float *) const
+{
+}
+
+void Source::setVelocity(float *)
+{
+}
+
+void Source::getVelocity(float *) const
+{
+}
+
+void Source::setDirection(float *)
+{
+}
+
+void Source::getDirection(float *) const
+{
+}
+
+void Source::setLooping(bool looping)
+{
+	this->looping = looping;
+}
+
+bool Source::isLooping() const
+{
+	return looping;
+}
+
+bool Source::isStatic() const
+{
+	return (type == TYPE_STATIC);
+}
+
+void Source::setMinVolume(float volume)
+{
+	this->minVolume = volume;
+}
+
+float Source::getMinVolume() const
+{
+	return this->minVolume;
+}
+
+void Source::setMaxVolume(float volume)
+{
+	this->maxVolume = volume;
+}
+
+float Source::getMaxVolume() const
+{
+	return this->maxVolume;
+}
+
+void Source::setReferenceDistance(float distance)
+{
+	this->referenceDistance = distance;
+}
+
+float Source::getReferenceDistance() const
+{
+	return this->referenceDistance;
+}
+
+void Source::setRolloffFactor(float factor)
+{
+	this->rolloffFactor = factor;
+}
+
+float Source::getRolloffFactor() const
+{
+	return this->rolloffFactor;
+}
+
+void Source::setMaxDistance(float distance)
+{
+	this->maxDistance = distance;
+}
+
+float Source::getMaxDistance() const
+{
+	return this->maxDistance;
+}
+
+} // null
+} // audio
+} // love

+ 94 - 93
src/modules/audio/null/Source.h

@@ -1,93 +1,94 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_NULL_SOURCE_H
-#define LOVE_AUDIO_NULL_SOURCE_H
-
-// LOVE
-#include <common/Object.h>
-#include <audio/Source.h>
-
-namespace love
-{
-namespace audio
-{
-namespace null
-{
-	class Source : public love::audio::Source
-	{
-	private:
-
-		float pitch;
-		float volume;
-		bool looping;
-		float minVolume;
-		float maxVolume;
-		float referenceDistance;
-		float rolloffFactor;
-		float maxDistance;
-
-	public:
-		Source();
-		virtual ~Source();
-
-		virtual love::audio::Source * copy();
-		virtual void play();
-		virtual void stop();
-		virtual void pause();
-		virtual void resume();
-		virtual void rewind();
-		virtual bool isStopped() const;
-		virtual bool isPaused() const;
-		virtual bool isFinished() const;
-		virtual bool update();
-		virtual void setPitch(float pitch);
-		virtual float getPitch() const;
-		virtual void setVolume(float volume);
-		virtual float getVolume() const;
-		virtual void seek(float offset, Unit unit);
-		virtual float tell(Unit unit);
-		virtual void setPosition(float * v);
-		virtual void getPosition(float * v) const;
-		virtual void setVelocity(float * v);
-		virtual void getVelocity(float * v) const;
-		virtual void setDirection(float * v);
-		virtual void getDirection(float * v) const;
-		void setLooping(bool looping);
-		bool isLooping() const;
-		bool isStatic() const;
-		virtual void setMinVolume(float volume);
-		virtual float getMinVolume() const;
-		virtual void setMaxVolume(float volume);
-		virtual float getMaxVolume() const;
-		virtual void setReferenceDistance(float distance);
-		virtual float getReferenceDistance() const;
-		virtual void setRolloffFactor(float factor);
-		virtual float getRolloffFactor() const;
-		virtual void setMaxDistance(float distance);
-		virtual float getMaxDistance() const;
-
-	}; // Source
-
-} // null
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_NULL_SOURCE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_NULL_SOURCE_H
+#define LOVE_AUDIO_NULL_SOURCE_H
+
+// LOVE
+#include "common/Object.h"
+#include "audio/Source.h"
+
+namespace love
+{
+namespace audio
+{
+namespace null
+{
+
+class Source : public love::audio::Source
+{
+public:
+	Source();
+	virtual ~Source();
+
+	virtual love::audio::Source *copy();
+	virtual void play();
+	virtual void stop();
+	virtual void pause();
+	virtual void resume();
+	virtual void rewind();
+	virtual bool isStopped() const;
+	virtual bool isPaused() const;
+	virtual bool isFinished() const;
+	virtual bool update();
+	virtual void setPitch(float pitch);
+	virtual float getPitch() const;
+	virtual void setVolume(float volume);
+	virtual float getVolume() const;
+	virtual void seek(float offset, Unit unit);
+	virtual float tell(Unit unit);
+	virtual void setPosition(float *v);
+	virtual void getPosition(float *v) const;
+	virtual void setVelocity(float *v);
+	virtual void getVelocity(float *v) const;
+	virtual void setDirection(float *v);
+	virtual void getDirection(float *v) const;
+	void setLooping(bool looping);
+	bool isLooping() const;
+	bool isStatic() const;
+	virtual void setMinVolume(float volume);
+	virtual float getMinVolume() const;
+	virtual void setMaxVolume(float volume);
+	virtual float getMaxVolume() const;
+	virtual void setReferenceDistance(float distance);
+	virtual float getReferenceDistance() const;
+	virtual void setRolloffFactor(float factor);
+	virtual float getRolloffFactor() const;
+	virtual void setMaxDistance(float distance);
+	virtual float getMaxDistance() const;
+
+private:
+
+	float pitch;
+	float volume;
+	bool looping;
+	float minVolume;
+	float maxVolume;
+	float referenceDistance;
+	float rolloffFactor;
+	float maxDistance;
+
+}; // Source
+
+} // null
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_NULL_SOURCE_H

+ 319 - 316
src/modules/audio/openal/Audio.cpp

@@ -1,316 +1,319 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Audio.h"
-#include <common/delay.h>
-
-#include <sound/Decoder.h>
-
-namespace love
-{
-namespace audio
-{
-namespace openal
-{
-	Audio::PoolThread::PoolThread(Pool* pool)
-	: pool(pool), finish(false)
-	{
-	}
-
-	void Audio::PoolThread::main()
-	{
-		while (true)
-		{
-			{
-				thread::Lock lock(mutex);
-				if (finish)
-				{
-					return;
-				}
-			}
-
-			pool->update();
-			delay(5);
-		}
-	}
-
-	void Audio::PoolThread::setFinish()
-	{
-		thread::Lock lock(mutex);
-		finish = true;
-	}
-
-
-	Audio::Audio() : distanceModel(DISTANCE_INVERSE_CLAMPED)
-	{
-		// Passing zero for default device.
-		device = alcOpenDevice(0);
-
-		if (device == 0)
-			throw love::Exception("Could not open device.");
-
-		context = alcCreateContext(device, 0);
-
-		if (context == 0)
-			throw love::Exception("Could not create context.");
-
-		alcMakeContextCurrent(context);
-
-		if (alcGetError(device) != ALC_NO_ERROR)
-			throw love::Exception("Could not make context current.");
-
-		/*std::string captureName(alcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER));
-		const ALCchar * devices = alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER);
-		while (*devices)
-		{
-			std::string device(devices);
-			devices += device.size() + 1;
-			if (device.find("Mic") != std::string::npos || device.find("mic") != std::string::npos)
-			{
-				captureName = device;
-			}
-		}
-
-		capture = alcCaptureOpenDevice(captureName.c_str(), 8000, AL_FORMAT_MONO16, 262144); // about 32 seconds
-
-		if (!capture)
-		{
-			// We're not going to prevent LOVE from running without a microphone, but we should warn, at least
-			std::cerr << "Warning, couldn't open capture device! No audio input!" << std::endl;
-		}*/
-
-		// pool must be allocated after AL context.
-		pool = new Pool();
-
-		poolThread = new PoolThread(pool);
-		poolThread->start();
-	}
-
-	Audio::~Audio()
-	{
-		poolThread->setFinish();
-		poolThread->wait();
-
-		delete poolThread;
-		delete pool;
-
-		alcMakeContextCurrent(0);
-		alcDestroyContext(context);
-		//if (capture) alcCaptureCloseDevice(capture);
-		alcCloseDevice(device);
-	}
-
-
-	const char * Audio::getName() const
-	{
-		return "love.audio.openal";
-	}
-
-	love::audio::Source * Audio::newSource(love::sound::Decoder * decoder)
-	{
-		return new Source(pool, decoder);
-	}
-
-	love::audio::Source * Audio::newSource(love::sound::SoundData * soundData)
-	{
-		return new Source(pool, soundData);
-	}
-
-	int Audio::getNumSources() const
-	{
-		return pool->getNumSources();
-	}
-
-	int Audio::getMaxSources() const
-	{
-		return pool->getMaxSources();
-	}
-
-	void Audio::play(love::audio::Source * source)
-	{
-		source->play();
-	}
-
-	void Audio::stop(love::audio::Source * source)
-	{
-		source->stop();
-	}
-
-	void Audio::stop()
-	{
-		pool->stop();
-	}
-
-	void Audio::pause(love::audio::Source * source)
-	{
-		source->pause();
-	}
-
-	void Audio::pause()
-	{
-		pool->pause();
-	}
-
-	void Audio::resume(love::audio::Source * source)
-	{
-		source->resume();
-	}
-
-	void Audio::resume()
-	{
-		pool->resume();
-	}
-
-	void Audio::rewind(love::audio::Source * source)
-	{
-		source->rewind();
-	}
-
-	void Audio::rewind()
-	{
-		pool->rewind();
-	}
-
-	void Audio::setVolume(float volume)
-	{
-		alListenerf(AL_GAIN, volume);
-	}
-
-	float Audio::getVolume() const
-	{
-		ALfloat volume;
-		alGetListenerf(AL_GAIN, &volume);
-		return volume;
-	}
-
-	void Audio::getPosition(float * v) const
-	{
-		alGetListenerfv(AL_POSITION, v);
-	}
-
-	void Audio::setPosition(float * v)
-	{
-		alListenerfv(AL_POSITION, v);
-	}
-
-	void Audio::getOrientation(float * v) const
-	{
-		alGetListenerfv(AL_ORIENTATION, v);
-	}
-
-	void Audio::setOrientation(float * v)
-	{
-		alListenerfv(AL_ORIENTATION, v);
-	}
-
-	void Audio::getVelocity(float * v) const
-	{
-		alGetListenerfv(AL_VELOCITY, v);
-	}
-
-	void Audio::setVelocity(float * v)
-	{
-		alListenerfv(AL_VELOCITY, v);
-	}
-
-	void Audio::record()
-	{
-		if (!canRecord()) return;
-		alcCaptureStart(capture);
-	}
-
-	love::sound::SoundData * Audio::getRecordedData()
-	{
-		if (!canRecord())
-			return NULL;
-		int samplerate = 8000;
-		ALCint samples;
-		alcGetIntegerv(capture, ALC_CAPTURE_SAMPLES, 4, &samples);
-		void * data = malloc(samples * (2/sizeof(char)));
-		alcCaptureSamples(capture, data, samples);
-		love::sound::SoundData * sd = new love::sound::SoundData(data, samples, samplerate, 16, 1);
-		free(data);
-		return sd;
-	}
-
-	love::sound::SoundData * Audio::stopRecording(bool returnData)
-	{
-		if (!canRecord())
-			return NULL;
-		love::sound::SoundData * sd = NULL;
-		if (returnData)
-		{
-			sd = getRecordedData();
-		}
-		alcCaptureStop(capture);
-		return sd;
-	}
-
-	bool Audio::canRecord()
-	{
-		return (capture != NULL);
-	}
-	
-	Audio::DistanceModel Audio::getDistanceModel() const
-	{
-		return this->distanceModel;
-	}
-
-	void Audio::setDistanceModel(DistanceModel distanceModel)
-	{
-		this->distanceModel = distanceModel;
-		
-		switch (distanceModel)
-		{
-		case DISTANCE_NONE:
-			alDistanceModel(AL_NONE);
-			break;
-			
-		case DISTANCE_INVERSE:
-			alDistanceModel(AL_INVERSE_DISTANCE);
-			break;
-
-		case DISTANCE_INVERSE_CLAMPED:
-			alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
-			break;
-			
-		case DISTANCE_LINEAR:
-			alDistanceModel(AL_LINEAR_DISTANCE);
-			break;
-
-		case DISTANCE_LINEAR_CLAMPED:
-			alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
-			break;
-			
-		case DISTANCE_EXPONENT:
-			alDistanceModel(AL_EXPONENT_DISTANCE);
-			break;
-
-		case DISTANCE_EXPONENT_CLAMPED:
-			alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED);
-			break;
-
-		default:
-			break;
-		}
-	}
-} // openal
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Audio.h"
+#include "common/delay.h"
+
+#include "sound/Decoder.h"
+
+namespace love
+{
+namespace audio
+{
+namespace openal
+{
+
+Audio::PoolThread::PoolThread(Pool *pool)
+	: pool(pool)
+	, finish(false)
+{
+}
+
+void Audio::PoolThread::main()
+{
+	while (true)
+	{
+		{
+			thread::Lock lock(mutex);
+			if (finish)
+			{
+				return;
+			}
+		}
+
+		pool->update();
+		delay(5);
+	}
+}
+
+void Audio::PoolThread::setFinish()
+{
+	thread::Lock lock(mutex);
+	finish = true;
+}
+
+
+Audio::Audio() : distanceModel(DISTANCE_INVERSE_CLAMPED)
+{
+	// Passing zero for default device.
+	device = alcOpenDevice(0);
+
+	if (device == 0)
+		throw love::Exception("Could not open device.");
+
+	context = alcCreateContext(device, 0);
+
+	if (context == 0)
+		throw love::Exception("Could not create context.");
+
+	alcMakeContextCurrent(context);
+
+	if (alcGetError(device) != ALC_NO_ERROR)
+		throw love::Exception("Could not make context current.");
+
+	/*std::string captureName(alcGetString(NULL, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER));
+	const ALCchar * devices = alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER);
+	while (*devices)
+	{
+		std::string device(devices);
+		devices += device.size() + 1;
+		if (device.find("Mic") != std::string::npos || device.find("mic") != std::string::npos)
+		{
+			captureName = device;
+		}
+	}
+
+	capture = alcCaptureOpenDevice(captureName.c_str(), 8000, AL_FORMAT_MONO16, 262144); // about 32 seconds
+
+	if (!capture)
+	{
+		// We're not going to prevent LOVE from running without a microphone, but we should warn, at least
+		std::cerr << "Warning, couldn't open capture device! No audio input!" << std::endl;
+	}*/
+
+	// pool must be allocated after AL context.
+	pool = new Pool();
+
+	poolThread = new PoolThread(pool);
+	poolThread->start();
+}
+
+Audio::~Audio()
+{
+	poolThread->setFinish();
+	poolThread->wait();
+
+	delete poolThread;
+	delete pool;
+
+	alcMakeContextCurrent(0);
+	alcDestroyContext(context);
+	//if (capture) alcCaptureCloseDevice(capture);
+	alcCloseDevice(device);
+}
+
+
+const char *Audio::getName() const
+{
+	return "love.audio.openal";
+}
+
+love::audio::Source *Audio::newSource(love::sound::Decoder *decoder)
+{
+	return new Source(pool, decoder);
+}
+
+love::audio::Source *Audio::newSource(love::sound::SoundData *soundData)
+{
+	return new Source(pool, soundData);
+}
+
+int Audio::getNumSources() const
+{
+	return pool->getNumSources();
+}
+
+int Audio::getMaxSources() const
+{
+	return pool->getMaxSources();
+}
+
+void Audio::play(love::audio::Source *source)
+{
+	source->play();
+}
+
+void Audio::stop(love::audio::Source *source)
+{
+	source->stop();
+}
+
+void Audio::stop()
+{
+	pool->stop();
+}
+
+void Audio::pause(love::audio::Source *source)
+{
+	source->pause();
+}
+
+void Audio::pause()
+{
+	pool->pause();
+}
+
+void Audio::resume(love::audio::Source *source)
+{
+	source->resume();
+}
+
+void Audio::resume()
+{
+	pool->resume();
+}
+
+void Audio::rewind(love::audio::Source *source)
+{
+	source->rewind();
+}
+
+void Audio::rewind()
+{
+	pool->rewind();
+}
+
+void Audio::setVolume(float volume)
+{
+	alListenerf(AL_GAIN, volume);
+}
+
+float Audio::getVolume() const
+{
+	ALfloat volume;
+	alGetListenerf(AL_GAIN, &volume);
+	return volume;
+}
+
+void Audio::getPosition(float *v) const
+{
+	alGetListenerfv(AL_POSITION, v);
+}
+
+void Audio::setPosition(float *v)
+{
+	alListenerfv(AL_POSITION, v);
+}
+
+void Audio::getOrientation(float *v) const
+{
+	alGetListenerfv(AL_ORIENTATION, v);
+}
+
+void Audio::setOrientation(float *v)
+{
+	alListenerfv(AL_ORIENTATION, v);
+}
+
+void Audio::getVelocity(float *v) const
+{
+	alGetListenerfv(AL_VELOCITY, v);
+}
+
+void Audio::setVelocity(float *v)
+{
+	alListenerfv(AL_VELOCITY, v);
+}
+
+void Audio::record()
+{
+	if (!canRecord()) return;
+	alcCaptureStart(capture);
+}
+
+love::sound::SoundData *Audio::getRecordedData()
+{
+	if (!canRecord())
+		return NULL;
+	int samplerate = 8000;
+	ALCint samples;
+	alcGetIntegerv(capture, ALC_CAPTURE_SAMPLES, 4, &samples);
+	void *data = malloc(samples * (2/sizeof(char)));
+	alcCaptureSamples(capture, data, samples);
+	love::sound::SoundData *sd = new love::sound::SoundData(data, samples, samplerate, 16, 1);
+	free(data);
+	return sd;
+}
+
+love::sound::SoundData *Audio::stopRecording(bool returnData)
+{
+	if (!canRecord())
+		return NULL;
+	love::sound::SoundData *sd = NULL;
+	if (returnData)
+	{
+		sd = getRecordedData();
+	}
+	alcCaptureStop(capture);
+	return sd;
+}
+
+bool Audio::canRecord()
+{
+	return (capture != NULL);
+}
+
+Audio::DistanceModel Audio::getDistanceModel() const
+{
+	return this->distanceModel;
+}
+
+void Audio::setDistanceModel(DistanceModel distanceModel)
+{
+	this->distanceModel = distanceModel;
+
+	switch (distanceModel)
+	{
+	case DISTANCE_NONE:
+		alDistanceModel(AL_NONE);
+		break;
+
+	case DISTANCE_INVERSE:
+		alDistanceModel(AL_INVERSE_DISTANCE);
+		break;
+
+	case DISTANCE_INVERSE_CLAMPED:
+		alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
+		break;
+
+	case DISTANCE_LINEAR:
+		alDistanceModel(AL_LINEAR_DISTANCE);
+		break;
+
+	case DISTANCE_LINEAR_CLAMPED:
+		alDistanceModel(AL_LINEAR_DISTANCE_CLAMPED);
+		break;
+
+	case DISTANCE_EXPONENT:
+		alDistanceModel(AL_EXPONENT_DISTANCE);
+		break;
+
+	case DISTANCE_EXPONENT_CLAMPED:
+		alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED);
+		break;
+
+	default:
+		break;
+	}
+}
+
+} // openal
+} // audio
+} // love

+ 142 - 140
src/modules/audio/openal/Audio.h

@@ -1,140 +1,142 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_OPENAL_AUDIO_H
-#define LOVE_AUDIO_OPENAL_AUDIO_H
-
-// STD
-#include <queue>
-#include <map>
-#include <iostream>
-#include <cmath>
-
-// LOVE
-#include <audio/Audio.h>
-#include <common/config.h>
-#include <sound/SoundData.h>
-
-#include "Source.h"
-#include "Pool.h"
-#include <thread/threads.h>
-
-// OpenAL
-#ifdef LOVE_MACOSX
-#include <OpenAL/alc.h>
-#include <OpenAL/al.h>
-#else
-#include <AL/alc.h>
-#include <AL/al.h>
-#endif
-
-namespace love
-{
-namespace audio
-{
-namespace openal
-{
-	class Audio : public love::audio::Audio
-	{
-	private:
-
-		// The OpenAL device.
-		ALCdevice * device;
-
-		// The OpenAL capture device (microphone).
-		ALCdevice * capture;
-
-		// The OpenAL context.
-		ALCcontext * context;
-
-		// The Pool.
-		Pool * pool;
-
-
-		class PoolThread: public thread::ThreadBase {
-		protected:
-			Pool* pool;
-
-			// Set this to true when the thread should finish.
-			// Main thread will write to this value, and PoolThread
-			// will read from it.
-			volatile bool finish;
-
-			// finish lock
-			thread::Mutex mutex;
-
-			virtual void main();
-
-		public:
-			PoolThread(Pool* pool);
-			void setFinish();
-		};
-
-		PoolThread* poolThread;
-
-		DistanceModel distanceModel;
-
-	public:
-
-		Audio();
-		~Audio();
-
-		// Implements Module.
-		const char * getName() const;
-
-		// Implements Audio.
-		love::audio::Source * newSource(love::sound::Decoder * decoder);
-		love::audio::Source * newSource(love::sound::SoundData * soundData);
-		int getNumSources() const;
-		int getMaxSources() const;
-		void play(love::audio::Source * source);
-		void play();
-		void stop(love::audio::Source * source);
-		void stop();
-		void pause(love::audio::Source * source);
-		void pause();
-		void resume(love::audio::Source * source);
-		void resume();
-		void rewind(love::audio::Source * source);
-		void rewind();
-		void setVolume(float volume);
-		float getVolume() const;
-
-		void getPosition(float * v) const;
-		void setPosition(float * v);
-		void getOrientation(float * v) const;
-		void setOrientation(float * v);
-		void getVelocity(float * v) const;
-		void setVelocity(float * v);
-
-		void record();
-		love::sound::SoundData * getRecordedData();
-		love::sound::SoundData * stopRecording(bool returnData);
-		bool canRecord();
-		
-		DistanceModel getDistanceModel() const;
-		void setDistanceModel(DistanceModel distanceModel);
-	}; // Audio
-
-} // openal
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_OPENAL_AUDIO_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_OPENAL_AUDIO_H
+#define LOVE_AUDIO_OPENAL_AUDIO_H
+
+// STD
+#include <queue>
+#include <map>
+#include <iostream>
+#include <cmath>
+
+// LOVE
+#include "audio/Audio.h"
+#include "common/config.h"
+#include "sound/SoundData.h"
+
+#include "Source.h"
+#include "Pool.h"
+#include "thread/threads.h"
+
+// OpenAL
+#ifdef LOVE_MACOSX
+#include <OpenAL/alc.h>
+#include <OpenAL/al.h>
+#else
+#include <AL/alc.h>
+#include <AL/al.h>
+#endif
+
+namespace love
+{
+namespace audio
+{
+namespace openal
+{
+
+class Audio : public love::audio::Audio
+{
+public:
+
+	Audio();
+	~Audio();
+
+	// Implements Module.
+	const char *getName() const;
+
+	// Implements Audio.
+	love::audio::Source *newSource(love::sound::Decoder *decoder);
+	love::audio::Source *newSource(love::sound::SoundData *soundData);
+	int getNumSources() const;
+	int getMaxSources() const;
+	void play(love::audio::Source *source);
+	void play();
+	void stop(love::audio::Source *source);
+	void stop();
+	void pause(love::audio::Source *source);
+	void pause();
+	void resume(love::audio::Source *source);
+	void resume();
+	void rewind(love::audio::Source *source);
+	void rewind();
+	void setVolume(float volume);
+	float getVolume() const;
+
+	void getPosition(float *v) const;
+	void setPosition(float *v);
+	void getOrientation(float *v) const;
+	void setOrientation(float *v);
+	void getVelocity(float *v) const;
+	void setVelocity(float *v);
+
+	void record();
+	love::sound::SoundData *getRecordedData();
+	love::sound::SoundData *stopRecording(bool returnData);
+	bool canRecord();
+
+	DistanceModel getDistanceModel() const;
+	void setDistanceModel(DistanceModel distanceModel);
+
+private:
+
+	// The OpenAL device.
+	ALCdevice *device;
+
+	// The OpenAL capture device (microphone).
+	ALCdevice *capture;
+
+	// The OpenAL context.
+	ALCcontext *context;
+
+	// The Pool.
+	Pool *pool;
+
+	class PoolThread: public thread::ThreadBase
+	{
+	protected:
+		Pool *pool;
+
+		// Set this to true when the thread should finish.
+		// Main thread will write to this value, and PoolThread
+		// will read from it.
+		volatile bool finish;
+
+		// finish lock
+		thread::Mutex mutex;
+
+		virtual void main();
+
+	public:
+		PoolThread(Pool *pool);
+		void setFinish();
+	};
+
+	PoolThread *poolThread;
+
+	DistanceModel distanceModel;
+
+}; // Audio
+
+} // openal
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_OPENAL_AUDIO_H

+ 293 - 286
src/modules/audio/openal/Pool.cpp

@@ -1,286 +1,293 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Pool.h"
-
-#include "Source.h"
-
-namespace love
-{
-namespace audio
-{
-namespace openal
-{
-	Pool::Pool()
-	{
-		// Generate sources.
-		alGenSources(NUM_SOURCES, sources);
-
-		// Create the mutex.
-		mutex = new thread::Mutex();
-
-		if (alGetError() != AL_NO_ERROR)
-			throw love::Exception("Could not generate sources.");
-
-		// Make all sources available initially.
-		for (int i = 0; i < NUM_SOURCES; i++)
-			available.push(sources[i]);
-	}
-
-	Pool::~Pool()
-	{
-		stop();
-
-		delete mutex;
-
-		// Free all sources.
-		alDeleteSources(NUM_SOURCES, sources);
-	}
-
-	bool Pool::isAvailable() const
-	{
-		bool has = false;
-		{
-			thread::Lock lock(mutex);
-			has = !available.empty();
-		}
-		return has;
-	}
-
-	bool Pool::isPlaying(Source * s)
-	{
-		bool p = false;
-		{
-			thread::Lock lock(mutex);
-			for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
-			{
-				if (i->first == s)
-					p = true;
-			}
-		}
-		return p;
-	}
-
-	void Pool::update()
-	{
-		thread::Lock lock(mutex);
-
-		std::map<Source *, ALuint>::iterator i = playing.begin();
-
-		while (i != playing.end())
-		{
-			if (!i->first->update())
-			{
-				i->first->stopAtomic();
-				i->first->rewindAtomic();
-				i->first->release();
-				available.push(i->second);
-				playing.erase(i++);
-			}
-			else
-				i++;
-		}
-	}
-
-	int Pool::getNumSources() const
-	{
-		return playing.size();
-	}
-
-	int Pool::getMaxSources() const
-	{
-		return NUM_SOURCES;
-	}
-
-	bool Pool::play(Source * source, ALuint & out)
-	{
-		bool ok;
-		out = 0;
-
-		thread::Lock lock(mutex);
-
-		bool alreadyPlaying = findSource(source, out);
-
-		if (!alreadyPlaying)
-		{
-			// Try to play.
-			if (!available.empty())
-			{
-				// Get the first available source.
-				out = available.front();
-
-				// Remove it.
-				available.pop();
-
-				// Insert into map of playing sources.
-				playing.insert(std::pair<Source *, ALuint>(source, out));
-
-				source->retain();
-
-				source->playAtomic();
-
-				ok = true;
-			}
-			else
-			{
-				ok = false;
-			}
-		}
-		else
-		{
-			ok = true;
-		}
-
-		return ok;
-	}
-
-	void Pool::stop()
-	{
-		thread::Lock lock(mutex);
-		for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
-		{
-			i->first->stopAtomic();
-			i->first->release();
-			available.push(i->second);
-		}
-
-		playing.clear();
-	}
-
-	void Pool::stop(Source * source)
-	{
-		thread::Lock lock(mutex);
-		removeSource(source);
-	}
-
-	void Pool::pause()
-	{
-		thread::Lock lock(mutex);
-		for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
-			i->first->pauseAtomic();
-	}
-
-	void Pool::pause(Source * source)
-	{
-		thread::Lock lock(mutex);
-		ALuint out;
-		if (findSource(source, out))
-			source->pauseAtomic();
-	}
-
-	void Pool::resume()
-	{
-		thread::Lock lock(mutex);
-		for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
-			i->first->resumeAtomic();
-	}
-
-	void Pool::resume(Source * source)
-	{
-		thread::Lock lock(mutex);
-		ALuint out;
-		if (findSource(source, out))
-			source->resumeAtomic();
-	}
-
-	void Pool::rewind()
-	{
-		thread::Lock lock(mutex);
-		for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
-			i->first->rewindAtomic();
-	}
-
-	// For those times we don't need it backed.
-	void Pool::softRewind(Source * source)
-	{
-		thread::Lock lock(mutex);
-		source->rewindAtomic();
-	}
-
-	void Pool::rewind(Source * source)
-	{
-		thread::Lock lock(mutex);
-		source->rewindAtomic();
-	}
-
-	void Pool::release(Source * source)
-	{
-		ALuint s = findi(source);
-
-		if (s != 0)
-		{
-			available.push(s);
-			playing.erase(source);
-		}
-	}
-
-	void Pool::seek(Source * source, float offset, void * unit)
-	{
-		thread::Lock lock(mutex);
-		return source->seekAtomic(offset, unit);
-	}
-
-	float Pool::tell(Source * source, void * unit)
-	{
-		thread::Lock lock(mutex);
-		return source->tellAtomic(unit);
-	}
-
-	ALuint Pool::findi(const Source * source) const
-	{
-		std::map<Source *, ALuint>::const_iterator i = playing.find((Source *)source);
-
-		if (i != playing.end())
-			return i->second;
-
-		return 0;
-	}
-
-	bool Pool::findSource(Source * source, ALuint & out)
-	{
-		std::map<Source *, ALuint>::const_iterator i = playing.find((Source *)source);
-
-		bool found = i != playing.end();
-
-		if (found)
-			out = i->second;
-
-		return found;
-	}
-
-	bool Pool::removeSource(Source * source)
-	{
-		std::map<Source *, ALuint>::iterator i = playing.find((Source *)source);
-
-		if (i != playing.end())
-		{
-			source->stopAtomic();
-			available.push(i->second);
-			playing.erase(i++);
-			source->release();
-			return true;
-		}
-
-		return false;
-	}
-
-} // openal
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Pool.h"
+
+#include "Source.h"
+
+namespace love
+{
+namespace audio
+{
+namespace openal
+{
+
+Pool::Pool()
+{
+	// Generate sources.
+	alGenSources(NUM_SOURCES, sources);
+
+	// Create the mutex.
+	mutex = new thread::Mutex();
+
+	if (alGetError() != AL_NO_ERROR)
+		throw love::Exception("Could not generate sources.");
+
+	// Make all sources available initially.
+	for (int i = 0; i < NUM_SOURCES; i++)
+	{
+#ifdef AL_DIRECT_CHANNELS_SOFT
+		// Bypassing virtualization of speakers for multi-channel sources in OpenAL Soft.
+		alSourcei(sources[i], AL_DIRECT_CHANNELS_SOFT, AL_TRUE);
+#endif
+		available.push(sources[i]);
+	}
+}
+
+Pool::~Pool()
+{
+	stop();
+
+	delete mutex;
+
+	// Free all sources.
+	alDeleteSources(NUM_SOURCES, sources);
+}
+
+bool Pool::isAvailable() const
+{
+	bool has = false;
+	{
+		thread::Lock lock(mutex);
+		has = !available.empty();
+	}
+	return has;
+}
+
+bool Pool::isPlaying(Source *s)
+{
+	bool p = false;
+	{
+		thread::Lock lock(mutex);
+		for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
+		{
+			if (i->first == s)
+				p = true;
+		}
+	}
+	return p;
+}
+
+void Pool::update()
+{
+	thread::Lock lock(mutex);
+
+	std::map<Source *, ALuint>::iterator i = playing.begin();
+
+	while (i != playing.end())
+	{
+		if (!i->first->update())
+		{
+			i->first->stopAtomic();
+			i->first->rewindAtomic();
+			i->first->release();
+			available.push(i->second);
+			playing.erase(i++);
+		}
+		else
+			i++;
+	}
+}
+
+int Pool::getNumSources() const
+{
+	return playing.size();
+}
+
+int Pool::getMaxSources() const
+{
+	return NUM_SOURCES;
+}
+
+bool Pool::play(Source *source, ALuint &out)
+{
+	bool ok;
+	out = 0;
+
+	thread::Lock lock(mutex);
+
+	bool alreadyPlaying = findSource(source, out);
+
+	if (!alreadyPlaying)
+	{
+		// Try to play.
+		if (!available.empty())
+		{
+			// Get the first available source.
+			out = available.front();
+
+			// Remove it.
+			available.pop();
+
+			// Insert into map of playing sources.
+			playing.insert(std::pair<Source *, ALuint>(source, out));
+
+			source->retain();
+
+			source->playAtomic();
+
+			ok = true;
+		}
+		else
+		{
+			ok = false;
+		}
+	}
+	else
+	{
+		ok = true;
+	}
+
+	return ok;
+}
+
+void Pool::stop()
+{
+	thread::Lock lock(mutex);
+	for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
+	{
+		i->first->stopAtomic();
+		i->first->release();
+		available.push(i->second);
+	}
+
+	playing.clear();
+}
+
+void Pool::stop(Source *source)
+{
+	thread::Lock lock(mutex);
+	removeSource(source);
+}
+
+void Pool::pause()
+{
+	thread::Lock lock(mutex);
+	for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
+		i->first->pauseAtomic();
+}
+
+void Pool::pause(Source *source)
+{
+	thread::Lock lock(mutex);
+	ALuint out;
+	if (findSource(source, out))
+		source->pauseAtomic();
+}
+
+void Pool::resume()
+{
+	thread::Lock lock(mutex);
+	for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
+		i->first->resumeAtomic();
+}
+
+void Pool::resume(Source *source)
+{
+	thread::Lock lock(mutex);
+	ALuint out;
+	if (findSource(source, out))
+		source->resumeAtomic();
+}
+
+void Pool::rewind()
+{
+	thread::Lock lock(mutex);
+	for (std::map<Source *, ALuint>::iterator i = playing.begin(); i != playing.end(); i++)
+		i->first->rewindAtomic();
+}
+
+// For those times we don't need it backed.
+void Pool::softRewind(Source *source)
+{
+	thread::Lock lock(mutex);
+	source->rewindAtomic();
+}
+
+void Pool::rewind(Source *source)
+{
+	thread::Lock lock(mutex);
+	source->rewindAtomic();
+}
+
+void Pool::release(Source *source)
+{
+	ALuint s = findi(source);
+
+	if (s != 0)
+	{
+		available.push(s);
+		playing.erase(source);
+	}
+}
+
+void Pool::seek(Source *source, float offset, void *unit)
+{
+	thread::Lock lock(mutex);
+	return source->seekAtomic(offset, unit);
+}
+
+float Pool::tell(Source *source, void *unit)
+{
+	thread::Lock lock(mutex);
+	return source->tellAtomic(unit);
+}
+
+ALuint Pool::findi(const Source *source) const
+{
+	std::map<Source *, ALuint>::const_iterator i = playing.find((Source *)source);
+
+	if (i != playing.end())
+		return i->second;
+
+	return 0;
+}
+
+bool Pool::findSource(Source *source, ALuint &out)
+{
+	std::map<Source *, ALuint>::const_iterator i = playing.find((Source *)source);
+
+	bool found = i != playing.end();
+
+	if (found)
+		out = i->second;
+
+	return found;
+}
+
+bool Pool::removeSource(Source *source)
+{
+	std::map<Source *, ALuint>::iterator i = playing.find((Source *)source);
+
+	if (i != playing.end())
+	{
+		source->stopAtomic();
+		available.push(i->second);
+		playing.erase(i++);
+		source->release();
+		return true;
+	}
+
+	return false;
+}
+
+} // openal
+} // audio
+} // love

+ 124 - 125
src/modules/audio/openal/Pool.h

@@ -1,125 +1,124 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_OPENAL_POOL_H
-#define LOVE_AUDIO_OPENAL_POOL_H
-
-// STD
-#include <queue>
-#include <map>
-#include <iostream>
-#include <cmath>
-
-// LOVE
-#include <common/config.h>
-#include <common/Exception.h>
-#include <thread/threads.h>
-
-// OpenAL
-#ifdef LOVE_MACOSX
-#include <OpenAL/alc.h>
-#include <OpenAL/al.h>
-#else
-#include <AL/alc.h>
-#include <AL/al.h>
-#endif
-
-namespace love
-{
-namespace audio
-{
-namespace openal
-{
-
-	class Source;
-
-	class Pool
-	{
-	private:
-
-		// Number of OpenAL sources.
-		static const int NUM_SOURCES = 64;
-
-		// OpenAL sources
-		ALuint sources[NUM_SOURCES];
-
-		// A queue of available sources.
-		std::queue<ALuint> available;
-
-		// A map of playing sources.
-		std::map<Source *, ALuint> playing;
-
-		// Only one thread can access this object at the same time. This mutex will
-		// make sure of that.
-		thread::Mutex* mutex;
-
-	public:
-
-		Pool();
-		~Pool();
-
-		/**
-		* Checks whether an OpenAL source is available.
-		* @return True if at least one is available, false otherwise.
-		**/
-		bool isAvailable() const;
-
-		/**
-		* Checks whether a Source is currently in the playing list.
-		**/
-		bool isPlaying(Source * s);
-
-		void update();
-
-		int getNumSources() const;
-		int getMaxSources() const;
-
-		bool play(Source * source, ALuint & out);
-		void stop();
-		void stop(Source * source);
-		void pause();
-		void pause(Source * source);
-		void resume();
-		void resume(Source * source);
-		void rewind();
-		void rewind(Source * source);
-		void softRewind(Source * source);
-		void seek(Source * source, float offset, void * unit);
-		float tell(Source * source, void * unit);
-
-	private:
-
-		/**
-		* Makes the specified OpenAL source available for use.
-		* @param source The OpenAL source.
-		**/
-		void release(Source * source);
-
-		ALuint findi(const Source * source) const;
-
-		bool findSource(Source * source, ALuint & out);
-		bool removeSource(Source * source);
-	}; // Pool
-
-} // openal
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_OPENAL_POOL_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_OPENAL_POOL_H
+#define LOVE_AUDIO_OPENAL_POOL_H
+
+// STD
+#include <queue>
+#include <map>
+#include <iostream>
+#include <cmath>
+
+// LOVE
+#include "common/config.h"
+#include "common/Exception.h"
+#include "thread/threads.h"
+
+// OpenAL
+#ifdef LOVE_MACOSX
+#include <OpenAL/alc.h>
+#include <OpenAL/al.h>
+#else
+#include <AL/alc.h>
+#include <AL/al.h>
+#include <AL/alext.h>
+#endif
+
+namespace love
+{
+namespace audio
+{
+namespace openal
+{
+
+class Source;
+
+class Pool
+{
+public:
+
+	Pool();
+	~Pool();
+
+	/**
+	 * Checks whether an OpenAL source is available.
+	 * @return True if at least one is available, false otherwise.
+	 **/
+	bool isAvailable() const;
+
+	/**
+	 * Checks whether a Source is currently in the playing list.
+	 **/
+	bool isPlaying(Source *s);
+
+	void update();
+
+	int getNumSources() const;
+	int getMaxSources() const;
+
+	bool play(Source *source, ALuint &out);
+	void stop();
+	void stop(Source *source);
+	void pause();
+	void pause(Source *source);
+	void resume();
+	void resume(Source *source);
+	void rewind();
+	void rewind(Source *source);
+	void softRewind(Source *source);
+	void seek(Source *source, float offset, void *unit);
+	float tell(Source *source, void *unit);
+
+private:
+
+	/**
+	 * Makes the specified OpenAL source available for use.
+	 * @param source The OpenAL source.
+	 **/
+	void release(Source *source);
+
+	ALuint findi(const Source *source) const;
+
+	bool findSource(Source *source, ALuint &out);
+	bool removeSource(Source *source);
+	// Number of OpenAL sources.
+	static const int NUM_SOURCES = 64;
+
+	// OpenAL sources
+	ALuint sources[NUM_SOURCES];
+
+	// A queue of available sources.
+	std::queue<ALuint> available;
+
+	// A map of playing sources.
+	std::map<Source *, ALuint> playing;
+
+	// Only one thread can access this object at the same time. This mutex will
+	// make sure of that.
+	thread::Mutex *mutex;
+
+}; // Pool
+
+} // openal
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_OPENAL_POOL_H

+ 724 - 698
src/modules/audio/openal/Source.cpp

@@ -1,698 +1,724 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Source.h"
-
-#include "Pool.h"
-
-// STD
-#include <iostream>
-#include <float.h>
-
-namespace love
-{
-namespace audio
-{
-namespace openal
-{
-
-	Source::Source(Pool * pool, love::sound::SoundData * soundData)
-		: love::audio::Source(Source::TYPE_STATIC), pool(pool), valid(false),
-		pitch(1.0f), volume(1.0f), looping(false), paused(false), minVolume(0.0f),
-		maxVolume(1.0f), referenceDistance(1.0f), rolloffFactor(1.0f), maxDistance(FLT_MAX),
-		offsetSamples(0), offsetSeconds(0), decoder(0), toLoop(0)
-	{
-		alGenBuffers(1, buffers);
-		ALenum fmt = getFormat(soundData->getChannels(), soundData->getBits());
-		alBufferData(buffers[0], fmt, soundData->getData(), soundData->getSize(), soundData->getSampleRate());
-
-		static float z[3] = {0, 0, 0};
-
-		setFloatv(position, z);
-		setFloatv(velocity, z);
-		setFloatv(direction, z);
-	}
-
-	Source::Source(Pool * pool, love::sound::Decoder * decoder)
-		: love::audio::Source(Source::TYPE_STREAM), pool(pool), valid(false),
-		pitch(1.0f), volume(1.0f), looping(false), paused(false), minVolume(0.0f),
-		maxVolume(1.0f), referenceDistance(1.0f), rolloffFactor(1.0f), maxDistance(FLT_MAX),
-		offsetSamples(0), offsetSeconds(0), decoder(decoder), toLoop(0)
-	{
-		decoder->retain();
-		alGenBuffers(MAX_BUFFERS, buffers);
-
-		static float z[3] = {0, 0, 0};
-
-		setFloatv(position, z);
-		setFloatv(velocity, z);
-		setFloatv(direction, z);
-	}
-
-	Source::~Source()
-	{
-		if (valid)
-			pool->stop(this);
-		alDeleteBuffers((type == TYPE_STATIC) ? 1 : MAX_BUFFERS, buffers);
-		if (decoder)
-			decoder->release();
-	}
-
-	love::audio::Source * Source::copy()
-	{
-		return 0;
-	}
-
-	void Source::play()
-	{
-		if (valid && paused)
-		{
-			pool->resume(this);
-			return;
-		}
-
-		valid = pool->play(this, source);
-
-		if (valid)
-			reset(source);
-	}
-
-	void Source::stop()
-	{
-		if (!isStopped())
-		{
-			pool->stop(this);
-			pool->softRewind(this);
-		}
-	}
-
-	void Source::pause()
-	{
-		pool->pause(this);
-	}
-
-	void Source::resume()
-	{
-		pool->resume(this);
-	}
-
-	void Source::rewind()
-	{
-		pool->rewind(this);
-	}
-
-	bool Source::isStopped() const
-	{
-		if (valid)
-		{
-			ALenum state;
-			alGetSourcei(source, AL_SOURCE_STATE, &state);
-			return (state == AL_STOPPED);
-		}
-
-		return true;
-	}
-
-	bool Source::isPaused() const
-	{
-		if (valid)
-		{
-			ALenum state;
-			alGetSourcei(source, AL_SOURCE_STATE, &state);
-			return (state == AL_PAUSED);
-		}
-
-		return false;
-	}
-
-	bool Source::isFinished() const
-	{
-		return type == TYPE_STATIC ? isStopped() : isStopped() && !isLooping() && decoder->isFinished();
-	}
-
-	bool Source::update()
-	{
-		if (!valid)
-			return false;
-		if (type == TYPE_STATIC)
-		{
-			// Looping mode could have changed.
-			alSourcei(source, AL_LOOPING, isLooping() ? AL_TRUE : AL_FALSE);
-			return !isStopped();
-		}
-		else if (type == TYPE_STREAM && (isLooping() || !isFinished()))
-		{
-			// Number of processed buffers.
-			ALint processed;
-
-			alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
-
-			while (processed--)
-			{
-				ALuint buffer;
-
-				float curOffsetSamples, curOffsetSecs;
-
-				alGetSourcef(source, AL_SAMPLE_OFFSET, &curOffsetSamples);
-
-				ALint b;
-				alGetSourcei(source, AL_BUFFER, &b);
-				int freq;
-				alGetBufferi(b, AL_FREQUENCY, &freq);
-				curOffsetSecs = curOffsetSamples / freq;
-
-				// Get a free buffer.
-				alSourceUnqueueBuffers(source, 1, &buffer);
-
-				float newOffsetSamples, newOffsetSecs;
-
-				alGetSourcef(source, AL_SAMPLE_OFFSET, &newOffsetSamples);
-				newOffsetSecs = newOffsetSamples / freq;
-
-				offsetSamples += (curOffsetSamples - newOffsetSamples);
-				offsetSeconds += (curOffsetSecs - newOffsetSecs);
-
-				streamAtomic(buffer, decoder);
-				alSourceQueueBuffers(source, 1, &buffer);
-			}
-			return true;
-		}
-		return false;
-	}
-
-	void Source::setPitch(float pitch)
-	{
-		if (valid)
-			alSourcef(source, AL_PITCH, pitch);
-
-		this->pitch = pitch;
-	}
-
-	float Source::getPitch() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_PITCH, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return pitch;
-	}
-
-	void Source::setVolume(float volume)
-	{
-		if (valid)
-		{
-			alSourcef(source, AL_GAIN, volume);
-		}
-
-		this->volume = volume;
-	}
-
-	float Source::getVolume() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_GAIN, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return volume;
-	}
-
-	void Source::seekAtomic(float offset, void * unit)
-	{
-		if (valid)
-		{
-			switch (*((Source::Unit*) unit)) {
-				case Source::UNIT_SAMPLES:
-					if (type == TYPE_STREAM)
-					{
-						offsetSamples = offset;
-						ALint buffer;
-						alGetSourcei(source, AL_BUFFER, &buffer);
-						int freq;
-						alGetBufferi(buffer, AL_FREQUENCY, &freq);
-						offset /= freq;
-						offsetSeconds = offset;
-						decoder->seek(offset);
-					}
-					else
-					{
-						alSourcef(source, AL_SAMPLE_OFFSET, offset);
-					}
-					break;
-				case Source::UNIT_SECONDS:
-				default:
-					if (type == TYPE_STREAM)
-					{
-						offsetSeconds = offset;
-						decoder->seek(offset);
-						ALint buffer;
-						alGetSourcei(source, AL_BUFFER, &buffer);
-						int freq;
-						alGetBufferi(buffer, AL_FREQUENCY, &freq);
-						offsetSamples = offset*freq;
-					}
-					else
-					{
-						alSourcef(source, AL_SEC_OFFSET, offset);
-					}
-					break;
-			}
-			if (type == TYPE_STREAM)
-			{
-				bool waspaused = paused;
-				// Because we still have old data
-				// from before the seek in the buffers
-				// let's empty them.
-				stopAtomic();
-				playAtomic();
-				if (waspaused)
-					pauseAtomic();
-			}
-		}
-	}
-
-	void Source::seek(float offset, Source::Unit unit)
-	{
-		return pool->seek(this, offset, &unit);
-	}
-
-	float Source::tellAtomic(void * unit) const
-	{
-		if (valid)
-		{
-			float offset;
-			switch (*((Source::Unit*) unit)) {
-				case Source::UNIT_SAMPLES:
-					alGetSourcef(source, AL_SAMPLE_OFFSET, &offset);
-					if (type == TYPE_STREAM) offset += offsetSamples;
-					break;
-				case Source::UNIT_SECONDS:
-				default:
-					alGetSourcef(source, AL_SAMPLE_OFFSET, &offset);
-					ALint buffer;
-					alGetSourcei(source, AL_BUFFER, &buffer);
-					int freq;
-					alGetBufferi(buffer, AL_FREQUENCY, &freq);
-					offset /= freq;
-					if (type == TYPE_STREAM) offset += offsetSeconds;
-					break;
-			}
-			return offset;
-		}
-		return 0.0f;
-	}
-
-	float Source::tell(Source::Unit unit)
-	{
-		return pool->tell(this, &unit);
-	}
-
-	void Source::setPosition(float * v)
-	{
-		if (valid)
-			alSourcefv(source, AL_POSITION, v);
-
-		setFloatv(position, v);
-	}
-
-	void Source::getPosition(float * v) const
-	{
-		if (valid)
-			alGetSourcefv(source, AL_POSITION, v);
-		else
-			setFloatv(v, position);
-	}
-
-	void Source::setVelocity(float * v)
-	{
-		if (valid)
-			alSourcefv(source, AL_VELOCITY, v);
-
-		setFloatv(velocity, v);
-	}
-
-	void Source::getVelocity(float * v) const
-	{
-		if (valid)
-			alGetSourcefv(source, AL_VELOCITY, v);
-		else
-			setFloatv(v, velocity);
-	}
-
-	void Source::setDirection(float * v)
-	{
-		if (valid)
-			alSourcefv(source, AL_DIRECTION, v);
-		else
-			setFloatv(direction, v);
-	}
-
-	void Source::getDirection(float * v) const
-	{
-		if (valid)
-			alGetSourcefv(source, AL_DIRECTION, v);
-		else
-			setFloatv(v, direction);
-	}
-
-	void Source::setLooping(bool looping)
-	{
-		if (valid && type == TYPE_STATIC)
-			alSourcei(source, AL_LOOPING, looping ? AL_TRUE : AL_FALSE);
-
-		this->looping = looping;
-	}
-
-	bool Source::isLooping() const
-	{
-		return looping;
-	}
-
-	void Source::playAtomic()
-	{
-		if (type == TYPE_STATIC)
-		{
-			alSourcei(source, AL_BUFFER, buffers[0]);
-		}
-		else if (type == TYPE_STREAM)
-		{
-			int usedBuffers = 0;
-
-			for (unsigned int i = 0; i < MAX_BUFFERS; i++)
-			{
-				streamAtomic(buffers[i], decoder);
-				++usedBuffers;
-				if (decoder->isFinished())
-					break;
-			}
-
-			if (usedBuffers > 0)
-				alSourceQueueBuffers(source, usedBuffers, buffers);
-		}
-
-		// Set these properties. These may have changed while we've
-		// been without an AL source.
-		alSourcef(source, AL_PITCH, pitch);
-		alSourcef(source, AL_GAIN, volume);
-		alSourcef(source, AL_MIN_GAIN, minVolume);
-		alSourcef(source, AL_MAX_GAIN, maxVolume);
-		alSourcef(source, AL_REFERENCE_DISTANCE, referenceDistance);
-		alSourcef(source, AL_ROLLOFF_FACTOR, rolloffFactor);
-		alSourcef(source, AL_MAX_DISTANCE, maxDistance);
-
-		alSourcePlay(source);
-
-		valid = true; //if it fails it will be set to false again
-		//but this prevents a horrible, horrible bug
-	}
-
-	void Source::stopAtomic()
-	{
-		if (valid)
-		{
-			if (type == TYPE_STATIC)
-			{
-				alSourceStop(source);
-			}
-			else if (type == TYPE_STREAM)
-			{
-				alSourceStop(source);
-				int queued = 0;
-				alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
-
-				while (queued--)
-				{
-					ALuint buffer;
-					alSourceUnqueueBuffers(source, 1, &buffer);
-				}
-			}
-			alSourcei(source, AL_BUFFER, AL_NONE);
-		}
-		toLoop = 0;
-		valid = false;
-	}
-
-	void Source::pauseAtomic()
-	{
-		if (valid)
-		{
-			alSourcePause(source);
-			paused = true;
-		}
-	}
-
-	void Source::resumeAtomic()
-	{
-		if (valid && paused)
-		{
-			alSourcePlay(source);
-			paused = false;
-		}
-	}
-
-	void Source::rewindAtomic()
-	{
-		if (valid && type == TYPE_STATIC)
-		{
-			alSourceRewind(source);
-			if (!paused)
-				alSourcePlay(source);
-		}
-		else if (valid && type == TYPE_STREAM)
-		{
-			bool waspaused = paused;
-			decoder->rewind();
-			// Because we still have old data
-			// from before the seek in the buffers
-			// let's empty them.
-			stopAtomic();
-			playAtomic();
-			if (waspaused)
-				pauseAtomic();
-			offsetSamples = 0;
-			offsetSeconds = 0;
-		}
-		else if (type == TYPE_STREAM)
-		{
-			decoder->rewind();
-			offsetSamples = 0;
-			offsetSeconds = 0;
-		}
-	}
-
-	void Source::reset(ALenum source)
-	{
-		alSourcefv(source, AL_POSITION, position);
-		alSourcefv(source, AL_VELOCITY, velocity);
-		alSourcefv(source, AL_DIRECTION, direction);
-		alSourcef(source, AL_PITCH, pitch);
-		alSourcef(source, AL_GAIN, volume);
-		alSourcef(source, AL_MIN_GAIN, minVolume);
-		alSourcef(source, AL_MAX_GAIN, maxVolume);
-		alSourcef(source, AL_REFERENCE_DISTANCE, referenceDistance);
-		alSourcef(source, AL_ROLLOFF_FACTOR, rolloffFactor);
-		alSourcef(source, AL_MAX_DISTANCE, maxDistance);
-	}
-
-	void Source::setFloatv(float * dst, const float * src) const
-	{
-		dst[0] = src[0];
-		dst[1] = src[1];
-		dst[2] = src[2];
-	}
-
-	ALenum Source::getFormat(int channels, int bits) const
-	{
-		if (channels == 1 && bits == 8)
-			return AL_FORMAT_MONO8;
-		else if (channels == 1 && bits == 16)
-			return AL_FORMAT_MONO16;
-		else if (channels == 2 && bits == 8)
-			return AL_FORMAT_STEREO8;
-		else if (channels == 2 && bits == 16)
-			return AL_FORMAT_STEREO16;
-		else
-			return 0;
-	}
-
-	int Source::streamAtomic(ALuint buffer, love::sound::Decoder * d)
-	{
-		// Get more sound data.
-		int decoded = d->decode();
-
-		int fmt = getFormat(d->getChannels(), d->getBits());
-
-		if (fmt != 0)
-			alBufferData(buffer, fmt, d->getBuffer(), decoded, d->getSampleRate());
-
-		if (decoder->isFinished() && isLooping())
-		{
-			int queued, processed;
-			alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
-			alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
-			if (queued > processed)
-				toLoop = queued-processed;
-			else
-				toLoop = MAX_BUFFERS-processed;
-			d->rewind();
-		}
-
-		if (toLoop > 0)
-		{
-			if (--toLoop == 0)
-			{
-				offsetSamples = 0;
-				offsetSeconds = 0;
-			}
-		}
-
-		return decoded;
-	}
-
-	bool Source::isStatic() const
-	{
-		return (type == TYPE_STATIC);
-	}
-	
-	void Source::setMinVolume(float volume)
-	{
-		if (valid)
-		{
-			alSourcef(source, AL_MIN_GAIN, volume);
-		}
-
-		this->minVolume = volume;
-	}
-
-	float Source::getMinVolume() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_MIN_GAIN, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return this->minVolume;
-	}
-
-	void Source::setMaxVolume(float volume)
-	{
-		if (valid)
-		{
-			alSourcef(source, AL_MAX_GAIN, volume);
-		}
-
-		this->maxVolume = volume;
-	}
-
-	float Source::getMaxVolume() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_MAX_GAIN, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return this->maxVolume;
-	}
-
-	void Source::setReferenceDistance(float distance)
-	{
-		if (valid)
-		{
-			alSourcef(source, AL_REFERENCE_DISTANCE, distance);
-		}
-
-		this->referenceDistance = distance;
-	}
-
-	float Source::getReferenceDistance() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_REFERENCE_DISTANCE, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return this->referenceDistance;
-	}
-
-	void Source::setRolloffFactor(float factor)
-	{
-		if (valid)
-		{
-			alSourcef(source, AL_ROLLOFF_FACTOR, factor);
-		}
-
-		this->rolloffFactor = factor;
-	}
-
-	float Source::getRolloffFactor() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_ROLLOFF_FACTOR, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return this->rolloffFactor;
-	}
-
-	void Source::setMaxDistance(float distance)
-	{
-		if (valid)
-		{
-			alSourcef(source, AL_MAX_DISTANCE, distance);
-		}
-
-		this->maxDistance = distance;
-	}
-
-	float Source::getMaxDistance() const
-	{
-		if (valid)
-		{
-			ALfloat f;
-			alGetSourcef(source, AL_MAX_DISTANCE, &f);
-			return f;
-		}
-
-		// In case the Source isn't playing.
-		return this->maxDistance;
-	}
-
-} // openal
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Source.h"
+
+#include "Pool.h"
+
+// STD
+#include <iostream>
+#include <float.h>
+
+namespace love
+{
+namespace audio
+{
+namespace openal
+{
+
+Source::Source(Pool *pool, love::sound::SoundData *soundData)
+	: love::audio::Source(Source::TYPE_STATIC)
+	, pool(pool)
+	, valid(false)
+	, pitch(1.0f)
+	, volume(1.0f)
+	, looping(false)
+	, paused(false)
+	, minVolume(0.0f)
+	, maxVolume(1.0f)
+	, referenceDistance(1.0f)
+	, rolloffFactor(1.0f)
+	, maxDistance(FLT_MAX)
+	, offsetSamples(0)
+	, offsetSeconds(0)
+	, decoder(0)
+	, toLoop(0)
+{
+	alGenBuffers(1, buffers);
+	ALenum fmt = getFormat(soundData->getChannels(), soundData->getBits());
+	alBufferData(buffers[0], fmt, soundData->getData(), soundData->getSize(), soundData->getSampleRate());
+
+	static float z[3] = {0, 0, 0};
+
+	setFloatv(position, z);
+	setFloatv(velocity, z);
+	setFloatv(direction, z);
+}
+
+Source::Source(Pool *pool, love::sound::Decoder *decoder)
+	: love::audio::Source(Source::TYPE_STREAM)
+	, pool(pool)
+	, valid(false)
+	, pitch(1.0f)
+	, volume(1.0f)
+	, looping(false)
+	, paused(false)
+	, minVolume(0.0f)
+	, maxVolume(1.0f)
+	, referenceDistance(1.0f)
+	, rolloffFactor(1.0f)
+	, maxDistance(FLT_MAX)
+	, offsetSamples(0)
+	, offsetSeconds(0)
+	, decoder(decoder)
+	, toLoop(0)
+{
+	decoder->retain();
+	alGenBuffers(MAX_BUFFERS, buffers);
+
+	static float z[3] = {0, 0, 0};
+
+	setFloatv(position, z);
+	setFloatv(velocity, z);
+	setFloatv(direction, z);
+}
+
+Source::~Source()
+{
+	if (valid)
+		pool->stop(this);
+	alDeleteBuffers((type == TYPE_STATIC) ? 1 : MAX_BUFFERS, buffers);
+	if (decoder)
+		decoder->release();
+}
+
+love::audio::Source *Source::copy()
+{
+	return 0;
+}
+
+void Source::play()
+{
+	if (valid && paused)
+	{
+		pool->resume(this);
+		return;
+	}
+
+	valid = pool->play(this, source);
+
+	if (valid)
+		reset(source);
+}
+
+void Source::stop()
+{
+	if (!isStopped())
+	{
+		pool->stop(this);
+		pool->softRewind(this);
+	}
+}
+
+void Source::pause()
+{
+	pool->pause(this);
+}
+
+void Source::resume()
+{
+	pool->resume(this);
+}
+
+void Source::rewind()
+{
+	pool->rewind(this);
+}
+
+bool Source::isStopped() const
+{
+	if (valid)
+	{
+		ALenum state;
+		alGetSourcei(source, AL_SOURCE_STATE, &state);
+		return (state == AL_STOPPED);
+	}
+
+	return true;
+}
+
+bool Source::isPaused() const
+{
+	if (valid)
+	{
+		ALenum state;
+		alGetSourcei(source, AL_SOURCE_STATE, &state);
+		return (state == AL_PAUSED);
+	}
+
+	return false;
+}
+
+bool Source::isFinished() const
+{
+	return type == TYPE_STATIC ? isStopped() : isStopped() && !isLooping() && decoder->isFinished();
+}
+
+bool Source::update()
+{
+	if (!valid)
+		return false;
+	if (type == TYPE_STATIC)
+	{
+		// Looping mode could have changed.
+		alSourcei(source, AL_LOOPING, isLooping() ? AL_TRUE : AL_FALSE);
+		return !isStopped();
+	}
+	else if (type == TYPE_STREAM && (isLooping() || !isFinished()))
+	{
+		// Number of processed buffers.
+		ALint processed = 0;
+
+		alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
+
+		while (processed--)
+		{
+			ALuint buffer;
+
+			float curOffsetSamples, curOffsetSecs;
+
+			alGetSourcef(source, AL_SAMPLE_OFFSET, &curOffsetSamples);
+
+			ALint b;
+			alGetSourcei(source, AL_BUFFER, &b);
+			int freq;
+			alGetBufferi(b, AL_FREQUENCY, &freq);
+			curOffsetSecs = curOffsetSamples / freq;
+
+			// Get a free buffer.
+			alSourceUnqueueBuffers(source, 1, &buffer);
+
+			float newOffsetSamples, newOffsetSecs;
+
+			alGetSourcef(source, AL_SAMPLE_OFFSET, &newOffsetSamples);
+			newOffsetSecs = newOffsetSamples / freq;
+
+			offsetSamples += (curOffsetSamples - newOffsetSamples);
+			offsetSeconds += (curOffsetSecs - newOffsetSecs);
+
+			streamAtomic(buffer, decoder);
+			alSourceQueueBuffers(source, 1, &buffer);
+		}
+		return true;
+	}
+	return false;
+}
+
+void Source::setPitch(float pitch)
+{
+	if (valid)
+		alSourcef(source, AL_PITCH, pitch);
+
+	this->pitch = pitch;
+}
+
+float Source::getPitch() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_PITCH, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return pitch;
+}
+
+void Source::setVolume(float volume)
+{
+	if (valid)
+	{
+		alSourcef(source, AL_GAIN, volume);
+	}
+
+	this->volume = volume;
+}
+
+float Source::getVolume() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_GAIN, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return volume;
+}
+
+void Source::seekAtomic(float offset, void *unit)
+{
+	if (valid)
+	{
+		switch (*((Source::Unit *) unit))
+		{
+		case Source::UNIT_SAMPLES:
+			if (type == TYPE_STREAM)
+			{
+				offsetSamples = offset;
+				ALint buffer;
+				alGetSourcei(source, AL_BUFFER, &buffer);
+				int freq;
+				alGetBufferi(buffer, AL_FREQUENCY, &freq);
+				offset /= freq;
+				offsetSeconds = offset;
+				decoder->seek(offset);
+			}
+			else
+			{
+				alSourcef(source, AL_SAMPLE_OFFSET, offset);
+			}
+			break;
+		case Source::UNIT_SECONDS:
+		default:
+			if (type == TYPE_STREAM)
+			{
+				offsetSeconds = offset;
+				decoder->seek(offset);
+				ALint buffer;
+				alGetSourcei(source, AL_BUFFER, &buffer);
+				int freq;
+				alGetBufferi(buffer, AL_FREQUENCY, &freq);
+				offsetSamples = offset*freq;
+			}
+			else
+			{
+				alSourcef(source, AL_SEC_OFFSET, offset);
+			}
+			break;
+		}
+		if (type == TYPE_STREAM)
+		{
+			bool waspaused = paused;
+			// Because we still have old data
+			// from before the seek in the buffers
+			// let's empty them.
+			stopAtomic();
+			playAtomic();
+			if (waspaused)
+				pauseAtomic();
+		}
+	}
+}
+
+void Source::seek(float offset, Source::Unit unit)
+{
+	return pool->seek(this, offset, &unit);
+}
+
+float Source::tellAtomic(void *unit) const
+{
+	if (valid)
+	{
+		float offset;
+		switch (*((Source::Unit *) unit))
+		{
+		case Source::UNIT_SAMPLES:
+			alGetSourcef(source, AL_SAMPLE_OFFSET, &offset);
+			if (type == TYPE_STREAM) offset += offsetSamples;
+			break;
+		case Source::UNIT_SECONDS:
+		default:
+			alGetSourcef(source, AL_SAMPLE_OFFSET, &offset);
+			ALint buffer;
+			alGetSourcei(source, AL_BUFFER, &buffer);
+			int freq;
+			alGetBufferi(buffer, AL_FREQUENCY, &freq);
+			offset /= freq;
+			if (type == TYPE_STREAM) offset += offsetSeconds;
+			break;
+		}
+		return offset;
+	}
+	return 0.0f;
+}
+
+float Source::tell(Source::Unit unit)
+{
+	return pool->tell(this, &unit);
+}
+
+void Source::setPosition(float *v)
+{
+	if (valid)
+		alSourcefv(source, AL_POSITION, v);
+
+	setFloatv(position, v);
+}
+
+void Source::getPosition(float *v) const
+{
+	if (valid)
+		alGetSourcefv(source, AL_POSITION, v);
+	else
+		setFloatv(v, position);
+}
+
+void Source::setVelocity(float *v)
+{
+	if (valid)
+		alSourcefv(source, AL_VELOCITY, v);
+
+	setFloatv(velocity, v);
+}
+
+void Source::getVelocity(float *v) const
+{
+	if (valid)
+		alGetSourcefv(source, AL_VELOCITY, v);
+	else
+		setFloatv(v, velocity);
+}
+
+void Source::setDirection(float *v)
+{
+	if (valid)
+		alSourcefv(source, AL_DIRECTION, v);
+	else
+		setFloatv(direction, v);
+}
+
+void Source::getDirection(float *v) const
+{
+	if (valid)
+		alGetSourcefv(source, AL_DIRECTION, v);
+	else
+		setFloatv(v, direction);
+}
+
+void Source::setLooping(bool looping)
+{
+	if (valid && type == TYPE_STATIC)
+		alSourcei(source, AL_LOOPING, looping ? AL_TRUE : AL_FALSE);
+
+	this->looping = looping;
+}
+
+bool Source::isLooping() const
+{
+	return looping;
+}
+
+void Source::playAtomic()
+{
+	if (type == TYPE_STATIC)
+	{
+		alSourcei(source, AL_BUFFER, buffers[0]);
+	}
+	else if (type == TYPE_STREAM)
+	{
+		int usedBuffers = 0;
+
+		for (unsigned int i = 0; i < MAX_BUFFERS; i++)
+		{
+			streamAtomic(buffers[i], decoder);
+			++usedBuffers;
+			if (decoder->isFinished())
+				break;
+		}
+
+		if (usedBuffers > 0)
+			alSourceQueueBuffers(source, usedBuffers, buffers);
+	}
+
+	// Set these properties. These may have changed while we've
+	// been without an AL source.
+	alSourcef(source, AL_PITCH, pitch);
+	alSourcef(source, AL_GAIN, volume);
+	alSourcef(source, AL_MIN_GAIN, minVolume);
+	alSourcef(source, AL_MAX_GAIN, maxVolume);
+	alSourcef(source, AL_REFERENCE_DISTANCE, referenceDistance);
+	alSourcef(source, AL_ROLLOFF_FACTOR, rolloffFactor);
+	alSourcef(source, AL_MAX_DISTANCE, maxDistance);
+
+	alSourcePlay(source);
+
+	valid = true; //if it fails it will be set to false again
+	//but this prevents a horrible, horrible bug
+}
+
+void Source::stopAtomic()
+{
+	if (valid)
+	{
+		if (type == TYPE_STATIC)
+		{
+			alSourceStop(source);
+		}
+		else if (type == TYPE_STREAM)
+		{
+			alSourceStop(source);
+			int queued = 0;
+			alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
+
+			while (queued--)
+			{
+				ALuint buffer;
+				alSourceUnqueueBuffers(source, 1, &buffer);
+			}
+		}
+		alSourcei(source, AL_BUFFER, AL_NONE);
+	}
+	toLoop = 0;
+	valid = false;
+}
+
+void Source::pauseAtomic()
+{
+	if (valid)
+	{
+		alSourcePause(source);
+		paused = true;
+	}
+}
+
+void Source::resumeAtomic()
+{
+	if (valid && paused)
+	{
+		alSourcePlay(source);
+		paused = false;
+	}
+}
+
+void Source::rewindAtomic()
+{
+	if (valid && type == TYPE_STATIC)
+	{
+		alSourceRewind(source);
+		if (!paused)
+			alSourcePlay(source);
+	}
+	else if (valid && type == TYPE_STREAM)
+	{
+		bool waspaused = paused;
+		decoder->rewind();
+		// Because we still have old data
+		// from before the seek in the buffers
+		// let's empty them.
+		stopAtomic();
+		playAtomic();
+		if (waspaused)
+			pauseAtomic();
+		offsetSamples = 0;
+		offsetSeconds = 0;
+	}
+	else if (type == TYPE_STREAM)
+	{
+		decoder->rewind();
+		offsetSamples = 0;
+		offsetSeconds = 0;
+	}
+}
+
+void Source::reset(ALenum source)
+{
+	alSourcefv(source, AL_POSITION, position);
+	alSourcefv(source, AL_VELOCITY, velocity);
+	alSourcefv(source, AL_DIRECTION, direction);
+	alSourcef(source, AL_PITCH, pitch);
+	alSourcef(source, AL_GAIN, volume);
+	alSourcef(source, AL_MIN_GAIN, minVolume);
+	alSourcef(source, AL_MAX_GAIN, maxVolume);
+	alSourcef(source, AL_REFERENCE_DISTANCE, referenceDistance);
+	alSourcef(source, AL_ROLLOFF_FACTOR, rolloffFactor);
+	alSourcef(source, AL_MAX_DISTANCE, maxDistance);
+}
+
+void Source::setFloatv(float *dst, const float *src) const
+{
+	dst[0] = src[0];
+	dst[1] = src[1];
+	dst[2] = src[2];
+}
+
+ALenum Source::getFormat(int channels, int bits) const
+{
+	if (channels == 1 && bits == 8)
+		return AL_FORMAT_MONO8;
+	else if (channels == 1 && bits == 16)
+		return AL_FORMAT_MONO16;
+	else if (channels == 2 && bits == 8)
+		return AL_FORMAT_STEREO8;
+	else if (channels == 2 && bits == 16)
+		return AL_FORMAT_STEREO16;
+	else
+		return 0;
+}
+
+int Source::streamAtomic(ALuint buffer, love::sound::Decoder *d)
+{
+	// Get more sound data.
+	int decoded = d->decode();
+
+	int fmt = getFormat(d->getChannels(), d->getBits());
+
+	if (fmt != 0)
+		alBufferData(buffer, fmt, d->getBuffer(), decoded, d->getSampleRate());
+
+	if (decoder->isFinished() && isLooping())
+	{
+		int queued, processed;
+		alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
+		alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
+		if (queued > processed)
+			toLoop = queued-processed;
+		else
+			toLoop = MAX_BUFFERS-processed;
+		d->rewind();
+	}
+
+	if (toLoop > 0)
+	{
+		if (--toLoop == 0)
+		{
+			offsetSamples = 0;
+			offsetSeconds = 0;
+		}
+	}
+
+	return decoded;
+}
+
+bool Source::isStatic() const
+{
+	return (type == TYPE_STATIC);
+}
+
+void Source::setMinVolume(float volume)
+{
+	if (valid)
+	{
+		alSourcef(source, AL_MIN_GAIN, volume);
+	}
+
+	this->minVolume = volume;
+}
+
+float Source::getMinVolume() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_MIN_GAIN, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return this->minVolume;
+}
+
+void Source::setMaxVolume(float volume)
+{
+	if (valid)
+	{
+		alSourcef(source, AL_MAX_GAIN, volume);
+	}
+
+	this->maxVolume = volume;
+}
+
+float Source::getMaxVolume() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_MAX_GAIN, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return this->maxVolume;
+}
+
+void Source::setReferenceDistance(float distance)
+{
+	if (valid)
+	{
+		alSourcef(source, AL_REFERENCE_DISTANCE, distance);
+	}
+
+	this->referenceDistance = distance;
+}
+
+float Source::getReferenceDistance() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_REFERENCE_DISTANCE, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return this->referenceDistance;
+}
+
+void Source::setRolloffFactor(float factor)
+{
+	if (valid)
+	{
+		alSourcef(source, AL_ROLLOFF_FACTOR, factor);
+	}
+
+	this->rolloffFactor = factor;
+}
+
+float Source::getRolloffFactor() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_ROLLOFF_FACTOR, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return this->rolloffFactor;
+}
+
+void Source::setMaxDistance(float distance)
+{
+	if (valid)
+	{
+		alSourcef(source, AL_MAX_DISTANCE, distance);
+	}
+
+	this->maxDistance = distance;
+}
+
+float Source::getMaxDistance() const
+{
+	if (valid)
+	{
+		ALfloat f;
+		alGetSourcef(source, AL_MAX_DISTANCE, &f);
+		return f;
+	}
+
+	// In case the Source isn't playing.
+	return this->maxDistance;
+}
+
+} // openal
+} // audio
+} // love

+ 150 - 151
src/modules/audio/openal/Source.h

@@ -1,151 +1,150 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_OPENAL_SOURCE_H
-#define LOVE_AUDIO_OPENAL_SOURCE_H
-
-// LOVE
-#include <common/config.h>
-#include <common/Object.h>
-#include <audio/Source.h>
-#include <sound/SoundData.h>
-#include <sound/Decoder.h>
-
-// OpenAL
-#ifdef LOVE_MACOSX
-#include <OpenAL/alc.h>
-#include <OpenAL/al.h>
-#else
-#include <AL/alc.h>
-#include <AL/al.h>
-#endif
-
-namespace love
-{
-namespace audio
-{
-namespace openal
-{
-	class Audio;
-	class Pool;
-
-	class Source : public love::audio::Source
-	{
-	private:
-
-		Pool * pool;
-		ALuint source;
-		bool valid;
-		static const unsigned int MAX_BUFFERS = 32;
-		ALuint buffers[MAX_BUFFERS];
-
-		float pitch;
-		float volume;
-		float position[3];
-		float velocity[3];
-		float direction[3];
-		bool looping;
-		bool paused;
-		float minVolume;
-		float maxVolume;
-		float referenceDistance;
-		float rolloffFactor;
-		float maxDistance;
-
-		float offsetSamples;
-		float offsetSeconds;
-
-		love::sound::Decoder * decoder;
-
-		unsigned int toLoop;
-
-	public:
-		Source(Pool * pool, love::sound::SoundData * soundData);
-		Source(Pool * pool, love::sound::Decoder * decoder);
-		virtual ~Source();
-
-		virtual love::audio::Source * copy();
-		virtual void play();
-		virtual void stop();
-		virtual void pause();
-		virtual void resume();
-		virtual void rewind();
-		virtual bool isStopped() const;
-		virtual bool isPaused() const;
-		virtual bool isFinished() const;
-		virtual bool update();
-		virtual void setPitch(float pitch);
-		virtual float getPitch() const;
-		virtual void setVolume(float volume);
-		virtual float getVolume() const;
-		virtual void seekAtomic(float offset, void * unit);
-		virtual void seek(float offset, Unit unit);
-		virtual float tellAtomic(void * unit) const;
-		virtual float tell(Unit unit);
-		virtual void setPosition(float * v);
-		virtual void getPosition(float * v) const;
-		virtual void setVelocity(float * v);
-		virtual void getVelocity(float * v) const;
-		virtual void setDirection(float * v);
-		virtual void getDirection(float * v) const;
-		void setLooping(bool looping);
-		bool isLooping() const;
-		bool isStatic() const;
-		virtual void setMinVolume(float volume);
-		virtual float getMinVolume() const;
-		virtual void setMaxVolume(float volume);
-		virtual float getMaxVolume() const;
-		virtual void setReferenceDistance(float distance);
-		virtual float getReferenceDistance() const;
-		virtual void setRolloffFactor(float factor);
-		virtual float getRolloffFactor() const;
-		virtual void setMaxDistance(float distance);
-		virtual float getMaxDistance() const;
-
-		void playAtomic();
-		void stopAtomic();
-		void pauseAtomic();
-		void resumeAtomic();
-		void rewindAtomic();
-
-	private:
-
-		void reset(ALenum source);
-
-		void setFloatv(float * dst, const float * src) const;
-
-		/**
-		* Gets the OpenAL format identifier based on number of
-		* channels and bits.
-		* @param channels Either 1 (mono) or 2 (stereo).
-		* @param bits Either 8-bit samples, or 16-bit samples.
-		* @return One of AL_FORMAT_*, or 0 if unsupported format.
-		**/
-		ALenum getFormat(int channels, int bits) const;
-
-		int streamAtomic(ALuint buffer, love::sound::Decoder * d);
-
-	}; // Source
-
-} // openal
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_OPENAL_SOURCE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_OPENAL_SOURCE_H
+#define LOVE_AUDIO_OPENAL_SOURCE_H
+
+// LOVE
+#include "common/config.h"
+#include "common/Object.h"
+#include "audio/Source.h"
+#include "sound/SoundData.h"
+#include "sound/Decoder.h"
+
+// OpenAL
+#ifdef LOVE_MACOSX
+#include <OpenAL/alc.h>
+#include <OpenAL/al.h>
+#else
+#include <AL/alc.h>
+#include <AL/al.h>
+#endif
+
+namespace love
+{
+namespace audio
+{
+namespace openal
+{
+
+class Audio;
+class Pool;
+
+class Source : public love::audio::Source
+{
+public:
+	Source(Pool *pool, love::sound::SoundData *soundData);
+	Source(Pool *pool, love::sound::Decoder *decoder);
+	virtual ~Source();
+
+	virtual love::audio::Source *copy();
+	virtual void play();
+	virtual void stop();
+	virtual void pause();
+	virtual void resume();
+	virtual void rewind();
+	virtual bool isStopped() const;
+	virtual bool isPaused() const;
+	virtual bool isFinished() const;
+	virtual bool update();
+	virtual void setPitch(float pitch);
+	virtual float getPitch() const;
+	virtual void setVolume(float volume);
+	virtual float getVolume() const;
+	virtual void seekAtomic(float offset, void *unit);
+	virtual void seek(float offset, Unit unit);
+	virtual float tellAtomic(void *unit) const;
+	virtual float tell(Unit unit);
+	virtual void setPosition(float *v);
+	virtual void getPosition(float *v) const;
+	virtual void setVelocity(float *v);
+	virtual void getVelocity(float *v) const;
+	virtual void setDirection(float *v);
+	virtual void getDirection(float *v) const;
+	void setLooping(bool looping);
+	bool isLooping() const;
+	bool isStatic() const;
+	virtual void setMinVolume(float volume);
+	virtual float getMinVolume() const;
+	virtual void setMaxVolume(float volume);
+	virtual float getMaxVolume() const;
+	virtual void setReferenceDistance(float distance);
+	virtual float getReferenceDistance() const;
+	virtual void setRolloffFactor(float factor);
+	virtual float getRolloffFactor() const;
+	virtual void setMaxDistance(float distance);
+	virtual float getMaxDistance() const;
+
+	void playAtomic();
+	void stopAtomic();
+	void pauseAtomic();
+	void resumeAtomic();
+	void rewindAtomic();
+
+private:
+
+	void reset(ALenum source);
+
+	void setFloatv(float *dst, const float *src) const;
+
+	/**
+	 * Gets the OpenAL format identifier based on number of
+	 * channels and bits.
+	 * @param channels Either 1 (mono) or 2 (stereo).
+	 * @param bits Either 8-bit samples, or 16-bit samples.
+	 * @return One of AL_FORMAT_*, or 0 if unsupported format.
+	 **/
+	ALenum getFormat(int channels, int bits) const;
+
+	int streamAtomic(ALuint buffer, love::sound::Decoder *d);
+
+	Pool *pool;
+	ALuint source;
+	bool valid;
+	static const unsigned int MAX_BUFFERS = 32;
+	ALuint buffers[MAX_BUFFERS];
+
+	float pitch;
+	float volume;
+	float position[3];
+	float velocity[3];
+	float direction[3];
+	bool looping;
+	bool paused;
+	float minVolume;
+	float maxVolume;
+	float referenceDistance;
+	float rolloffFactor;
+	float maxDistance;
+
+	float offsetSamples;
+	float offsetSeconds;
+
+	love::sound::Decoder *decoder;
+
+	unsigned int toLoop;
+
+}; // Source
+
+} // openal
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_OPENAL_SOURCE_H

+ 343 - 339
src/modules/audio/wrap_Audio.cpp

@@ -1,339 +1,343 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-// LOVE
-#include "wrap_Audio.h"
-
-#include "openal/Audio.h"
-#include "null/Audio.h"
-
-#include <scripts/audio.lua.h>
-
-#include <common/runtime.h>
-
-namespace love
-{
-namespace audio
-{
-	static Audio * instance = 0;
-
-	int w_getNumSources(lua_State * L)
-	{
-		lua_pushinteger(L, instance->getNumSources());
-		return 1;
-	}
-
-	int w_newSource1(lua_State * L)
-	{
-		Source * t = 0;
-
-		if (luax_istype(L, 1, SOUND_SOUND_DATA_T))
-			t = instance->newSource(luax_totype<love::sound::SoundData>(L, 1, "SoundData", SOUND_SOUND_DATA_T));
-		else if (luax_istype(L, 1, SOUND_DECODER_T))
-			t = instance->newSource(luax_totype<love::sound::Decoder>(L, 1, "Decoder", SOUND_DECODER_T));
-
-		if (t)
-		{
-			luax_newtype(L, "Source", AUDIO_SOURCE_T, (void*)t);
-			return 1;
-		}
-		else
-			return luaL_error(L, "No matching overload");
-
-		return 0;
-	}
-
-	int w_play(lua_State * L)
-	{
-		Source * s = luax_checksource(L, 1);
-		instance->play(s);
-		return 0;
-	}
-
-	int w_stop(lua_State * L)
-	{
-		if (lua_gettop(L) == 0)
-		{
-			instance->stop();
-		}
-		else
-		{
-			Source * s = luax_checksource(L, 1);
-			s->stop();
-		}
-		return 0;
-	}
-
-	int w_pause(lua_State * L)
-	{
-		if (lua_gettop(L) == 0)
-		{
-			instance->pause();
-		}
-		else
-		{
-			Source * s = luax_checksource(L, 1);
-			s->pause();
-		}
-
-		return 0;
-	}
-
-	int w_resume(lua_State * L)
-	{
-		if (lua_gettop(L) == 0)
-		{
-			instance->resume();
-		}
-		else
-		{
-			Source * s = luax_checksource(L, 1);
-			s->resume();
-		}
-		return 0;
-	}
-
-	int w_rewind(lua_State * L)
-	{
-		if (lua_gettop(L) == 0)
-		{
-			instance->rewind();
-		}
-		else
-		{
-			Source * s = luax_checksource(L, 1);
-			s->rewind();
-		}
-		return 0;
-	}
-
-	int w_setVolume(lua_State * L)
-	{
-		float v = (float)luaL_checknumber(L, 1);
-		instance->setVolume(v);
-		return 0;
-	}
-
-	int w_getVolume(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getVolume());
-		return 1;
-	}
-
-	int w_setPosition(lua_State * L)
-	{
-		float v[3];
-		v[0] = (float)luaL_checknumber(L, 1);
-		v[1] = (float)luaL_checknumber(L, 2);
-		v[2] = (float)luaL_checknumber(L, 3);
-		instance->setPosition(v);
-		return 0;
-	}
-
-	int w_getPosition(lua_State * L)
-	{
-		float v[3];
-		instance->getPosition(v);
-		lua_pushnumber(L, v[0]);
-		lua_pushnumber(L, v[1]);
-		lua_pushnumber(L, v[2]);
-		return 3;
-	}
-
-	int w_setOrientation(lua_State * L)
-	{
-		float v[6];
-		v[0] = (float)luaL_checknumber(L, 1);
-		v[1] = (float)luaL_checknumber(L, 2);
-		v[2] = (float)luaL_checknumber(L, 3);
-		v[3] = (float)luaL_checknumber(L, 4);
-		v[4] = (float)luaL_checknumber(L, 5);
-		v[5] = (float)luaL_checknumber(L, 6);
-		instance->setOrientation(v);
-		return 0;
-	}
-
-	int w_getOrientation(lua_State * L)
-	{
-		float v[6];
-		instance->getOrientation(v);
-		lua_pushnumber(L, v[0]);
-		lua_pushnumber(L, v[1]);
-		lua_pushnumber(L, v[2]);
-		lua_pushnumber(L, v[3]);
-		lua_pushnumber(L, v[4]);
-		lua_pushnumber(L, v[5]);
-		return 6;
-	}
-
-	int w_setVelocity(lua_State * L)
-	{
-		float v[3];
-		v[0] = (float)luaL_checknumber(L, 1);
-		v[1] = (float)luaL_checknumber(L, 2);
-		v[2] = (float)luaL_checknumber(L, 3);
-		instance->setVelocity(v);
-		return 0;
-	}
-
-	int w_getVelocity(lua_State * L)
-	{
-		float v[3];
-		instance->getVelocity(v);
-		lua_pushnumber(L, v[0]);
-		lua_pushnumber(L, v[1]);
-		lua_pushnumber(L, v[2]);
-		return 3;
-	}
-
-	int w_record(lua_State *)
-	{
-		instance->record();
-		return 0;
-	}
-
-	int w_getRecordedData(lua_State * L)
-	{
-		love::sound::SoundData * sd = instance->getRecordedData();
-		if (!sd)
-			lua_pushnil(L);
-		else
-			luax_newtype(L, "SoundData", SOUND_SOUND_DATA_T, (void*)sd);
-		return 1;
-	}
-
-	int w_stopRecording(lua_State * L)
-	{
-		if (luax_optboolean(L, 1, true))
-		{
-			love::sound::SoundData * sd = instance->stopRecording(true);
-			if (!sd) lua_pushnil(L);
-			else luax_newtype(L, "SoundData", SOUND_SOUND_DATA_T, (void*)sd);
-			return 1;
-		}
-		instance->stopRecording(false);
-		return 0;
-	}
-
-	int w_canRecord(lua_State * L) {
-		luax_pushboolean(L, instance->canRecord());
-		return 1;
-	}
-	
-	int w_setDistanceModel(lua_State * L)
-	{
-		const char *modelStr = luaL_checkstring(L, 1);
-		Audio::DistanceModel distanceModel;
-		if (!Audio::getConstant(modelStr, distanceModel))
-			return luaL_error(L, "Invalid distance model: %s", modelStr);
-		instance->setDistanceModel(distanceModel);
-		return 0;
-	}
-
-	int w_getDistanceModel(lua_State * L)
-	{
-		Audio::DistanceModel distanceModel = instance->getDistanceModel();
-		const char *modelStr;
-		if (!Audio::getConstant(distanceModel, modelStr))
-			return 0;
-		lua_pushstring(L, modelStr);
-		return 1;
-	}
-
-	// List of functions to wrap.
-	static const luaL_Reg functions[] = {
-		{ "getNumSources", w_getNumSources },
-		{ "newSource1", w_newSource1 },
-		{ "play", w_play },
-		{ "stop", w_stop },
-		{ "pause", w_pause },
-		{ "resume", w_resume },
-		{ "rewind", w_rewind },
-		{ "setVolume", w_setVolume },
-		{ "getVolume", w_getVolume },
-		{ "setPosition", w_setPosition },
-		{ "getPosition", w_getPosition },
-		{ "setOrientation", w_setOrientation },
-		{ "getOrientation", w_getOrientation },
-		{ "setVelocity", w_setVelocity },
-		{ "getVelocity", w_getVelocity },
-		/*{ "record", w_record },
-		{ "getRecordedData", w_getRecordedData },
-		{ "stopRecording", w_stopRecording },*/
-		{ "setDistanceModel", w_setDistanceModel },
-		{ "getDistanceModel", w_getDistanceModel },
-		{ 0, 0 }
-	};
-
-	static const lua_CFunction types[] = {
-		luaopen_source,
-		0
-	};
-
-	extern "C" int luaopen_love_audio(lua_State * L)
-	{
-		if (instance == 0)
-		{
-			// Try OpenAL first.
-			try
-			{
-				instance = new love::audio::openal::Audio();
-			}
-			catch (love::Exception & e)
-			{
-				std::cout << e.what() << std::endl;
-			}
-		}
-		else
-			instance->retain();
-
-		if (instance == 0)
-		{
-			// Fall back to nullaudio.
-			try
-			{
-				instance = new love::audio::null::Audio();
-			}
-			catch (love::Exception & e)
-			{
-				std::cout << e.what() << std::endl;
-			}
-		}
-
-		if (instance == 0)
-			return luaL_error(L, "Could not open any audio module.");
-
-		WrappedModule w;
-		w.module = instance;
-		w.name = "audio";
-		w.flags = MODULE_T;
-		w.functions = functions;
-		w.types = types;
-
-		int n = luax_register_module(L, w);
-
-		if (luaL_loadbuffer(L, (const char *)audio_lua, sizeof(audio_lua), "audio.lua") == 0)
-			lua_call(L, 0, 0);
-
-		return n;
-	}
-
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+// LOVE
+#include "wrap_Audio.h"
+
+#include "openal/Audio.h"
+#include "null/Audio.h"
+
+#include "scripts/audio.lua.h"
+
+#include "common/runtime.h"
+
+namespace love
+{
+namespace audio
+{
+
+static Audio *instance = 0;
+
+int w_getNumSources(lua_State *L)
+{
+	lua_pushinteger(L, instance->getNumSources());
+	return 1;
+}
+
+int w_newSource1(lua_State *L)
+{
+	Source *t = 0;
+
+	if (luax_istype(L, 1, SOUND_SOUND_DATA_T))
+		t = instance->newSource(luax_totype<love::sound::SoundData>(L, 1, "SoundData", SOUND_SOUND_DATA_T));
+	else if (luax_istype(L, 1, SOUND_DECODER_T))
+		t = instance->newSource(luax_totype<love::sound::Decoder>(L, 1, "Decoder", SOUND_DECODER_T));
+
+	if (t)
+	{
+		luax_newtype(L, "Source", AUDIO_SOURCE_T, (void *)t);
+		return 1;
+	}
+	else
+		return luaL_error(L, "No matching overload");
+
+	return 0;
+}
+
+int w_play(lua_State *L)
+{
+	Source *s = luax_checksource(L, 1);
+	instance->play(s);
+	return 0;
+}
+
+int w_stop(lua_State *L)
+{
+	if (lua_gettop(L) == 0)
+	{
+		instance->stop();
+	}
+	else
+	{
+		Source *s = luax_checksource(L, 1);
+		s->stop();
+	}
+	return 0;
+}
+
+int w_pause(lua_State *L)
+{
+	if (lua_gettop(L) == 0)
+	{
+		instance->pause();
+	}
+	else
+	{
+		Source *s = luax_checksource(L, 1);
+		s->pause();
+	}
+
+	return 0;
+}
+
+int w_resume(lua_State *L)
+{
+	if (lua_gettop(L) == 0)
+	{
+		instance->resume();
+	}
+	else
+	{
+		Source *s = luax_checksource(L, 1);
+		s->resume();
+	}
+	return 0;
+}
+
+int w_rewind(lua_State *L)
+{
+	if (lua_gettop(L) == 0)
+	{
+		instance->rewind();
+	}
+	else
+	{
+		Source *s = luax_checksource(L, 1);
+		s->rewind();
+	}
+	return 0;
+}
+
+int w_setVolume(lua_State *L)
+{
+	float v = (float)luaL_checknumber(L, 1);
+	instance->setVolume(v);
+	return 0;
+}
+
+int w_getVolume(lua_State *L)
+{
+	lua_pushnumber(L, instance->getVolume());
+	return 1;
+}
+
+int w_setPosition(lua_State *L)
+{
+	float v[3];
+	v[0] = (float)luaL_checknumber(L, 1);
+	v[1] = (float)luaL_checknumber(L, 2);
+	v[2] = (float)luaL_optnumber(L, 3, 0);
+	instance->setPosition(v);
+	return 0;
+}
+
+int w_getPosition(lua_State *L)
+{
+	float v[3];
+	instance->getPosition(v);
+	lua_pushnumber(L, v[0]);
+	lua_pushnumber(L, v[1]);
+	lua_pushnumber(L, v[2]);
+	return 3;
+}
+
+int w_setOrientation(lua_State *L)
+{
+	float v[6];
+	v[0] = (float)luaL_checknumber(L, 1);
+	v[1] = (float)luaL_checknumber(L, 2);
+	v[2] = (float)luaL_checknumber(L, 3);
+	v[3] = (float)luaL_checknumber(L, 4);
+	v[4] = (float)luaL_checknumber(L, 5);
+	v[5] = (float)luaL_checknumber(L, 6);
+	instance->setOrientation(v);
+	return 0;
+}
+
+int w_getOrientation(lua_State *L)
+{
+	float v[6];
+	instance->getOrientation(v);
+	lua_pushnumber(L, v[0]);
+	lua_pushnumber(L, v[1]);
+	lua_pushnumber(L, v[2]);
+	lua_pushnumber(L, v[3]);
+	lua_pushnumber(L, v[4]);
+	lua_pushnumber(L, v[5]);
+	return 6;
+}
+
+int w_setVelocity(lua_State *L)
+{
+	float v[3];
+	v[0] = (float)luaL_checknumber(L, 1);
+	v[1] = (float)luaL_checknumber(L, 2);
+	v[2] = (float)luaL_optnumber(L, 3, 0);
+	instance->setVelocity(v);
+	return 0;
+}
+
+int w_getVelocity(lua_State *L)
+{
+	float v[3];
+	instance->getVelocity(v);
+	lua_pushnumber(L, v[0]);
+	lua_pushnumber(L, v[1]);
+	lua_pushnumber(L, v[2]);
+	return 3;
+}
+
+int w_record(lua_State *)
+{
+	instance->record();
+	return 0;
+}
+
+int w_getRecordedData(lua_State *L)
+{
+	love::sound::SoundData *sd = instance->getRecordedData();
+	if (!sd)
+		lua_pushnil(L);
+	else
+		luax_newtype(L, "SoundData", SOUND_SOUND_DATA_T, (void *)sd);
+	return 1;
+}
+
+int w_stopRecording(lua_State *L)
+{
+	if (luax_optboolean(L, 1, true))
+	{
+		love::sound::SoundData *sd = instance->stopRecording(true);
+		if (!sd) lua_pushnil(L);
+		else luax_newtype(L, "SoundData", SOUND_SOUND_DATA_T, (void *)sd);
+		return 1;
+	}
+	instance->stopRecording(false);
+	return 0;
+}
+
+int w_canRecord(lua_State *L)
+{
+	luax_pushboolean(L, instance->canRecord());
+	return 1;
+}
+
+int w_setDistanceModel(lua_State *L)
+{
+	const char *modelStr = luaL_checkstring(L, 1);
+	Audio::DistanceModel distanceModel;
+	if (!Audio::getConstant(modelStr, distanceModel))
+		return luaL_error(L, "Invalid distance model: %s", modelStr);
+	instance->setDistanceModel(distanceModel);
+	return 0;
+}
+
+int w_getDistanceModel(lua_State *L)
+{
+	Audio::DistanceModel distanceModel = instance->getDistanceModel();
+	const char *modelStr;
+	if (!Audio::getConstant(distanceModel, modelStr))
+		return 0;
+	lua_pushstring(L, modelStr);
+	return 1;
+}
+
+// List of functions to wrap.
+static const luaL_Reg functions[] =
+{
+	{ "getNumSources", w_getNumSources },
+	{ "newSource1", w_newSource1 },
+	{ "play", w_play },
+	{ "stop", w_stop },
+	{ "pause", w_pause },
+	{ "resume", w_resume },
+	{ "rewind", w_rewind },
+	{ "setVolume", w_setVolume },
+	{ "getVolume", w_getVolume },
+	{ "setPosition", w_setPosition },
+	{ "getPosition", w_getPosition },
+	{ "setOrientation", w_setOrientation },
+	{ "getOrientation", w_getOrientation },
+	{ "setVelocity", w_setVelocity },
+	{ "getVelocity", w_getVelocity },
+	/*{ "record", w_record },
+	{ "getRecordedData", w_getRecordedData },
+	{ "stopRecording", w_stopRecording },*/
+	{ "setDistanceModel", w_setDistanceModel },
+	{ "getDistanceModel", w_getDistanceModel },
+	{ 0, 0 }
+};
+
+static const lua_CFunction types[] =
+{
+	luaopen_source,
+	0
+};
+
+extern "C" int luaopen_love_audio(lua_State *L)
+{
+	if (instance == 0)
+	{
+		// Try OpenAL first.
+		try
+		{
+			instance = new love::audio::openal::Audio();
+		}
+		catch(love::Exception &e)
+		{
+			std::cout << e.what() << std::endl;
+		}
+	}
+	else
+		instance->retain();
+
+	if (instance == 0)
+	{
+		// Fall back to nullaudio.
+		try
+		{
+			instance = new love::audio::null::Audio();
+		}
+		catch(love::Exception &e)
+		{
+			std::cout << e.what() << std::endl;
+		}
+	}
+
+	if (instance == 0)
+		return luaL_error(L, "Could not open any audio module.");
+
+	WrappedModule w;
+	w.module = instance;
+	w.name = "audio";
+	w.flags = MODULE_T;
+	w.functions = functions;
+	w.types = types;
+
+	int n = luax_register_module(L, w);
+
+	if (luaL_loadbuffer(L, (const char *)audio_lua, sizeof(audio_lua), "audio.lua") == 0)
+		lua_call(L, 0, 0);
+
+	return n;
+}
+
+} // audio
+} // love

+ 61 - 60
src/modules/audio/wrap_Audio.h

@@ -1,60 +1,61 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_WRAP_AUDIO_H
-#define LOVE_AUDIO_WRAP_AUDIO_H
-
-// LOVE
-#include <common/config.h>
-#include <common/runtime.h>
-#include "Audio.h"
-#include "wrap_Source.h"
-
-namespace love
-{
-namespace audio
-{
-	int w_getNumSources(lua_State * L);
-	int w_newSource1(lua_State * L);
-	int w_play(lua_State * L);
-	int w_stop(lua_State * L);
-	int w_pause(lua_State * L);
-	int w_resume(lua_State * L);
-	int w_rewind(lua_State * L);
-	int w_setVolume(lua_State * L);
-	int w_getVolume(lua_State * L);
-	int w_setPosition(lua_State * L);
-	int w_getPosition(lua_State * L);
-	int w_setOrientation(lua_State * L);
-	int w_getOrientation(lua_State * L);
-	int w_setVelocity(lua_State * L);
-	int w_getVelocity(lua_State * L);
-	int w_record(lua_State * L);
-	int w_getRecordedData(lua_State * L);
-	int w_stopRecording(lua_State * L);
-	int w_canRecord(lua_State * L);
-	int w_setDistanceModel(lua_State * L);
-	int w_getDistanceModel(lua_State * L);
-	extern "C" LOVE_EXPORT int luaopen_love_audio(lua_State * L);
-
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_WRAP_AUDIO_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_WRAP_AUDIO_H
+#define LOVE_AUDIO_WRAP_AUDIO_H
+
+// LOVE
+#include "common/config.h"
+#include "common/runtime.h"
+#include "Audio.h"
+#include "wrap_Source.h"
+
+namespace love
+{
+namespace audio
+{
+
+int w_getNumSources(lua_State *L);
+int w_newSource1(lua_State *L);
+int w_play(lua_State *L);
+int w_stop(lua_State *L);
+int w_pause(lua_State *L);
+int w_resume(lua_State *L);
+int w_rewind(lua_State *L);
+int w_setVolume(lua_State *L);
+int w_getVolume(lua_State *L);
+int w_setPosition(lua_State *L);
+int w_getPosition(lua_State *L);
+int w_setOrientation(lua_State *L);
+int w_getOrientation(lua_State *L);
+int w_setVelocity(lua_State *L);
+int w_getVelocity(lua_State *L);
+int w_record(lua_State *L);
+int w_getRecordedData(lua_State *L);
+int w_stopRecording(lua_State *L);
+int w_canRecord(lua_State *L);
+int w_setDistanceModel(lua_State *L);
+int w_getDistanceModel(lua_State *L);
+extern "C" LOVE_EXPORT int luaopen_love_audio(lua_State *L);
+
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_WRAP_AUDIO_H

+ 320 - 318
src/modules/audio/wrap_Source.cpp

@@ -1,318 +1,320 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "wrap_Source.h"
-
-namespace love
-{
-namespace audio
-{
-	Source * luax_checksource(lua_State * L, int idx)
-	{
-		return luax_checktype<Source>(L, idx, "Source", AUDIO_SOURCE_T);
-	}
-
-	int w_Source_play(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		t->play();
-		return 0;
-	}
-
-	int w_Source_stop(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		t->stop();
-		return 0;
-	}
-
-	int w_Source_pause(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		t->pause();
-		return 0;
-	}
-
-	int w_Source_resume(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		t->resume();
-		return 0;
-	}
-
-	int w_Source_rewind(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		t->rewind();
-		return 0;
-	}
-
-	int w_Source_setPitch(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float p = (float)luaL_checknumber(L, 2);
-		t->setPitch(p);
-		return 0;
-	}
-
-	int w_Source_getPitch(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		lua_pushnumber(L, t->getPitch());
-		return 1;
-	}
-
-	int w_Source_setVolume(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float p = (float)luaL_checknumber(L, 2);
-		t->setVolume(p);
-		return 0;
-	}
-
-	int w_Source_getVolume(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		lua_pushnumber(L, t->getVolume());
-		return 1;
-	}
-
-	int w_Source_seek(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float offset = (float)luaL_checknumber(L, 2);
-		const char * unit = luaL_optstring(L, 3, "seconds");
-		Source::Unit u;
-		t->getConstant(unit, u);
-		t->seek(offset, u);
-		return 0;
-	}
-
-	int w_Source_tell(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		const char * unit = luaL_optstring(L, 2, "seconds");
-		Source::Unit u;
-		t->getConstant(unit, u);
-		lua_pushnumber(L, t->tell(u));
-		return 1;
-	}
-
-	int w_Source_setPosition(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float v[3];
-		v[0] = (float)luaL_checknumber(L, 2);
-		v[1] = (float)luaL_checknumber(L, 3);
-		v[2] = (float)luaL_checknumber(L, 4);
-		t->setPosition(v);
-		return 0;
-	}
-
-	int w_Source_getPosition(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float v[3];
-		t->getPosition(v);
-		lua_pushnumber(L, v[0]);
-		lua_pushnumber(L, v[1]);
-		lua_pushnumber(L, v[2]);
-		return 3;
-	}
-
-	int w_Source_setVelocity(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float v[3];
-		v[0] = (float)luaL_checknumber(L, 2);
-		v[1] = (float)luaL_checknumber(L, 3);
-		v[2] = (float)luaL_checknumber(L, 4);
-		t->setVelocity(v);
-		return 0;
-	}
-
-	int w_Source_getVelocity(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float v[3];
-		t->getVelocity(v);
-		lua_pushnumber(L, v[0]);
-		lua_pushnumber(L, v[1]);
-		lua_pushnumber(L, v[2]);
-		return 3;
-	}
-
-	int w_Source_setDirection(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float v[3];
-		v[0] = (float)luaL_checknumber(L, 2);
-		v[1] = (float)luaL_checknumber(L, 3);
-		v[2] = (float)luaL_checknumber(L, 4);
-		t->setDirection(v);
-		return 0;
-	}
-
-	int w_Source_getDirection(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float v[3];
-		t->getDirection(v);
-		lua_pushnumber(L, v[0]);
-		lua_pushnumber(L, v[1]);
-		lua_pushnumber(L, v[2]);
-		return 3;
-	}
-
-	int w_Source_setLooping(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		t->setLooping(luax_toboolean(L, 2));
-		return 0;
-	}
-
-	int w_Source_isLooping(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		luax_pushboolean(L, t->isLooping());
-		return 1;
-	}
-
-	int w_Source_isStopped(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		luax_pushboolean(L, t->isStopped());
-		return 1;
-	}
-
-	int w_Source_isPaused(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		luax_pushboolean(L, t->isPaused());
-		return 1;
-	}
-
-	int w_Source_isStatic(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		luax_pushboolean(L, t->isStatic());
-		return 1;
-	}
-
-	int w_Source_setVolumeLimits(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float vmin = (float)luaL_checknumber(L, 2);
-		float vmax = (float)luaL_checknumber(L, 3);
-		if (vmin < .0f || vmin > 1.f || vmax < .0f || vmax > 1.f)
-			return luaL_error(L, "Invalid volume limits: [%f:%f]. Must be in [0:1]", vmin, vmax);
-		t->setMinVolume(vmin);
-		t->setMaxVolume(vmin);
-		return 0;
-	}
-
-	int w_Source_getVolumeLimits(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		lua_pushnumber(L, t->getMinVolume());
-		lua_pushnumber(L, t->getMaxVolume());
-		return 2;
-	}
-
-	int w_Source_setDistance(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float dref = (float)luaL_checknumber(L, 2);
-		float dmax = (float)luaL_checknumber(L, 3);
-		if (dref < .0f || dmax < .0f)
-			return luaL_error(L, "Invalid distances: %f, %f. Must be > 0", dref, dmax);
-		t->setReferenceDistance(dref);
-		t->setMaxDistance(dmax);
-		return 0;
-	}
-
-	int w_Source_getDistance(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		lua_pushnumber(L, t->getReferenceDistance());
-		lua_pushnumber(L, t->getMaxDistance());
-		return 2;
-	}
-
-	int w_Source_setRolloff(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		float rolloff = (float)luaL_checknumber(L, 2);
-		if (rolloff < .0f)
-			return luaL_error(L, "Invalid rolloff: %f. Must be > 0.", rolloff);
-		t->setRolloffFactor(rolloff);
-		return 0;
-	}
-
-	int w_Source_getRolloff(lua_State * L)
-	{
-		Source * t = luax_checksource(L, 1);
-		lua_pushnumber(L, t->getRolloffFactor());
-		return 1;
-	}
-
-	static const luaL_Reg functions[] = {
-		{ "play", w_Source_play },
-		{ "stop", w_Source_stop },
-		{ "pause", w_Source_pause },
-		{ "resume", w_Source_resume },
-		{ "rewind", w_Source_rewind },
-
-		{ "setPitch", w_Source_setPitch },
-		{ "getPitch", w_Source_getPitch },
-		{ "setVolume", w_Source_setVolume },
-		{ "getVolume", w_Source_getVolume },
-		{ "seek", w_Source_seek },
-		{ "tell", w_Source_tell },
-		{ "setPosition", w_Source_setPosition },
-		{ "getPosition", w_Source_getPosition },
-		{ "setVelocity", w_Source_setVelocity },
-		{ "getVelocity", w_Source_getVelocity },
-		{ "setDirection", w_Source_setDirection },
-		{ "getDirection", w_Source_getDirection },
-
-		{ "setLooping", w_Source_setLooping },
-		{ "isLooping", w_Source_isLooping },
-		{ "isStopped", w_Source_isStopped },
-		{ "isPaused", w_Source_isPaused },
-		{ "isStatic", w_Source_isStatic },
-
-		{ "setVolumeLimits", w_Source_setVolumeLimits },
-		{ "getVolumeLimits", w_Source_getVolumeLimits },
-		{ "setDistance", w_Source_setDistance },
-		{ "getDistance", w_Source_setDistance },
-		{ "setRolloff", w_Source_setRolloff},
-		{ "getRolloff", w_Source_getRolloff},
-
-		{ 0, 0 }
-	};
-
-	extern "C" int luaopen_source(lua_State * L)
-	{
-		return luax_register_type(L, "Source", functions);
-	}
-
-} // audio
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "wrap_Source.h"
+
+namespace love
+{
+namespace audio
+{
+
+Source *luax_checksource(lua_State *L, int idx)
+{
+	return luax_checktype<Source>(L, idx, "Source", AUDIO_SOURCE_T);
+}
+
+int w_Source_play(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	t->play();
+	return 0;
+}
+
+int w_Source_stop(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	t->stop();
+	return 0;
+}
+
+int w_Source_pause(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	t->pause();
+	return 0;
+}
+
+int w_Source_resume(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	t->resume();
+	return 0;
+}
+
+int w_Source_rewind(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	t->rewind();
+	return 0;
+}
+
+int w_Source_setPitch(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float p = (float)luaL_checknumber(L, 2);
+	t->setPitch(p);
+	return 0;
+}
+
+int w_Source_getPitch(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	lua_pushnumber(L, t->getPitch());
+	return 1;
+}
+
+int w_Source_setVolume(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float p = (float)luaL_checknumber(L, 2);
+	t->setVolume(p);
+	return 0;
+}
+
+int w_Source_getVolume(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	lua_pushnumber(L, t->getVolume());
+	return 1;
+}
+
+int w_Source_seek(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float offset = (float)luaL_checknumber(L, 2);
+	const char *unit = luaL_optstring(L, 3, "seconds");
+	Source::Unit u;
+	t->getConstant(unit, u);
+	t->seek(offset, u);
+	return 0;
+}
+
+int w_Source_tell(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	const char *unit = luaL_optstring(L, 2, "seconds");
+	Source::Unit u;
+	t->getConstant(unit, u);
+	lua_pushnumber(L, t->tell(u));
+	return 1;
+}
+
+int w_Source_setPosition(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float v[3];
+	v[0] = (float)luaL_checknumber(L, 2);
+	v[1] = (float)luaL_checknumber(L, 3);
+	v[2] = (float)luaL_optnumber(L, 4, 0);
+	t->setPosition(v);
+	return 0;
+}
+
+int w_Source_getPosition(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float v[3];
+	t->getPosition(v);
+	lua_pushnumber(L, v[0]);
+	lua_pushnumber(L, v[1]);
+	lua_pushnumber(L, v[2]);
+	return 3;
+}
+
+int w_Source_setVelocity(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float v[3];
+	v[0] = (float)luaL_checknumber(L, 2);
+	v[1] = (float)luaL_checknumber(L, 3);
+	v[2] = (float)luaL_optnumber(L, 4, 0);
+	t->setVelocity(v);
+	return 0;
+}
+
+int w_Source_getVelocity(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float v[3];
+	t->getVelocity(v);
+	lua_pushnumber(L, v[0]);
+	lua_pushnumber(L, v[1]);
+	lua_pushnumber(L, v[2]);
+	return 3;
+}
+
+int w_Source_setDirection(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float v[3];
+	v[0] = (float)luaL_checknumber(L, 2);
+	v[1] = (float)luaL_checknumber(L, 3);
+	v[2] = (float)luaL_optnumber(L, 4, 0);
+	t->setDirection(v);
+	return 0;
+}
+
+int w_Source_getDirection(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float v[3];
+	t->getDirection(v);
+	lua_pushnumber(L, v[0]);
+	lua_pushnumber(L, v[1]);
+	lua_pushnumber(L, v[2]);
+	return 3;
+}
+
+int w_Source_setLooping(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	t->setLooping(luax_toboolean(L, 2));
+	return 0;
+}
+
+int w_Source_isLooping(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	luax_pushboolean(L, t->isLooping());
+	return 1;
+}
+
+int w_Source_isStopped(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	luax_pushboolean(L, t->isStopped());
+	return 1;
+}
+
+int w_Source_isPaused(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	luax_pushboolean(L, t->isPaused());
+	return 1;
+}
+
+int w_Source_isStatic(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	luax_pushboolean(L, t->isStatic());
+	return 1;
+}
+
+int w_Source_setVolumeLimits(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float vmin = (float)luaL_checknumber(L, 2);
+	float vmax = (float)luaL_checknumber(L, 3);
+	if (vmin < .0f || vmin > 1.f || vmax < .0f || vmax > 1.f)
+		return luaL_error(L, "Invalid volume limits: [%f:%f]. Must be in [0:1]", vmin, vmax);
+	t->setMinVolume(vmin);
+	t->setMaxVolume(vmin);
+	return 0;
+}
+
+int w_Source_getVolumeLimits(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	lua_pushnumber(L, t->getMinVolume());
+	lua_pushnumber(L, t->getMaxVolume());
+	return 2;
+}
+
+int w_Source_setDistance(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float dref = (float)luaL_checknumber(L, 2);
+	float dmax = (float)luaL_checknumber(L, 3);
+	if (dref < .0f || dmax < .0f)
+		return luaL_error(L, "Invalid distances: %f, %f. Must be > 0", dref, dmax);
+	t->setReferenceDistance(dref);
+	t->setMaxDistance(dmax);
+	return 0;
+}
+
+int w_Source_getDistance(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	lua_pushnumber(L, t->getReferenceDistance());
+	lua_pushnumber(L, t->getMaxDistance());
+	return 2;
+}
+
+int w_Source_setRolloff(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	float rolloff = (float)luaL_checknumber(L, 2);
+	if (rolloff < .0f)
+		return luaL_error(L, "Invalid rolloff: %f. Must be > 0.", rolloff);
+	t->setRolloffFactor(rolloff);
+	return 0;
+}
+
+int w_Source_getRolloff(lua_State *L)
+{
+	Source *t = luax_checksource(L, 1);
+	lua_pushnumber(L, t->getRolloffFactor());
+	return 1;
+}
+
+static const luaL_Reg functions[] =
+{
+	{ "play", w_Source_play },
+	{ "stop", w_Source_stop },
+	{ "pause", w_Source_pause },
+	{ "resume", w_Source_resume },
+	{ "rewind", w_Source_rewind },
+
+	{ "setPitch", w_Source_setPitch },
+	{ "getPitch", w_Source_getPitch },
+	{ "setVolume", w_Source_setVolume },
+	{ "getVolume", w_Source_getVolume },
+	{ "seek", w_Source_seek },
+	{ "tell", w_Source_tell },
+	{ "setPosition", w_Source_setPosition },
+	{ "getPosition", w_Source_getPosition },
+	{ "setVelocity", w_Source_setVelocity },
+	{ "getVelocity", w_Source_getVelocity },
+	{ "setDirection", w_Source_setDirection },
+	{ "getDirection", w_Source_getDirection },
+
+	{ "setLooping", w_Source_setLooping },
+	{ "isLooping", w_Source_isLooping },
+	{ "isStopped", w_Source_isStopped },
+	{ "isPaused", w_Source_isPaused },
+	{ "isStatic", w_Source_isStatic },
+
+	{ "setVolumeLimits", w_Source_setVolumeLimits },
+	{ "getVolumeLimits", w_Source_getVolumeLimits },
+	{ "setDistance", w_Source_setDistance },
+	{ "getDistance", w_Source_setDistance },
+	{ "setRolloff", w_Source_setRolloff},
+	{ "getRolloff", w_Source_getRolloff},
+
+	{ 0, 0 }
+};
+
+extern "C" int luaopen_source(lua_State *L)
+{
+	return luax_register_type(L, "Source", functions);
+}
+
+} // audio
+} // love

+ 66 - 65
src/modules/audio/wrap_Source.h

@@ -1,65 +1,66 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_AUDIO_WRAP_SOURCE_H
-#define LOVE_AUDIO_WRAP_SOURCE_H
-
-#include <common/runtime.h>
-#include "Source.h"
-
-namespace love
-{
-namespace audio
-{
-	Source * luax_checksource(lua_State * L, int idx);
-	int w_Source_play(lua_State * L);
-	int w_Source_stop(lua_State * L);
-	int w_Source_pause(lua_State * L);
-	int w_Source_resume(lua_State * L);
-	int w_Source_rewind(lua_State * L);
-	int w_Source_setPitch(lua_State * L);
-	int w_Source_getPitch(lua_State * L);
-	int w_Source_setVolume(lua_State * L);
-	int w_Source_getVolume(lua_State * L);
-	int w_Source_seek(lua_State * L);
-	int w_Source_tell(lua_State * L);
-	int w_Source_setPosition(lua_State * L);
-	int w_Source_getPosition(lua_State * L);
-	int w_Source_setVelocity(lua_State * L);
-	int w_Source_getVelocity(lua_State * L);
-	int w_Source_setDirection(lua_State * L);
-	int w_Source_getDirection(lua_State * L);
-	int w_Source_setLooping(lua_State * L);
-	int w_Source_isLooping(lua_State * L);
-	int w_Source_isStopped(lua_State * L);
-	int w_Source_isPaused(lua_State * L);
-	int w_Source_isStatic(lua_State * L);
-	int w_Source_setVolumeLimits(lua_State * L);
-	int w_Source_getVolumeLimits(lua_State * L);
-	int w_Source_setDistance(lua_State * L);
-	int w_Source_getDistance(lua_State * L);
-	int w_Source_setRolloff(lua_State * L);
-	int w_Source_getRolloff(lua_State * L);
-	extern "C" int luaopen_source(lua_State * L);
-
-} // audio
-} // love
-
-#endif // LOVE_AUDIO_WRAP_SOURCE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_AUDIO_WRAP_SOURCE_H
+#define LOVE_AUDIO_WRAP_SOURCE_H
+
+#include "common/runtime.h"
+#include "Source.h"
+
+namespace love
+{
+namespace audio
+{
+
+Source *luax_checksource(lua_State *L, int idx);
+int w_Source_play(lua_State *L);
+int w_Source_stop(lua_State *L);
+int w_Source_pause(lua_State *L);
+int w_Source_resume(lua_State *L);
+int w_Source_rewind(lua_State *L);
+int w_Source_setPitch(lua_State *L);
+int w_Source_getPitch(lua_State *L);
+int w_Source_setVolume(lua_State *L);
+int w_Source_getVolume(lua_State *L);
+int w_Source_seek(lua_State *L);
+int w_Source_tell(lua_State *L);
+int w_Source_setPosition(lua_State *L);
+int w_Source_getPosition(lua_State *L);
+int w_Source_setVelocity(lua_State *L);
+int w_Source_getVelocity(lua_State *L);
+int w_Source_setDirection(lua_State *L);
+int w_Source_getDirection(lua_State *L);
+int w_Source_setLooping(lua_State *L);
+int w_Source_isLooping(lua_State *L);
+int w_Source_isStopped(lua_State *L);
+int w_Source_isPaused(lua_State *L);
+int w_Source_isStatic(lua_State *L);
+int w_Source_setVolumeLimits(lua_State *L);
+int w_Source_getVolumeLimits(lua_State *L);
+int w_Source_setDistance(lua_State *L);
+int w_Source_getDistance(lua_State *L);
+int w_Source_setRolloff(lua_State *L);
+int w_Source_getRolloff(lua_State *L);
+extern "C" int luaopen_source(lua_State *L);
+
+} // audio
+} // love
+
+#endif // LOVE_AUDIO_WRAP_SOURCE_H

+ 297 - 295
src/modules/event/Event.cpp

@@ -1,295 +1,297 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Event.h"
-
-using love::thread::Mutex;
-using love::thread::Lock;
-
-namespace love
-{
-namespace event
-{
-	Message::Message(std::string name, Variant *a, Variant *b, Variant *c, Variant *d)
-		: name(name), nargs(0)
-	{
-		args[0] = a;
-		args[1] = b;
-		args[2] = c;
-		args[3] = d;
-		for (int i = 0; i < 4; i++)
-		{
-			if (!args[i])
-				continue;
-			args[i]->retain();
-			nargs++;
-		}
-	}
-
-	Message::~Message()
-	{
-		for (int i = 0; i < nargs; i++)
-			args[i]->release();
-	}
-
-	int Message::toLua(lua_State *L)
-	{
-		luax_pushstring(L, name);
-		for (int i = 0; i < nargs; i++)
-			args[i]->toLua(L);
-		return nargs+1;
-	}
-
-	Message *Message::fromLua(lua_State *L, int n)
-	{
-		std::string name = luax_checkstring(L, n);
-		n++;
-		Message *m = new Message(name);
-		for (int i = 0; i < 4; i++)
-		{
-			if (lua_isnoneornil(L, n+i))
-				break;
-			m->args[i] = Variant::fromLua(L, n+i);
-			if (!m->args[i])
-			{
-				delete m;
-				luaL_error(L, "Argument %d can't be stored safely\nExpected boolean, number, string or userdata.", n+i);
-				return NULL;
-			}
-			m->nargs++;
-		}
-		return m;
-	}
-
-	Event::~Event()
-	{
-	}
-
-	void Event::push(Message *msg)
-	{
-		Lock lock(mutex);
-		msg->retain();
-		queue.push(msg);
-	}
-
-	bool Event::poll(Message *&msg)
-	{
-		Lock lock(mutex);
-		if (queue.empty())
-			return false;
-		msg = queue.front();
-		queue.pop();
-		return true;
-	}
-
-	void Event::clear()
-	{
-		Lock lock(mutex);
-		while (!queue.empty())
-		{
-			queue.back()->release();
-			queue.pop();
-		}
-	}
-
-	bool Event::getConstant(const char * in, love::mouse::Mouse::Button & out)
-	{
-		return buttons.find(in, out);
-	}
-
-	bool Event::getConstant(love::mouse::Mouse::Button in, const char *& out)
-	{
-		return buttons.find(in, out);
-	}
-
-	bool Event::getConstant(const char * in, love::keyboard::Keyboard::Key & out)
-	{
-		return keys.find(in, out);
-	}
-
-	bool Event::getConstant(love::keyboard::Keyboard::Key in, const char *& out)
-	{
-		return keys.find(in, out);
-	}
-
-	StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry Event::buttonEntries[] =
-	{
-		{"l", love::mouse::Mouse::BUTTON_LEFT},
-		{"m", love::mouse::Mouse::BUTTON_MIDDLE},
-		{"r", love::mouse::Mouse::BUTTON_RIGHT},
-		{"wu", love::mouse::Mouse::BUTTON_WHEELUP},
-		{"wd", love::mouse::Mouse::BUTTON_WHEELDOWN},
-		{"x1", love::mouse::Mouse::BUTTON_X1},
-		{"x2", love::mouse::Mouse::BUTTON_X2},
-	};
-
-	StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM> Event::buttons(Event::buttonEntries, sizeof(Event::buttonEntries));
-
-	StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry Event::keyEntries[] =
-	{
-		{"backspace", love::keyboard::Keyboard::KEY_BACKSPACE},
-		{"tab", love::keyboard::Keyboard::KEY_TAB},
-		{"clear", love::keyboard::Keyboard::KEY_CLEAR},
-		{"return", love::keyboard::Keyboard::KEY_RETURN},
-		{"pause", love::keyboard::Keyboard::KEY_PAUSE},
-		{"escape", love::keyboard::Keyboard::KEY_ESCAPE},
-		{" ", love::keyboard::Keyboard::KEY_SPACE},
-		{"!", love::keyboard::Keyboard::KEY_EXCLAIM},
-		{"\"", love::keyboard::Keyboard::KEY_QUOTEDBL},
-		{"#", love::keyboard::Keyboard::KEY_HASH},
-		{"$", love::keyboard::Keyboard::KEY_DOLLAR},
-		{"&", love::keyboard::Keyboard::KEY_AMPERSAND},
-		{"'", love::keyboard::Keyboard::KEY_QUOTE},
-		{"(", love::keyboard::Keyboard::KEY_LEFTPAREN},
-		{")", love::keyboard::Keyboard::KEY_RIGHTPAREN},
-		{"*", love::keyboard::Keyboard::KEY_ASTERISK},
-		{"+", love::keyboard::Keyboard::KEY_PLUS},
-		{",", love::keyboard::Keyboard::KEY_COMMA},
-		{"-", love::keyboard::Keyboard::KEY_MINUS},
-		{".", love::keyboard::Keyboard::KEY_PERIOD},
-		{"/", love::keyboard::Keyboard::KEY_SLASH},
-		{"0", love::keyboard::Keyboard::KEY_0},
-		{"1", love::keyboard::Keyboard::KEY_1},
-		{"2", love::keyboard::Keyboard::KEY_2},
-		{"3", love::keyboard::Keyboard::KEY_3},
-		{"4", love::keyboard::Keyboard::KEY_4},
-		{"5", love::keyboard::Keyboard::KEY_5},
-		{"6", love::keyboard::Keyboard::KEY_6},
-		{"7", love::keyboard::Keyboard::KEY_7},
-		{"8", love::keyboard::Keyboard::KEY_8},
-		{"9", love::keyboard::Keyboard::KEY_9},
-		{":", love::keyboard::Keyboard::KEY_COLON},
-		{";", love::keyboard::Keyboard::KEY_SEMICOLON},
-		{"<", love::keyboard::Keyboard::KEY_LESS},
-		{"=", love::keyboard::Keyboard::KEY_EQUALS},
-		{">", love::keyboard::Keyboard::KEY_GREATER},
-		{"?", love::keyboard::Keyboard::KEY_QUESTION},
-		{"@", love::keyboard::Keyboard::KEY_AT},
-
-		{"[", love::keyboard::Keyboard::KEY_LEFTBRACKET},
-		{"\\", love::keyboard::Keyboard::KEY_BACKSLASH},
-		{"]", love::keyboard::Keyboard::KEY_RIGHTBRACKET},
-		{"^", love::keyboard::Keyboard::KEY_CARET},
-		{"_", love::keyboard::Keyboard::KEY_UNDERSCORE},
-		{"`", love::keyboard::Keyboard::KEY_BACKQUOTE},
-		{"a", love::keyboard::Keyboard::KEY_A},
-		{"b", love::keyboard::Keyboard::KEY_B},
-		{"c", love::keyboard::Keyboard::KEY_C},
-		{"d", love::keyboard::Keyboard::KEY_D},
-		{"e", love::keyboard::Keyboard::KEY_E},
-		{"f", love::keyboard::Keyboard::KEY_F},
-		{"g", love::keyboard::Keyboard::KEY_G},
-		{"h", love::keyboard::Keyboard::KEY_H},
-		{"i", love::keyboard::Keyboard::KEY_I},
-		{"j", love::keyboard::Keyboard::KEY_J},
-		{"k", love::keyboard::Keyboard::KEY_K},
-		{"l", love::keyboard::Keyboard::KEY_L},
-		{"m", love::keyboard::Keyboard::KEY_M},
-		{"n", love::keyboard::Keyboard::KEY_N},
-		{"o", love::keyboard::Keyboard::KEY_O},
-		{"p", love::keyboard::Keyboard::KEY_P},
-		{"q", love::keyboard::Keyboard::KEY_Q},
-		{"r", love::keyboard::Keyboard::KEY_R},
-		{"s", love::keyboard::Keyboard::KEY_S},
-		{"t", love::keyboard::Keyboard::KEY_T},
-		{"u", love::keyboard::Keyboard::KEY_U},
-		{"v", love::keyboard::Keyboard::KEY_V},
-		{"w", love::keyboard::Keyboard::KEY_W},
-		{"x", love::keyboard::Keyboard::KEY_X},
-		{"y", love::keyboard::Keyboard::KEY_Y},
-		{"z", love::keyboard::Keyboard::KEY_Z},
-		{"delete", love::keyboard::Keyboard::KEY_DELETE},
-
-		{"kp0", love::keyboard::Keyboard::KEY_KP0},
-		{"kp1", love::keyboard::Keyboard::KEY_KP1},
-		{"kp2", love::keyboard::Keyboard::KEY_KP2},
-		{"kp3", love::keyboard::Keyboard::KEY_KP3},
-		{"kp4", love::keyboard::Keyboard::KEY_KP4},
-		{"kp5", love::keyboard::Keyboard::KEY_KP5},
-		{"kp6", love::keyboard::Keyboard::KEY_KP6},
-		{"kp7", love::keyboard::Keyboard::KEY_KP7},
-		{"kp8", love::keyboard::Keyboard::KEY_KP8},
-		{"kp9", love::keyboard::Keyboard::KEY_KP9},
-		{"kp.", love::keyboard::Keyboard::KEY_KP_PERIOD},
-		{"kp/", love::keyboard::Keyboard::KEY_KP_DIVIDE},
-		{"kp*", love::keyboard::Keyboard::KEY_KP_MULTIPLY},
-		{"kp-", love::keyboard::Keyboard::KEY_KP_MINUS},
-		{"kp+", love::keyboard::Keyboard::KEY_KP_PLUS},
-		{"kpenter", love::keyboard::Keyboard::KEY_KP_ENTER},
-		{"kp=", love::keyboard::Keyboard::KEY_KP_EQUALS},
-
-		{"up", love::keyboard::Keyboard::KEY_UP},
-		{"down", love::keyboard::Keyboard::KEY_DOWN},
-		{"right", love::keyboard::Keyboard::KEY_RIGHT},
-		{"left", love::keyboard::Keyboard::KEY_LEFT},
-		{"insert", love::keyboard::Keyboard::KEY_INSERT},
-		{"home", love::keyboard::Keyboard::KEY_HOME},
-		{"end", love::keyboard::Keyboard::KEY_END},
-		{"pageup", love::keyboard::Keyboard::KEY_PAGEUP},
-		{"pagedown", love::keyboard::Keyboard::KEY_PAGEDOWN},
-
-		{"f1", love::keyboard::Keyboard::KEY_F1},
-		{"f2", love::keyboard::Keyboard::KEY_F2},
-		{"f3", love::keyboard::Keyboard::KEY_F3},
-		{"f4", love::keyboard::Keyboard::KEY_F4},
-		{"f5", love::keyboard::Keyboard::KEY_F5},
-		{"f6", love::keyboard::Keyboard::KEY_F6},
-		{"f7", love::keyboard::Keyboard::KEY_F7},
-		{"f8", love::keyboard::Keyboard::KEY_F8},
-		{"f9", love::keyboard::Keyboard::KEY_F9},
-		{"f10", love::keyboard::Keyboard::KEY_F10},
-		{"f11", love::keyboard::Keyboard::KEY_F11},
-		{"f12", love::keyboard::Keyboard::KEY_F12},
-		{"f13", love::keyboard::Keyboard::KEY_F13},
-		{"f14", love::keyboard::Keyboard::KEY_F14},
-		{"f15", love::keyboard::Keyboard::KEY_F15},
-
-		{"numlock", love::keyboard::Keyboard::KEY_NUMLOCK},
-		{"capslock", love::keyboard::Keyboard::KEY_CAPSLOCK},
-		{"scrollock", love::keyboard::Keyboard::KEY_SCROLLOCK},
-		{"rshift", love::keyboard::Keyboard::KEY_RSHIFT},
-		{"lshift", love::keyboard::Keyboard::KEY_LSHIFT},
-		{"rctrl", love::keyboard::Keyboard::KEY_RCTRL},
-		{"lctrl", love::keyboard::Keyboard::KEY_LCTRL},
-		{"ralt", love::keyboard::Keyboard::KEY_RALT},
-		{"lalt", love::keyboard::Keyboard::KEY_LALT},
-		{"rmeta", love::keyboard::Keyboard::KEY_RMETA},
-		{"lmeta", love::keyboard::Keyboard::KEY_LMETA},
-		{"lsuper", love::keyboard::Keyboard::KEY_LSUPER},
-		{"rsuper", love::keyboard::Keyboard::KEY_RSUPER},
-		{"mode", love::keyboard::Keyboard::KEY_MODE},
-		{"compose", love::keyboard::Keyboard::KEY_COMPOSE},
-
-		{"help", love::keyboard::Keyboard::KEY_HELP},
-		{"print", love::keyboard::Keyboard::KEY_PRINT},
-		{"sysreq", love::keyboard::Keyboard::KEY_SYSREQ},
-		{"break", love::keyboard::Keyboard::KEY_BREAK},
-		{"menu", love::keyboard::Keyboard::KEY_MENU},
-		{"power", love::keyboard::Keyboard::KEY_POWER},
-		{"euro", love::keyboard::Keyboard::KEY_EURO},
-		{"undo", love::keyboard::Keyboard::KEY_UNDO},
-
-		{"unknown", love::keyboard::Keyboard::KEY_UNKNOWN},
-	};
-
-	StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM> Event::keys(Event::keyEntries, sizeof(Event::keyEntries));
-
-} // event
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Event.h"
+
+using love::thread::Mutex;
+using love::thread::Lock;
+
+namespace love
+{
+namespace event
+{
+
+Message::Message(std::string name, Variant *a, Variant *b, Variant *c, Variant *d)
+	: name(name)
+	, nargs(0)
+{
+	args[0] = a;
+	args[1] = b;
+	args[2] = c;
+	args[3] = d;
+	for (int i = 0; i < 4; i++)
+	{
+		if (!args[i])
+			continue;
+		args[i]->retain();
+		nargs++;
+	}
+}
+
+Message::~Message()
+{
+	for (int i = 0; i < nargs; i++)
+		args[i]->release();
+}
+
+int Message::toLua(lua_State *L)
+{
+	luax_pushstring(L, name);
+	for (int i = 0; i < nargs; i++)
+		args[i]->toLua(L);
+	return nargs+1;
+}
+
+Message *Message::fromLua(lua_State *L, int n)
+{
+	std::string name = luax_checkstring(L, n);
+	n++;
+	Message *m = new Message(name);
+	for (int i = 0; i < 4; i++)
+	{
+		if (lua_isnoneornil(L, n+i))
+			break;
+		m->args[i] = Variant::fromLua(L, n+i);
+		if (!m->args[i])
+		{
+			delete m;
+			luaL_error(L, "Argument %d can't be stored safely\nExpected boolean, number, string or userdata.", n+i);
+			return NULL;
+		}
+		m->nargs++;
+	}
+	return m;
+}
+
+Event::~Event()
+{
+}
+
+void Event::push(Message *msg)
+{
+	Lock lock(mutex);
+	msg->retain();
+	queue.push(msg);
+}
+
+bool Event::poll(Message *&msg)
+{
+	Lock lock(mutex);
+	if (queue.empty())
+		return false;
+	msg = queue.front();
+	queue.pop();
+	return true;
+}
+
+void Event::clear()
+{
+	Lock lock(mutex);
+	while (!queue.empty())
+	{
+		queue.back()->release();
+		queue.pop();
+	}
+}
+
+bool Event::getConstant(const char *in, love::mouse::Mouse::Button &out)
+{
+	return buttons.find(in, out);
+}
+
+bool Event::getConstant(love::mouse::Mouse::Button in, const char  *&out)
+{
+	return buttons.find(in, out);
+}
+
+bool Event::getConstant(const char *in, love::keyboard::Keyboard::Key &out)
+{
+	return keys.find(in, out);
+}
+
+bool Event::getConstant(love::keyboard::Keyboard::Key in, const char  *&out)
+{
+	return keys.find(in, out);
+}
+
+StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry Event::buttonEntries[] =
+{
+	{"l", love::mouse::Mouse::BUTTON_LEFT},
+	{"m", love::mouse::Mouse::BUTTON_MIDDLE},
+	{"r", love::mouse::Mouse::BUTTON_RIGHT},
+	{"wu", love::mouse::Mouse::BUTTON_WHEELUP},
+	{"wd", love::mouse::Mouse::BUTTON_WHEELDOWN},
+	{"x1", love::mouse::Mouse::BUTTON_X1},
+	{"x2", love::mouse::Mouse::BUTTON_X2},
+};
+
+StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM> Event::buttons(Event::buttonEntries, sizeof(Event::buttonEntries));
+
+StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry Event::keyEntries[] =
+{
+	{"backspace", love::keyboard::Keyboard::KEY_BACKSPACE},
+	{"tab", love::keyboard::Keyboard::KEY_TAB},
+	{"clear", love::keyboard::Keyboard::KEY_CLEAR},
+	{"return", love::keyboard::Keyboard::KEY_RETURN},
+	{"pause", love::keyboard::Keyboard::KEY_PAUSE},
+	{"escape", love::keyboard::Keyboard::KEY_ESCAPE},
+	{" ", love::keyboard::Keyboard::KEY_SPACE},
+	{"!", love::keyboard::Keyboard::KEY_EXCLAIM},
+	{"\"", love::keyboard::Keyboard::KEY_QUOTEDBL},
+	{"#", love::keyboard::Keyboard::KEY_HASH},
+	{"$", love::keyboard::Keyboard::KEY_DOLLAR},
+	{"&", love::keyboard::Keyboard::KEY_AMPERSAND},
+	{"'", love::keyboard::Keyboard::KEY_QUOTE},
+	{"(", love::keyboard::Keyboard::KEY_LEFTPAREN},
+	{")", love::keyboard::Keyboard::KEY_RIGHTPAREN},
+	{"*", love::keyboard::Keyboard::KEY_ASTERISK},
+	{"+", love::keyboard::Keyboard::KEY_PLUS},
+	{",", love::keyboard::Keyboard::KEY_COMMA},
+	{"-", love::keyboard::Keyboard::KEY_MINUS},
+	{".", love::keyboard::Keyboard::KEY_PERIOD},
+	{"/", love::keyboard::Keyboard::KEY_SLASH},
+	{"0", love::keyboard::Keyboard::KEY_0},
+	{"1", love::keyboard::Keyboard::KEY_1},
+	{"2", love::keyboard::Keyboard::KEY_2},
+	{"3", love::keyboard::Keyboard::KEY_3},
+	{"4", love::keyboard::Keyboard::KEY_4},
+	{"5", love::keyboard::Keyboard::KEY_5},
+	{"6", love::keyboard::Keyboard::KEY_6},
+	{"7", love::keyboard::Keyboard::KEY_7},
+	{"8", love::keyboard::Keyboard::KEY_8},
+	{"9", love::keyboard::Keyboard::KEY_9},
+	{":", love::keyboard::Keyboard::KEY_COLON},
+	{";", love::keyboard::Keyboard::KEY_SEMICOLON},
+	{"<", love::keyboard::Keyboard::KEY_LESS},
+	{"=", love::keyboard::Keyboard::KEY_EQUALS},
+	{">", love::keyboard::Keyboard::KEY_GREATER},
+	{"?", love::keyboard::Keyboard::KEY_QUESTION},
+	{"@", love::keyboard::Keyboard::KEY_AT},
+
+	{"[", love::keyboard::Keyboard::KEY_LEFTBRACKET},
+	{"\\", love::keyboard::Keyboard::KEY_BACKSLASH},
+	{"]", love::keyboard::Keyboard::KEY_RIGHTBRACKET},
+	{"^", love::keyboard::Keyboard::KEY_CARET},
+	{"_", love::keyboard::Keyboard::KEY_UNDERSCORE},
+	{"`", love::keyboard::Keyboard::KEY_BACKQUOTE},
+	{"a", love::keyboard::Keyboard::KEY_A},
+	{"b", love::keyboard::Keyboard::KEY_B},
+	{"c", love::keyboard::Keyboard::KEY_C},
+	{"d", love::keyboard::Keyboard::KEY_D},
+	{"e", love::keyboard::Keyboard::KEY_E},
+	{"f", love::keyboard::Keyboard::KEY_F},
+	{"g", love::keyboard::Keyboard::KEY_G},
+	{"h", love::keyboard::Keyboard::KEY_H},
+	{"i", love::keyboard::Keyboard::KEY_I},
+	{"j", love::keyboard::Keyboard::KEY_J},
+	{"k", love::keyboard::Keyboard::KEY_K},
+	{"l", love::keyboard::Keyboard::KEY_L},
+	{"m", love::keyboard::Keyboard::KEY_M},
+	{"n", love::keyboard::Keyboard::KEY_N},
+	{"o", love::keyboard::Keyboard::KEY_O},
+	{"p", love::keyboard::Keyboard::KEY_P},
+	{"q", love::keyboard::Keyboard::KEY_Q},
+	{"r", love::keyboard::Keyboard::KEY_R},
+	{"s", love::keyboard::Keyboard::KEY_S},
+	{"t", love::keyboard::Keyboard::KEY_T},
+	{"u", love::keyboard::Keyboard::KEY_U},
+	{"v", love::keyboard::Keyboard::KEY_V},
+	{"w", love::keyboard::Keyboard::KEY_W},
+	{"x", love::keyboard::Keyboard::KEY_X},
+	{"y", love::keyboard::Keyboard::KEY_Y},
+	{"z", love::keyboard::Keyboard::KEY_Z},
+	{"delete", love::keyboard::Keyboard::KEY_DELETE},
+
+	{"kp0", love::keyboard::Keyboard::KEY_KP0},
+	{"kp1", love::keyboard::Keyboard::KEY_KP1},
+	{"kp2", love::keyboard::Keyboard::KEY_KP2},
+	{"kp3", love::keyboard::Keyboard::KEY_KP3},
+	{"kp4", love::keyboard::Keyboard::KEY_KP4},
+	{"kp5", love::keyboard::Keyboard::KEY_KP5},
+	{"kp6", love::keyboard::Keyboard::KEY_KP6},
+	{"kp7", love::keyboard::Keyboard::KEY_KP7},
+	{"kp8", love::keyboard::Keyboard::KEY_KP8},
+	{"kp9", love::keyboard::Keyboard::KEY_KP9},
+	{"kp.", love::keyboard::Keyboard::KEY_KP_PERIOD},
+	{"kp/", love::keyboard::Keyboard::KEY_KP_DIVIDE},
+	{"kp*", love::keyboard::Keyboard::KEY_KP_MULTIPLY},
+	{"kp-", love::keyboard::Keyboard::KEY_KP_MINUS},
+	{"kp+", love::keyboard::Keyboard::KEY_KP_PLUS},
+	{"kpenter", love::keyboard::Keyboard::KEY_KP_ENTER},
+	{"kp=", love::keyboard::Keyboard::KEY_KP_EQUALS},
+
+	{"up", love::keyboard::Keyboard::KEY_UP},
+	{"down", love::keyboard::Keyboard::KEY_DOWN},
+	{"right", love::keyboard::Keyboard::KEY_RIGHT},
+	{"left", love::keyboard::Keyboard::KEY_LEFT},
+	{"insert", love::keyboard::Keyboard::KEY_INSERT},
+	{"home", love::keyboard::Keyboard::KEY_HOME},
+	{"end", love::keyboard::Keyboard::KEY_END},
+	{"pageup", love::keyboard::Keyboard::KEY_PAGEUP},
+	{"pagedown", love::keyboard::Keyboard::KEY_PAGEDOWN},
+
+	{"f1", love::keyboard::Keyboard::KEY_F1},
+	{"f2", love::keyboard::Keyboard::KEY_F2},
+	{"f3", love::keyboard::Keyboard::KEY_F3},
+	{"f4", love::keyboard::Keyboard::KEY_F4},
+	{"f5", love::keyboard::Keyboard::KEY_F5},
+	{"f6", love::keyboard::Keyboard::KEY_F6},
+	{"f7", love::keyboard::Keyboard::KEY_F7},
+	{"f8", love::keyboard::Keyboard::KEY_F8},
+	{"f9", love::keyboard::Keyboard::KEY_F9},
+	{"f10", love::keyboard::Keyboard::KEY_F10},
+	{"f11", love::keyboard::Keyboard::KEY_F11},
+	{"f12", love::keyboard::Keyboard::KEY_F12},
+	{"f13", love::keyboard::Keyboard::KEY_F13},
+	{"f14", love::keyboard::Keyboard::KEY_F14},
+	{"f15", love::keyboard::Keyboard::KEY_F15},
+
+	{"numlock", love::keyboard::Keyboard::KEY_NUMLOCK},
+	{"capslock", love::keyboard::Keyboard::KEY_CAPSLOCK},
+	{"scrollock", love::keyboard::Keyboard::KEY_SCROLLOCK},
+	{"rshift", love::keyboard::Keyboard::KEY_RSHIFT},
+	{"lshift", love::keyboard::Keyboard::KEY_LSHIFT},
+	{"rctrl", love::keyboard::Keyboard::KEY_RCTRL},
+	{"lctrl", love::keyboard::Keyboard::KEY_LCTRL},
+	{"ralt", love::keyboard::Keyboard::KEY_RALT},
+	{"lalt", love::keyboard::Keyboard::KEY_LALT},
+	{"rmeta", love::keyboard::Keyboard::KEY_RMETA},
+	{"lmeta", love::keyboard::Keyboard::KEY_LMETA},
+	{"lsuper", love::keyboard::Keyboard::KEY_LSUPER},
+	{"rsuper", love::keyboard::Keyboard::KEY_RSUPER},
+	{"mode", love::keyboard::Keyboard::KEY_MODE},
+	{"compose", love::keyboard::Keyboard::KEY_COMPOSE},
+
+	{"help", love::keyboard::Keyboard::KEY_HELP},
+	{"print", love::keyboard::Keyboard::KEY_PRINT},
+	{"sysreq", love::keyboard::Keyboard::KEY_SYSREQ},
+	{"break", love::keyboard::Keyboard::KEY_BREAK},
+	{"menu", love::keyboard::Keyboard::KEY_MENU},
+	{"power", love::keyboard::Keyboard::KEY_POWER},
+	{"euro", love::keyboard::Keyboard::KEY_EURO},
+	{"undo", love::keyboard::Keyboard::KEY_UNDO},
+
+	{"unknown", love::keyboard::Keyboard::KEY_UNKNOWN},
+};
+
+StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM> Event::keys(Event::keyEntries, sizeof(Event::keyEntries));
+
+} // event
+} // love

+ 83 - 83
src/modules/event/Event.h

@@ -1,83 +1,83 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_EVENT_EVENT_H
-#define LOVE_EVENT_EVENT_H
-
-// LOVE
-#include <common/Module.h>
-#include <common/StringMap.h>
-#include <common/Variant.h>
-#include <keyboard/Keyboard.h>
-#include <mouse/Mouse.h>
-#include <thread/threads.h>
-
-// STL
-#include <queue>
-
-namespace love
-{
-namespace event
-{
-	class Message : public Object
-	{
-	private:
-		std::string name;
-		Variant *args[4];
-		int nargs;
-
-	public:
-		Message(std::string name, Variant *a = NULL, Variant *b = NULL, Variant *c = NULL, Variant *d = NULL);
-		~Message();
-
-		int toLua(lua_State *L);
-		static Message *fromLua(lua_State *L, int n);
-	};
-
-	class Event : public Module
-	{
-	public:
-		virtual ~Event();
-
-		void push(Message *msg);
-		bool poll(Message *&msg);
-		virtual void clear();
-
-		virtual void pump() = 0;
-
-		static bool getConstant(const char * in, love::mouse::Mouse::Button & out);
-		static bool getConstant(love::mouse::Mouse::Button in, const char *& out);
-		static bool getConstant(const char * in, love::keyboard::Keyboard::Key & out);
-		static bool getConstant(love::keyboard::Keyboard::Key in, const char *& out);
-
-	protected:
-		thread::Mutex mutex;
-		std::queue<Message*> queue;
-		static StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry buttonEntries[];
-		static StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM> buttons;
-		static StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry keyEntries[];
-		static StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM> keys;
-
-	}; // Event
-
-} // event
-} // love
-
-#endif // LOVE_EVENT_EVENT_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_EVENT_EVENT_H
+#define LOVE_EVENT_EVENT_H
+
+// LOVE
+#include "common/Module.h"
+#include "common/StringMap.h"
+#include "common/Variant.h"
+#include "keyboard/Keyboard.h"
+#include "mouse/Mouse.h"
+#include "thread/threads.h"
+
+// STL
+#include <queue>
+
+namespace love
+{
+namespace event
+{
+class Message : public Object
+{
+private:
+	std::string name;
+	Variant *args[4];
+	int nargs;
+
+public:
+	Message(std::string name, Variant *a = NULL, Variant *b = NULL, Variant *c = NULL, Variant *d = NULL);
+	~Message();
+
+	int toLua(lua_State *L);
+	static Message *fromLua(lua_State *L, int n);
+};
+
+class Event : public Module
+{
+public:
+	virtual ~Event();
+
+	void push(Message *msg);
+	bool poll(Message *&msg);
+	virtual void clear();
+
+	virtual void pump() = 0;
+
+	static bool getConstant(const char *in, love::mouse::Mouse::Button &out);
+	static bool getConstant(love::mouse::Mouse::Button in, const char  *&out);
+	static bool getConstant(const char *in, love::keyboard::Keyboard::Key &out);
+	static bool getConstant(love::keyboard::Keyboard::Key in, const char  *&out);
+
+protected:
+	thread::Mutex mutex;
+	std::queue<Message *> queue;
+	static StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry buttonEntries[];
+	static StringMap<love::mouse::Mouse::Button, love::mouse::Mouse::BUTTON_MAX_ENUM> buttons;
+	static StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry keyEntries[];
+	static StringMap<love::keyboard::Keyboard::Key, love::keyboard::Keyboard::KEY_MAX_ENUM> keys;
+
+}; // Event
+
+} // event
+} // love
+
+#endif // LOVE_EVENT_EVENT_H

+ 314 - 313
src/modules/event/sdl/Event.cpp

@@ -1,313 +1,314 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "Event.h"
-
-#include <keyboard/Keyboard.h>
-#include <mouse/Mouse.h>
-
-namespace love
-{
-namespace event
-{
-namespace sdl
-{
-	const char * Event::getName() const
-	{
-		return "love.event.sdl";
-	}
-
-	Event::Event()
-	{
-		SDL_EnableUNICODE(1);
-	}
-
-	void Event::pump()
-	{
-		SDL_PumpEvents();
-
-		static SDL_Event e;
-		SDL_EnableUNICODE(1);
-
-		Message *msg;
-
-		while (SDL_PollEvent(&e))
-		{
-			msg = convert(e);
-			if (msg)
-			{
-				push(msg);
-				msg->release();
-			}
-		}
-	}
-
-	Message *Event::wait()
-	{
-		static SDL_Event e;
-		bool ok = (SDL_WaitEvent(&e) == 1);
-		if (!ok)
-			return NULL;
-		return convert(e);
-	}
-
-	void Event::clear()
-	{
-		static SDL_Event e;
-
-		while (SDL_PollEvent(&e))
-		{
-			// Do nothing with 'e' ...
-		}
-
-		love::event::Event::clear();
-	}
-
-	Message *Event::convert(SDL_Event & e)
-	{
-		Message *msg = NULL;
-		love::keyboard::Keyboard::Key key;
-		love::mouse::Mouse::Button button;
-		Variant *arg1, *arg2, *arg3;
-		const char *txt;
-		switch(e.type)
-		{
-		case SDL_KEYDOWN:
-			if (keys.find(e.key.keysym.sym, key) && love::event::Event::keys.find(key, txt))
-			{
-				arg1 = new Variant(txt, strlen(txt));
-				arg2 = new Variant((double) e.key.keysym.unicode);
-				msg = new Message("keypressed", arg1, arg2);
-				arg1->release();
-				arg2->release();
-			}
-			break;
-		case SDL_KEYUP:
-			if (keys.find(e.key.keysym.sym, key) && love::event::Event::keys.find(key, txt))
-			{
-				arg1 = new Variant(txt, strlen(txt));
-				msg = new Message("keyreleased", arg1);
-				arg1->release();
-			}
-			break;
-		case SDL_MOUSEBUTTONDOWN:
-		case SDL_MOUSEBUTTONUP:
-			if (buttons.find(e.button.button, button) && love::event::Event::buttons.find(button, txt))
-			{
-				arg1 = new Variant((double) e.button.x);
-				arg2 = new Variant((double) e.button.y);
-				arg3 = new Variant(txt, strlen(txt));
-				msg = new Message((e.type == SDL_MOUSEBUTTONDOWN) ?
-						"mousepressed" : "mousereleased",
-						arg1, arg2, arg3);
-				arg1->release();
-				arg2->release();
-				arg3->release();
-			}
-			break;
-		case SDL_JOYBUTTONDOWN:
-		case SDL_JOYBUTTONUP:
-			arg1 = new Variant((double) (e.jbutton.which+1));
-			arg2 = new Variant((double) (e.jbutton.button+1));
-			msg = new Message((e.type == SDL_JOYBUTTONDOWN) ?
-					"joystickpressed" : "joystickreleased",
-					arg1, arg2);
-			arg1->release();
-			arg2->release();
-			break;
-		case SDL_ACTIVEEVENT:
-			arg1 = new Variant(e.active.gain != 0);
-			if (e.active.state & SDL_APPINPUTFOCUS)
-				msg = new Message("focus", arg1);
-			arg1->release();
-			break;
-		case SDL_QUIT:
-			msg = new Message("quit");
-			break;
-		}
-
-		return msg;
-	}
-
-	EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry Event::keyEntries[] =
-	{
-		{ love::keyboard::Keyboard::KEY_BACKSPACE, SDLK_BACKSPACE},
-		{ love::keyboard::Keyboard::KEY_TAB, SDLK_TAB},
-		{ love::keyboard::Keyboard::KEY_CLEAR, SDLK_CLEAR},
-		{ love::keyboard::Keyboard::KEY_RETURN, SDLK_RETURN},
-		{ love::keyboard::Keyboard::KEY_PAUSE, SDLK_PAUSE},
-		{ love::keyboard::Keyboard::KEY_ESCAPE, SDLK_ESCAPE },
-		{ love::keyboard::Keyboard::KEY_SPACE, SDLK_SPACE },
-		{ love::keyboard::Keyboard::KEY_EXCLAIM, SDLK_EXCLAIM },
-		{ love::keyboard::Keyboard::KEY_QUOTEDBL, SDLK_QUOTEDBL },
-		{ love::keyboard::Keyboard::KEY_HASH, SDLK_HASH },
-		{ love::keyboard::Keyboard::KEY_DOLLAR, SDLK_DOLLAR },
-		{ love::keyboard::Keyboard::KEY_AMPERSAND, SDLK_AMPERSAND },
-		{ love::keyboard::Keyboard::KEY_QUOTE, SDLK_QUOTE },
-		{ love::keyboard::Keyboard::KEY_LEFTPAREN, SDLK_LEFTPAREN },
-		{ love::keyboard::Keyboard::KEY_RIGHTPAREN, SDLK_RIGHTPAREN },
-		{ love::keyboard::Keyboard::KEY_ASTERISK, SDLK_ASTERISK },
-		{ love::keyboard::Keyboard::KEY_PLUS, SDLK_PLUS },
-		{ love::keyboard::Keyboard::KEY_COMMA, SDLK_COMMA },
-		{ love::keyboard::Keyboard::KEY_MINUS, SDLK_MINUS },
-		{ love::keyboard::Keyboard::KEY_PERIOD, SDLK_PERIOD },
-		{ love::keyboard::Keyboard::KEY_SLASH, SDLK_SLASH },
-		{ love::keyboard::Keyboard::KEY_0, SDLK_0 },
-		{ love::keyboard::Keyboard::KEY_1, SDLK_1 },
-		{ love::keyboard::Keyboard::KEY_2, SDLK_2 },
-		{ love::keyboard::Keyboard::KEY_3, SDLK_3 },
-		{ love::keyboard::Keyboard::KEY_4, SDLK_4 },
-		{ love::keyboard::Keyboard::KEY_5, SDLK_5 },
-		{ love::keyboard::Keyboard::KEY_6, SDLK_6 },
-		{ love::keyboard::Keyboard::KEY_7, SDLK_7 },
-		{ love::keyboard::Keyboard::KEY_8, SDLK_8 },
-		{ love::keyboard::Keyboard::KEY_9, SDLK_9 },
-		{ love::keyboard::Keyboard::KEY_COLON, SDLK_COLON },
-		{ love::keyboard::Keyboard::KEY_SEMICOLON, SDLK_SEMICOLON },
-		{ love::keyboard::Keyboard::KEY_LESS, SDLK_LESS },
-		{ love::keyboard::Keyboard::KEY_EQUALS, SDLK_EQUALS },
-		{ love::keyboard::Keyboard::KEY_GREATER, SDLK_GREATER },
-		{ love::keyboard::Keyboard::KEY_QUESTION, SDLK_QUESTION },
-		{ love::keyboard::Keyboard::KEY_AT, SDLK_AT },
-
-		{ love::keyboard::Keyboard::KEY_LEFTBRACKET, SDLK_LEFTBRACKET },
-		{ love::keyboard::Keyboard::KEY_BACKSLASH, SDLK_BACKSLASH },
-		{ love::keyboard::Keyboard::KEY_RIGHTBRACKET, SDLK_RIGHTBRACKET },
-		{ love::keyboard::Keyboard::KEY_CARET, SDLK_CARET },
-		{ love::keyboard::Keyboard::KEY_UNDERSCORE, SDLK_UNDERSCORE },
-		{ love::keyboard::Keyboard::KEY_BACKQUOTE, SDLK_BACKQUOTE },
-		{ love::keyboard::Keyboard::KEY_A, SDLK_a },
-		{ love::keyboard::Keyboard::KEY_B, SDLK_b },
-		{ love::keyboard::Keyboard::KEY_C, SDLK_c },
-		{ love::keyboard::Keyboard::KEY_D, SDLK_d },
-		{ love::keyboard::Keyboard::KEY_E, SDLK_e },
-		{ love::keyboard::Keyboard::KEY_F, SDLK_f },
-		{ love::keyboard::Keyboard::KEY_G, SDLK_g },
-		{ love::keyboard::Keyboard::KEY_H, SDLK_h },
-		{ love::keyboard::Keyboard::KEY_I, SDLK_i },
-		{ love::keyboard::Keyboard::KEY_J, SDLK_j },
-		{ love::keyboard::Keyboard::KEY_K, SDLK_k },
-		{ love::keyboard::Keyboard::KEY_L, SDLK_l },
-		{ love::keyboard::Keyboard::KEY_M, SDLK_m },
-		{ love::keyboard::Keyboard::KEY_N, SDLK_n },
-		{ love::keyboard::Keyboard::KEY_O, SDLK_o },
-		{ love::keyboard::Keyboard::KEY_P, SDLK_p },
-		{ love::keyboard::Keyboard::KEY_Q, SDLK_q },
-		{ love::keyboard::Keyboard::KEY_R, SDLK_r },
-		{ love::keyboard::Keyboard::KEY_S, SDLK_s },
-		{ love::keyboard::Keyboard::KEY_T, SDLK_t },
-		{ love::keyboard::Keyboard::KEY_U, SDLK_u },
-		{ love::keyboard::Keyboard::KEY_V, SDLK_v },
-		{ love::keyboard::Keyboard::KEY_W, SDLK_w },
-		{ love::keyboard::Keyboard::KEY_X, SDLK_x },
-		{ love::keyboard::Keyboard::KEY_Y, SDLK_y },
-		{ love::keyboard::Keyboard::KEY_Z, SDLK_z },
-		{ love::keyboard::Keyboard::KEY_DELETE, SDLK_DELETE },
-
-		{ love::keyboard::Keyboard::KEY_KP0, SDLK_KP0 },
-		{ love::keyboard::Keyboard::KEY_KP1, SDLK_KP1 },
-		{ love::keyboard::Keyboard::KEY_KP2, SDLK_KP2 },
-		{ love::keyboard::Keyboard::KEY_KP3, SDLK_KP3 },
-		{ love::keyboard::Keyboard::KEY_KP4, SDLK_KP4 },
-		{ love::keyboard::Keyboard::KEY_KP5, SDLK_KP5 },
-		{ love::keyboard::Keyboard::KEY_KP6, SDLK_KP6 },
-		{ love::keyboard::Keyboard::KEY_KP7, SDLK_KP7 },
-		{ love::keyboard::Keyboard::KEY_KP8, SDLK_KP8 },
-		{ love::keyboard::Keyboard::KEY_KP9, SDLK_KP9 },
-		{ love::keyboard::Keyboard::KEY_KP_PERIOD, SDLK_KP_PERIOD },
-		{ love::keyboard::Keyboard::KEY_KP_DIVIDE, SDLK_KP_DIVIDE },
-		{ love::keyboard::Keyboard::KEY_KP_MULTIPLY, SDLK_KP_MULTIPLY},
-		{ love::keyboard::Keyboard::KEY_KP_MINUS, SDLK_KP_MINUS },
-		{ love::keyboard::Keyboard::KEY_KP_PLUS, SDLK_KP_PLUS },
-		{ love::keyboard::Keyboard::KEY_KP_ENTER, SDLK_KP_ENTER },
-		{ love::keyboard::Keyboard::KEY_KP_EQUALS, SDLK_KP_EQUALS },
-
-		{ love::keyboard::Keyboard::KEY_UP, SDLK_UP },
-		{ love::keyboard::Keyboard::KEY_DOWN, SDLK_DOWN },
-		{ love::keyboard::Keyboard::KEY_RIGHT, SDLK_RIGHT },
-		{ love::keyboard::Keyboard::KEY_LEFT, SDLK_LEFT },
-		{ love::keyboard::Keyboard::KEY_INSERT, SDLK_INSERT },
-		{ love::keyboard::Keyboard::KEY_HOME, SDLK_HOME },
-		{ love::keyboard::Keyboard::KEY_END, SDLK_END },
-		{ love::keyboard::Keyboard::KEY_PAGEUP, SDLK_PAGEUP },
-		{ love::keyboard::Keyboard::KEY_PAGEDOWN, SDLK_PAGEDOWN },
-
-		{ love::keyboard::Keyboard::KEY_F1, SDLK_F1 },
-		{ love::keyboard::Keyboard::KEY_F2, SDLK_F2 },
-		{ love::keyboard::Keyboard::KEY_F3, SDLK_F3 },
-		{ love::keyboard::Keyboard::KEY_F4, SDLK_F4 },
-		{ love::keyboard::Keyboard::KEY_F5, SDLK_F5 },
-		{ love::keyboard::Keyboard::KEY_F6, SDLK_F6 },
-		{ love::keyboard::Keyboard::KEY_F7, SDLK_F7 },
-		{ love::keyboard::Keyboard::KEY_F8, SDLK_F8 },
-		{ love::keyboard::Keyboard::KEY_F9, SDLK_F9 },
-		{ love::keyboard::Keyboard::KEY_F10, SDLK_F10 },
-		{ love::keyboard::Keyboard::KEY_F11, SDLK_F11 },
-		{ love::keyboard::Keyboard::KEY_F12, SDLK_F12 },
-		{ love::keyboard::Keyboard::KEY_F13, SDLK_F13 },
-		{ love::keyboard::Keyboard::KEY_F14, SDLK_F14 },
-		{ love::keyboard::Keyboard::KEY_F15, SDLK_F15 },
-
-		{ love::keyboard::Keyboard::KEY_NUMLOCK, SDLK_NUMLOCK },
-		{ love::keyboard::Keyboard::KEY_CAPSLOCK, SDLK_CAPSLOCK },
-		{ love::keyboard::Keyboard::KEY_SCROLLOCK, SDLK_SCROLLOCK },
-		{ love::keyboard::Keyboard::KEY_RSHIFT, SDLK_RSHIFT },
-		{ love::keyboard::Keyboard::KEY_LSHIFT, SDLK_LSHIFT },
-		{ love::keyboard::Keyboard::KEY_RCTRL, SDLK_RCTRL },
-		{ love::keyboard::Keyboard::KEY_LCTRL, SDLK_LCTRL },
-		{ love::keyboard::Keyboard::KEY_RALT, SDLK_RALT },
-		{ love::keyboard::Keyboard::KEY_LALT, SDLK_LALT },
-		{ love::keyboard::Keyboard::KEY_RMETA, SDLK_RMETA },
-		{ love::keyboard::Keyboard::KEY_LMETA, SDLK_LMETA },
-		{ love::keyboard::Keyboard::KEY_LSUPER, SDLK_LSUPER },
-		{ love::keyboard::Keyboard::KEY_RSUPER, SDLK_RSUPER },
-		{ love::keyboard::Keyboard::KEY_MODE, SDLK_MODE },
-		{ love::keyboard::Keyboard::KEY_COMPOSE, SDLK_COMPOSE },
-
-		{ love::keyboard::Keyboard::KEY_HELP, SDLK_HELP },
-		{ love::keyboard::Keyboard::KEY_PRINT, SDLK_PRINT },
-		{ love::keyboard::Keyboard::KEY_SYSREQ, SDLK_SYSREQ },
-		{ love::keyboard::Keyboard::KEY_BREAK, SDLK_BREAK },
-		{ love::keyboard::Keyboard::KEY_MENU, SDLK_MENU },
-		{ love::keyboard::Keyboard::KEY_POWER, SDLK_POWER },
-		{ love::keyboard::Keyboard::KEY_EURO, SDLK_EURO },
-		{ love::keyboard::Keyboard::KEY_UNDO, SDLK_UNDO },
-
-		{ love::keyboard::Keyboard::KEY_UNKNOWN, SDLK_UNKNOWN },
-	};
-
-	EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM> Event::keys(Event::keyEntries, sizeof(Event::keyEntries));
-
-	EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry Event::buttonEntries[] =
-	{
-		{ love::mouse::Mouse::BUTTON_LEFT, SDL_BUTTON_LEFT},
-		{ love::mouse::Mouse::BUTTON_MIDDLE, SDL_BUTTON_MIDDLE},
-		{ love::mouse::Mouse::BUTTON_RIGHT, SDL_BUTTON_RIGHT},
-		{ love::mouse::Mouse::BUTTON_WHEELUP, SDL_BUTTON_WHEELUP},
-		{ love::mouse::Mouse::BUTTON_WHEELDOWN, SDL_BUTTON_WHEELDOWN},
-		{ love::mouse::Mouse::BUTTON_X1, SDL_BUTTON_X1},
-		{ love::mouse::Mouse::BUTTON_X2, SDL_BUTTON_X2},
-	};
-
-	EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM> Event::buttons(Event::buttonEntries, sizeof(Event::buttonEntries));
-
-} // sdl
-} // event
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "Event.h"
+
+#include "keyboard/Keyboard.h"
+#include "mouse/Mouse.h"
+
+namespace love
+{
+namespace event
+{
+namespace sdl
+{
+
+const char *Event::getName() const
+{
+	return "love.event.sdl";
+}
+
+Event::Event()
+{
+	SDL_EnableUNICODE(1);
+}
+
+void Event::pump()
+{
+	SDL_PumpEvents();
+
+	static SDL_Event e;
+	SDL_EnableUNICODE(1);
+
+	Message *msg;
+
+	while (SDL_PollEvent(&e))
+	{
+		msg = convert(e);
+		if (msg)
+		{
+			push(msg);
+			msg->release();
+		}
+	}
+}
+
+Message *Event::wait()
+{
+	static SDL_Event e;
+	bool ok = (SDL_WaitEvent(&e) == 1);
+	if (!ok)
+		return NULL;
+	return convert(e);
+}
+
+void Event::clear()
+{
+	static SDL_Event e;
+
+	while (SDL_PollEvent(&e))
+	{
+		// Do nothing with 'e' ...
+	}
+
+	love::event::Event::clear();
+}
+
+Message *Event::convert(SDL_Event &e)
+{
+	Message *msg = NULL;
+	love::keyboard::Keyboard::Key key;
+	love::mouse::Mouse::Button button;
+	Variant *arg1, *arg2, *arg3;
+	const char *txt;
+	switch (e.type)
+	{
+	case SDL_KEYDOWN:
+		if (keys.find(e.key.keysym.sym, key) && love::event::Event::keys.find(key, txt))
+		{
+			arg1 = new Variant(txt, strlen(txt));
+			arg2 = new Variant((double) e.key.keysym.unicode);
+			msg = new Message("keypressed", arg1, arg2);
+			arg1->release();
+			arg2->release();
+		}
+		break;
+	case SDL_KEYUP:
+		if (keys.find(e.key.keysym.sym, key) && love::event::Event::keys.find(key, txt))
+		{
+			arg1 = new Variant(txt, strlen(txt));
+			msg = new Message("keyreleased", arg1);
+			arg1->release();
+		}
+		break;
+	case SDL_MOUSEBUTTONDOWN:
+	case SDL_MOUSEBUTTONUP:
+		if (buttons.find(e.button.button, button) && love::event::Event::buttons.find(button, txt))
+		{
+			arg1 = new Variant((double) e.button.x);
+			arg2 = new Variant((double) e.button.y);
+			arg3 = new Variant(txt, strlen(txt));
+			msg = new Message((e.type == SDL_MOUSEBUTTONDOWN) ?
+							  "mousepressed" : "mousereleased",
+							  arg1, arg2, arg3);
+			arg1->release();
+			arg2->release();
+			arg3->release();
+		}
+		break;
+	case SDL_JOYBUTTONDOWN:
+	case SDL_JOYBUTTONUP:
+		arg1 = new Variant((double)(e.jbutton.which+1));
+		arg2 = new Variant((double)(e.jbutton.button+1));
+		msg = new Message((e.type == SDL_JOYBUTTONDOWN) ?
+						  "joystickpressed" : "joystickreleased",
+						  arg1, arg2);
+		arg1->release();
+		arg2->release();
+		break;
+	case SDL_ACTIVEEVENT:
+		arg1 = new Variant(e.active.gain != 0);
+		if (e.active.state & SDL_APPINPUTFOCUS)
+			msg = new Message("focus", arg1);
+		arg1->release();
+		break;
+	case SDL_QUIT:
+		msg = new Message("quit");
+		break;
+	}
+
+	return msg;
+}
+
+EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry Event::keyEntries[] =
+{
+	{ love::keyboard::Keyboard::KEY_BACKSPACE, SDLK_BACKSPACE},
+	{ love::keyboard::Keyboard::KEY_TAB, SDLK_TAB},
+	{ love::keyboard::Keyboard::KEY_CLEAR, SDLK_CLEAR},
+	{ love::keyboard::Keyboard::KEY_RETURN, SDLK_RETURN},
+	{ love::keyboard::Keyboard::KEY_PAUSE, SDLK_PAUSE},
+	{ love::keyboard::Keyboard::KEY_ESCAPE, SDLK_ESCAPE },
+	{ love::keyboard::Keyboard::KEY_SPACE, SDLK_SPACE },
+	{ love::keyboard::Keyboard::KEY_EXCLAIM, SDLK_EXCLAIM },
+	{ love::keyboard::Keyboard::KEY_QUOTEDBL, SDLK_QUOTEDBL },
+	{ love::keyboard::Keyboard::KEY_HASH, SDLK_HASH },
+	{ love::keyboard::Keyboard::KEY_DOLLAR, SDLK_DOLLAR },
+	{ love::keyboard::Keyboard::KEY_AMPERSAND, SDLK_AMPERSAND },
+	{ love::keyboard::Keyboard::KEY_QUOTE, SDLK_QUOTE },
+	{ love::keyboard::Keyboard::KEY_LEFTPAREN, SDLK_LEFTPAREN },
+	{ love::keyboard::Keyboard::KEY_RIGHTPAREN, SDLK_RIGHTPAREN },
+	{ love::keyboard::Keyboard::KEY_ASTERISK, SDLK_ASTERISK },
+	{ love::keyboard::Keyboard::KEY_PLUS, SDLK_PLUS },
+	{ love::keyboard::Keyboard::KEY_COMMA, SDLK_COMMA },
+	{ love::keyboard::Keyboard::KEY_MINUS, SDLK_MINUS },
+	{ love::keyboard::Keyboard::KEY_PERIOD, SDLK_PERIOD },
+	{ love::keyboard::Keyboard::KEY_SLASH, SDLK_SLASH },
+	{ love::keyboard::Keyboard::KEY_0, SDLK_0 },
+	{ love::keyboard::Keyboard::KEY_1, SDLK_1 },
+	{ love::keyboard::Keyboard::KEY_2, SDLK_2 },
+	{ love::keyboard::Keyboard::KEY_3, SDLK_3 },
+	{ love::keyboard::Keyboard::KEY_4, SDLK_4 },
+	{ love::keyboard::Keyboard::KEY_5, SDLK_5 },
+	{ love::keyboard::Keyboard::KEY_6, SDLK_6 },
+	{ love::keyboard::Keyboard::KEY_7, SDLK_7 },
+	{ love::keyboard::Keyboard::KEY_8, SDLK_8 },
+	{ love::keyboard::Keyboard::KEY_9, SDLK_9 },
+	{ love::keyboard::Keyboard::KEY_COLON, SDLK_COLON },
+	{ love::keyboard::Keyboard::KEY_SEMICOLON, SDLK_SEMICOLON },
+	{ love::keyboard::Keyboard::KEY_LESS, SDLK_LESS },
+	{ love::keyboard::Keyboard::KEY_EQUALS, SDLK_EQUALS },
+	{ love::keyboard::Keyboard::KEY_GREATER, SDLK_GREATER },
+	{ love::keyboard::Keyboard::KEY_QUESTION, SDLK_QUESTION },
+	{ love::keyboard::Keyboard::KEY_AT, SDLK_AT },
+
+	{ love::keyboard::Keyboard::KEY_LEFTBRACKET, SDLK_LEFTBRACKET },
+	{ love::keyboard::Keyboard::KEY_BACKSLASH, SDLK_BACKSLASH },
+	{ love::keyboard::Keyboard::KEY_RIGHTBRACKET, SDLK_RIGHTBRACKET },
+	{ love::keyboard::Keyboard::KEY_CARET, SDLK_CARET },
+	{ love::keyboard::Keyboard::KEY_UNDERSCORE, SDLK_UNDERSCORE },
+	{ love::keyboard::Keyboard::KEY_BACKQUOTE, SDLK_BACKQUOTE },
+	{ love::keyboard::Keyboard::KEY_A, SDLK_a },
+	{ love::keyboard::Keyboard::KEY_B, SDLK_b },
+	{ love::keyboard::Keyboard::KEY_C, SDLK_c },
+	{ love::keyboard::Keyboard::KEY_D, SDLK_d },
+	{ love::keyboard::Keyboard::KEY_E, SDLK_e },
+	{ love::keyboard::Keyboard::KEY_F, SDLK_f },
+	{ love::keyboard::Keyboard::KEY_G, SDLK_g },
+	{ love::keyboard::Keyboard::KEY_H, SDLK_h },
+	{ love::keyboard::Keyboard::KEY_I, SDLK_i },
+	{ love::keyboard::Keyboard::KEY_J, SDLK_j },
+	{ love::keyboard::Keyboard::KEY_K, SDLK_k },
+	{ love::keyboard::Keyboard::KEY_L, SDLK_l },
+	{ love::keyboard::Keyboard::KEY_M, SDLK_m },
+	{ love::keyboard::Keyboard::KEY_N, SDLK_n },
+	{ love::keyboard::Keyboard::KEY_O, SDLK_o },
+	{ love::keyboard::Keyboard::KEY_P, SDLK_p },
+	{ love::keyboard::Keyboard::KEY_Q, SDLK_q },
+	{ love::keyboard::Keyboard::KEY_R, SDLK_r },
+	{ love::keyboard::Keyboard::KEY_S, SDLK_s },
+	{ love::keyboard::Keyboard::KEY_T, SDLK_t },
+	{ love::keyboard::Keyboard::KEY_U, SDLK_u },
+	{ love::keyboard::Keyboard::KEY_V, SDLK_v },
+	{ love::keyboard::Keyboard::KEY_W, SDLK_w },
+	{ love::keyboard::Keyboard::KEY_X, SDLK_x },
+	{ love::keyboard::Keyboard::KEY_Y, SDLK_y },
+	{ love::keyboard::Keyboard::KEY_Z, SDLK_z },
+	{ love::keyboard::Keyboard::KEY_DELETE, SDLK_DELETE },
+
+	{ love::keyboard::Keyboard::KEY_KP0, SDLK_KP0 },
+	{ love::keyboard::Keyboard::KEY_KP1, SDLK_KP1 },
+	{ love::keyboard::Keyboard::KEY_KP2, SDLK_KP2 },
+	{ love::keyboard::Keyboard::KEY_KP3, SDLK_KP3 },
+	{ love::keyboard::Keyboard::KEY_KP4, SDLK_KP4 },
+	{ love::keyboard::Keyboard::KEY_KP5, SDLK_KP5 },
+	{ love::keyboard::Keyboard::KEY_KP6, SDLK_KP6 },
+	{ love::keyboard::Keyboard::KEY_KP7, SDLK_KP7 },
+	{ love::keyboard::Keyboard::KEY_KP8, SDLK_KP8 },
+	{ love::keyboard::Keyboard::KEY_KP9, SDLK_KP9 },
+	{ love::keyboard::Keyboard::KEY_KP_PERIOD, SDLK_KP_PERIOD },
+	{ love::keyboard::Keyboard::KEY_KP_DIVIDE, SDLK_KP_DIVIDE },
+	{ love::keyboard::Keyboard::KEY_KP_MULTIPLY, SDLK_KP_MULTIPLY},
+	{ love::keyboard::Keyboard::KEY_KP_MINUS, SDLK_KP_MINUS },
+	{ love::keyboard::Keyboard::KEY_KP_PLUS, SDLK_KP_PLUS },
+	{ love::keyboard::Keyboard::KEY_KP_ENTER, SDLK_KP_ENTER },
+	{ love::keyboard::Keyboard::KEY_KP_EQUALS, SDLK_KP_EQUALS },
+
+	{ love::keyboard::Keyboard::KEY_UP, SDLK_UP },
+	{ love::keyboard::Keyboard::KEY_DOWN, SDLK_DOWN },
+	{ love::keyboard::Keyboard::KEY_RIGHT, SDLK_RIGHT },
+	{ love::keyboard::Keyboard::KEY_LEFT, SDLK_LEFT },
+	{ love::keyboard::Keyboard::KEY_INSERT, SDLK_INSERT },
+	{ love::keyboard::Keyboard::KEY_HOME, SDLK_HOME },
+	{ love::keyboard::Keyboard::KEY_END, SDLK_END },
+	{ love::keyboard::Keyboard::KEY_PAGEUP, SDLK_PAGEUP },
+	{ love::keyboard::Keyboard::KEY_PAGEDOWN, SDLK_PAGEDOWN },
+
+	{ love::keyboard::Keyboard::KEY_F1, SDLK_F1 },
+	{ love::keyboard::Keyboard::KEY_F2, SDLK_F2 },
+	{ love::keyboard::Keyboard::KEY_F3, SDLK_F3 },
+	{ love::keyboard::Keyboard::KEY_F4, SDLK_F4 },
+	{ love::keyboard::Keyboard::KEY_F5, SDLK_F5 },
+	{ love::keyboard::Keyboard::KEY_F6, SDLK_F6 },
+	{ love::keyboard::Keyboard::KEY_F7, SDLK_F7 },
+	{ love::keyboard::Keyboard::KEY_F8, SDLK_F8 },
+	{ love::keyboard::Keyboard::KEY_F9, SDLK_F9 },
+	{ love::keyboard::Keyboard::KEY_F10, SDLK_F10 },
+	{ love::keyboard::Keyboard::KEY_F11, SDLK_F11 },
+	{ love::keyboard::Keyboard::KEY_F12, SDLK_F12 },
+	{ love::keyboard::Keyboard::KEY_F13, SDLK_F13 },
+	{ love::keyboard::Keyboard::KEY_F14, SDLK_F14 },
+	{ love::keyboard::Keyboard::KEY_F15, SDLK_F15 },
+
+	{ love::keyboard::Keyboard::KEY_NUMLOCK, SDLK_NUMLOCK },
+	{ love::keyboard::Keyboard::KEY_CAPSLOCK, SDLK_CAPSLOCK },
+	{ love::keyboard::Keyboard::KEY_SCROLLOCK, SDLK_SCROLLOCK },
+	{ love::keyboard::Keyboard::KEY_RSHIFT, SDLK_RSHIFT },
+	{ love::keyboard::Keyboard::KEY_LSHIFT, SDLK_LSHIFT },
+	{ love::keyboard::Keyboard::KEY_RCTRL, SDLK_RCTRL },
+	{ love::keyboard::Keyboard::KEY_LCTRL, SDLK_LCTRL },
+	{ love::keyboard::Keyboard::KEY_RALT, SDLK_RALT },
+	{ love::keyboard::Keyboard::KEY_LALT, SDLK_LALT },
+	{ love::keyboard::Keyboard::KEY_RMETA, SDLK_RMETA },
+	{ love::keyboard::Keyboard::KEY_LMETA, SDLK_LMETA },
+	{ love::keyboard::Keyboard::KEY_LSUPER, SDLK_LSUPER },
+	{ love::keyboard::Keyboard::KEY_RSUPER, SDLK_RSUPER },
+	{ love::keyboard::Keyboard::KEY_MODE, SDLK_MODE },
+	{ love::keyboard::Keyboard::KEY_COMPOSE, SDLK_COMPOSE },
+
+	{ love::keyboard::Keyboard::KEY_HELP, SDLK_HELP },
+	{ love::keyboard::Keyboard::KEY_PRINT, SDLK_PRINT },
+	{ love::keyboard::Keyboard::KEY_SYSREQ, SDLK_SYSREQ },
+	{ love::keyboard::Keyboard::KEY_BREAK, SDLK_BREAK },
+	{ love::keyboard::Keyboard::KEY_MENU, SDLK_MENU },
+	{ love::keyboard::Keyboard::KEY_POWER, SDLK_POWER },
+	{ love::keyboard::Keyboard::KEY_EURO, SDLK_EURO },
+	{ love::keyboard::Keyboard::KEY_UNDO, SDLK_UNDO },
+
+	{ love::keyboard::Keyboard::KEY_UNKNOWN, SDLK_UNKNOWN },
+};
+
+EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM> Event::keys(Event::keyEntries, sizeof(Event::keyEntries));
+
+EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry Event::buttonEntries[] =
+{
+	{ love::mouse::Mouse::BUTTON_LEFT, SDL_BUTTON_LEFT},
+	{ love::mouse::Mouse::BUTTON_MIDDLE, SDL_BUTTON_MIDDLE},
+	{ love::mouse::Mouse::BUTTON_RIGHT, SDL_BUTTON_RIGHT},
+	{ love::mouse::Mouse::BUTTON_WHEELUP, SDL_BUTTON_WHEELUP},
+	{ love::mouse::Mouse::BUTTON_WHEELDOWN, SDL_BUTTON_WHEELDOWN},
+	{ love::mouse::Mouse::BUTTON_X1, SDL_BUTTON_X1},
+	{ love::mouse::Mouse::BUTTON_X2, SDL_BUTTON_X2},
+};
+
+EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM> Event::buttons(Event::buttonEntries, sizeof(Event::buttonEntries));
+
+} // sdl
+} // event
+} // love

+ 82 - 81
src/modules/event/sdl/Event.h

@@ -1,81 +1,82 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_EVENT_SDL_EVENT_H
-#define LOVE_EVENT_SDL_EVENT_H
-
-// LOVE
-#include <event/Event.h>
-#include <common/runtime.h>
-#include <common/EnumMap.h>
-
-// SDL
-#include <SDL.h>
-
-namespace love
-{
-namespace event
-{
-namespace sdl
-{
-	class Event : public love::event::Event
-	{
-	public:
-
-		// Implements Module.
-		const char * getName() const;
-
-		Event();
-
-		/**
-		* Pumps the event queue. This function gathers all the pending input information
-		* from devices and places it on the event queue. Normally not needed if you poll
-		* for events.
-		**/
-		void pump();
-
-		/**
-		* Waits for the next event (indefinitely). Useful for creating games where
-		* the screen and game state only needs updating when the user interacts with
-		* the window.
-		**/
-		Message *wait();
-
-		/**
-		 * Clears the event queue.
-		 */
-		void clear();
-
-	private:
-
-		Message *convert(SDL_Event & e);
-
-		static EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry keyEntries[];
-		static EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM> keys;
-		static EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry buttonEntries[];
-		static EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM> buttons;
-
-	}; // System
-
-} // sdl
-} // event
-} // love
-
-#endif // LOVE_EVENT_SDL_EVENT_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_EVENT_SDL_EVENT_H
+#define LOVE_EVENT_SDL_EVENT_H
+
+// LOVE
+#include "event/Event.h"
+#include "common/runtime.h"
+#include "common/EnumMap.h"
+
+// SDL
+#include <SDL.h>
+
+namespace love
+{
+namespace event
+{
+namespace sdl
+{
+
+class Event : public love::event::Event
+{
+public:
+
+	// Implements Module.
+	const char *getName() const;
+
+	Event();
+
+	/**
+	 * Pumps the event queue. This function gathers all the pending input information
+	 * from devices and places it on the event queue. Normally not needed if you poll
+	 * for events.
+	 **/
+	void pump();
+
+	/**
+	 * Waits for the next event (indefinitely). Useful for creating games where
+	 * the screen and game state only needs updating when the user interacts with
+	 * the window.
+	 **/
+	Message *wait();
+
+	/**
+	 * Clears the event queue.
+	 */
+	void clear();
+
+private:
+
+	Message *convert(SDL_Event &e);
+
+	static EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM>::Entry keyEntries[];
+	static EnumMap<love::keyboard::Keyboard::Key, SDLKey, love::keyboard::Keyboard::KEY_MAX_ENUM> keys;
+	static EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM>::Entry buttonEntries[];
+	static EnumMap<love::mouse::Mouse::Button, Uint8, love::mouse::Mouse::BUTTON_MAX_ENUM> buttons;
+
+}; // System
+
+} // sdl
+} // event
+} // love
+
+#endif // LOVE_EVENT_SDL_EVENT_H

+ 150 - 148
src/modules/event/sdl/wrap_Event.cpp

@@ -1,148 +1,150 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "wrap_Event.h"
-
-// LOVE
-#include <common/runtime.h>
-
-// sdlevent
-#include "Event.h"
-
-namespace love
-{
-namespace event
-{
-namespace sdl
-{
-	static Event * instance = 0;
-
-	static int poll_i(lua_State * L)
-	{
-		Message *m;
-
-		while (instance->poll(m))
-		{
-			int args = m->toLua(L);
-			m->release();
-			return args;
-		}
-
-		// No pending events.
-		return 0;
-	}
-
-	int w_pump(lua_State *)
-	{
-		instance->pump();
-		return 0;
-	}
-
-	int w_poll(lua_State * L)
-	{
-		lua_pushcclosure(L, &poll_i, 0);
-		return 1;
-	}
-
-	int w_wait(lua_State * L)
-	{
-		static Message *m;
-
-		if ((m = instance->wait()))
-		{
-			int args = m->toLua(L);
-			m->release();
-			return args;
-		}
-
-		return 0;
-	}
-
-	int w_push(lua_State * L)
-	{
-		static Message *m;
-
-		bool success = (m = Message::fromLua(L, 1)) != NULL;
-		luax_pushboolean(L, success);
-
-		if (!success)
-			return 1;
-
-		instance->push(m);
-		m->release();
-
-		return 1;
-	}
-
-	int w_clear(lua_State *)
-	{
-		instance->clear();
-		return 0;
-	}
-
-	int w_quit(lua_State * L)
-	{
-		Message *m = new Message("quit");
-		instance->push(m);
-		m->release();
-		luax_pushboolean(L, true);
-		return 1;
-	}
-
-	// List of functions to wrap.
-	static const luaL_Reg functions[] = {
-		{ "pump", w_pump },
-		{ "poll", w_poll },
-		{ "wait", w_wait },
-		{ "push", w_push },
-		{ "clear", w_clear },
-		{ "quit", w_quit },
-		{ 0, 0 }
-	};
-
-	extern "C" int luaopen_love_event(lua_State * L)
-	{
-		if (instance == 0)
-		{
-			try
-			{
-				instance = new Event();
-			}
-			catch (Exception & e)
-			{
-				return luaL_error(L, e.what());
-			}
-		}
-		else
-			instance->retain();
-
-		WrappedModule w;
-		w.module = instance;
-		w.name = "event";
-		w.flags = MODULE_T;
-		w.functions = functions;
-		w.types = 0;
-
-		return luax_register_module(L, w);
-	}
-
-} // sdl
-} // event
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "wrap_Event.h"
+
+// LOVE
+#include "common/runtime.h"
+
+// sdlevent
+#include "Event.h"
+
+namespace love
+{
+namespace event
+{
+namespace sdl
+{
+
+static Event *instance = 0;
+
+static int poll_i(lua_State *L)
+{
+	Message *m;
+
+	while (instance->poll(m))
+	{
+		int args = m->toLua(L);
+		m->release();
+		return args;
+	}
+
+	// No pending events.
+	return 0;
+}
+
+int w_pump(lua_State *)
+{
+	instance->pump();
+	return 0;
+}
+
+int w_poll(lua_State *L)
+{
+	lua_pushcclosure(L, &poll_i, 0);
+	return 1;
+}
+
+int w_wait(lua_State *L)
+{
+	static Message *m;
+
+	if ((m = instance->wait()))
+	{
+		int args = m->toLua(L);
+		m->release();
+		return args;
+	}
+
+	return 0;
+}
+
+int w_push(lua_State *L)
+{
+	static Message *m;
+
+	bool success = (m = Message::fromLua(L, 1)) != NULL;
+	luax_pushboolean(L, success);
+
+	if (!success)
+		return 1;
+
+	instance->push(m);
+	m->release();
+
+	return 1;
+}
+
+int w_clear(lua_State *)
+{
+	instance->clear();
+	return 0;
+}
+
+int w_quit(lua_State *L)
+{
+	Message *m = new Message("quit");
+	instance->push(m);
+	m->release();
+	luax_pushboolean(L, true);
+	return 1;
+}
+
+// List of functions to wrap.
+static const luaL_Reg functions[] =
+{
+	{ "pump", w_pump },
+	{ "poll", w_poll },
+	{ "wait", w_wait },
+	{ "push", w_push },
+	{ "clear", w_clear },
+	{ "quit", w_quit },
+	{ 0, 0 }
+};
+
+extern "C" int luaopen_love_event(lua_State *L)
+{
+	if (instance == 0)
+	{
+		try
+		{
+			instance = new Event();
+		}
+		catch(Exception &e)
+		{
+			return luaL_error(L, e.what());
+		}
+	}
+	else
+		instance->retain();
+
+	WrappedModule w;
+	w.module = instance;
+	w.name = "event";
+	w.flags = MODULE_T;
+	w.functions = functions;
+	w.types = 0;
+
+	return luax_register_module(L, w);
+}
+
+} // sdl
+} // event
+} // love

+ 48 - 47
src/modules/event/sdl/wrap_Event.h

@@ -1,47 +1,48 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_EVENT_SDL_WRAP_EVENT_H
-#define LOVE_EVENT_SDL_WRAP_EVENT_H
-
-// LOVE
-#include <common/config.h>
-#include "Event.h"
-
-namespace love
-{
-namespace event
-{
-namespace sdl
-{
-	int w_pump(lua_State * L);
-	int w_poll(lua_State * L);
-	int w_wait(lua_State * L);
-	int w_push(lua_State * L);
-	int w_clear(lua_State * L);
-	int w_quit(lua_State * L);
-
-	extern "C" LOVE_EXPORT int luaopen_love_event(lua_State * L);
-
-} // sdl
-} // event
-} // love
-
-#endif // LOVE_EVENT_SDL_WRAP_EVENT_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_EVENT_SDL_WRAP_EVENT_H
+#define LOVE_EVENT_SDL_WRAP_EVENT_H
+
+// LOVE
+#include "common/config.h"
+#include "Event.h"
+
+namespace love
+{
+namespace event
+{
+namespace sdl
+{
+
+int w_pump(lua_State *L);
+int w_poll(lua_State *L);
+int w_wait(lua_State *L);
+int w_push(lua_State *L);
+int w_clear(lua_State *L);
+int w_quit(lua_State *L);
+
+extern "C" LOVE_EXPORT int luaopen_love_event(lua_State *L);
+
+} // sdl
+} // event
+} // love
+
+#endif // LOVE_EVENT_SDL_WRAP_EVENT_H

+ 53 - 52
src/modules/filesystem/File.cpp

@@ -1,52 +1,53 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "File.h"
-
-namespace love
-{
-namespace filesystem
-{
-	File::~File()
-	{
-	}
-
-	bool File::getConstant(const char * in, Mode & out)
-	{
-		return modes.find(in, out);
-	}
-
-	bool File::getConstant(Mode in, const char *& out)
-	{
-		return modes.find(in, out);
-	}
-
-	StringMap<File::Mode, File::MODE_MAX_ENUM>::Entry File::modeEntries[] =
-	{
-		{"c", File::CLOSED},
-		{"r", File::READ},
-		{"w", File::WRITE},
-		{"a", File::APPEND},
-	};
-
-	StringMap<File::Mode, File::MODE_MAX_ENUM> File::modes(File::modeEntries, sizeof(File::modeEntries));
-
-} // filesystem
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "File.h"
+
+namespace love
+{
+namespace filesystem
+{
+
+File::~File()
+{
+}
+
+bool File::getConstant(const char *in, Mode &out)
+{
+	return modes.find(in, out);
+}
+
+bool File::getConstant(Mode in, const char  *&out)
+{
+	return modes.find(in, out);
+}
+
+StringMap<File::Mode, File::MODE_MAX_ENUM>::Entry File::modeEntries[] =
+{
+	{"c", File::CLOSED},
+	{"r", File::READ},
+	{"w", File::WRITE},
+	{"a", File::APPEND},
+};
+
+StringMap<File::Mode, File::MODE_MAX_ENUM> File::modes(File::modeEntries, sizeof(File::modeEntries));
+
+} // filesystem
+} // love

+ 178 - 177
src/modules/filesystem/File.h

@@ -1,177 +1,178 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#ifndef LOVE_FILESYSTEM_FILE_H
-#define LOVE_FILESYSTEM_FILE_H
-
-// STD
-#include <string>
-
-// LOVE
-#include <common/Data.h>
-#include <common/Object.h>
-#include <common/StringMap.h>
-#include <common/int.h>
-
-namespace love
-{
-namespace filesystem
-{
-	/**
-	* A File interface, providing generic means of reading from and
-	* writing to files.
-	**/
-	class File : public Object
-	{
-	public:
-
-		/**
-		* File open mode.
-		**/
-		enum Mode
-		{
-			CLOSED,
-			READ,
-			WRITE,
-			APPEND,
-			MODE_MAX_ENUM
-		};
-
-		/**
-		* Used to indicate ALL data in a file.
-		**/
-		static const int64 ALL = -1;
-
-		/**
-		* Destructor.
-		**/
-		virtual ~File();
-
-		/**
-		* Opens the file in a certain mode.
-		*
-		* @param mode READ, WRITE, APPEND.
-		* @return True if successful, false otherwise.
-		**/
-		virtual bool open(Mode mode) = 0;
-
-		/**
-		* Closes the file.
-		*
-		* @return True if successful, false otherwise.
-		**/
-		virtual bool close() = 0;
-
-		/**
-		* Gets the size of the file.
-		*
-		* @return The size of the file.
-		**/
-		virtual int64 getSize() = 0;
-
-		/**
-		* Reads data from the file and allocates a Data object.
-		*
-		* @param size The number of bytes to attempt reading, or -1 for EOF.
-		* @return A newly allocated Data object.
-		**/
-		virtual Data * read(int64 size = ALL) = 0;
-
-		/**
-		* Reads data into the destination buffer.
-		*
-		* @param dst The destination buffer.
-		* @param size The number of bytes to attempt reading.
-		* @return The number of bytes actually read.
-		**/
-		virtual int64 read(void * dst, int64 size) = 0;
-
-		/**
-		* Writes data into the File.
-		*
-		* @param data The source buffer.
-		* @param size The size of the buffer.
-		* @return True of success, false otherwise.
-		**/
-		virtual bool write(const void * data, int64 size) = 0;
-
-		/**
-		* Writes a Data object into the File.
-		*
-		* @param data The data object to write into the file.
-		* @param size The number of bytes to attempt writing, or -1 for everything.
-		* @return True of success, false otherwise.
-		**/
-		virtual bool write(const Data * data, int64 size = ALL) = 0;
-
-		/**
-		* Checks whether we are currently at end-of-file.
-		*
-		* @return True if EOF, false otherwise.
-		**/
-		virtual bool eof() = 0;
-
-		/**
-		* Gets the current position in the File.
-		*
-		* @return The current byte position in the File.
-		**/
-		virtual int64 tell() = 0;
-
-		/**
-		* Seeks to a certain position in the File.
-		*
-		* @param pos The byte position in the file.
-		* @return True on success, false otherwise.
-		**/
-		virtual bool seek(uint64 pos) = 0;
-
-		/**
-		* Gets the current mode of the File.
-		* @return The current mode of the File; CLOSED, READ, WRITE or APPEND.
-		**/
-		virtual Mode getMode() = 0;
-
-		/**
-		* Gets the filename for this File, or empty string if none.
-		* @return The filename for this File.
-		**/
-		virtual std::string getFilename() const = 0;
-
-		/**
-		* Gets the file extension for this File, or empty string if none.
-		* @return The file extension for this File (without the dot).
-		**/
-		virtual std::string getExtension() const = 0;
-
-		static bool getConstant(const char * in, Mode & out);
-		static bool getConstant(Mode in, const char *& out);
-
-	private:
-
-		static StringMap<Mode, MODE_MAX_ENUM>::Entry modeEntries[];
-		static StringMap<Mode, MODE_MAX_ENUM> modes;
-
-	}; // File
-
-} // filesystem
-} // love
-
-#endif // LOVE_FILESYSTEM_FILE_H
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#ifndef LOVE_FILESYSTEM_FILE_H
+#define LOVE_FILESYSTEM_FILE_H
+
+// STD
+#include <string>
+
+// LOVE
+#include "common/Data.h"
+#include "common/Object.h"
+#include "common/StringMap.h"
+#include "common/int.h"
+
+namespace love
+{
+namespace filesystem
+{
+
+/**
+ * A File interface, providing generic means of reading from and
+ * writing to files.
+ **/
+class File : public Object
+{
+public:
+
+	/**
+	 * File open mode.
+	 **/
+	enum Mode
+	{
+		CLOSED,
+		READ,
+		WRITE,
+		APPEND,
+		MODE_MAX_ENUM
+	};
+
+	/**
+	 * Used to indicate ALL data in a file.
+	 **/
+	static const int64 ALL = -1;
+
+	/**
+	 * Destructor.
+	 **/
+	virtual ~File();
+
+	/**
+	 * Opens the file in a certain mode.
+	 *
+	 * @param mode READ, WRITE, APPEND.
+	 * @return True if successful, false otherwise.
+	 **/
+	virtual bool open(Mode mode) = 0;
+
+	/**
+	 * Closes the file.
+	 *
+	 * @return True if successful, false otherwise.
+	 **/
+	virtual bool close() = 0;
+
+	/**
+	 * Gets the size of the file.
+	 *
+	 * @return The size of the file.
+	 **/
+	virtual int64 getSize() = 0;
+
+	/**
+	 * Reads data from the file and allocates a Data object.
+	 *
+	 * @param size The number of bytes to attempt reading, or -1 for EOF.
+	 * @return A newly allocated Data object.
+	 **/
+	virtual Data *read(int64 size = ALL) = 0;
+
+	/**
+	 * Reads data into the destination buffer.
+	 *
+	 * @param dst The destination buffer.
+	 * @param size The number of bytes to attempt reading.
+	 * @return The number of bytes actually read.
+	 **/
+	virtual int64 read(void *dst, int64 size) = 0;
+
+	/**
+	 * Writes data into the File.
+	 *
+	 * @param data The source buffer.
+	 * @param size The size of the buffer.
+	 * @return True of success, false otherwise.
+	 **/
+	virtual bool write(const void *data, int64 size) = 0;
+
+	/**
+	 * Writes a Data object into the File.
+	 *
+	 * @param data The data object to write into the file.
+	 * @param size The number of bytes to attempt writing, or -1 for everything.
+	 * @return True of success, false otherwise.
+	 **/
+	virtual bool write(const Data *data, int64 size = ALL) = 0;
+
+	/**
+	 * Checks whether we are currently at end-of-file.
+	 *
+	 * @return True if EOF, false otherwise.
+	 **/
+	virtual bool eof() = 0;
+
+	/**
+	 * Gets the current position in the File.
+	 *
+	 * @return The current byte position in the File.
+	 **/
+	virtual int64 tell() = 0;
+
+	/**
+	 * Seeks to a certain position in the File.
+	 *
+	 * @param pos The byte position in the file.
+	 * @return True on success, false otherwise.
+	 **/
+	virtual bool seek(uint64 pos) = 0;
+
+	/**
+	 * Gets the current mode of the File.
+	 * @return The current mode of the File; CLOSED, READ, WRITE or APPEND.
+	 **/
+	virtual Mode getMode() = 0;
+
+	/**
+	 * Gets the filename for this File, or empty string if none.
+	 * @return The filename for this File.
+	 **/
+	virtual std::string getFilename() const = 0;
+
+	/**
+	 * Gets the file extension for this File, or empty string if none.
+	 * @return The file extension for this File (without the dot).
+	 **/
+	virtual std::string getExtension() const = 0;
+
+	static bool getConstant(const char *in, Mode &out);
+	static bool getConstant(Mode in, const char  *&out);
+
+private:
+
+	static StringMap<Mode, MODE_MAX_ENUM>::Entry modeEntries[];
+	static StringMap<Mode, MODE_MAX_ENUM> modes;
+
+}; // File
+
+} // filesystem
+} // love
+
+#endif // LOVE_FILESYSTEM_FILE_H

+ 91 - 88
src/modules/filesystem/FileData.cpp

@@ -1,88 +1,91 @@
-/**
-* Copyright (c) 2006-2012 LOVE Development Team
-*
-* This software is provided 'as-is', without any express or implied
-* warranty.  In no event will the authors be held liable for any damages
-* arising from the use of this software.
-*
-* Permission is granted to anyone to use this software for any purpose,
-* including commercial applications, and to alter it and redistribute it
-* freely, subject to the following restrictions:
-*
-* 1. The origin of this software must not be misrepresented; you must not
-*    claim that you wrote the original software. If you use this software
-*    in a product, an acknowledgment in the product documentation would be
-*    appreciated but is not required.
-* 2. Altered source versions must be plainly marked as such, and must not be
-*    misrepresented as being the original software.
-* 3. This notice may not be removed or altered from any source distribution.
-**/
-
-#include "FileData.h"
-
-// STD
-#include <iostream>
-#include <climits>
-
-namespace love
-{
-namespace filesystem
-{
-	FileData::FileData(uint64 size, const std::string & filename)
-		: data(new char[(size_t) size]), size(size), filename(filename)
-	{
-		if (filename.rfind('.') != std::string::npos)
-			extension = filename.substr(filename.rfind('.')+1);
-	}
-
-	FileData::~FileData()
-	{
-		delete [] data;
-	}
-
-	void * FileData::getData() const
-	{
-		return (void*)data;
-	}
-
-	// TODO: Enable this
-	/*uint64 FileData::getSize() const
-	{
-		return size;
-	}*/
-
-	int FileData::getSize() const
-	{
-		return size > INT_MAX ? INT_MAX : (int) size;
-	}
-
-	const std::string & FileData::getFilename() const
-	{
-		return filename;
-	}
-
-	const std::string & FileData::getExtension() const
-	{
-		return extension;
-	}
-
-	bool FileData::getConstant(const char * in, Decoder & out)
-	{
-		return decoders.find(in, out);
-	}
-
-	bool FileData::getConstant(Decoder in, const char *& out)
-	{
-		return decoders.find(in, out);
-	}
-
-	StringMap<FileData::Decoder, FileData::DECODE_MAX_ENUM>::Entry FileData::decoderEntries[] =
-	{
-		{"file", FileData::FILE},
-		{"base64", FileData::BASE64},
-	};
-
-	StringMap<FileData::Decoder, FileData::DECODE_MAX_ENUM> FileData::decoders(FileData::decoderEntries, sizeof(FileData::decoderEntries));
-
-} // filesystem
-} // love
+/**
+ * Copyright (c) 2006-2012 LOVE Development Team
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
+#include "FileData.h"
+
+// STD
+#include <iostream>
+#include <climits>
+
+namespace love
+{
+namespace filesystem
+{
+
+FileData::FileData(uint64 size, const std::string &filename)
+	: data(new char[(size_t) size])
+	, size(size)
+	, filename(filename)
+{
+	if (filename.rfind('.') != std::string::npos)
+		extension = filename.substr(filename.rfind('.')+1);
+}
+
+FileData::~FileData()
+{
+	delete [] data;
+}
+
+void *FileData::getData() const
+{
+	return (void *)data;
+}
+
+// TODO: Enable this
+/*uint64 FileData::getSize() const
+{
+	return size;
+}*/
+
+int FileData::getSize() const
+{
+	return size > INT_MAX ? INT_MAX : (int) size;
+}
+
+const std::string &FileData::getFilename() const
+{
+	return filename;
+}
+
+const std::string &FileData::getExtension() const
+{
+	return extension;
+}
+
+bool FileData::getConstant(const char *in, Decoder &out)
+{
+	return decoders.find(in, out);
+}
+
+bool FileData::getConstant(Decoder in, const char  *&out)
+{
+	return decoders.find(in, out);
+}
+
+StringMap<FileData::Decoder, FileData::DECODE_MAX_ENUM>::Entry FileData::decoderEntries[] =
+{
+	{"file", FileData::FILE},
+	{"base64", FileData::BASE64},
+};
+
+StringMap<FileData::Decoder, FileData::DECODE_MAX_ENUM> FileData::decoders(FileData::decoderEntries, sizeof(FileData::decoderEntries));
+
+} // filesystem
+} // love

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