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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SoundBlock.cpp Source File

SoundBlock.cpp

00001 #include "mbed.h"
00002 #include "Fix16.h"
00003 #include "SoundBlock.h"
00004 
00005 SoundBlock::SoundBlock(ToneType toneType, uint16_t stepCount, uint16_t stepDuration, uint16_t pitch, int16_t pitchSlide, uint8_t duty, int8_t dutySlide)    
00006 {
00007     initialize(toneType, stepCount, stepDuration, pitch, pitchSlide, duty, dutySlide);
00008 }
00009 
00010 SoundBlock::SoundBlock(ToneType toneType, uint16_t stepCount, uint16_t stepDuration)    
00011 {
00012     initialize(toneType, stepCount, stepDuration, 0, 0, 128, 0);
00013 }
00014 
00015 SoundBlock::SoundBlock() {}
00016 
00017 void SoundBlock::initialize(ToneType toneType, uint16_t stepCount, uint16_t stepDuration, uint16_t pitch, int16_t pitchSlide, uint8_t duty, int8_t dutySlide)
00018 {
00019     _toneType = toneType;
00020     
00021     _stepCount = stepCount;
00022     _stepDuration = stepDuration;
00023     _pitch = fix16_from(pitch);
00024     _pitchSlide = fix16_from(pitchSlide);
00025     _duty = duty;
00026     _dutySlide = dutySlide;
00027 } 
00028