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:
14:b4884a31069e
Added a 4th game screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
taylorza 4:45ff7fc8a431 1 #ifndef __SCREENINTRO_H__
taylorza 4:45ff7fc8a431 2 #define __SCREENINTRO_H__
taylorza 4:45ff7fc8a431 3
taylorza 4:45ff7fc8a431 4 class ScreenIntro : public Scene
taylorza 4:45ff7fc8a431 5 {
taylorza 4:45ff7fc8a431 6 public:
taylorza 4:45ff7fc8a431 7 ScreenIntro() :
taylorza 4:45ff7fc8a431 8 _player()
taylorza 4:45ff7fc8a431 9 {
taylorza 4:45ff7fc8a431 10 Game::Surface.clearScreen();
taylorza 4:45ff7fc8a431 11
taylorza 4:45ff7fc8a431 12 addGameObject(&_player);
taylorza 4:45ff7fc8a431 13
taylorza 4:45ff7fc8a431 14 restartScreen();
taylorza 4:45ff7fc8a431 15 }
taylorza 4:45ff7fc8a431 16
taylorza 4:45ff7fc8a431 17 virtual void restartScreen()
taylorza 4:45ff7fc8a431 18 {
taylorza 4:45ff7fc8a431 19 _player.setIntroMode(true);
taylorza 14:b4884a31069e 20 _player.setStartPosition(72, 40);
taylorza 4:45ff7fc8a431 21
taylorza 4:45ff7fc8a431 22 setPosition(0, 16);
taylorza 4:45ff7fc8a431 23 setMap(Maps::ScreenIntro, 20, 7, blocks, sprites);
taylorza 4:45ff7fc8a431 24
taylorza 4:45ff7fc8a431 25 Scene::restartScreen();
taylorza 4:45ff7fc8a431 26 }
taylorza 4:45ff7fc8a431 27
taylorza 4:45ff7fc8a431 28 virtual void update()
taylorza 4:45ff7fc8a431 29 {
taylorza 4:45ff7fc8a431 30 Scene::update();
taylorza 4:45ff7fc8a431 31
taylorza 4:45ff7fc8a431 32 if (GameInput::isSquarePressed()) Game::Instance->completeScreen();
taylorza 4:45ff7fc8a431 33 }
taylorza 4:45ff7fc8a431 34
taylorza 4:45ff7fc8a431 35 virtual void draw()
taylorza 4:45ff7fc8a431 36 {
taylorza 4:45ff7fc8a431 37 Scene::draw();
taylorza 4:45ff7fc8a431 38
taylorza 4:45ff7fc8a431 39 Game::Surface.drawBitmap(43, 8, bmpText, 0, 24, 74, 8, Color565::White, Color565::Black);
taylorza 4:45ff7fc8a431 40 Game::Surface.drawBitmap(43, 80, bmpText, 0, 32, 74, 8, Color565::White, Color565::Black);
taylorza 4:45ff7fc8a431 41 Game::Surface.drawBitmap(44, 116, bmpText, 0, 40, 71, 8, Color565::White, Color565::Black);
taylorza 4:45ff7fc8a431 42 }
taylorza 4:45ff7fc8a431 43
taylorza 4:45ff7fc8a431 44 private:
taylorza 4:45ff7fc8a431 45 Player _player;
taylorza 4:45ff7fc8a431 46 };
taylorza 4:45ff7fc8a431 47
taylorza 4:45ff7fc8a431 48 #endif //__SCREENINTRO_H__