Browse Source

Removed some dead code and fixed luax_pushtype when the object argument is null.

Alex Szpakowski 11 years ago
parent
commit
40c6821048

+ 3 - 0
src/common/runtime.cpp

@@ -398,7 +398,10 @@ void luax_rawnewtype(lua_State *L, const char *name, bits flags, love::Object *o
 void luax_pushtype(lua_State *L, const char *name, bits flags, love::Object *object)
 void luax_pushtype(lua_State *L, const char *name, bits flags, love::Object *object)
 {
 {
 	if (object == nullptr)
 	if (object == nullptr)
+	{
 		lua_pushnil(L);
 		lua_pushnil(L);
+		return;
+	}
 
 
 	// Fetch the registry table of instantiated types.
 	// Fetch the registry table of instantiated types.
 	luax_getregistry(L, REGISTRY_TYPES);
 	luax_getregistry(L, REGISTRY_TYPES);

+ 0 - 52
src/modules/graphics/opengl/OpenGL.cpp

@@ -579,58 +579,6 @@ float OpenGL::setTextureFilter(graphics::Texture::Filter &f)
 	return f.anisotropy;
 	return f.anisotropy;
 }
 }
 
 
-graphics::Texture::Filter OpenGL::getTextureFilter()
-{
-	GLint gmin, gmag;
-	glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &gmin);
-	glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &gmag);
-
-	Texture::Filter f;
-
-	switch (gmin)
-	{
-	case GL_NEAREST:
-		f.min = Texture::FILTER_NEAREST;
-		f.mipmap = Texture::FILTER_NONE;
-		break;
-	case GL_NEAREST_MIPMAP_NEAREST:
-		f.min = f.mipmap = Texture::FILTER_NEAREST;
-		break;
-	case GL_NEAREST_MIPMAP_LINEAR:
-		f.min = Texture::FILTER_NEAREST;
-		f.mipmap = Texture::FILTER_LINEAR;
-		break;
-	case GL_LINEAR_MIPMAP_NEAREST:
-		f.min = Texture::FILTER_LINEAR;
-		f.mipmap = Texture::FILTER_NEAREST;
-		break;
-	case GL_LINEAR_MIPMAP_LINEAR:
-		f.min = f.mipmap = Texture::FILTER_LINEAR;
-		break;
-	case GL_LINEAR:
-	default:
-		f.min = Texture::FILTER_LINEAR;
-		f.mipmap = Texture::FILTER_NONE;
-		break;
-	}
-
-	switch (gmag)
-	{
-	case GL_NEAREST:
-		f.mag = Texture::FILTER_NEAREST;
-		break;
-	case GL_LINEAR:
-	default:
-		f.mag = Texture::FILTER_LINEAR;
-		break;
-	}
-
-	if (GLEE_EXT_texture_filter_anisotropic)
-		glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, &f.anisotropy);
-
-	return f;
-}
-
 void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w)
 void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w)
 {
 {
 	GLint gs, gt;
 	GLint gs, gt;

+ 0 - 5
src/modules/graphics/opengl/OpenGL.h

@@ -264,11 +264,6 @@ public:
 	 **/
 	 **/
 	float setTextureFilter(graphics::Texture::Filter &f);
 	float setTextureFilter(graphics::Texture::Filter &f);
 
 
-	/**
-	 * Returns the texture filter mode for the currently bound texture.
-	 **/
-	graphics::Texture::Filter getTextureFilter();
-
 	/**
 	/**
 	 * Sets the texture wrap mode for the currently bound texture.
 	 * Sets the texture wrap mode for the currently bound texture.
 	 **/
 	 **/

+ 1 - 1
src/modules/image/magpie/ddsHandler.h

@@ -58,7 +58,7 @@ public:
 	 * a single block of memory containing all the images.
 	 * a single block of memory containing all the images.
 	 *
 	 *
 	 * @param[in] filedata The data to parse.
 	 * @param[in] filedata The data to parse.
-	 * @param[out] image The list of sub-images generated. Byte data is a pointer
+	 * @param[out] images The list of sub-images generated. Byte data is a pointer
 	 *             to the returned data.
 	 *             to the returned data.
 	 * @param[out] dataSize The total size in bytes of the returned data.
 	 * @param[out] dataSize The total size in bytes of the returned data.
 	 * @param[out] format The format of the Compressed Data.
 	 * @param[out] format The format of the Compressed Data.