After decimating the enemy forces that have attacked your ship, you are charged with taking out as many of the remaining enemy fighters as possible. 3d space fighter game was initially written while I was testing some 3d routines I was implementing for a flight simulator, but my daughter started playing it and seemed to enjoy it so I added a few sound effects, explosions etc. and so this little game was born.

Dependencies:   mbed

OneBitSound/OneBitSound.h

Committer:
taylorza
Date:
2015-02-08
Revision:
4:b857db213f10
Parent:
1:9ff7384171ec

File content as of revision 4:b857db213f10:

#ifndef __ONEBITSOUND_H__
#define __ONEBITSOUND_H__
class OneBitSound
{
    public:
        OneBitSound(PinName pin);
        
        void play(uint8_t channel, const SoundBlock soundBlocks[], int count);
    
    private:
        void update();
        
    private:
        DigitalOut      _soundPin;
        bool            _lastPinState;
        SoundChannel    _channels[4];
        int             _totalElapsed;
        
        Ticker          _ticker;
};
#endif //__ONEBITSOUND_H__