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.
OneBitSound/OneBitSound.h@4:b857db213f10, 2015-02-08 (annotated)
- Committer:
- taylorza
- Date:
- Sun Feb 08 01:38:18 2015 +0000
- Revision:
- 4:b857db213f10
- Parent:
- 1:9ff7384171ec
Removed duty lookup table
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
taylorza | 1:9ff7384171ec | 1 | #ifndef __ONEBITSOUND_H__ |
taylorza | 1:9ff7384171ec | 2 | #define __ONEBITSOUND_H__ |
taylorza | 1:9ff7384171ec | 3 | class OneBitSound |
taylorza | 1:9ff7384171ec | 4 | { |
taylorza | 1:9ff7384171ec | 5 | public: |
taylorza | 1:9ff7384171ec | 6 | OneBitSound(PinName pin); |
taylorza | 1:9ff7384171ec | 7 | |
taylorza | 1:9ff7384171ec | 8 | void play(uint8_t channel, const SoundBlock soundBlocks[], int count); |
taylorza | 1:9ff7384171ec | 9 | |
taylorza | 1:9ff7384171ec | 10 | private: |
taylorza | 1:9ff7384171ec | 11 | void update(); |
taylorza | 1:9ff7384171ec | 12 | |
taylorza | 1:9ff7384171ec | 13 | private: |
taylorza | 1:9ff7384171ec | 14 | DigitalOut _soundPin; |
taylorza | 1:9ff7384171ec | 15 | bool _lastPinState; |
taylorza | 1:9ff7384171ec | 16 | SoundChannel _channels[4]; |
taylorza | 1:9ff7384171ec | 17 | int _totalElapsed; |
taylorza | 1:9ff7384171ec | 18 | |
taylorza | 1:9ff7384171ec | 19 | Ticker _ticker; |
taylorza | 1:9ff7384171ec | 20 | }; |
taylorza | 1:9ff7384171ec | 21 | #endif //__ONEBITSOUND_H__ |