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 / Sprite strangeness

Author
Message
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 31st Jul 2008 23:03
While working on some things for the Wiki I was doing some testing with sprites. I found some weird stuff. As I always believed, declaring a dbSprite using an non-existent image means that the sprite number will not exist as an entity within DGDK. However, if you do

dbSetSprite (spriteNumber, 1, 1); // Params 2 and 3 can probably be 0

the sprite does exist even though it doesn't have an image on which it is based. I'm wondering if, as I go along, I'll find other functions that reference a sprite number that will cause DGDK to create a sprite.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Master Xilo
18
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 2nd Aug 2008 15:11
Some other things about sprites:

dbSetSpriteTextureCoordinates
AND
dbSetSpriteTextureCoord


don't work

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 2nd Aug 2008 17:52
Strange. dbSetSpriteTextureCoord has worked for me. I've never tried it directly but I have incorporated it into my Sprite class and it worked well in terms of extracting a portion of an image into the sprite.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-09-30 03:30:09
Your offset time is: 2024-09-30 03:30:09