Wierd Problems With Sdl_fillrect & Boxcolor


zacaj

void main()
Joined
Apr 3, 2007
Messages
362
Age
29
Location
NY
Website
zacaj.com
Ive been working on my port of engine3d from the ipod, and none of the filled Rectangle functions for sdl are working. boxColor doesnt display the right colors, and sometimes doesnt display at all, and SDL_FillRect isnt the right height. Here are some pics:
pic1.jpg

Origional on iPod(clipped off a bit at bottom)
pic2.jpg

Using SDL_FillRect
pic3.jpg

Using boxColor

The source, origional and port, is at http://zacaj.com/engine3d.tar.bz2

Thanks for all your help. :) :) :)
 
SDL_FillRect uses x,y,w,h, but you're using the x2 and y2 values from boxColor instead of w and h. As for boxColor not working, try making sure that you're not drawing off the edge of the screen (can't remember if boxColor likes that or not), and I don't have time to read through and find out what's wrong with the color but you could just try boxRGBA instead and see how that looks.
 
Back
Top