X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/f2da68c5992fe2c29cced7e51709d0a45e0bb3b4..789ebb2d04033053b3cfeaa73648e3a1c3b3d8f5:/video/generic.c diff --git a/video/generic.c b/video/generic.c deleted file mode 100644 index 95f564f..0000000 --- a/video/generic.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include - -uint32_t checksum_rect_generic32(int x, int y, int width, int height) { - - /* Generic checksum_rect function for video modes with 32-bit pixels - * (i.e. fb->curmode.bytestride = 4). - */ - - int scanline = fb->curmode.xres * 4; - unsigned char * lineaddr; - int i; - - uint32_t sum = 0; - - for (i = 0; i < height; i++) { - lineaddr = fb->fbaddr + (i + y) * scanline + (4 * x); - - sum = crc32(lineaddr, width * 4, sum); - } - - return sum; -} - -void copy_pixels_generic32(char *buf, int x, int y, int width, int height) -{ - int cx, cy; - unsigned int *ibuf = (unsigned int *)buf; - unsigned int *fbuf; - for (cy = 0; cy < height; cy++) - { - fbuf = (unsigned int *)fb->fbaddr; - fbuf += (cy + y) * (fb->curmode.xres) + x; - for (cx = 0; cx < width; cx++) - *(ibuf++) = *(fbuf++); - } -}