Platform game written for the GHI/OutrageousCircuits RETRO game device. Navigate the caves collecting all the pickups and avoiding the creatures and haunted mine carts that patrol the caves. Oh and remember to watch out for the poisonous plants... This game demonstrates the ability to have multiple animated sprites where the sprites can overlap the background environment. See how the player moves past the fence and climbs the wall in the 3rd screen.

Dependencies:   mbed

Committer:
taylorza
Date:
Sat Nov 29 06:40:50 2014 +0000
Revision:
0:2ee0812e2615
Working engine with patrolling enemies

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 0:2ee0812e2615 1 ///////////////////////////////////////////////////////////////////////////////
taylorza 0:2ee0812e2615 2 // LCD_ST7735 - Driver for ST7735 LCD display controller
taylorza 0:2ee0812e2615 3 // Author: Chris Taylor (taylorza)
taylorza 0:2ee0812e2615 4
taylorza 0:2ee0812e2615 5 #ifndef __COLOR565_H__
taylorza 0:2ee0812e2615 6 #define __COLOR565_H__
taylorza 0:2ee0812e2615 7 /** Color palete support for 16bit RGB colors with 565 color format
taylorza 0:2ee0812e2615 8 */
taylorza 0:2ee0812e2615 9 class Color565
taylorza 0:2ee0812e2615 10 {
taylorza 0:2ee0812e2615 11 public:
taylorza 0:2ee0812e2615 12 /**White*/
taylorza 0:2ee0812e2615 13 static const uint16_t White;
taylorza 0:2ee0812e2615 14
taylorza 0:2ee0812e2615 15 /**Silver*/
taylorza 0:2ee0812e2615 16 static const uint16_t Silver;
taylorza 0:2ee0812e2615 17
taylorza 0:2ee0812e2615 18 /**Gray*/
taylorza 0:2ee0812e2615 19 static const uint16_t Gray;
taylorza 0:2ee0812e2615 20
taylorza 0:2ee0812e2615 21 /**Black*/
taylorza 0:2ee0812e2615 22 static const uint16_t Black;
taylorza 0:2ee0812e2615 23
taylorza 0:2ee0812e2615 24 /**Red*/
taylorza 0:2ee0812e2615 25 static const uint16_t Red;
taylorza 0:2ee0812e2615 26
taylorza 0:2ee0812e2615 27 /**Maroon*/
taylorza 0:2ee0812e2615 28 static const uint16_t Maroon;
taylorza 0:2ee0812e2615 29
taylorza 0:2ee0812e2615 30 /**Yellow*/
taylorza 0:2ee0812e2615 31 static const uint16_t Yellow;
taylorza 0:2ee0812e2615 32
taylorza 0:2ee0812e2615 33 /**Olive*/
taylorza 0:2ee0812e2615 34 static const uint16_t Olive;
taylorza 0:2ee0812e2615 35
taylorza 0:2ee0812e2615 36 /**Lime*/
taylorza 0:2ee0812e2615 37 static const uint16_t Lime;
taylorza 0:2ee0812e2615 38
taylorza 0:2ee0812e2615 39 /**Green*/
taylorza 0:2ee0812e2615 40 static const uint16_t Green;
taylorza 0:2ee0812e2615 41
taylorza 0:2ee0812e2615 42 /**Aqua*/
taylorza 0:2ee0812e2615 43 static const uint16_t Aqua;
taylorza 0:2ee0812e2615 44
taylorza 0:2ee0812e2615 45 /**Teal*/
taylorza 0:2ee0812e2615 46 static const uint16_t Teal;
taylorza 0:2ee0812e2615 47
taylorza 0:2ee0812e2615 48 /**Blue*/
taylorza 0:2ee0812e2615 49 static const uint16_t Blue;
taylorza 0:2ee0812e2615 50
taylorza 0:2ee0812e2615 51 /**Navy*/
taylorza 0:2ee0812e2615 52 static const uint16_t Navy;
taylorza 0:2ee0812e2615 53
taylorza 0:2ee0812e2615 54 /**Fuchsia*/
taylorza 0:2ee0812e2615 55 static const uint16_t Fuchsia;
taylorza 0:2ee0812e2615 56
taylorza 0:2ee0812e2615 57 /**Purple*/
taylorza 0:2ee0812e2615 58 static const uint16_t Purple;
taylorza 0:2ee0812e2615 59
taylorza 0:2ee0812e2615 60 /**Returns a 565 RGB color built from individual RGB color components
taylorza 0:2ee0812e2615 61 * @param r Red component
taylorza 0:2ee0812e2615 62 * @param g Green component
taylorza 0:2ee0812e2615 63 * @param b Blue component
taylorza 0:2ee0812e2615 64 */
taylorza 0:2ee0812e2615 65 static uint16_t fromRGB(uint8_t r, uint8_t g, uint8_t b)
taylorza 0:2ee0812e2615 66 {
taylorza 0:2ee0812e2615 67 return ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3) ;
taylorza 0:2ee0812e2615 68 }
taylorza 0:2ee0812e2615 69 private:
taylorza 0:2ee0812e2615 70 Color565(){};
taylorza 0:2ee0812e2615 71 };
taylorza 0:2ee0812e2615 72 #endif // __COLOR565_H__