I'm writing a BMP library ( to load BMP files ),
but I'm getting some error with this:
Code: Select all
typedef struct
{
u16 magic_value; /** "BM" **/
u32 file_size; /** the size of the BMP file in bytes **/
u32 reserved; /** Reserved **/
u32 rawdataoffset; /** Offset where bmp data can be found **/
} BmpHeader;
Code: Select all
[...]
BmpHeader Bmp_Header;
sceIoRead(fd, &Bmp_Header, sizeof(BmpHeader))
[...]
So can I write a right struct?
I've tried with __attribute__((packed)), but I still get 16 bytes...