Advertisement

Need help with offscreen buffers

Started by January 20, 2000 09:58 AM
0 comments, last by Dark Star 25 years, 1 month ago
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.
there is a function called blit, look it up int the docs. dont remember its syntax exactly. its quite fast i recall.

This topic is closed to new replies.

Advertisement