Simplified Doodle Jump game for mbed
Dependencies: 4DGL-uLCD-SE LSM9DS1_Library_cal SDFileSystem mbed-rtos mbed wave_player
Diff: myBMP/myBMP.h
- Revision:
- 1:bdeb188cb474
- Child:
- 3:141c57be5a2d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/myBMP/myBMP.h Mon Mar 14 03:03:26 2016 +0000 @@ -0,0 +1,55 @@ +// Code taken and hacked from EasyBMP library by Paul Macklin + +#include "uLCD_4DGL.h" +#include "SDFileSystem.h" + +#define DefaultXPelsPerMeter 3780 +#define DefaultYPelsPerMeter 3780 + +typedef unsigned char ebmpBYTE; +typedef unsigned short ebmpWORD; +typedef unsigned int ebmpDWORD; + +typedef struct RGBApixel { + ebmpBYTE Blue; + ebmpBYTE Green; + ebmpBYTE Red; + ebmpBYTE Alpha; +} RGBApixel; + +typedef struct RGBpixel { + ebmpBYTE Blue; + ebmpBYTE Green; + ebmpBYTE Red; +} RGBpixel; + + +class BMFH{ +public: + ebmpWORD bfType; + ebmpDWORD bfSize; + ebmpWORD bfReserved1; + ebmpWORD bfReserved2; + ebmpDWORD bfOffBits; + + BMFH(); +}; + +class BMIH{ +public: + ebmpDWORD biSize; + ebmpDWORD biWidth; + ebmpDWORD biHeight; + ebmpWORD biPlanes; + ebmpWORD biBitCount; + ebmpDWORD biCompression; + ebmpDWORD biSizeImage; + ebmpDWORD biXPelsPerMeter; + ebmpDWORD biYPelsPerMeter; + ebmpDWORD biClrUsed; + ebmpDWORD biClrImportant; + + BMIH(); +}; +bool ReadBMPFromFile( const char* FileName , RGBApixel *Colors, uLCD_4DGL *lcd); +bool ReadBMPFromFile(const char* FileName , RGBApixel *Colors, uLCD_4DGL *lcd, int x, int y);