Commits

Anonymous committed 9bcd727

Abstractify some modules completely: timer, keyboard and mouse.

If this commit breaks some project file(s), well ...
I AM RUDE AND I WILL BREAK EVERYTHING, AHAHAHAHAHAHAHHAHAHAHAHA!

Comments (0)

Files changed (24)

platform/msvc2010/love.vcxproj

     <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\sdl\wrap_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\sdl\wrap_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>
     <ClCompile Include="..\..\src\modules\thread\wrap_Thread.cpp" />
     <ClCompile Include="..\..\src\modules\timer\sdl\Timer.cpp" />
-    <ClCompile Include="..\..\src\modules\timer\sdl\wrap_Timer.cpp" />
+    <ClCompile Include="..\..\src\modules\timer\wrap_Timer.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\common\b64.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\sdl\wrap_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\sdl\wrap_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>
     <ClInclude Include="..\..\src\modules\thread\wrap_Thread.h" />
     <ClInclude Include="..\..\src\modules\timer\sdl\Timer.h" />
-    <ClInclude Include="..\..\src\modules\timer\sdl\wrap_Timer.h" />
+    <ClInclude Include="..\..\src\modules\timer\Timer.h" />
+    <ClInclude Include="..\..\src\modules\timer\wrap_Timer.h" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="app.rc" />

platform/msvc2010/love.vcxproj.filters

     <ClCompile Include="..\..\src\modules\joystick\sdl\wrap_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\sdl\Keyboard.cpp">
-      <Filter>modules\keyboard\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\keyboard\sdl\wrap_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\sdl\Mouse.cpp">
-      <Filter>modules\mouse\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\mouse\sdl\wrap_Mouse.cpp">
-      <Filter>modules\mouse\sdl</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\modules\sound\Sound.cpp">
       <Filter>modules\sound</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp">
       <Filter>modules\sound\lullaby</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\modules\timer\sdl\Timer.cpp">
-      <Filter>modules\timer\sdl</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\modules\timer\sdl\wrap_Timer.cpp">
-      <Filter>modules\timer\sdl</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\libraries\luasocket\luasocket.cpp">
       <Filter>luasocket</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>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\modules\audio\Audio.h">
     <ClInclude Include="..\..\src\modules\joystick\sdl\wrap_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\sdl\Keyboard.h">
-      <Filter>modules\keyboard\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\keyboard\sdl\wrap_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\sdl\Mouse.h">
-      <Filter>modules\mouse\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\mouse\sdl\wrap_Mouse.h">
-      <Filter>modules\mouse\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\timer\sdl\Timer.h">
-      <Filter>modules\timer\sdl</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\src\modules\timer\sdl\wrap_Timer.h">
-      <Filter>modules\timer\sdl</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\libraries\luasocket\luasocket.h">
       <Filter>luasocket</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>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="app.rc" />
 #include <graphics/opengl/wrap_Graphics.h>
 #include <image/wrap_Image.h>
 #include <joystick/sdl/wrap_Joystick.h>
-#include <keyboard/sdl/wrap_Keyboard.h>
-#include <mouse/sdl/wrap_Mouse.h>
+#include <keyboard/wrap_Keyboard.h>
+#include <mouse/wrap_Mouse.h>
 #include <physics/box2d/wrap_Physics.h>
 #include <sound/wrap_Sound.h>
-#include <timer/sdl/wrap_Timer.h>
+#include <timer/wrap_Timer.h>
 #include <thread/wrap_Thread.h>
 
 // Libraries.
 	{ "love.graphics", love::graphics::opengl::luaopen_love_graphics },
 	{ "love.image", love::image::luaopen_love_image },
 	{ "love.joystick", love::joystick::sdl::luaopen_love_joystick },
-	{ "love.keyboard", love::keyboard::sdl::luaopen_love_keyboard },
-	{ "love.mouse", love::mouse::sdl::luaopen_love_mouse },
+	{ "love.keyboard", love::keyboard::luaopen_love_keyboard },
+	{ "love.mouse", love::mouse::luaopen_love_mouse },
 	{ "love.physics", love::physics::box2d::luaopen_love_physics },
 	{ "love.sound", love::sound::luaopen_love_sound },
-	{ "love.timer", love::timer::sdl::luaopen_love_timer },
+	{ "love.timer", love::timer::luaopen_love_timer },
 	{ "love.thread", love::thread::luaopen_love_thread },
 	{ 0, 0 }
 };

src/modules/keyboard/Keyboard.cpp

 * 3. This notice may not be removed or altered from any source distribution.
 **/
 
+#include <common/config.h>
+
 #include "Keyboard.h"
 
 namespace love
 {
 namespace keyboard
 {
-
 	bool Keyboard::getConstant(const char * in, Keyboard::Key & out)
 	{
 		return keys.find(in, out);

src/modules/keyboard/Keyboard.h

 
 		virtual ~Keyboard(){}
 
+		/**
+		* Checks whether a certain key is down or not.
+		* @param key A key identifier.
+		* @return boolean
+		**/
+		virtual bool isDown(Key * keylist) const = 0;
+
+		/**
+		* Enables key repeating.
+		* @param delay The amount of delay before repeating the key (in milliseconds)
+		* @param interval Specifies the amount of time between repeats (in milliseconds)
+		**/
+		virtual void setKeyRepeat(int delay, int interval) const = 0;
+
+		/**
+		* Gets the specified delay for the key repeat.
+		* @return int
+		**/
+		virtual int getKeyRepeatDelay() const = 0;
+
+		/**
+		* Gets the specified interval for the key repeat.
+		* @return int
+		**/
+		virtual int getKeyRepeatInterval() const = 0;
+
 		static bool getConstant(const char * in, Key & out);
 		static bool getConstant(Key in, const char *& out);
 

src/modules/keyboard/sdl/Keyboard.cpp

 * 3. This notice may not be removed or altered from any source distribution.
 **/
 
+#include <common/config.h>
+
 #include "Keyboard.h"
 
 namespace love

src/modules/keyboard/sdl/Keyboard.h

 
 		// Implements Module.
 		const char * getName() const;
-		
-		/**
-		* Checks whether a certain key is down or not.
-		* @param key A key identifier.
-		* @return boolean
-		**/
 		bool isDown(Key * keylist) const;
-
-		/**
-		* Enables key repeating.
-		* @param delay The amount of delay before repeating the key (in milliseconds)
-		* @param interval Specifies the amount of time between repeats (in milliseconds)
-		**/
 		void setKeyRepeat(int delay, int interval) const;
-
-		/**
-		* Gets the specified delay for the key repeat.
-		* @return int
-		**/
 		int getKeyRepeatDelay() const;
-
-		/**
-		* Gets the specified interval for the key repeat.
-		* @return int
-		**/
 		int getKeyRepeatInterval() const;
 
 	private:

src/modules/keyboard/sdl/wrap_Keyboard.cpp

-/**
-* Copyright (c) 2006-2011 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_Keyboard.h"
-
-namespace love
-{
-namespace keyboard
-{
-namespace sdl
-{
-	static Keyboard * instance;
-
-	int w_isDown(lua_State * L)
-	{
-		Keyboard::Key k;
-		unsigned int num = lua_gettop(L);
-		Keyboard::Key * keylist = new Keyboard::Key[num+1];
-		unsigned int counter = 0;
-		
-		for (unsigned int i = 0; i < num; i++)
-		{
-			if(Keyboard::getConstant(luaL_checkstring(L, i+1), k))
-				keylist[counter++] = k;
-		}
-		keylist[counter] = Keyboard::KEY_MAX_ENUM;
-		
-		luax_pushboolean(L, instance->isDown(keylist));
-		delete[] keylist;
-		return 1;
-	}
-
-	int w_setKeyRepeat(lua_State * L)
-	{
-		if(lua_gettop(L) == 0)
-		{
-			// Disables key repeat.
-			instance->setKeyRepeat(0, 0);
-			return 0;
-		}
-
-		instance->setKeyRepeat(luaL_optint(L, 1, Keyboard::DEFAULT), luaL_optint(L, 2, Keyboard::DEFAULT));
-		return 0;
-	}
-
-	int w_getKeyRepeat(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getKeyRepeatDelay());
-		lua_pushnumber(L, instance->getKeyRepeatInterval());
-		return 2;
-	}
-
-	// List of functions to wrap.
-	static const luaL_Reg functions[] = {
-		{ "isDown", w_isDown },
-		{ "setKeyRepeat", w_setKeyRepeat },
-		{ "getKeyRepeat", w_getKeyRepeat },
-		{ 0, 0 }
-	};
-
-	int luaopen_love_keyboard(lua_State * L)
-	{
-		if(instance == 0)
-		{
-			try
-			{
-				instance = new Keyboard();
-			}
-			catch(Exception & e)
-			{
-				return luaL_error(L, e.what());
-			}
-		}
-		else
-			instance->retain();
-
-		WrappedModule w;
-		w.module = instance;
-		w.name = "keyboard";
-		w.flags = MODULE_T;
-		w.functions = functions;
-		w.types = 0;
-
-		return luax_register_module(L, w);
-	}
-
-} // sdl
-} // keyboard
-} // love

src/modules/keyboard/sdl/wrap_Keyboard.h

-/**
-* Copyright (c) 2006-2011 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_KEYBOARD_SDL_WRAP_KEYBOARD_H
-#define LOVE_KEYBOARD_SDL_WRAP_KEYBOARD_H
-
-// LOVE
-#include <common/config.h>
-#include "Keyboard.h"
-
-// SDL
-#include <SDL.h>
-
-namespace love
-{
-namespace keyboard
-{
-namespace sdl
-{
-	int w_isDown(lua_State * L);
-	int w_setKeyRepeat(lua_State * L);
-	int w_getKeyRepeat(lua_State * L);
-	extern "C" LOVE_EXPORT int luaopen_love_keyboard(lua_State * L);
-
-} // sdl
-} // keyboard
-} // love
-
-#endif // LOVE_KEYBOARD_SDL_WRAP_KEYBOARD_H

src/modules/keyboard/wrap_Keyboard.cpp

+/**
+* Copyright (c) 2006-2011 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 <common/config.h>
+
+#include "wrap_Keyboard.h"
+
+#include "sdl/Keyboard.h"
+
+namespace love
+{
+namespace keyboard
+{
+	static Keyboard * instance;
+
+	int w_isDown(lua_State * L)
+	{
+		Keyboard::Key k;
+		unsigned int num = lua_gettop(L);
+		Keyboard::Key * keylist = new Keyboard::Key[num+1];
+		unsigned int counter = 0;
+		
+		for (unsigned int i = 0; i < num; i++)
+		{
+			if(Keyboard::getConstant(luaL_checkstring(L, i+1), k))
+				keylist[counter++] = k;
+		}
+		keylist[counter] = Keyboard::KEY_MAX_ENUM;
+		
+		luax_pushboolean(L, instance->isDown(keylist));
+		delete[] keylist;
+		return 1;
+	}
+
+	int w_setKeyRepeat(lua_State * L)
+	{
+		if(lua_gettop(L) == 0)
+		{
+			// Disables key repeat.
+			instance->setKeyRepeat(0, 0);
+			return 0;
+		}
+
+		instance->setKeyRepeat(luaL_optint(L, 1, Keyboard::DEFAULT), luaL_optint(L, 2, Keyboard::DEFAULT));
+		return 0;
+	}
+
+	int w_getKeyRepeat(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getKeyRepeatDelay());
+		lua_pushnumber(L, instance->getKeyRepeatInterval());
+		return 2;
+	}
+
+	// List of functions to wrap.
+	static const luaL_Reg functions[] = {
+		{ "isDown", w_isDown },
+		{ "setKeyRepeat", w_setKeyRepeat },
+		{ "getKeyRepeat", w_getKeyRepeat },
+		{ 0, 0 }
+	};
+
+	int luaopen_love_keyboard(lua_State * L)
+	{
+		if(instance == 0)
+		{
+			try
+			{
+				instance = new love::keyboard::sdl::Keyboard();
+			}
+			catch(Exception & e)
+			{
+				return luaL_error(L, e.what());
+			}
+		}
+		else
+			instance->retain();
+
+		WrappedModule w;
+		w.module = instance;
+		w.name = "keyboard";
+		w.flags = MODULE_T;
+		w.functions = functions;
+		w.types = 0;
+
+		return luax_register_module(L, w);
+	}
+} // keyboard
+} // love

src/modules/keyboard/wrap_Keyboard.h

+/**
+* Copyright (c) 2006-2011 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_KEYBOARD_WRAP_KEYBOARD_H
+#define LOVE_KEYBOARD_WRAP_KEYBOARD_H
+
+// LOVE
+#include "Keyboard.h"
+
+namespace love
+{
+namespace keyboard
+{
+	int w_isDown(lua_State * L);
+	int w_setKeyRepeat(lua_State * L);
+	int w_getKeyRepeat(lua_State * L);
+	extern "C" LOVE_EXPORT int luaopen_love_keyboard(lua_State * L);
+} // keyboard
+} // love
+
+#endif // LOVE_KEYBOARD_WRAP_KEYBOARD_H

src/modules/mouse/Mouse.h

 
 		virtual ~Mouse(){};
 
+		virtual int getX() const = 0;
+		virtual int getY() const = 0;
+		virtual void getPosition(int & x, int & y) const = 0;
+		virtual void setPosition(int x, int y) = 0;
+		virtual void setVisible(bool visible) = 0;
+		virtual bool isDown(Button * buttonlist) const = 0;
+		virtual bool isVisible() const = 0;
+		virtual void setGrab(bool grab) = 0;
+		virtual bool isGrabbed() const = 0;
+
 		static bool getConstant(const char * in, Button & out);
 		static bool getConstant(Button in, const char *& out);
 

src/modules/mouse/sdl/Mouse.cpp

 		return (SDL_WM_GrabInput(SDL_GRAB_QUERY) ==  SDL_GRAB_ON ? true : false);
 	}
 
-	EnumMap<Mouse::Button, unsigned, Mouse::BUTTON_MAX_ENUM>::Entry Mouse::buttonEntries[] = 
-	{
-		{ Mouse::BUTTON_LEFT, SDL_BUTTON_LEFT},
-		{ Mouse::BUTTON_MIDDLE, SDL_BUTTON_MIDDLE},
-		{ Mouse::BUTTON_RIGHT, SDL_BUTTON_RIGHT},
-		{ Mouse::BUTTON_WHEELUP, SDL_BUTTON_WHEELUP},
-		{ Mouse::BUTTON_WHEELDOWN, SDL_BUTTON_WHEELDOWN},
-		{ Mouse::BUTTON_X1, SDL_BUTTON_X1},
-		{ Mouse::BUTTON_X2, SDL_BUTTON_X2},
-	};
-
-	EnumMap<Mouse::Button, unsigned, Mouse::BUTTON_MAX_ENUM> Mouse::buttons(Mouse::buttonEntries, sizeof(Mouse::buttonEntries));
-
 } // sdl
 } // mouse
 } // love

src/modules/mouse/sdl/Mouse.h

 
 // LOVE
 #include <mouse/Mouse.h>
-#include <common/EnumMap.h>
 
 namespace love
 {
 		bool isVisible() const;
 		void setGrab(bool grab);
 		bool isGrabbed() const;
-
-	public:
-
-		static EnumMap<Button, unsigned, BUTTON_MAX_ENUM>::Entry buttonEntries[];
-		static EnumMap<Button, unsigned, BUTTON_MAX_ENUM> buttons;
-
 	}; // Mouse
 
 } // sdl

src/modules/mouse/sdl/wrap_Mouse.cpp

-/**
-* Copyright (c) 2006-2011 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_Mouse.h"
-
-namespace love
-{
-namespace mouse
-{
-namespace sdl
-{
-	static Mouse * instance = 0;
-
-	int w_getX(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getX());
-		return 1;
-	}
-
-	int w_getY(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getY());
-		return 1;
-	}
-
-	int w_getPosition(lua_State * L)
-	{
-		int x, y;
-		instance->getPosition(x, y);
-		lua_pushinteger(L, x);
-		lua_pushinteger(L, y);
-		return 2;
-	}
-
-	int w_setPosition(lua_State * L)
-	{
-		int x = luaL_checkint(L, 1);
-		int y = luaL_checkint(L, 2);
-		instance->setPosition(x, y);
-		return 0;
-	}
-
-	int w_isDown(lua_State * L)
-	{
-		Mouse::Button b;
-		unsigned int num = lua_gettop(L);
-		Mouse::Button * buttonlist = new Mouse::Button[num+1];
-		unsigned int counter = 0;
-		
-		for (unsigned int i = 0; i < num; i++)
-		{
-			if(Mouse::getConstant(luaL_checkstring(L, i+1), b))
-				buttonlist[counter++] = b;
-		}
-		buttonlist[counter] = Mouse::BUTTON_MAX_ENUM;
-		
-		luax_pushboolean(L, instance->isDown(buttonlist));
-		delete[] buttonlist;
-		return 1;
-	}
-
-	int w_setVisible(lua_State * L)
-	{
-		bool b = luax_toboolean(L, 1);
-		instance->setVisible(b);
-		return 0;
-	}
-
-	int w_isVisible(lua_State * L)
-	{
-		luax_pushboolean(L, instance->isVisible());
-		return 1;
-	}
-
-	int w_setGrab(lua_State * L)
-	{
-		bool b = luax_toboolean(L, 1);
-		instance->setGrab(b);
-		return 0;
-	}
-
-	int w_isGrabbed(lua_State * L)
-	{
-		luax_pushboolean(L, instance->isGrabbed());
-		return 1;
-	}
-
-	// List of functions to wrap.
-	static const luaL_Reg functions[] = {
-		{ "getX", w_getX },
-		{ "getY", w_getY },
-		{ "setPosition", w_setPosition },
-		{ "isDown", w_isDown },
-		{ "setVisible", w_setVisible },
-		{ "isVisible", w_isVisible },
-		{ "getPosition", w_getPosition },
-		{ "setGrab", w_setGrab },
-		{ "isGrabbed", w_isGrabbed },
-		{ 0, 0 }
-	};
-
-	int luaopen_love_mouse(lua_State * L)
-	{
-		if(instance == 0)
-		{
-			try
-			{
-				instance = new Mouse();
-			}
-			catch(Exception & e)
-			{
-				return luaL_error(L, e.what());
-			}
-		}
-		else
-			instance->retain();
-
-		WrappedModule w;
-		w.module = instance;
-		w.name = "mouse";
-		w.flags = MODULE_T;
-		w.functions = functions;
-		w.types = 0;
-
-		return luax_register_module(L, w);
-	}
-
-} // sdl
-} // mouse
-} // love

src/modules/mouse/sdl/wrap_Mouse.h

-/**
-* Copyright (c) 2006-2011 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_MOUSE_SDL_WRAP_MOUSE_H
-#define LOVE_MOUSE_SDL_WRAP_MOUSE_H
-
-// LOVE
-#include <common/config.h>
-#include "Mouse.h"
-
-namespace love
-{
-namespace mouse
-{
-namespace sdl
-{
-	int w_getX(lua_State * L);
-	int w_getY(lua_State * L);
-	int w_getPosition(lua_State * L);
-	int w_setPosition(lua_State * L);
-	int w_isDown(lua_State * L);
-	int w_setVisible(lua_State * L);
-	int w_isVisible(lua_State * L);
-	int w_setGrap(lua_State * L);
-	int w_isGrabbed(lua_State * L);
-	extern "C" LOVE_EXPORT int luaopen_love_mouse(lua_State * L);
-
-} // sdl
-} // mouse
-} // love
-
-#endif // LOVE_MOUSE_SDL_WRAP_MOUSE_H
-

src/modules/mouse/wrap_Mouse.cpp

+/**
+* Copyright (c) 2006-2011 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 <common/config.h>
+
+#include "sdl/Mouse.h"
+
+#include "wrap_Mouse.h"
+
+namespace love
+{
+namespace mouse
+{
+	static Mouse * instance = 0;
+
+	int w_getX(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getX());
+		return 1;
+	}
+
+	int w_getY(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getY());
+		return 1;
+	}
+
+	int w_getPosition(lua_State * L)
+	{
+		int x, y;
+		instance->getPosition(x, y);
+		lua_pushinteger(L, x);
+		lua_pushinteger(L, y);
+		return 2;
+	}
+
+	int w_setPosition(lua_State * L)
+	{
+		int x = luaL_checkint(L, 1);
+		int y = luaL_checkint(L, 2);
+		instance->setPosition(x, y);
+		return 0;
+	}
+
+	int w_isDown(lua_State * L)
+	{
+		Mouse::Button b;
+		unsigned int num = lua_gettop(L);
+		Mouse::Button * buttonlist = new Mouse::Button[num+1];
+		unsigned int counter = 0;
+		
+		for (unsigned int i = 0; i < num; i++)
+		{
+			if(Mouse::getConstant(luaL_checkstring(L, i+1), b))
+				buttonlist[counter++] = b;
+		}
+		buttonlist[counter] = Mouse::BUTTON_MAX_ENUM;
+		
+		luax_pushboolean(L, instance->isDown(buttonlist));
+		delete[] buttonlist;
+		return 1;
+	}
+
+	int w_setVisible(lua_State * L)
+	{
+		bool b = luax_toboolean(L, 1);
+		instance->setVisible(b);
+		return 0;
+	}
+
+	int w_isVisible(lua_State * L)
+	{
+		luax_pushboolean(L, instance->isVisible());
+		return 1;
+	}
+
+	int w_setGrab(lua_State * L)
+	{
+		bool b = luax_toboolean(L, 1);
+		instance->setGrab(b);
+		return 0;
+	}
+
+	int w_isGrabbed(lua_State * L)
+	{
+		luax_pushboolean(L, instance->isGrabbed());
+		return 1;
+	}
+
+	// List of functions to wrap.
+	static const luaL_Reg functions[] = {
+		{ "getX", w_getX },
+		{ "getY", w_getY },
+		{ "setPosition", w_setPosition },
+		{ "isDown", w_isDown },
+		{ "setVisible", w_setVisible },
+		{ "isVisible", w_isVisible },
+		{ "getPosition", w_getPosition },
+		{ "setGrab", w_setGrab },
+		{ "isGrabbed", w_isGrabbed },
+		{ 0, 0 }
+	};
+
+	int luaopen_love_mouse(lua_State * L)
+	{
+		if(instance == 0)
+		{
+			try
+			{
+				instance = new love::mouse::sdl::Mouse();
+			}
+			catch(Exception & e)
+			{
+				return luaL_error(L, e.what());
+			}
+		}
+		else
+			instance->retain();
+
+		WrappedModule w;
+		w.module = instance;
+		w.name = "mouse";
+		w.flags = MODULE_T;
+		w.functions = functions;
+		w.types = 0;
+
+		return luax_register_module(L, w);
+	}
+
+} // mouse
+} // love

src/modules/mouse/wrap_Mouse.h

+/**
+* Copyright (c) 2006-2011 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_MOUSE_WRAP_MOUSE_H
+#define LOVE_MOUSE_WRAP_MOUSE_H
+
+// LOVE
+#include "Mouse.h"
+
+namespace love
+{
+namespace mouse
+{
+	int w_getX(lua_State * L);
+	int w_getY(lua_State * L);
+	int w_getPosition(lua_State * L);
+	int w_setPosition(lua_State * L);
+	int w_isDown(lua_State * L);
+	int w_setVisible(lua_State * L);
+	int w_isVisible(lua_State * L);
+	int w_setGrap(lua_State * L);
+	int w_isGrabbed(lua_State * L);
+	extern "C" LOVE_EXPORT int luaopen_love_mouse(lua_State * L);
+
+} // mouse
+} // love
+
+#endif // LOVE_MOUSE_WRAP_MOUSE_H
+

src/modules/timer/Timer.h

+/**
+* Copyright (c) 2006-2011 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_TIMER_TIMER_H
+#define LOVE_TIMER_TIMER_H
+
+// LOVE
+#include <common/Module.h>
+
+namespace love
+{
+namespace timer
+{
+	class Timer : public Module
+	{
+	public:
+
+		/**
+		* Destructor.
+		**/
+		virtual ~Timer(){}
+
+		/**
+		* Measures the time between this call and the previous call,
+		* and updates internal values accordinly.
+		**/
+		virtual void step() = 0;
+
+		/**
+		* Tries to sleep for the specified amount of time. The precision is
+		* usually 1ms.
+		* @param seconds The number of seconds to sleep for.
+		**/
+		virtual void sleep(double seconds) = 0;
+
+		/**
+		* Gets the time between the last two frames, assuming step is called
+		* each frame.
+		**/
+		virtual double getDelta() const = 0;
+
+		/**
+		* Gets the average FPS over the last second. Beucase the value is only updated
+		* once per second, it does not look erratic when displayed on screen.
+		* @return The "current" FPS.
+		**/
+		virtual double getFPS() const = 0;
+
+		/**
+		* Gets the amount of time since the program started. Only useful for timing
+		* code or measuring intervals.
+		* @return The time (in seconds) since the program started.
+		**/
+		virtual double getTime() const = 0;
+
+		/**
+		 * Gets the amount of time passed since an unspecified time. The time is accurate
+		 * to the microsecond, and is limited to 24 hours.
+		 * @return The time (in seconds)
+		 **/
+		virtual double getMicroTime() const = 0;
+
+	}; // Timer
+
+} // timer
+} // love
+
+#endif // LOVE_TIMER_TIMER_H

src/modules/timer/sdl/Timer.h

 #include <SDL.h>
 
 // LOVE
-#include <common/Module.h>
+#include <timer/Timer.h>
 
 namespace love
 {
 	* An SDL timer module. Can keep track of time between certain function
 	* calls, and provides access to a FPS metric which updates once each second.
 	**/
-	class Timer : public Module
+	class Timer : public love::timer::Timer
 	{
+	public:
+
+		/**
+		* Constructor. Initializes the SDL/timer subsystem.
+		**/
+		Timer();
+
+		/**
+		* Destructor.
+		**/
+		virtual ~Timer();
+
+		const char * getName() const;
+		void step();
+		void sleep(double seconds);
+		double getDelta() const;
+		double getFPS() const;
+		double getTime() const;
+		double getMicroTime() const;
+
 	private:
 
+		// Timing vars for benchmarking.
+		Uint32 time_init;
+
 		// Frame delta vars.
 		Uint32 currTime;
 		Uint32 prevTime;
 		// The current timestep.
 		double dt;
 
-	public:
-
-		/**
-		* Constructor. Initializes the SDL/timer subsystem.
-		**/
-		Timer();
-
-		/**
-		* Destructor.
-		**/
-		~Timer();
-
-		/**
-		* Gets the name of the module.
-		* @return Always returns "love.timer.sdl".
-		**/
-		const char * getName() const;
-
-		/**
-		* Measures the time between this call and the previous call,
-		* and updates internal values accordinly.
-		**/
-		void step();
-
-		/**
-		* Tries to sleep for the specified amount of time. The precision is
-		* usually 1ms.
-		* @param seconds The number of seconds to sleep for.
-		**/
-		void sleep(double seconds);
-
-		/**
-		* Gets the time between the last two frames, assuming step is called
-		* each frame.
-		**/
-		double getDelta() const;
-
-		/**
-		* Gets the average FPS over the last second. Beucase the value is only updated
-		* once per second, it does not look erratic when displayed on screen.
-		* @return The "current" FPS.
-		**/
-		double getFPS() const;
-
-		/**
-		* Gets the amount of time since the program started. Only useful for timing
-		* code or measuring intervals.
-		* @return The time (in seconds) since the program started.
-		**/
-		double getTime() const;
-
-		/**
-		 * Gets the amount of time passed since an unspecified time. The time is accurate
-		 * to the microsecond, and is limited to 24 hours.
-		 * @return The time (in seconds)
-		 **/
-		double getMicroTime() const;
-
 	}; // Timer
 
 } // sdl

src/modules/timer/sdl/wrap_Timer.cpp

-/**
-* Copyright (c) 2006-2011 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_Timer.h"
-
-namespace love
-{
-namespace timer
-{
-namespace sdl
-{
-	static Timer * instance = 0;
-
-	int w_step(lua_State *)
-	{
-		instance->step();
-		return 0;
-	}
-
-	int w_getDelta(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getDelta());
-		return 1;
-	}
-
-	int w_getFPS(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getFPS());
-		return 1;
-	}
-
-	int w_sleep(lua_State * L)
-	{
-		instance->sleep((float) luaL_checknumber(L, 1));
-		return 0;
-	}
-
-	int w_getTime(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getTime());
-		return 1;
-	}
-
-	int w_getMicroTime(lua_State * L)
-	{
-		lua_pushnumber(L, instance->getMicroTime());
-		return 1;
-	}
-
-	// List of functions to wrap.
-	static const luaL_Reg functions[] = {
-		{ "step", w_step },
-		{ "getDelta", w_getDelta },
-		{ "getFPS", w_getFPS },
-		{ "sleep", w_sleep },
-		{ "getTime", w_getTime },
-		{ "getMicroTime", w_getMicroTime },
-		{ 0, 0 }
-	};
-
-
-	int luaopen_love_timer(lua_State * L)
-	{
-		if(instance == 0)
-		{
-			try
-			{
-				instance = new Timer();
-			}
-			catch(Exception & e)
-			{
-				return luaL_error(L, e.what());
-			}
-		}
-		else
-			instance->retain();
-
-		WrappedModule w;
-		w.module = instance;
-		w.name = "timer";
-		w.flags = MODULE_T;
-		w.functions = functions;
-		w.types = 0;
-
-		return luax_register_module(L, w);
-	}
-
-} // sdl
-} // timer
-} // love

src/modules/timer/sdl/wrap_Timer.h

-/**
-* Copyright (c) 2006-2011 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_TIMER_SDL_WRAP_TIMER_H
-#define LOVE_TIMER_SDL_WRAP_TIMER_H
-
-// LOVE
-#include <common/config.h>
-#include "Timer.h"
-
-namespace love
-{
-namespace timer
-{
-namespace sdl
-{
-	int w_step(lua_State * L);
-	int w_getDelta(lua_State * L);
-	int w_getFPS(lua_State * L);
-	int w_sleep(lua_State * L);
-	int w_getTime(lua_State * L);
-	int w_getMicroTime(lua_State * L);
-	extern "C" LOVE_EXPORT int luaopen_love_timer(lua_State * L);
-
-} // sdl
-} // timer
-} // love
-
-#endif // LOVE_TIMER_SDL_WRAP_TIMER_H

src/modules/timer/wrap_Timer.cpp

+/**
+* Copyright (c) 2006-2011 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 <common/config.h>
+
+// LOVE
+#include "wrap_Timer.h"
+
+#include "sdl/Timer.h"
+
+namespace love
+{
+namespace timer
+{
+	static Timer * instance = 0;
+
+	int w_step(lua_State *)
+	{
+		instance->step();
+		return 0;
+	}
+
+	int w_getDelta(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getDelta());
+		return 1;
+	}
+
+	int w_getFPS(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getFPS());
+		return 1;
+	}
+
+	int w_sleep(lua_State * L)
+	{
+		instance->sleep((float) luaL_checknumber(L, 1));
+		return 0;
+	}
+
+	int w_getTime(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getTime());
+		return 1;
+	}
+
+	int w_getMicroTime(lua_State * L)
+	{
+		lua_pushnumber(L, instance->getMicroTime());
+		return 1;
+	}
+
+	// List of functions to wrap.
+	static const luaL_Reg functions[] = {
+		{ "step", w_step },
+		{ "getDelta", w_getDelta },
+		{ "getFPS", w_getFPS },
+		{ "sleep", w_sleep },
+		{ "getTime", w_getTime },
+		{ "getMicroTime", w_getMicroTime },
+		{ 0, 0 }
+	};
+
+
+	int luaopen_love_timer(lua_State * L)
+	{
+		if(instance == 0)
+		{
+			try
+			{
+				instance = new love::timer::sdl::Timer();
+				
+			}
+			catch(Exception & e)
+			{
+				return luaL_error(L, e.what());
+			}
+		}
+		else
+			instance->retain();
+
+		WrappedModule w;
+		w.module = instance;
+		w.name = "timer";
+		w.flags = MODULE_T;
+		w.functions = functions;
+		w.types = 0;
+
+		return luax_register_module(L, w);
+	}
+
+} // timer
+} // love

src/modules/timer/wrap_Timer.h

+/**
+* Copyright (c) 2006-2011 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_TIMER_WRAP_TIMER_H
+#define LOVE_TIMER_WRAP_TIMER_H
+
+// LOVE
+#include "Timer.h"
+
+namespace love
+{
+namespace timer
+{
+	int w_step(lua_State * L);
+	int w_getDelta(lua_State * L);
+	int w_getFPS(lua_State * L);
+	int w_sleep(lua_State * L);
+	int w_getTime(lua_State * L);
+	int w_getMicroTime(lua_State * L);
+	extern "C" LOVE_EXPORT int luaopen_love_timer(lua_State * L);
+
+} // timer
+} // love
+
+#endif // LOVE_TIMER_WRAP_TIMER_H