MacLO/src/Sounds.h

52 lines
1.0 KiB
C
Raw Normal View History

2021-11-10 01:01:34 +00:00
// Copyright (c) Jon Thysell <http://jonthysell.com>
// Licensed under the MIT License.
2021-12-07 19:07:28 +00:00
/**
* @file Sounds.h
*
* This file provides a Sounds type which contains handles to every
* sound resource used by the game, as well as functions for playing them.
*/
2021-11-10 01:01:34 +00:00
#ifndef SOUNDS_H
#define SOUNDS_H
#include <Sound.h>
#include "MacCommon.h"
2021-12-07 19:07:28 +00:00
/** Struct containing handles to every sound resource. */
2021-11-10 01:01:34 +00:00
typedef struct sSounds
{
bool Enabled;
Handle ClickSnd;
Handle RetrySnd;
Handle DoneSnd;
} Sounds;
2021-12-07 19:07:28 +00:00
/**
* Initializes the Sounds by loading each sound resource.
* @param pSounds The Sounds.
*/
2021-11-10 01:01:34 +00:00
void Sounds_Init(Sounds *pSounds);
2021-12-07 19:07:28 +00:00
/**
* Plays the "click" sound.
* @param pSounds The Sounds.
*/
2021-11-10 01:01:34 +00:00
void Sounds_PlayClickSnd(const Sounds *pSounds);
2021-12-07 19:07:28 +00:00
/**
* Plays the "retry" sound.
* @param pSounds The Sounds.
*/
2021-11-10 01:01:34 +00:00
void Sounds_PlayRetrySnd(const Sounds *pSounds);
2021-12-07 19:07:28 +00:00
/**
* Plays the "done" sound.
* @param pSounds The Sounds.
*/
2021-11-10 01:01:34 +00:00
void Sounds_PlayDoneSnd(const Sounds *pSounds);
#endif