Author Topic: Fast drawing on sprites and bmp positioning  (Read 1433 times)

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
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

  • Guest
Re: Fast drawing on sprites and bmp positioning
« Reply #1 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

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Fast drawing on sprites and bmp positioning
« Reply #2 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."

Offline ketil

  • Mr. Polyvector
  • ***
  • Posts: 117
    • View Profile
Re: Fast drawing on sprites and bmp positioning
« Reply #3 on: 2010-Nov-02 »
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."