A implementation of a simple bomberman game

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player

Fork of rtos_basic by mbed official

Committer:
apcastelein
Date:
Mon Oct 31 19:33:11 2016 +0000
Revision:
7:12f7fd2b1a13
Published bomberman game;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
apcastelein 7:12f7fd2b1a13 1 // Code taken and hacked from EasyBMP library by Paul Macklin
apcastelein 7:12f7fd2b1a13 2
apcastelein 7:12f7fd2b1a13 3 #include "uLCD_4DGL.h"
apcastelein 7:12f7fd2b1a13 4 #include "SDFileSystem.h"
apcastelein 7:12f7fd2b1a13 5
apcastelein 7:12f7fd2b1a13 6 #define DefaultXPelsPerMeter 3780
apcastelein 7:12f7fd2b1a13 7 #define DefaultYPelsPerMeter 3780
apcastelein 7:12f7fd2b1a13 8
apcastelein 7:12f7fd2b1a13 9 typedef unsigned char ebmpBYTE;
apcastelein 7:12f7fd2b1a13 10 typedef unsigned short ebmpWORD;
apcastelein 7:12f7fd2b1a13 11 typedef unsigned int ebmpDWORD;
apcastelein 7:12f7fd2b1a13 12
apcastelein 7:12f7fd2b1a13 13 typedef struct RGBApixel {
apcastelein 7:12f7fd2b1a13 14 ebmpBYTE Blue;
apcastelein 7:12f7fd2b1a13 15 ebmpBYTE Green;
apcastelein 7:12f7fd2b1a13 16 ebmpBYTE Red;
apcastelein 7:12f7fd2b1a13 17 ebmpBYTE Alpha;
apcastelein 7:12f7fd2b1a13 18 } RGBApixel;
apcastelein 7:12f7fd2b1a13 19
apcastelein 7:12f7fd2b1a13 20 class BMFH{
apcastelein 7:12f7fd2b1a13 21 public:
apcastelein 7:12f7fd2b1a13 22 ebmpWORD bfType;
apcastelein 7:12f7fd2b1a13 23 ebmpDWORD bfSize;
apcastelein 7:12f7fd2b1a13 24 ebmpWORD bfReserved1;
apcastelein 7:12f7fd2b1a13 25 ebmpWORD bfReserved2;
apcastelein 7:12f7fd2b1a13 26 ebmpDWORD bfOffBits;
apcastelein 7:12f7fd2b1a13 27
apcastelein 7:12f7fd2b1a13 28 BMFH();
apcastelein 7:12f7fd2b1a13 29 };
apcastelein 7:12f7fd2b1a13 30
apcastelein 7:12f7fd2b1a13 31 class BMIH{
apcastelein 7:12f7fd2b1a13 32 public:
apcastelein 7:12f7fd2b1a13 33 ebmpDWORD biSize;
apcastelein 7:12f7fd2b1a13 34 ebmpDWORD biWidth;
apcastelein 7:12f7fd2b1a13 35 ebmpDWORD biHeight;
apcastelein 7:12f7fd2b1a13 36 ebmpWORD biPlanes;
apcastelein 7:12f7fd2b1a13 37 ebmpWORD biBitCount;
apcastelein 7:12f7fd2b1a13 38 ebmpDWORD biCompression;
apcastelein 7:12f7fd2b1a13 39 ebmpDWORD biSizeImage;
apcastelein 7:12f7fd2b1a13 40 ebmpDWORD biXPelsPerMeter;
apcastelein 7:12f7fd2b1a13 41 ebmpDWORD biYPelsPerMeter;
apcastelein 7:12f7fd2b1a13 42 ebmpDWORD biClrUsed;
apcastelein 7:12f7fd2b1a13 43 ebmpDWORD biClrImportant;
apcastelein 7:12f7fd2b1a13 44
apcastelein 7:12f7fd2b1a13 45 BMIH();
apcastelein 7:12f7fd2b1a13 46 };
apcastelein 7:12f7fd2b1a13 47 bool ReadBMPFromFile(int x, int y, const char* FileName , RGBApixel *Colors, uLCD_4DGL *lcd);