Browse Source

Renamed love.touch.getIDs to love.touch.getTouches.

Alex Szpakowski 10 years ago
parent
commit
457903a425

+ 4 - 8
src/modules/image/ImageData.cpp

@@ -130,22 +130,18 @@ void ImageData::paste(ImageData *src, int dx, int dy, int sx, int sy, int sw, in
 		dy -= sy;
 		dy -= sy;
 		sy = 0;
 		sy = 0;
 	}
 	}
+
 	if (dx + sw > getWidth())
 	if (dx + sw > getWidth())
-	{
 		sw = getWidth() - dx;
 		sw = getWidth() - dx;
-	}
+
 	if (dy + sh > getHeight())
 	if (dy + sh > getHeight())
-	{
 		sh = getHeight() - dy;
 		sh = getHeight() - dy;
-	}
+
 	if (sx + sw > src->getWidth())
 	if (sx + sw > src->getWidth())
-	{
 		sw = src->getWidth() - sx;
 		sw = src->getWidth() - sx;
-	}
+
 	if (sy + sh > src->getHeight())
 	if (sy + sh > src->getHeight())
-	{
 		sh = src->getHeight() - sy;
 		sh = src->getHeight() - sy;
-	}
 
 
 	// If the dimensions match up, copy the entire memory stream in one go
 	// If the dimensions match up, copy the entire memory stream in one go
 	if (sw == getWidth() && getWidth() == src->getWidth()
 	if (sw == getWidth() && getWidth() == src->getWidth()

+ 1 - 1
src/modules/touch/Touch.h

@@ -57,7 +57,7 @@ public:
 	/**
 	/**
 	 * Gets a list of the IDs of all currently active touches.
 	 * Gets a list of the IDs of all currently active touches.
 	 **/
 	 **/
-	virtual std::vector<int64> getIDs() const = 0;
+	virtual std::vector<int64> getTouches() const = 0;
 
 
 	/**
 	/**
 	 * Gets the position in pixels of a specific touch, using its ID.
 	 * Gets the position in pixels of a specific touch, using its ID.

+ 1 - 1
src/modules/touch/sdl/Touch.cpp

@@ -30,7 +30,7 @@ namespace touch
 namespace sdl
 namespace sdl
 {
 {
 
 
-std::vector<int64> Touch::getIDs() const
+std::vector<int64> Touch::getTouches() const
 {
 {
 	std::vector<int64> ids;
 	std::vector<int64> ids;
 	ids.reserve(touches.size());
 	ids.reserve(touches.size());

+ 1 - 1
src/modules/touch/sdl/Touch.h

@@ -43,7 +43,7 @@ public:
 
 
 	virtual ~Touch() {}
 	virtual ~Touch() {}
 
 
-	std::vector<int64> getIDs() const override;
+	std::vector<int64> getTouches() const override;
 	void getPosition(int64 id, double &x, double &y) const override;
 	void getPosition(int64 id, double &x, double &y) const override;
 	double getPressure(int64 id) const override;
 	double getPressure(int64 id) const override;
 
 

+ 3 - 3
src/modules/touch/wrap_Touch.cpp

@@ -40,9 +40,9 @@ int64 luax_checktouchid(lua_State *L, int idx)
 	return (int64) (intptr_t) lua_touserdata(L, 1);
 	return (int64) (intptr_t) lua_touserdata(L, 1);
 }
 }
 
 
-int w_getIDs(lua_State *L)
+int w_getTouches(lua_State *L)
 {
 {
-	std::vector<int64> ids = instance()->getIDs();
+	std::vector<int64> ids = instance()->getTouches();
 
 
 	lua_createtable(L, (int) ids.size(), 0);
 	lua_createtable(L, (int) ids.size(), 0);
 
 
@@ -85,7 +85,7 @@ int w_getPressure(lua_State *L)
 
 
 static const luaL_Reg functions[] =
 static const luaL_Reg functions[] =
 {
 {
-	{ "getIDs", w_getIDs },
+	{ "getTouches", w_getTouches },
 	{ "getPosition", w_getPosition },
 	{ "getPosition", w_getPosition },
 	{ "getPressure", w_getPressure },
 	{ "getPressure", w_getPressure },
 	{ 0, 0 }
 	{ 0, 0 }

+ 1 - 1
src/modules/touch/wrap_Touch.h

@@ -32,7 +32,7 @@ namespace touch
 {
 {
 
 
 int64 luax_checktouchid(lua_State *L, int idx);
 int64 luax_checktouchid(lua_State *L, int idx);
-int w_getIDs(lua_State *L);
+int w_getTouches(lua_State *L);
 int w_getPosition(lua_State *L);
 int w_getPosition(lua_State *L);
 int w_getPressure(lua_State *L);
 int w_getPressure(lua_State *L);
 extern "C" LOVE_EXPORT int luaopen_love_touch(lua_State *L);
 extern "C" LOVE_EXPORT int luaopen_love_touch(lua_State *L);