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.

Bug Reports / [Dark GDK] dbSpriteScaleX/Y initially returns sprite width rather than scale

Author
Message
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 28th Aug 2011 12:36 Edited at: 28th Aug 2011 12:42
When an animated sprite is created, or when dbSizeSprite is used, dbSpriteScaleX or dbSpriteScaleY return the width/height of the sprite in pixels, and not its scale. In the attached project, the program displays first width and height values for both sprites, instead of displaying 100% scale. Press the Left key to execute dbScaleSprite to 100% and the displayed scale values will change to 100.

The problem is caused by this part in the Dark GDK source code:



That sets the scale so that width and height is returned instead of percentage of original image (or frame) size.

EDIT: The problem exists in DBPro as well, I tested with PureGDK.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-28 15:18:56
Your offset time is: 2024-03-28 15:18:56