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:
Mon Feb 16 03:46:57 2015 +0000
Revision:
16:f9227904afc4
Parent:
7:2fd875c1d9b1
Added a 4th game screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 0:2ee0812e2615 1 #include "mbed.h"
taylorza 0:2ee0812e2615 2 #include "Bitmap4bpp.h"
taylorza 0:2ee0812e2615 3
taylorza 0:2ee0812e2615 4 Bitmap4bpp::Bitmap4bpp(uint16_t width, uint16_t height) :
taylorza 0:2ee0812e2615 5 _width(width),
taylorza 0:2ee0812e2615 6 _height(height),
taylorza 7:2fd875c1d9b1 7 _stride((width >> 1) + (width & 0x01)),
taylorza 7:2fd875c1d9b1 8 _pBitmapData(new uint8_t[_stride * height])
taylorza 0:2ee0812e2615 9 {
taylorza 7:2fd875c1d9b1 10
taylorza 7:2fd875c1d9b1 11 }
taylorza 7:2fd875c1d9b1 12
taylorza 7:2fd875c1d9b1 13 Bitmap4bpp::~Bitmap4bpp()
taylorza 7:2fd875c1d9b1 14 {
taylorza 7:2fd875c1d9b1 15 if (_pBitmapData != NULL)
taylorza 7:2fd875c1d9b1 16 {
taylorza 7:2fd875c1d9b1 17 delete []_pBitmapData;
taylorza 7:2fd875c1d9b1 18 _pBitmapData = NULL;
taylorza 7:2fd875c1d9b1 19 }
taylorza 0:2ee0812e2615 20 }
taylorza 0:2ee0812e2615 21
taylorza 0:2ee0812e2615 22 void Bitmap4bpp::clear()
taylorza 0:2ee0812e2615 23 {
taylorza 0:2ee0812e2615 24 memset(_pBitmapData, 0, _stride * _height);
taylorza 0:2ee0812e2615 25 }
taylorza 0:2ee0812e2615 26