diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-08-04 21:46:20 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-08-04 21:46:20 +0200 |
commit | 8c5065f8a99eee0b0edeeab3d9a7f815fa4d50df (patch) | |
tree | e868de7513b10dedeee6cd52a26adc6943518013 /bmp.h | |
parent | 96919bf34222c0c3f37e1085342b81c63da386c8 (diff) | |
download | nebula2-8c5065f8a99eee0b0edeeab3d9a7f815fa4d50df.tar.gz nebula2-8c5065f8a99eee0b0edeeab3d9a7f815fa4d50df.tar.bz2 nebula2-8c5065f8a99eee0b0edeeab3d9a7f815fa4d50df.zip |
Moved BMP stuff to own file and fixed BMP generation.
Diffstat (limited to 'bmp.h')
-rw-r--r-- | bmp.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -6,7 +6,15 @@ #include "color.h" -extern int bmp_write_header(FILE* fh, int32_t width, int32_t height); -extern int bmp_write_pixel(FILE* fh, color_t col); +typedef struct { + int32_t width, height; + size_t line_padding; + size_t line_left; + FILE* fh; +} bmp_write_handle_t; + +extern bmp_write_handle_t* bmp_create(const char* fn, int32_t width, int32_t height); +extern int bmp_write_pixel(bmp_write_handle_t* bmph, color_t col); +extern void bmp_destroy(bmp_write_handle_t* bmph); #endif
\ No newline at end of file |