[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Taking a part from character
On Mon, Jan 03, 2000 at 05:57:38PM +0000, Wille Huuskonen wrote:
> Want to explain?
Coitainly! You're simply looping over the section of the array you wish to copy, and copying it element by element into the new array. This is also called a "block move" or a "block transfer" (blit). It's messy, but it's the only way to move lots of data like this in C or most ASMs (again, barring hardware-based speed hacks like SIMD).
Writing a function to copy an arbitrarily positioned and sized "rectangle" of values into its own little array would sure come in handy for uses like this. I leave this as an exercise to the reader.