diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-12-08 10:15:52 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-12-08 10:15:52 -0800 |
commit | deeeb92628344011651548372e7e27dca780dfc3 (patch) | |
tree | 2eb5bf57515cd53e9efe48f5bd5dac16ed3348f7 /src/game.c | |
parent | 9b6d98d1f727abd0629da68665d69d646e0bf764 (diff) |
sfx,game: introduce sfx_t.tv_talk[10] for talking head
There can be assets/talk/[0-9].wav now, one of which will be
played along with adult-captivated.wav
Intended to match the new talking head .ans
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -882,6 +882,12 @@ static ix2_search_status_t adult_search(void *cb_context, ix2_object_t *ix2_obje game->adult->captivated = 1; sfx_play(sfx.adult_captivated); + /* 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)]); + return IX2_SEARCH_STOP_HIT; case ENTITY_TYPE_MASK: |