Some small improvements

This commit is contained in:
Jeremy Rand 2014-07-24 11:21:54 -05:00
parent 3b271d3c97
commit 5ea3682f70

View File

@ -52,9 +52,11 @@ void shortDelay(uint16_t howMuch)
void playSound(int8_t freq, int16_t duration) void playSound(int8_t freq, int16_t duration)
{ {
if (!gPlaySounds)
return;
while (duration > 0) { while (duration > 0) {
if (gPlaySounds) asm ("STA %w", 0xc030);
asm ("STA %w", 0xc030);
while (freq > 0) { while (freq > 0) {
freq--; freq--;
} }
@ -215,7 +217,7 @@ void performAnimationsLeft(void)
animInProgress = true; animInProgress = true;
printValueAt(x, y, tileAnim->tileString); printValueAt(x, y, tileAnim->tileString);
} }
playSound(200, 2); playSound(200, 1);
} }
firstFrame = false; firstFrame = false;
} while (animInProgress); } while (animInProgress);
@ -270,7 +272,7 @@ void performAnimationsRight(void)
animInProgress = true; animInProgress = true;
printValueAt(x, y, tileAnim->tileString); printValueAt(x, y, tileAnim->tileString);
} }
playSound(200, 2); playSound(200, 1);
} }
firstFrame = false; firstFrame = false;
} while (animInProgress); } while (animInProgress);
@ -321,7 +323,7 @@ void performAnimationsUp(void)
animInProgress = true; animInProgress = true;
printValueAt(x, y, tileAnim->tileString); printValueAt(x, y, tileAnim->tileString);
} }
playSound(200, 2); playSound(200, 1);
} }
firstFrame = false; firstFrame = false;
} while (animInProgress); } while (animInProgress);
@ -372,7 +374,7 @@ void performAnimationsDown(void)
animInProgress = true; animInProgress = true;
printValueAt(x, y, tileAnim->tileString); printValueAt(x, y, tileAnim->tileString);
} }
playSound(200, 2); playSound(200, 1);
} }
firstFrame = false; firstFrame = false;
} while (animInProgress); } while (animInProgress);