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 / help with display of sprites...

Author
Message
Frankula
16
Years of Service
User Offline
Joined: 11th Oct 2008
Location:
Posted: 13th Oct 2008 02:54
So I have a background sprite and a sprite that should appear in front of it. Here is my code:



My problem is that for some obscure reason even though i define the animated sprite(ID 20) after the background sprite(ID 1) the animated sprite is drawn underneath the other one so you can't see it. I tried switching the order and that didn't work either. I know that it draws the animated sprite cause I ran it while i had commented out the first sprite and it showed up. Please help.
go2none
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location: London
Posted: 13th Oct 2008 14:09 Edited at: 13th Oct 2008 14:41
1. I'm not a sprite expert but it seems that your dbSprite(1,0,0,1); shares its ID with the image. They both read 1. Is this valid? I tend to belive your 1st sprite is not drawn at all.

2. Have you tried fiddling with void dbSetSpritePriority ( int iSprite, int iPriority )? Sprites with higher iPriority will be drawn last and stay on top.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Oct 2008 15:18
Quote: "They both read 1. Is this valid?"

Yes. An ID for an image doesn't have to be different to the ID for a sprite, bitmap, object, sound, music etc.

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 15th Oct 2008 00:07 Edited at: 15th Oct 2008 00:07
go2none has answered the problem, with his second statement.

Login to post a reply

Server time is: 2024-11-25 06:59:20
Your offset time is: 2024-11-25 06:59:20