Add sound

This commit is contained in:
Miloslav Číž 2020-02-05 20:29:27 +01:00
parent 943847cfb4
commit 58c2f56bcf
3 changed files with 57 additions and 1 deletions

BIN
assets/sfx_click.raw Normal file

Binary file not shown.

4
main.c
View File

@ -1360,7 +1360,7 @@ void SFG_createExplosion(RCL_Unit x, RCL_Unit y, RCL_Unit z)
{
SFG_ProjectileRecord explosion;
SFG_playSound(2,255);
SFG_playSound(2,255);
explosion.type = SFG_PROJECTILE_EXPLOSION;
@ -2169,6 +2169,7 @@ void SFG_gameStep()
SFG_removeItem(i);
SFG_player.lastItemTakenFrame = SFG_gameFrame;
i--;
SFG_playSound(3,255);
#endif
}
else // collide
@ -2517,6 +2518,7 @@ void SFG_gameStep()
else if (monster->health == 0)
{
monster->stateType = SFG_MR_TYPE(*monster) | SFG_MONSTER_STATE_DYING;
SFG_playSound(2,255);
}
else if (state != SFG_MONSTER_STATE_INACTIVE)
{

View File

@ -190,6 +190,60 @@ SFG_PROGRAM_MEMORY uint8_t SFG_sounds[][SFG_SFX_SIZE] =
68,51,51,52,68,69,85,86,102,119,120,136,136,120,136,136,119,119,120,136,
136,136,136,136,136,136,119,119,119,119,136,136,136,136,136,136,136,136,136,136,
136,136,136,119,120
},
{ // 3, click
136,136,136,136,136,136,136,136,136,136,136,136,136,120,136,136,136,136,120,
136,120,135,119,119,119,119,119,119,119,119,119,119,120,136,136,136,135,120,135,
119,135,119,119,119,119,119,119,136,136,136,136,136,136,136,136,136,136,136,137,
153,152,153,136,136,136,136,136,136,119,119,119,119,119,119,119,136,136,136,136,
136,136,136,120,120,135,119,135,119,119,135,120,135,119,136,119,119,119,119,119,
103,119,103,119,120,136,119,136,136,136,152,137,152,136,137,152,135,120,136,119,
104,136,119,135,118,135,134,136,72,134,105,150,120,135,85,151,136,120,183,118,
124,34,12,137,112,150,145,125,104,54,228,25,230,57,152,118,106,116,136,106,
116,137,103,168,135,104,151,120,151,121,152,104,136,119,119,137,135,120,136,136,
135,136,136,119,136,119,135,119,119,119,119,119,119,119,119,120,135,120,119,119,
119,119,119,119,119,119,136,119,136,136,136,136,136,136,135,119,119,119,120,136,
136,136,136,136,136,136,136,136,120,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,119,119,135,119,119,119,136,136,136,136,137,136,137,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,119,119,119,119,119,119,119,
119,119,136,136,136,136,136,136,136,136,136,136,136,119,119,119,119,119,119,119,
119,119,119,135,120,120,135,135,119,119,119,135,120,119,136,136,136,135,119,119,
119,119,119,119,120,136,136,136,136,136,136,119,119,119,119,119,119,119,119,119,
120,136,136,136,136,136,136,119,119,119,119,119,119,119,119,119,119,119,119,119,
119,120,136,136,136,136,119,119,119,119,119,120,136,136,136,136,136,136,136,136,
136,119,119,119,119,119,119,119,119,119,120,120,135,135,119,119,119,120,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,135,135,119,119,
119,119,119,119,119,119,119,119,119,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
136,136,136,136,136
}
};