Hi all!
Any idea how to write in a sprite buffer with Aurora ?
um elaborate
You write to the back buffer and flip between the back and the front for seeing what is going on and what is in process.
Otherwise, are you talking about simple pointers in aurora?
*scratches head*
The member variable m_tile of a sprite is derived from C2DSurface. So you can perform direct sprite writiing
mysprite.m_tile->Lock();
pBuffer = mysprite.m_tile->GetSurfacePointer();
pitch = mysprite.m_tile->GetSurfacePitch();
//work with the sprint buffer
....
mysprite.m_tile->UnLock();
Don't have a more complete example handy. A simple example of drawing to a sprite can be found in breakout.src
Paul.
Paul got it right! :)
In fact i did not know that the Lock() method which seemed to be a member of the C2DSurface Class, could be used with an object of C2DSprite class.
BTW, when i come to think about it, it's not that weird :)
this short example is fine.
Thank you guys.