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:
10:782e4e9c6b47
Added a 4th game screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 9:34008d8b1cdf 1 #ifndef __IMAGEFRAME_H__
taylorza 9:34008d8b1cdf 2 #define __IMAGEFRAME_H__
taylorza 9:34008d8b1cdf 3
taylorza 9:34008d8b1cdf 4 class ImageFrame
taylorza 9:34008d8b1cdf 5 {
taylorza 9:34008d8b1cdf 6 public:
taylorza 9:34008d8b1cdf 7 ImageFrame(const uint8_t *pSheet,
taylorza 10:782e4e9c6b47 8 uint8_t x, uint8_t y) :
taylorza 9:34008d8b1cdf 9 _stride((*((uint16_t*)pSheet)) >> 3),
taylorza 10:782e4e9c6b47 10 _pStart((pSheet + 4) + ((y * _stride) + (x >> 3)))
taylorza 9:34008d8b1cdf 11 {
taylorza 9:34008d8b1cdf 12 }
taylorza 9:34008d8b1cdf 13
taylorza 9:34008d8b1cdf 14 inline uint8_t *getBits(int row) const
taylorza 10:782e4e9c6b47 15 {
taylorza 10:782e4e9c6b47 16 return (uint8_t*)(_pStart + (row * _stride));
taylorza 9:34008d8b1cdf 17 }
taylorza 9:34008d8b1cdf 18
taylorza 9:34008d8b1cdf 19 private:
taylorza 10:782e4e9c6b47 20 uint8_t _stride;
taylorza 10:782e4e9c6b47 21 const uint8_t *_pStart;
taylorza 10:782e4e9c6b47 22
taylorza 9:34008d8b1cdf 23 };
taylorza 9:34008d8b1cdf 24
taylorza 9:34008d8b1cdf 25 #endif //__IMAGEFRAME_H__
taylorza 9:34008d8b1cdf 26