[Super-tux-commit] supertux/src screen.cpp,1.13,1.14
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-05-15 10:29:47
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16653 Modified Files: screen.cpp Log Message: - fixed drawgradient() function (res fix) Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- screen.cpp 14 May 2004 21:49:30 -0000 1.13 +++ screen.cpp 15 May 2004 10:29:35 -0000 1.14 @@ -82,11 +82,11 @@ { #endif - for(float y = 0; y < 480; y += 2) - fillrect(0, (int)y, 640, 2, - (int)(((float)(top_clr.red-bot_clr.red)/(0-480)) * y + top_clr.red), - (int)(((float)(top_clr.green-bot_clr.green)/(0-480)) * y + top_clr.green), - (int)(((float)(top_clr.blue-bot_clr.blue)/(0-480)) * y + top_clr.blue), 255); + for(float y = 0; y < screen->h; y += 2) + fillrect(0, (int)y, screen->w, 2, + (int)(((float)(top_clr.red-bot_clr.red)/(0-screen->h)) * y + top_clr.red), + (int)(((float)(top_clr.green-bot_clr.green)/(0-screen->w)) * y + top_clr.green), + (int)(((float)(top_clr.blue-bot_clr.blue)/(0-screen->w)) * y + top_clr.blue), 255); /* calculates the color for each line, based in the generic equation for functions: y = mx + b */ #ifndef NOOPENGL |