summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/game.c b/src/game.c
index 65b8d62..2b46001 100644
--- a/src/game.c
+++ b/src/game.c
@@ -422,7 +422,7 @@ static void infect_entity(game_t *game, entity_t *entity, const char *name)
{
/* convert entity into inanimate virus (off the viruses array) */
(void) virus_node_new(&(stage_conf_t){ .stage = entity->any.node, .replace = 1, .name = name, .active = 1, .alpha = 1.f }, &game->sars->projection_x, &entity->any.model_x);
- sfx_play(&sfx.baby_infected);
+ sfx_play(&sfx.baby_infected, 1.f);
entity->any.type = ENTITY_TYPE_VIRUS;
entity->virus.corpse = 1;
@@ -435,7 +435,7 @@ static void infect_entity(game_t *game, entity_t *entity, const char *name)
static void hat_baby(game_t *game, baby_t *baby, mask_t *mask)
{
(void) baby_hatted_node_new(&(stage_conf_t){ .stage = baby->entity.node, .replace = 1, .name = "baby-hatted", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &baby->entity.model_x);
- sfx_play(&sfx.baby_hatted);
+ sfx_play(&sfx.baby_hatted, 1.f);
stage_set_active(mask->entity.node, 0);
}
@@ -454,7 +454,7 @@ static void maga_adult(game_t *game, adult_t *adult, maga_t *maga)
* memory ensured maga was always off initially.
*/
game->is_maga = 1;
- sfx_play(&sfx.adult_maga);
+ sfx_play(&sfx.adult_maga, 1.f);
stage_set_active(maga->entity.node, 0);
}
@@ -464,13 +464,13 @@ static void mask_adult(game_t *game, adult_t *adult, mask_t *mask)
if (game->is_maga) { /* MAGA discards masks */
stage_set_active(mask->entity.node, 0);
- return sfx_play(&sfx.adult_maga);
+ return sfx_play(&sfx.adult_maga, 1.f);
}
(void) adult_masked_node_new(&(stage_conf_t){ .stage = adult->entity.node, .replace = 1, .name = "adult-masked", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &adult->entity.model_x);
adult->masked += GAME_MASK_PROTECTION;
- sfx_play(&sfx.adult_mine);
+ sfx_play(&sfx.adult_mine, 1.f);
stage_set_active(mask->entity.node, 0);
}
@@ -481,9 +481,9 @@ static int expose_adult(game_t *game, adult_t *adult, virus_t *virus)
if (adult->masked) {
if (!--adult->masked) {
(void) adult_node_new(&(stage_conf_t){ .stage = adult->entity.node, .replace = 1, .name = "adult-unmasked", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &adult->entity.model_x);
- sfx_play(&sfx.adult_unmasked);
+ sfx_play(&sfx.adult_unmasked, 1.f);
} else
- sfx_play(&sfx.adult_maskhit);
+ sfx_play(&sfx.adult_maskhit, 1.f);
(void) flash_entity(game, &adult->entity, 4);
reset_virus(virus);
@@ -492,11 +492,11 @@ static int expose_adult(game_t *game, adult_t *adult, virus_t *virus)
/* convert adult into inanimate virus (off the viruses array) */
(void) virus_node_new(&(stage_conf_t){ .stage = adult->entity.node, .replace = 1, .name = "adult-virus", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &adult->entity.model_x);
- sfx_play(&sfx.adult_infected);
+ sfx_play(&sfx.adult_infected, 1.f);
if (adult->holding) {
(void) virus_node_new(&(stage_conf_t){ .stage = adult->holding->entity.node, .replace = 1, .name = "baby-virus", .active = 1, .alpha = 1.f }, &game->sars->projection_x, &adult->holding->entity.model_x);
- sfx_play(&sfx.baby_infected);
+ sfx_play(&sfx.baby_infected, 1.f);
}
game->state = GAME_STATE_OVER;
@@ -510,7 +510,7 @@ static void pickup_baby(game_t *game, adult_t *adult, baby_t *baby)
if (adult->holding)
return;
- sfx_play(&sfx.baby_held);
+ sfx_play(&sfx.baby_held, 1.f);
adult->holding = baby;
adult->holding->entity.position = adult->entity.position;
entity_update_x(game, &adult->holding->entity);
@@ -523,7 +523,7 @@ static void more_teepee(game_t *game, teepee_t *teepee)
if (game->adult->holding) {
/* disallow picking up teepee if holding something, flash what's held and the teepee we missed */
if (flash_entity(game, &teepee->entity, 5))
- sfx_play(&sfx.adult_armsfull);
+ sfx_play(&sfx.adult_armsfull, 1.f);
(void) flash_entity(game, &game->adult->holding->entity, 5);
return;
@@ -558,7 +558,7 @@ static void more_teepee(game_t *game, teepee_t *teepee)
}
(*teepee->bonus_release) = BONUS_NODE_RELEASE_MS;
(*teepee->bonus_release_position) = teepee->entity.position;
- sfx_play(&sfx.adult_mine);
+ sfx_play(&sfx.adult_mine, 1.f);
stage_set_active(teepee->entity.node, 0);
}
@@ -990,12 +990,12 @@ static ix2_search_status_t adult_search(void *cb_context, ix2_object_t *ix2_obje
case ENTITY_TYPE_TV:
game->adult->captivated = 1;
- sfx_play(&sfx.adult_captivated);
+ sfx_play(&sfx.adult_captivated, 1.f);
/* shifted because rand() tends to have more activity in the upper bits,
* but this could be more careful about avoiding repetition by randomizing
* a 0-9 list every time it stepped through said list. TODO
*/
- sfx_play(&sfx.tv_talk[(rand() >> 8) % NELEMS(sfx.tv_talk)]);
+ sfx_play(&sfx.tv_talk[(rand() >> 8) % NELEMS(sfx.tv_talk)], 1.f);
return IX2_SEARCH_STOP_HIT;
@@ -1057,7 +1057,7 @@ static void game_move_adult(game_t *game, v2f_t *dir)
game->adult->entity.position.y < -1.05f) {
/* rescued baby */
- sfx_play(&sfx.baby_rescued);
+ sfx_play(&sfx.baby_rescued, 1.f);
/* make the rescued baby available for respawn reuse */
game->adult->holding->entity.flashes_remaining = 0;
© All Rights Reserved