From bb1302dd7b35ab5b7ca61b164d0dde4f4ade7cca Mon Sep 17 00:00:00 2001 From: James Turk Date: Fri, 8 Aug 2003 03:52:25 +0000 Subject: [PATCH] oops! fixed problems in new ZImage stretching --- src/ZE_ZImage.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ZE_ZImage.cpp b/src/ZE_ZImage.cpp index 032423e..766db98 100644 --- a/src/ZE_ZImage.cpp +++ b/src/ZE_ZImage.cpp @@ -13,7 +13,7 @@ \brief Source file for ZImage. Implementation of ZImage, the Image class for ZEngine. -
$Id: ZE_ZImage.cpp,v 1.40 2003/08/07 05:54:45 cozman Exp $
+
$Id: ZE_ZImage.cpp,v 1.41 2003/08/08 03:52:25 cozman Exp $
\author James Turk **/ @@ -140,8 +140,8 @@ void ZImage::Attach(SDL_Surface *surface) if(surface) { - rWidth = surface->w; - rHeight = surface->h; + rWidth = static_cast(surface->w); + rHeight = static_cast(surface->h); rTexID = SDL_GL_LoadTexture(surface,coord); //major helper, not written by me, from libsdl.org rTexMinX = coord[0]; rTexMinY = coord[1]; @@ -167,7 +167,8 @@ void ZImage::Release() if(glIsTexture(rTexID)) glDeleteTextures(1,&rTexID); rTexMinX = rTexMinY = rTexMaxX = rTexMaxY = 0.0f; - rTexID = rWidth = rHeight = 0; + rTexID = 0; + rWidth = rHeight = 0; FreeImage(rImage); } @@ -193,7 +194,7 @@ void ZImage::SetColorKey(Uint8 red, Uint8 green, Uint8 blue) void ZImage::Draw(int x, int y) const { - Draw(x,y); + Draw(static_cast(x),static_cast(y)); } void ZImage::Draw(float x, float y) const