Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / point/dot problem...

Author
Message
sprites r us
20
Years of Service
User Offline
Joined: 4th Mar 2004
Location:
Posted: 4th Mar 2004 20:57
Well, i have written a little 100m dash program and i want to paint the runners shirts in different colors, but i dont want to have to load a load of different pictures, so i tried changing the color as follows: (i used (0,255,0) for the color of the shirt in my bitmap)

as an example i like to set the color to (100,100,100)



method works great as far as it checks all the points and eventually gets the image for me, but! it never once recognises point(x,y) = rgb(0,255,0) (both return a DWORD should be the same if color is same, no?)

is there an easier way to do this?

it's getting on my nerves...
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 4th Mar 2004 21:04
to get your rgb value you'll need to do something like:

red=rgbr(point(x,y))
green=rgbg(point(x,y))
blue=rgbb(point(x,y))

you now have the red,green+blue values separated into different variables then check it by:

if red=0 and green=0 and blue=0
do stuff
endif

hope that helps

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
sprites r us
20
Years of Service
User Offline
Joined: 4th Mar 2004
Location:
Posted: 4th Mar 2004 21:20
yep! that did the trick! thanx!

Login to post a reply

Server time is: 2024-09-22 00:26:51
Your offset time is: 2024-09-22 00:26:51