Fast drawing on sprites and bmp positioning

Previous topic - Next topic

ketil

I actually have two questions.
I have slow solutions for both, but faster in nicer ... right  :)

1. What would you consider the best way for fast drawing on sprite surfaces ?
Maybe there is a way of getting pointers to the surfaces in inline c++ ?

2. Is there a way to reposition the background when using loadbmp ?
It would be be nice with a function like setbmp x,y (using the loaded bitmap).
I quess i'll use a sprite for background, but then there is the limits of the spritesizes ( 1000x1000 ? isn't it ? ).
"Sugar makes the world go 'round. Caffeine makes it spin faster."

MrTAToad

The only way I can think of its to create (and keep a screen) of the sprite in memory, and manipulate that as appropriate.

If you want to position a background then you need to use a sprite - LOADBMP positions at 0,0

ketil

Quote from: MrTAToad on 2010-Nov-02
The only way I can think of its to create (and keep a screen) of the sprite in memory, and manipulate that as appropriate.

If you want to position a background then you need to use a sprite - LOADBMP positions at 0,0

Yeah. Thats just what i've done. Quit slow, but ... thats the way it have to be. At least for now.
A function like SETBMP X,Y would be nice for backgrounds larger than the screen.
"Sugar makes the world go 'round. Caffeine makes it spin faster."

ketil

With a SETBMP X,Y function, I could load several background at one time, and change positioning. Or do a simple scroll when the background is larger than the screen, but not big enough to bother using a tile-scroller.
"Sugar makes the world go 'round. Caffeine makes it spin faster."