Files
source/Utils/Music Control.h
T
Asdow 7546a23d0d Allow custom music to be added
Additional music can be added by placing sound files into Dataa/Music folder following this naming convention

musicmode_runningNumber.fileformat, so for example:

Mainmenu_001.mp3
Mainmenu_002.ogg
Laptop_002.ogg
Tactical_003.wav

*****************************************************************
Different musicmodes are

Mainmenu_ 		<-- Mainmenu music
Laptop_ 		<-- Laptop music
Tactical_		<-- Tactical with nothing special going on
Enemy_			<-- Tactical, enemy present
Battle_			<-- Tactical, enemy present and visible
Victory_		<-- Tactical, battle victory
Death_			<-- Tactical, battle defeat
Creepy_			<-- Tactical, creatures present
CreepyBattle_	<-- Tactical, creatures present and visible

Music files can be .mp3, .ogg or .wav formats and 100 songs in each category is supported.
The running numbering starts from 000

*****************************************************************
A few filenames are treated in a special way to facilitate easy replacement of original music.
To replace original music, insert the following named files into this folder

"menumix1"			<-- Mainmenu music
"marimbad 2"		<-- Laptop music
"nothing A"			<-- Tactical with nothing special going on
"nothing B"
"nothing C"
"nothing D"
"tensor A"			<-- Tactical, enemy present
"tensor B"
"tensor C"
"triumph"
"death"
"battle A"			<-- Tactical, enemy present and visible
"tensor B"			<-- This file is also used as battle music
"creepy"			<-- Tactical, creatures present
"creature battle"	<-- Tactical, creatures present and visible
2024-01-27 14:29:51 +02:00

69 lines
1.5 KiB
C++

#ifndef _MUSIC_CONTROL_H_
#define _MUSIC_CONTROL_H_
#include "Overhead Types.h"
enum MusicMode
{
MUSIC_NONE,
MUSIC_RESTORE,
MUSIC_MAIN_MENU,
MUSIC_TACTICAL_NOTHING,
MUSIC_TACTICAL_ENEMYPRESENT,
MUSIC_TACTICAL_BATTLE,
MUSIC_TACTICAL_VICTORY,
MUSIC_TACTICAL_DEATH,
MUSIC_LAPTOP,
MUSIC_OLD_TYPE,
MUSIC_TACTICAL_BATTLE_MUSIC,
MUSIC_TACTICAL_CREEPY_MUSIC,
OTHER_MUSIC_TACTICAL,
MUSIC_TACTICAL_CIV_GROUP_BATTLE,
};
enum NewMusicList
{
MUSICLIST_MAIN_MENU,
MUSICLIST_LAPTOP,
MUSICLIST_TACTICAL_NOTHING,
MUSICLIST_TACTICAL_ENEMYPRESENT,
MUSICLIST_TACTICAL_BATTLE,
MUSICLIST_TACTICAL_VICTORY,
MUSICLIST_TACTICAL_DEATH,
MUSICLIST_TACTICAL_CREEPY,
MUSICLIST_TACTICAL_CREEPY_BATTLE,
MAX_MUSIC,
};
extern std::vector<STR> MusicLists[MAX_MUSIC];
void InitializeMusicLists();
UINT8 GetMusicMode(void);
BOOLEAN SetMusicMode(UINT8 ubMusicMode);
// Used in lua scripting and editscreen.cpp
BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex);
UINT32 MusicGetVolume(void);
BOOLEAN MusicSetVolume(UINT32 uiVolume);
BOOLEAN MusicPoll(BOOLEAN fForce);
void SetMusicFadeSpeed(INT8 bFadeSpeed);
BOOLEAN UsingCreatureMusic(void);
void UseCreatureMusic(BOOLEAN fUseCreatureMusic);
// only for luaglobal.cpp
BOOLEAN IsMusicPlaying(void);
UINT32 GetMusicHandle(void);
//BOOLEAN MusicStop(void);
//BOOLEAN MusicFadeOut(void);
//BOOLEAN MusicFadeIn(void);
//void FadeMusicForXSeconds( UINT32 uiDelay );
#endif