Sprite in wrong size

Started by
4 comments, last by Toyemann 22 years, 8 months ago
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?
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]
Shoot Pixels Not People
Are you showing it at a lower resolution?
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.

Are you showing it in different resolution than you drawed it?

Press any key to continue or any other key to quit...
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.

This topic is closed to new replies.

Advertisement