From 8bde9095c5840b8d62ebafe11beaed98877d6ac2 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 9 Oct 2005 03:34:45 +0000 Subject: * Made Sprite into an interface implemented by both FloorItem and Being, which hook themselves into the map on construction. The improved fringe layer is working as expected now. * Made sure TMW compiles without warnings even when using "-Wconversion -Wshadow -Wcast-qual -Wwrite-strings -ansi -pedantic", lots of cleanups. * Added two new small tilesets that contain the desert tiles that are twice and three times the height of a normal tile. One well in new_3-1 has been converted to use the new double tiles for testing purposes. --- src/openglgraphics.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/openglgraphics.cpp') diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index d7915256..983c948e 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -89,13 +89,13 @@ bool OpenGLGraphics::drawImage(Image *image, int srcX, int srcY, srcY += image->bounds.y; // Find OpenGL texture coordinates - float texX1 = srcX / (float)image->texWidth; - float texY1 = srcY / (float)image->texHeight; - float texX2 = (srcX + width) / (float)image->texWidth; - float texY2 = (srcY + height) / (float)image->texHeight; + float texX1 = srcX / (float)image->mTexWidth; + float texY1 = srcY / (float)image->mTexHeight; + float texX2 = (srcX + width) / (float)image->mTexWidth; + float texY2 = (srcY + height) / (float)image->mTexHeight; glColor4f(1.0f, 1.0f, 1.0f, image->alpha); - glBindTexture(GL_TEXTURE_2D, image->glimage); + glBindTexture(GL_TEXTURE_2D, image->mGLImage); drawTexedQuad(dstX, dstY, width, height, texX1, texY1, texX2, texY2); -- cgit v1.2.3-60-g2f50