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.

Dark GDK / dbSetImageColorKey() not working

Author
Message
Pog Mo Hone
14
Years of Service
User Offline
Joined: 21st May 2010
Location:
Posted: 10th Jun 2010 07:15
I created a ball sprite and am using white as the color surrounding the ball. I set the dbSetImageColorKey(255, 255, 255); to make the white invisible, but doesnt seem to work. Ive tried other colors and same with no results. I put the command within the void game(void) function. I also tried placing within the void function i used to update and display the sprite and still nothing... I just cant figure out what it is doing this. Anyone got any suggestions?

Thanks!

"Wisemen say: Forgiveness is divine, but never pay full price for late pizza." - Michaelangelo
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 10th Jun 2010 19:17
well, i don't know why it doesn't work, but anyway, you shouldn't be using it, it is better to use alpha channels with images (using tga/png format(s)), you can find tutorials on how to make alpha channels for your images if you search on google, including your designing program's name

JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 10th Jun 2010 21:06
If you must use it, you have to use it before loading the image from file.



JTK
Pog Mo Hone
14
Years of Service
User Offline
Joined: 21st May 2010
Location:
Posted: 11th Jun 2010 02:45
JTK, I did. I tried it before any possible call that was related to the sprite.

Hassan, I will definitely look into that...gotta solve this issue. =)

Thank you both for your information!

"Wisemen say: Forgiveness is divine, but never pay full price for late pizza." - Michaelangelo
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Jun 2010 17:00
Once I saw a weird issue: dbSetImageColorKey worked when it was placed in the main function (the void DarkGDK() part) but it did not work when it was inside another function called from there (like your "game" function). Try placing it after the beginning of the main function, does that help?
Pog Mo Hone
14
Years of Service
User Offline
Joined: 21st May 2010
Location:
Posted: 11th Jun 2010 23:48
I figured out how to use alpha channels on Gimp, so it works well enough. Thanks though.

"Wisemen say: Forgiveness is divine, but never pay full price for late pizza." - Michaelangelo

Login to post a reply

Server time is: 2024-11-19 23:26:59
Your offset time is: 2024-11-19 23:26:59