bmp.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef BMP_H
00013 #define BMP_H
00014
00015 #include "gfx_type.h"
00016
00017 struct BmpInfo {
00018 uint32 offset;
00019 uint32 width;
00020 uint32 height;
00021 bool os2_bmp;
00022 uint16 bpp;
00023 uint32 compression;
00024 uint32 palette_size;
00025 };
00026
00027 struct BmpData {
00028 Colour *palette;
00029 byte *bitmap;
00030 };
00031
00032 #define BMP_BUFFER_SIZE 1024
00033
00034 struct BmpBuffer {
00035 byte data[BMP_BUFFER_SIZE];
00036 int pos;
00037 int read;
00038 FILE *file;
00039 uint real_pos;
00040 };
00041
00042 void BmpInitializeBuffer(BmpBuffer *buffer, FILE *file);
00043 bool BmpReadHeader(BmpBuffer *buffer, BmpInfo *info, BmpData *data);
00044 bool BmpReadBitmap(BmpBuffer *buffer, BmpInfo *info, BmpData *data);
00045 void BmpDestroyData(BmpData *data);
00046
00047 #endif