just curious if there is a way to tell the blitting code to run right to left, and bottom to top instead of the normal way that it runs?
there is a genuinely good reason - tile based map scrolling
to explain...
I have a dummy surface for a tile based game that holds the current area tiles + 1 tile surrounding them all the way around
as I scroll the map, it takes screen size blits from this surface, moving by small offsets across it
when the scroll is sufficient to 'push the screen' I blit copy the lump of the tiles that is unchanged, and add the new row in the push direction
this is a classic scroll method and runs fine when moving down and/or right because of the direction the blit code runs in
BUT if I want to move left and/or up I have to do 2 blits, moving the main tile area to another surface and back again as otherwise the pixels overwrite
not only is the double blitting slow (relative terms here), it also means another surface in the memory
all in all just the wrong thing to do
at the moment I'm actually redrawing the whole screen so that there is no imbalance in the scroll direction
so I just thought I'd ask if there was a way of flagging the blitcode to "reverse it's loops" (not seen it in the docs, but hey, dont ask, dont get
)
TIA
muff
there is a genuinely good reason - tile based map scrolling
to explain...
I have a dummy surface for a tile based game that holds the current area tiles + 1 tile surrounding them all the way around
as I scroll the map, it takes screen size blits from this surface, moving by small offsets across it
when the scroll is sufficient to 'push the screen' I blit copy the lump of the tiles that is unchanged, and add the new row in the push direction
this is a classic scroll method and runs fine when moving down and/or right because of the direction the blit code runs in
BUT if I want to move left and/or up I have to do 2 blits, moving the main tile area to another surface and back again as otherwise the pixels overwrite
not only is the double blitting slow (relative terms here), it also means another surface in the memory
all in all just the wrong thing to do
at the moment I'm actually redrawing the whole screen so that there is no imbalance in the scroll direction
so I just thought I'd ask if there was a way of flagging the blitcode to "reverse it's loops" (not seen it in the docs, but hey, dont ask, dont get
TIA
muff