News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Drawing a portion of a CPCTelera sprite buffer

Started by Typhon, 13:42, 06 May 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Typhon

Me again with another Question 

My new project uses a 9k screen software back buffer. Obviously this is not the horribly quickest sort of thing to draw (I'm using CPCTelera). I'm wondering if there is a way in said framework (I'm using the Development branch 1.5),of only drawing an arbitrary portion of said sprite buffer? (say a bit w by h bytes at x, y bytes with 0, 0 being the top left). I think getting the x/y bit isn't a problem, using the GetScreenPtr library function?, but it's limiting the draw to only w times h bytes that seems like there's no current way to do. 

I'm aware of Arnaud's Sprite Clipping extension but having tried that out, I don't think it's quite what I'm after. 

Arnaud

Hi @Typhon,
the GetScreenPtrfunction is only to have pointer to screen position, it doesn't works for a buffer.
For the buffer (or sprite) you can use the Macro cpctm_spriteBufferPtr.

I think the fonction cpct_drawSpriteClipped will do the job to copy partial back-buffer to screen.


Powered by SMFPacks Menu Editor Mod