Page 1 of 1

Fewest lines to load/display one sprite

Posted: Sat Jul 30, 2005 8:49 pm
by Omnius
Can someone post the code for the fewest lines required to load .bmp into a sprite and show it on the screen? This seems so much more difficult that it should be.

Thanks guys :)

Re: Fewest lines to load/display one sprite

Posted: Sat Jul 30, 2005 8:56 pm
by va!n
Omnius wrote:Can someone post the code for the fewest lines required to load .bmp into a sprite and show it on the screen? This seems so much more difficult that it should be.

Thanks guys :)

Code: Select all

InitSprite()
OpenScreen(640,480,32,"")

If LoadSprite(0,"YourBitmap.bmp") = 0 : End : EndIf

DisplaySprite(0,0,0)
FlipBuffers()

Delay(5000)
End

Yep

Posted: Sun Jul 31, 2005 3:46 pm
by Omnius
I had all that stuff in my code in various arrangements and with/without misc other commands. I'll try to determine what I was doing wrong.

This works. Thanks Va!n :)

Re: Yep

Posted: Sun Jul 31, 2005 6:01 pm
by va!n
Omnius wrote:I had all that stuff in my code in various arrangements and with/without misc other commands. I'll try to determine what I was doing wrong.

This works. Thanks Va!n :)
Can you poste your source? So i will try to help you. Or just private message me! ;)