[Super-tux-commit] supertux/src/screen texture.cpp,1.9,1.10 texture.h,1.6,1.7
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-06-14 22:13:58
|
Update of /cvsroot/super-tux/supertux/src/screen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18037 Modified Files: texture.cpp texture.h Log Message: - fixed gradient crash bug Index: texture.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen/texture.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- texture.h 10 Jun 2004 14:09:49 -0000 1.6 +++ texture.h 14 Jun 2004 22:13:50 -0000 1.7 @@ -97,7 +97,7 @@ Surface(SDL_Surface* surf, int use_alpha); Surface(const std::string& file, int use_alpha); Surface(const std::string& file, int x, int y, int w, int h, int use_alpha); - Surface(Color top_gradient, Color bottom_gradient, int w, int h); + Surface(Color top_gradient, Color bottom_gradient, int w_, int h_); ~Surface(); /** Reload the surface, which is necesarry in case of a mode swich */ Index: texture.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen/texture.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- texture.cpp 13 Jun 2004 22:42:13 -0000 1.9 +++ texture.cpp 14 Jun 2004 22:13:50 -0000 1.10 @@ -170,9 +170,12 @@ surfaces.push_back(this); } -Surface::Surface(Color top_background, Color bottom_background, int w, int h) - : data(top_background, bottom_background, w, h), w(0), h(0) +Surface::Surface(Color top_background, Color bottom_background, int w_, int h_) + : data(top_background, bottom_background, 0, 0), w(0), h(0) { + // FIXME: Gradient surfaces currently don't accept width/height + // If nonzero values are passed to data.create(), supertux + // crashes. impl = data.create(); if (impl) { |