Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Toyemann

Sprite in wrong size

This topic is 6135 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m trying to load a sprite on to a screen, but it''s displaying in wrong scale. It''s little larger than the original bitmap. Any idea what''s going on?

Share this post


Link to post
Share on other sites
Advertisement
in the words of Johny 5....
Need input.

What are you using? Directdraw? Some DX8 thing? Are you using blit()? bltfast? Need input.



Drakonite

[Insert Witty Signature Here]

Share this post


Link to post
Share on other sites
I''m using DX8 in 800x600 resolution.
I used the D3DX->CreateTextureFromFile() to load the texture.
And Sprite->Draw() to draw it on the screen, but when I do, the sprite is little bigger than the original size.

Share this post


Link to post
Share on other sites
I''ve figured it out. Thanks for the response, though.

After a long painful debugging:
I''ve noticed that a sprite has to be in a certain size.
The width and the height have to be in the scale of 2.
(eg 2,4,8,16,32,64,128,256,etc.)
Any other size is stratched to fit the next size up.
That''s why my sprites were showing bigger than it should.

How come no one tells me this stuff!!!! Ergg!!!

Heheh, have a nice day.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!