#include "sgl.h" Uint16 songs; Uint8 prio; Uint8 vol; Uint8 rate; Bool slBGMOn( song, prio, vol, rate );
Uint16 song - Song number.
Uint8 prio - Priority.
Uint8 vol - Volume.
Uint8 rate - Fade rate.
Bool - Flag indicating whether the command was issued correctly.
slBGMOn ( 0, 4, 127, 0 );
slBGMCont | slBGMOff | slBGMFade | slBGMTempo |
slBGMStat | slSequenceOn | slSequenceOff | slSequenceFade |
slSequenceTempo | slSequencePause | slSequenceCont | slSequencePan |
slSequenceReset | slSequenceStat |
#include "sgl.h" Bool slBGMPause( void );
void - gives nothing.
Bool - Flag indicating whether the command was issued correctly.
slBGMPause ( 3 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequencePause | slSequenceCont |
slSequencePan | slSequenceReset | slSequenceStat |
#include "sgl.h" Bool slBGMCont( void );
void - gives nothing.
Bool - Flag indicating whether the command was issued correctly.
slBGMCont();
slBGMOn | slBGMPause | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequencePause | slSequenceCont |
slSequencePan | slSequenceReset | slSequenceStat |
#include "sgl.h" Bool slBGMOff( void );
void - gives nothing.
Bool - Flag indicating whether the command was issued correctly.
slBGMOff ();
slBGMOn | slBGMPause | slBGMCont | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequencePause | slSequenceCont |
slSequencePan | slSequenceReset | slSequenceStat |
#include "sgl.h" Uint8 vol; Uint8 rate; Bool slBGMFade( vol, rate );
Uint8 vol - maximum volume Uint8 rate - rate of increase in volume
Bool - Flag indicating whether the command was issued correctly.
slBGMFade ( 127, 4 );
slBGMOn | slBGMPause | slBGMCont | slBGMOff |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequencePause | slSequenceCont |
slSequencePan | slSequenceReset | slSequenceStat |
#include "sgl.h" Sint16 tempo; Bool slBGMTempo( tempo );
Sint16 tempo - BGM tempo
Bool - Flag indicating whether the command was issued correctly.
slBGMTempo ( -50 );
slBGMOn | slBGMPause | slBGMCont | slBGMOff |
slBGMFade | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequencePause | slSequenceCont |
slSequencePan | slSequenceReset | slSequenceStat |
#include "sgl.h" Bool slBGMStat( void );
void - gives nothing.
Bool - Flag indicating whether the command was issued correctly.
if ( slBGMStat () == TRUE ) { /* Playing */ } else { /* End of playback */ }
slBGMOn | slBGMPause | slBGMCont | slBGMOff |
slBGMFade | slBGMTempo | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequencePause | slSequenceCont |
slSequencePan | slSequenceReset | slSequenceStat |
#include "sgl.h" Uint16 songs; Uint8 prio; Uint8 vol; Sint8 pan; Uint8 slSequenceOn( song, prio, vol, pan );
Uint16 song - Song number Uint8 prio - Priority Uint8 vol - Volume Sint8 pan - Pan
Uint8 - Reserved sequence number
Plays the sound effect from the specified direction (Pan).
Specify vol in the range from 0 to 127, and pan in the range (left -127 to 0 to +127 right) (However, since Pan has 32 levels on the hardware, the lower 3 bits are invalid) If you specify -128, the Pan setting will be ignored.
Returns FALSE if there is no space in the command buffer or pronunciation management buffer.
In the case of normal termination, the pronunciation control number is returned.
slSequenceOn ( bank << 8 | song, 5, 127, 0 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOff | slSequenceFade |
slSequenceTempo | slSequencePause | slSequenceCont | slSequencePan |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8seq ; Bool slSequenceOff( seq );
Uint8 seq - Sequence number.
Bool - Flag indicating whether the command was issued correctly.
slSequenceOff( 3 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceFade |
slSequenceTempo | slSequencePause | slSequenceCont | slSequencePan |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8 seq; Uint8 vol; Uint8 rate; Bool slSequenceFade( seq, vol, rate );
Uint8 seq - Pronunciation control number Uint8 vol - Maximum volume Uint8 rate - Rate of change in volume
Bool - Flag indicating whether the command was issued correctly.
slSequenceFade ( 5, 120, 3 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceTempo | slSequencePause | slSequenceCont | slSequencePan |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8 seq; Uint16 tempo; Bool slSequenceTempo( seq, tempo );
Uint8 seq - pronunciation management number Uint16 tempo - tempo
Bool - Flag indicating whether the command was issued correctly.
slSequenceTempo ( 4, 100 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequencePause | slSequenceCont | slSequencePan |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8seq ; Bool slSequencePause( seq );
Uint8 seq - pronunciation control number.
Bool - Flag indicating whether the command was issued correctly.
slSequencePause ( 2 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequenceCont | slSequencePan |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8 seq; Bool slSequenceCont( seq );
Uint8 seq - pronunciation control number.
Bool - Flag indicating whether the command was issued correctly.
slSequenceCont ( 6 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequenceFade | slSequencePan |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8 seq; Uint8 pan;
Uint8 seq - Pronunciation control number Uint8 pan - Pan Bool slSequencePan( seq, pan );
Bool - Flag indicating whether the command was issued correctly.
slSequencePan ( 5, 65 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequenceFade | slSequenceCont |
slSequenceReset | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8seq ; Bool slSequenceReset( seq );
Uint8 seq - pronunciation control number
Bool - Flag indicating whether the command was issued correctly.
slSequenceReset( 5 );
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequenceFade | slSequenceCont |
slSequencePan | slSequenceStat | slSndFlush |
#include "sgl.h" Uint8seq ; Bool slSequenceStat( seq );
Uint8 seq - sequence number
Bool - Flag indicating whether the command was issued correctly.
if ( slSequenceStat ( 4 ) == TRUE ) { /* Playing */ } else { /* End of playback */ }
slBGMOn | slBGMCont | slBGMOff | slBGMFade |
slBGMTempo | slBGMStat | slSequenceOn | slSequenceOff |
slSequenceFade | slSequenceTempo | slSequenceFade | slSequenceCont |
slSequencePan | slSequenceReset | slSndFlush |
#include "sgl.h" Uint8 map; void *slSndMapChange( map );
Uint8 map - map number.
void* - Address of the current sound map.
typedef struct sndmap{ Sint8 ID; Sint8 ST_Addr[ 3 ]; Sint8 LdFlag; Sint8 AR_Size[ 3 ]; }SOUNDMAP; void init_sound(){ SOUNDMAP *smptrs, *smptrd; /* Wait for the current map to change */ slWaitSound ( slSndMapChange ( 1 ) ); smptrs = (SOUNDMAP *)soundmap; smptrd = (SOUNDMAP *)SoundCTRL; while(smptrs->ID >= 0){ smptrd->LdFlag = -1; /* Map Load Flag */ smptrs++; smptrd++; } slDMACopy ( sounddat, ( void * )( SoundSeqBuf ), sizeof( sounddat ) ); }
slWaitSound | slSndFlush | SoundRdCount |
#include "sgl.h" Uint8 slSndSeqNum( void );
void - gives nothing.
Uint8 - Vacant pronunciation management number
Returns a free pronunciation management number.
0 is returned if there is no space, and 1 to 7 is returned if the process completes normally.
if ( slSndSeqNum () > 0 ) { slSequenceOn (... }
slSequenceOn | slSequenceOff | slSequenceFade | slSequenceTempo |
slSequencePause | slSequenceCont | slSequencePan | slSequenceReset |
slSequenceStat |