Re: [WIP] Robo-Sushi, a Robotron-inspired shooter
Posted: Thu Jul 09, 2015 3:35 pm
Working nice and hard on it! Speaking of .infs though, what's the maximum size for a picture that can be displayed?
const int PROGMEM soundfx[8][8] = {
{1,20,52,3,7,12,7,9}, // sound 0: Explosion
{1,45,75,2,2,7,5,2}, // sound 1: Shoot
{0,48,35,2,4,2,4,1}, // sound 2: Cursor blip
{1,5,0,0,3,2,7,1}, // sound 3: Robot footstep
{1,45,75,2,2,7,5,2}, // sound 4: Human footstep
{1,24,11,3,1,0,6,4}, // sound 5: Sentry fire
{1,41,96,1,3,3,6,4}, // sound 6: Sentry fire [alt]
{1,41,6,2,5,3,7,4}, // sound 7: Teleport
};
void PlaySoundFX(int fxno, int channel)
{
gb.sound.command(0,soundfx[fxno][6],0,channel); // set volume
gb.sound.command(1,soundfx[fxno][0],0,channel); // set waveform
gb.sound.command(2,soundfx[fxno][5],-soundfx[fxno][4],channel); // set volume slide
gb.sound.command(3,soundfx[fxno][3],soundfx[fxno][2]-58,channel); // set pitch slide
gb.sound.playNote(soundfx[fxno][1],soundfx[fxno][7],channel); // play note
}
PlaySoundFX(1,0); //Player fires