Page 1 of 1
Resize sprites
Posted: Tue May 16, 2006 1:07 am
by robert1352
Hi everyone,does anyone know of a way to resize your sprites?? Is there a command for that? If there is I cant seem to find it. Thanks for your help.

Posted: Tue May 16, 2006 4:03 pm
by netmaestro
2D Sprite or 3D Sprite?
reply
Posted: Tue May 16, 2006 4:11 pm
by robert1352
2-D sprites

Posted: Tue May 16, 2006 4:20 pm
by netmaestro
Just one more question, what is the reason for the resize?
Posted: Tue May 16, 2006 4:31 pm
by josku_x
netmaestro wrote:Just one more question, what is the reason for the resize?
Lol?
Posted: Tue May 16, 2006 4:35 pm
by netmaestro
The reason matters as there are a couple of ways to approach it depending on how many sprites need resized and in what circumstances.
Resize sprite
Posted: Tue May 16, 2006 4:48 pm
by robert1352
The reason I need to resize my sprite is that for the game Im making the sprites I have avalible to me seem too large, I would like to make them a little smaller.Thank you for your help!! [/quote]
Posted: Tue May 16, 2006 4:59 pm
by netmaestro
In that case I suggest you:
Code: Select all
InitSprite()
OpenScreen(...)
CatchImage(#image, ?Sprite1)
ResizeImage(#image, newsize, newsize, #PB_Image_Smooth)
CreateSprite(#sprite, newsize, newsize)
StartDrawing(SpriteOutput(#sprite))
DrawImage(ImageID(#image), 0, 0)
StopDrawing()
;...program stuff
DataSection
Sprite1: IncludeBinary "<path to the sprite image>"
EndDataSection
Thank you
Posted: Tue May 16, 2006 6:33 pm
by robert1352
Thank you very much Ill give your idea a try and let you know how it works out

Re: Resize sprite
Posted: Tue May 16, 2006 7:31 pm
by Trond
robert1352 wrote:The reason I need to resize my sprite is that for the game Im making the sprites I have avalible to me seem too large, I would like to make them a little smaller.Thank you for your help!!
[/quote]Then you should resize them before you load them.
thank you
Posted: Fri May 19, 2006 6:58 pm
by robert1352
Thanks everyone for all of your help
