|
Cavestory Mod API
|
In-house math functions. More...
Macros | |
| #define | SOUND_MODE_STOP 0 |
| Stop sound. More... | |
| #define | SOUND_MODE_STOP_THEN_PLAY 1 |
| Stop and then play a sound. More... | |
| #define | SOUND_MODE_PLAY 2 |
| Play a sound. More... | |
Typedefs | |
| typedef int | CSM_CustomPixToneId |
| A custom sound ID. | |
| typedef int | CSM_CustomSoundId |
Functions | |
| CAVESTORY_MOD_API CSM_CustomPixToneId | CSM_LoadPixTone (const char *pPath) |
| Load a custom pixtone file. More... | |
| CAVESTORY_MOD_API CSM_CustomSoundId | CSM_LoadCustomSound (const char *pPath) |
| Load a custom sound file. More... | |
| CAVESTORY_MOD_API void | CSM_SetCustomSoundPan (CSM_CustomSoundId iSoundId, unsigned char iPanAmount=50) |
| Set the pan amount of a custom sound. More... | |
| CAVESTORY_MOD_API void | CSM_SetCustomSoundVolume (CSM_CustomSoundId iSoundId, unsigned char iVolume) |
| Set the volume of a custom sound. More... | |
| CAVESTORY_MOD_API BOOL | CSM_UnloadPixTone (CSM_CustomPixToneId iSoundId) |
| Unload a custom sound file. More... | |
| CAVESTORY_MOD_API BOOL | CSM_UnloadCustomSound (CSM_CustomSoundId iSoundId) |
| Unload a custom sound file. More... | |
| CAVESTORY_MOD_API void | CSM_Sound_Process2D () |
| Process the 2D soundscape. | |
| CAVESTORY_MOD_API void | PlaySoundObject2D (int iSubpixelX, int iSubpixelY, int iRadius, bool bAlwaysOnScreen, int iSoundIndex, int iPlayMode=SOUND_MODE_STOP_THEN_PLAY, unsigned int iPlayVolume=0x100, unsigned int iFalloffRadius=0x7FFFFFFE) |
| Play a sound by index at a specific place in the game. More... | |
| CAVESTORY_MOD_API void | CSM_Sound_SetPitch (int iSoundIndex, unsigned short iPitch) |
| Set the pitch of a sound. More... | |
| CAVESTORY_MOD_API void | CSM_Sound_SetPan (int iSoundIndex, char iPan) |
| Set the panning of a sound. More... | |
| CAVESTORY_MOD_API void | CSM_Sound_SetVolume (int iSoundIndex, unsigned char iVolume) |
| Set the volume of a sound. More... | |
| CAVESTORY_MOD_API void | PlaySoundObject (int iSoundIndex, int iPlayMode=SOUND_MODE_STOP_THEN_PLAY, unsigned int iPlayVolume=0x100) |
| Play a sound by index. More... | |
| CAVESTORY_MOD_API BOOL | IsSoundPlaying (int iSoundId) |
| Check if a sound is playing. More... | |
| CAVESTORY_MOD_API void | ChangeMusic (int iMusicIndex) |
| Set the current music track. More... | |
| CAVESTORY_MOD_API void | PlayCustomMusic (const char *pFileName) |
| Play custom music. More... | |
| CAVESTORY_MOD_API void | CSM_Music_SetVolume (unsigned char iVolume) |
| Set the volume of music. More... | |
| CAVESTORY_MOD_API void | ReCallMusic () |
| Recall the last played music. More... | |
In-house math functions.
Several helpful in-house math functions.
| #define SOUND_MODE_PLAY 2 |
| #define SOUND_MODE_STOP 0 |
| #define SOUND_MODE_STOP_THEN_PLAY 1 |
Stop and then play a sound.
Tells PlaySoundObject to stop the sound, and then plays it afterwards.
| CAVESTORY_MOD_API void ChangeMusic | ( | int | iMusicIndex | ) |
Set the current music track.
| iMusicIndex | The index of the music to play. |
| CAVESTORY_MOD_API CSM_CustomSoundId CSM_LoadCustomSound | ( | const char * | pPath | ) |
Load a custom sound file.
| pPath | The file path of the sound file. |
| CAVESTORY_MOD_API CSM_CustomPixToneId CSM_LoadPixTone | ( | const char * | pPath | ) |
Load a custom pixtone file.
| pPath | The file path of the sound file. |
| CAVESTORY_MOD_API void CSM_Music_SetVolume | ( | unsigned char | iVolume | ) |
Set the volume of music.
| iVolume | The new volume of the music. Must be 0 - 255, with 255 being the loudest and 0 being inaudible. |
| CAVESTORY_MOD_API void CSM_SetCustomSoundPan | ( | CSM_CustomSoundId | iSoundId, |
| unsigned char | iPanAmount = 50 |
||
| ) |
Set the pan amount of a custom sound.
| iSoundId | The ID of the sound to manipulate. |
| iPanAmount | The amount of pan (0 - 100). Center = 50. |
| CAVESTORY_MOD_API void CSM_SetCustomSoundVolume | ( | CSM_CustomSoundId | iSoundId, |
| unsigned char | iVolume | ||
| ) |
Set the volume of a custom sound.
| iSoundId | The ID of the sound to manipulate. |
| iVolume | The volume (0 - 100). |
| CAVESTORY_MOD_API void CSM_Sound_SetPan | ( | int | iSoundIndex, |
| char | iPan | ||
| ) |
Set the panning of a sound.
| iSoundIndex | The index of the sound. |
| iPan | The new pan of the sound. Must be between -127 and 127, with 0 being normal pan. |
| CAVESTORY_MOD_API void CSM_Sound_SetPitch | ( | int | iSoundIndex, |
| unsigned short | iPitch | ||
| ) |
Set the pitch of a sound.
| iSoundIndex | The index of the sound. |
| iPitch | The new pitch of the sound. Must be between 0 and 1000, with 500 being normal pitch. |
| CAVESTORY_MOD_API void CSM_Sound_SetVolume | ( | int | iSoundIndex, |
| unsigned char | iVolume | ||
| ) |
Set the volume of a sound.
| iSoundIndex | The index of the sound. |
| iVolume | The new volume of the sound. Must be between 0 and 255, with 255 being loudest. |
| CAVESTORY_MOD_API BOOL CSM_UnloadCustomSound | ( | CSM_CustomSoundId | iSoundId | ) |
Unload a custom sound file.
| iSoundId | The ID of the sound file to unload. |
| CAVESTORY_MOD_API BOOL CSM_UnloadPixTone | ( | CSM_CustomPixToneId | iSoundId | ) |
Unload a custom sound file.
| iSoundId | The ID of the sound file to unload. |
| CAVESTORY_MOD_API BOOL IsSoundPlaying | ( | int | iSoundId | ) |
Check if a sound is playing.
| iSoundId | The sound to test for. |
| CAVESTORY_MOD_API void PlayCustomMusic | ( | const char * | pFileName | ) |
Play custom music.
| pFileName | The filename of the music file to play. |
| CAVESTORY_MOD_API void PlaySoundObject | ( | int | iSoundIndex, |
| int | iPlayMode = SOUND_MODE_STOP_THEN_PLAY, |
||
| unsigned int | iPlayVolume = 0x100 |
||
| ) |
Play a sound by index.
| iSoundIndex | The index of the sound. |
| iPlayMode | How to play the sound. Default is #CSM_SOUND_MODE_STOP_THEN_PLAY. |
| iPlayVolume | The volume of the sound, from 0 to 0x100. |
| CAVESTORY_MOD_API void PlaySoundObject2D | ( | int | iSubpixelX, |
| int | iSubpixelY, | ||
| int | iRadius, | ||
| bool | bAlwaysOnScreen, | ||
| int | iSoundIndex, | ||
| int | iPlayMode = SOUND_MODE_STOP_THEN_PLAY, |
||
| unsigned int | iPlayVolume = 0x100, |
||
| unsigned int | iFalloffRadius = 0x7FFFFFFE |
||
| ) |
Play a sound by index at a specific place in the game.
Plays a sound at a subpixel coordinate with a given distance.
| iSubpixelX | The X subpixel coordinate to play the sound at. |
| iSubpixelY | The Y subpixel coordinate to play the sound at. |
| iRadius | The distance that this will be hearable at, in subpixels. |
| bAlwaysOnScreen | If this is set to 'TRUE', then iRadius is used as the distance from the edge of the screen that the sound needs to be in order to be heard. |
| iSoundIndex | The index of the sound. |
| iPlayMode | How to play the sound. Default is #CSM_SOUND_MODE_STOP_THEN_PLAY. |
| iPlayVolume | The volume of the sound, from 0 to 0x100. |
| iFalloffRadius | The sound falloff radius. Will be clamped to iRadus. |
| CAVESTORY_MOD_API void ReCallMusic | ( | ) |
Recall the last played music.
| iMusicIndex | The index of the music to play |