mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-24 01:42:19 -05:00
Fix sound
This commit is contained in:
parent
1892ebab81
commit
2f1573eb9d
BIN
assets/sfx_explosion.raw
Normal file
BIN
assets/sfx_explosion.raw
Normal file
Binary file not shown.
2
main.c
2
main.c
@ -1360,6 +1360,8 @@ void SFG_createExplosion(RCL_Unit x, RCL_Unit y, RCL_Unit z)
|
|||||||
{
|
{
|
||||||
SFG_ProjectileRecord explosion;
|
SFG_ProjectileRecord explosion;
|
||||||
|
|
||||||
|
SFG_playSound(2,255);
|
||||||
|
|
||||||
explosion.type = SFG_PROJECTILE_EXPLOSION;
|
explosion.type = SFG_PROJECTILE_EXPLOSION;
|
||||||
|
|
||||||
explosion.position[0] = x;
|
explosion.position[0] = x;
|
||||||
|
56
sounds.h
56
sounds.h
@ -23,7 +23,7 @@
|
|||||||
#define SFG_SFX_SIZE (SFG_SFX_SAMPLE_COUNT / 2)
|
#define SFG_SFX_SIZE (SFG_SFX_SAMPLE_COUNT / 2)
|
||||||
|
|
||||||
#define SFG_GET_SFX_SAMPLE(soundIndex,sampleIndex) \
|
#define SFG_GET_SFX_SAMPLE(soundIndex,sampleIndex) \
|
||||||
((sampleIndex % 2) ? \
|
((sampleIndex % 2 == 0) ? \
|
||||||
(SFG_sounds[soundIndex][sampleIndex / 2] >> 4) : \
|
(SFG_sounds[soundIndex][sampleIndex / 2] >> 4) : \
|
||||||
(SFG_sounds[soundIndex][sampleIndex / 2] & 0x0f))
|
(SFG_sounds[soundIndex][sampleIndex / 2] & 0x0f))
|
||||||
|
|
||||||
@ -136,6 +136,60 @@ SFG_PROGRAM_MEMORY uint8_t SFG_sounds[][SFG_SFX_SIZE] =
|
|||||||
119,119,119,120,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
|
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,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
|
||||||
136,136,136,120,120
|
136,136,136,120,120
|
||||||
|
},
|
||||||
|
{ // 2, explosion
|
||||||
|
135,136,153,18,51,51,33,18,123,255,255,255,255,255,255,255,254,184,48,
|
||||||
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,189,255,255,255,
|
||||||
|
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,201,135,
|
||||||
|
101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,41,
|
||||||
|
239,255,255,253,186,188,221,221,220,153,152,136,155,188,203,187,171,202,169,116,
|
||||||
|
35,16,0,0,17,20,68,87,191,255,255,255,253,221,221,202,115,16,0,0,
|
||||||
|
0,0,18,34,70,117,85,68,85,86,102,68,67,68,70,136,153,134,67,32,
|
||||||
|
0,0,0,0,35,87,154,205,238,255,255,255,255,255,255,255,255,255,255,255,
|
||||||
|
255,255,237,168,101,67,16,0,0,0,53,102,119,133,85,85,49,0,0,34,
|
||||||
|
34,16,1,35,69,103,119,101,86,103,102,120,119,102,137,206,255,238,238,202,
|
||||||
|
152,120,134,85,86,102,102,102,119,120,135,117,68,50,34,35,69,121,188,221,
|
||||||
|
222,239,255,255,255,255,220,204,186,153,153,135,102,137,153,151,100,51,51,35,
|
||||||
|
69,102,68,68,67,52,68,51,86,118,86,119,118,103,137,172,221,237,221,221,
|
||||||
|
221,220,169,136,118,84,68,68,68,69,121,189,237,220,203,186,170,152,119,119,
|
||||||
|
120,170,188,204,204,204,188,204,186,152,117,67,50,52,87,119,118,103,102,103,
|
||||||
|
136,101,50,33,1,34,34,35,69,86,120,136,153,153,153,152,135,100,67,51,
|
||||||
|
51,69,85,102,121,188,205,222,255,236,203,204,187,188,221,203,170,170,170,169,
|
||||||
|
152,118,102,86,102,119,136,137,169,153,169,152,135,119,101,51,34,51,68,85,
|
||||||
|
102,85,85,84,85,102,102,85,86,103,137,170,187,221,204,222,255,238,237,203,
|
||||||
|
170,171,186,152,119,120,136,136,136,135,119,120,119,138,187,185,152,119,119,136,
|
||||||
|
134,83,16,1,35,68,68,50,17,52,104,172,222,238,238,238,221,220,186,153,
|
||||||
|
133,51,68,50,18,69,65,1,89,207,255,255,255,255,255,255,255,255,255,255,
|
||||||
|
255,255,255,255,255,255,255,252,184,81,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,2,53,104,154,223,255,255,255,255,255,255,255,255,
|
||||||
|
255,255,255,255,255,255,255,255,255,255,255,255,237,186,152,118,84,49,0,0,
|
||||||
|
0,0,0,0,0,0,0,0,0,0,0,0,0,19,70,121,171,205,255,255,
|
||||||
|
255,255,255,255,255,255,255,254,220,187,170,153,152,135,102,118,101,67,16,0,
|
||||||
|
0,0,0,0,0,1,52,86,137,153,135,103,102,67,33,17,35,53,102,103,
|
||||||
|
118,102,84,51,35,51,51,69,87,120,154,189,255,255,255,255,255,255,255,236,
|
||||||
|
185,118,84,50,33,18,17,34,34,17,17,16,0,0,0,0,0,18,52,68,
|
||||||
|
69,86,119,137,171,187,205,221,237,239,255,255,255,253,204,186,152,136,118,66,
|
||||||
|
16,18,35,52,85,68,68,86,119,119,119,120,136,135,120,136,136,136,119,101,
|
||||||
|
85,68,68,67,50,17,16,0,0,0,1,17,17,17,18,35,69,120,171,188,
|
||||||
|
222,237,221,239,255,239,255,255,255,255,238,238,238,238,236,185,153,153,152,118,
|
||||||
|
85,84,67,51,50,34,34,34,35,51,34,34,35,52,68,68,68,69,85,103,
|
||||||
|
136,136,136,154,171,204,205,222,238,255,255,255,255,255,255,254,237,203,186,153,
|
||||||
|
153,153,153,136,135,118,102,84,50,16,0,0,0,0,0,0,0,0,0,17,
|
||||||
|
17,17,17,17,35,69,103,137,171,204,222,255,255,255,255,255,255,238,238,220,
|
||||||
|
203,170,169,153,170,170,171,187,187,205,221,220,203,186,136,135,119,102,85,68,
|
||||||
|
68,68,68,68,50,34,17,0,0,0,0,0,0,19,85,119,136,154,187,204,
|
||||||
|
204,186,136,120,136,136,136,136,136,154,188,239,255,255,255,255,238,237,203,186,
|
||||||
|
153,135,119,118,102,102,102,102,103,136,153,152,135,118,101,68,68,67,50,17,
|
||||||
|
0,0,0,0,1,17,17,34,51,52,86,103,137,170,170,187,187,204,221,221,
|
||||||
|
204,203,170,170,171,187,170,170,153,153,153,153,153,153,153,153,136,119,119,102,
|
||||||
|
102,102,103,119,119,136,153,153,154,170,153,152,135,119,119,119,119,119,137,153,
|
||||||
|
153,153,152,137,153,136,136,136,135,119,119,119,119,136,136,135,119,119,119,119,
|
||||||
|
119,119,119,119,137,152,136,136,153,154,169,153,136,136,136,135,119,102,85,85,
|
||||||
|
85,85,84,68,69,85,84,68,85,85,102,119,119,119,120,136,136,154,171,188,
|
||||||
|
204,205,221,222,237,221,204,187,170,153,136,119,119,119,102,101,85,85,68,68,
|
||||||
|
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
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user