Help with offscreen buffers
Hi,
For my game I am writing in DJGPP C++ I am using offscreen buffers which are just pointers to char type and have room for 64KB. One is the vga memory itself. I was just wondering if there was a way I could copy from one buffer to the other without having to address each position individually.
The method I use is (Note:I am just a beginner)
for (int x=0; x<320; x++)
{
for (int y=0; y<200; y++)
vgaMemory[y*320+x]=offscreen[y*320+x];
}
that is how I copy from my offscreen buffer to the screen. But I feel that this is too much of a slow method seeing as I need to this many times within the game and with other buffers. I just want to know if there is a faster way of doing this like in a flash or something ? Cos I feel my game would really suffer.
Thanks in advance.
Dark Star
---------------------------------------------You Only Live Once - Don't be afriad to take chances.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement