Log In  

Hello.

I would like to request a feature that was available in GFA years ago via bitblt() for bit blitter object.

While you can indeed do SPR() or SSPR() to transfer the entire contents of the SPRITESHEET (0x0000) to the display (0x6000) I would like to add that memcpy() have an added argument.

memcpy(dest,orig,len,transparent)

if transparent is not NIL then it assumes you are transferring pixel data and as such will modify memory as if you were using SPR(). So any colors that have the transparent flag will come into play.

While I know you can use 0x5f54 and 0x5f55, which does not work for map(), see this link for details on that:

https://www.lexaloffle.com/bbs/?tid=50158

Instead of changing the sprite and screen location, it would be far easier to transfer memory with transparency than poke to screen write to and spr() or sspr().

You could layer your screens.

function screen()
  cls()
  memcpy(0x6000,0xe000,0x2000,1)
  memcpy(0x6000,0xc000,0x2000,1)
  memcpy(0x6000,0xa000,0x2000,1)
  memcpy(0x6000,0x8000,0x2000,1)
end

This would first draw the screen at 0xe000, then on top of that, 0xc000, then 0xa000, then finally 0x8000.

Giving you a true 4-layers of graphics to work with.

Also if possible add to line(), rect(), rectfill(), circ(), circfill(), oval(), ovalfill(), spr(), sspr(), clip(), print(), and cls() an argument on the end that tells from which screen you are drawing to.

Default is 0x6000. So an example of drawing to memory would be:

line(0,0,127,63,7,0x8000)

This would draw a white line all the way across the screen and halfway down the screen in memory location 0x8000 treating that location 0x8000-0x9fff as a virtual screen.

To clear this memory location as a screen you would use:

cls(0,0x8000)

So what do you think about this ?

P#120490 2022-11-11 18:55 ( Edited 2022-11-12 20:25)


[Please log in to post a comment]