04-26-2003, 10:02 AM
I just glanced at this thread so I could be way off, but wouldnt something like the following be sufficient:
Much nicer than programming in assembly, plus its completely portable and should give reasonably good object good if you use a good compiler (gcc -O3).
Code:
void blit(void *dst, int x, int y, void *src) {
int i, width, height;
/*
* Work out the height and width and offset
* dst correctly. Cant be bothered.
*/
for(i = 0; i < width * height; i++) {
/* Gives transparent colour = 0 */
if(*src) {
/* Copy */
*dst++ = *src++;
}
}
}
Much nicer than programming in assembly, plus its completely portable and should give reasonably good object good if you use a good compiler (gcc -O3).
esus saves.... Passes to Moses, shoots, he scores!