Go to the source code of this file.
Detailed Description
Definition in file common.h.
Define Documentation
Typedef Documentation
Function Documentation
Initialize the Alsa9 sound system.
- Returns:
- Zero if audio initialized successfully, otherwise -1.
Definition at line 113 of file alsa9.c.
Stub for playing music with the Alsa 9 sound system.
- Parameters:
-
| name | A name of a song to play that does not include anything like path or file extensions. It is up to this function to map the name to a file. |
Music is not supported by the legacy (non-SDL_mixer) sound systems.
- Parameters:
-
| name | A name of a song to play that does not include anything like path or file extensions. It is up to this function to map the name to a file. |
Definition at line 479 of file alsa9.c.
| void play_sound |
( |
int |
soundnum, |
|
|
int |
soundtype, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Add a sound to the buffer to be played later on. This function is common to all systems except SDL_SOUND.
- Parameters:
-
| soundnum | The sound to play. |
| soundtype | 0 for normal sounds, 1 for spell_sounds. |
| x | Offset (assumed from player) to play sound used to determine value and left vs. right speaker balance. |
| y | Offset (assumed from player) to play sound used to determine value and left vs. right speaker balance. |
Definition at line 302 of file alsa9.c.
Convert a buffer of a specified maximum size by replacing token characters with a provided string. Given a buffered template string "/input/to/edit", the maximum size of the buffer, a token '/', and a replacement string ":", the input string is transformed to ":input:to:edit". If the replacement string is empty, the token characters are simply removed. The template is processed from left to right, replacing token characters as they are found. Replacement strings are always inserted whole. If token replacement would overflow the size of the conversion buffer, the token is not replaced, and the remaining portion of the input string is appended after truncating it as required to avoid overfilling the buffer.
- Parameters:
-
| buffer | A string to perform a find and replace operation on. |
| buffer_size | Allocated buffer size (used to avoid buffer overflow). |
| find | A token character to find and replace in the buffer. |
| replace | A string that is to replace each token in the buffer. |
Definition at line 60 of file misc.c.
A replacement of strdup(), since it's not defined at some unix variants.
Definition at line 170 of file misc.c.
Variable Documentation