![]() |
|
getpixel() and putpixel() |
Jeff Bernard
Member #6,698
December 2005
![]() |
I'm trying to make it so the player can customize the hero's colors. So, they choose the red, green, and blue values for the hero, then a function goes through and changes the colors. I would think my function works, but for some reason it doesn't. I've tried adding an obscene rest() when before putpixel() is executed, to see if it actually is, and it skipped the obscene rest()'s, so I assume it's a problem with checking for which color should be changed:
-- |
CGamesPlay
Member #2,559
July 2002
![]() |
if (newR != hero.r && newG != hero.g && newB != hero.b)Each of those should be OR. I.E. "if red is not the old red OR green is not...". "data\\hero.bmp"That should be "data/hero.bmp" Other than that it should work. -- Ryan Patterson - <http://cgamesplay.com/> |
Jeff Bernard
Member #6,698
December 2005
![]() |
Ah, thanks, I didn't notice that with my first check. I've changed the AND to OR now. As for the double backslash, that's how I load all of my files. It's essentially the same thing as a single forward slash. I just prefer the double backslash because Windows uses backslashes in their address for folders. I've made the change on the first line...but it still doesn't seem to reach putpixel(). EDIT-- I fixed the problem. Simple mistake in my code. -- |
|