8-Bit Sprites

Advanced game related topics
Tomy
New User
New User
Posts: 2
Joined: Fri May 30, 2003 3:18 pm

8-Bit Sprites

Post by Tomy »

Hello,

why i can't display 8-Bit-Sprites on a 16- or 32-Bit Screen?

The Error code is:
#Sprite Object not initialized

Thanks!
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Because it's currently not supported. I could add this in a near future.
Tomy
New User
New User
Posts: 2
Joined: Fri May 30, 2003 3:18 pm

Post by Tomy »

Thanks!!! :D
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Tomy wrote:Thanks!!! :D
try something like this (untested, but the way should be clear!)

Code: Select all

loadimage (#img,"8bit.bmp")
createsprite(#sp,imagewidth(#nr),imageheight(#nr))
startdrawing(imageoutput())
  drawimage(imageid(),0,0)
stopdrawing()
freeimage(#img)
Thorsten
User
User
Posts: 28
Joined: Sun Apr 27, 2003 2:55 pm
Location: Germany
Contact:

Post by Thorsten »

Hi GPI :)

I think you have a error in your Code. You don't wan't this, or:
startdrawing(imageoutput())

Why imageoutput()? You meant SpriteOutput(#sp), or? :wink:

So:

Code: Select all

loadimage (#img,"8bit.bmp") 
createsprite(#sp,imagewidth(#nr),imageheight(#nr)) 
startdrawing(SpriteOutput(#sp)) 
  drawimage(imageid(),0,0) 
stopdrawing() 
freeimage(#img) 
Post Reply