|
I have wrote an ugly readbmp.c .h for reading bmp
files, and a function to show them on svgalib. it is based on Dr. Dobbs BMP
example source. worked fine for me, may be usefull. simple code is included as
attachment.
simply; gcc -o main main.c readbmp.c -lvgagl
-lvga; ./main
int gl_showbmpfile(char *file, int x, int y,
int xo, int yo, int w, int h)
* (x,y)
* o--------------------------------- w * | * | (xo,yo) * | o------ w * h | h | * | | * | * |
* Usage is like gl_putboxpart. * * If you like to show image, at position (x,y), as it is; * gl_showbmpfile(char *file, x, y, NULL, NULL, NULL, NULL); * * Or to show some part of the image to the ends of its dimentions * at position (x,y); * gl_showbmpfile(char *file, x, y, xo, yo, NULL, NULL); * * Last, to show some part of the with w, h at position (x,y); * gl_showbmpfile(char *file, x, y, xo, yo, w, h); Alper.
|
src.zip
Description: application/compressed
