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

ScreenIntro.h

Committer:
taylorza
Date:
2015-02-16
Revision:
16:f9227904afc4
Parent:
14:b4884a31069e

File content as of revision 16:f9227904afc4:

#ifndef __SCREENINTRO_H__
#define __SCREENINTRO_H__

class ScreenIntro : public Scene
{
public:
    ScreenIntro() :
        _player()
    {
        Game::Surface.clearScreen();
        
        addGameObject(&_player);
        
        restartScreen();
    }
    
    virtual void restartScreen()
    {
        _player.setIntroMode(true);
        _player.setStartPosition(72, 40);        
        
        setPosition(0, 16);
        setMap(Maps::ScreenIntro, 20, 7, blocks, sprites);
        
        Scene::restartScreen();
    }
    
    virtual void update()
    {
        Scene::update();
        
        if (GameInput::isSquarePressed()) Game::Instance->completeScreen();
    }
    
    virtual void draw()
    {
        Scene::draw();
        
        Game::Surface.drawBitmap(43, 8, bmpText, 0, 24, 74, 8, Color565::White, Color565::Black);
        Game::Surface.drawBitmap(43, 80, bmpText, 0, 32, 74, 8, Color565::White, Color565::Black);            
        Game::Surface.drawBitmap(44, 116, bmpText, 0, 40, 71, 8, Color565::White, Color565::Black);            
    }
    
private:    
    Player        _player;    
};

#endif //__SCREENINTRO_H__