mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2025-01-30 23:00:16 -05:00
Fix pokitto sound
This commit is contained in:
parent
597242b353
commit
ac87b4692d
2
game.h
2
game.h
@ -581,8 +581,6 @@ void SFG_gameLoad()
|
|||||||
|
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
SFG_game.saved = SFG_CANT_SAVE;
|
SFG_game.saved = SFG_CANT_SAVE;
|
||||||
|
|
||||||
SFG_game.settings = SFG_game.save[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,22 +82,6 @@ void SFG_getMouseOffset(int16_t *x, int16_t *y)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void SFG_save(uint8_t data[SFG_SAVE_SIZE])
|
|
||||||
{
|
|
||||||
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
|
|
||||||
save.data[i] = data[i];
|
|
||||||
|
|
||||||
save.saveCookie();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t SFG_load(uint8_t data[SFG_SAVE_SIZE])
|
|
||||||
{
|
|
||||||
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
|
|
||||||
data[i] = save.data[i];
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t audioBuff[SFG_SFX_SAMPLE_COUNT];
|
uint8_t audioBuff[SFG_SFX_SAMPLE_COUNT];
|
||||||
uint16_t audioPos = 0;
|
uint16_t audioPos = 0;
|
||||||
|
|
||||||
@ -148,6 +132,27 @@ void timerInit(uint32_t samplingRate)
|
|||||||
#undef weirdNumber
|
#undef weirdNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SFG_save(uint8_t data[SFG_SAVE_SIZE])
|
||||||
|
{
|
||||||
|
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
|
||||||
|
save.data[i] = data[i];
|
||||||
|
|
||||||
|
save.saveCookie();
|
||||||
|
|
||||||
|
/* ^ This causes sound to stop as it writes something to timer32, we need to
|
||||||
|
reinit the audio: */
|
||||||
|
|
||||||
|
timerInit(8000);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t SFG_load(uint8_t data[SFG_SAVE_SIZE])
|
||||||
|
{
|
||||||
|
for (uint8_t i = 0; i < SFG_SAVE_SIZE; ++i)
|
||||||
|
data[i] = save.data[i];
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
void SFG_playSound(uint8_t soundIndex, uint8_t volume)
|
void SFG_playSound(uint8_t soundIndex, uint8_t volume)
|
||||||
{
|
{
|
||||||
uint8_t volumeShift = 7 - volume / 32;
|
uint8_t volumeShift = 7 - volume / 32;
|
||||||
|
Loading…
Reference in New Issue
Block a user