Fewest lines to load/display one sprite

Just starting out? Need help? Post your questions and find answers here.
Omnius
User
User
Posts: 40
Joined: Sun Jul 10, 2005 4:40 pm
Location: Mount Airy, MD
Contact:

Fewest lines to load/display one sprite

Post 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 :)
You want -real- game graphics?...
Matt Chavez is the man you contact. He's brilliant.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Re: Fewest lines to load/display one sprite

Post 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
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Omnius
User
User
Posts: 40
Joined: Sun Jul 10, 2005 4:40 pm
Location: Mount Airy, MD
Contact:

Yep

Post 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 :)
You want -real- game graphics?...
Matt Chavez is the man you contact. He's brilliant.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Re: Yep

Post 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! ;)
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Post Reply