Changeset View
Changeset View
Standalone View
Standalone View
source/soundmanager/scripting/JSInterface_Sound.cpp
/* Copyright (C) 2018 Wildfire Games. | /* Copyright (C) 2020 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | #else | ||||
void PlayAmbientSound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ){} | void PlayAmbientSound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ){} | ||||
void PlayUISound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ) {} | void PlayUISound(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ) {} | ||||
void PlayMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ) {} | void PlayMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename), bool UNUSED(looping) ) {} | ||||
void StartPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool UNUSED(looping) ){} | void StartPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool UNUSED(looping) ){} | ||||
void AddPlaylistItem(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename) ){} | void AddPlaylistItem(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& UNUSED(filename) ){} | ||||
void ClearPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} | void ClearPlaylist(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} | ||||
void StopMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} | void StopMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} | ||||
void StartMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} | void StartMusic(ScriptInterface::CxPrivate* UNUSED(pCxPrivate) ){} | ||||
void SetMasterGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} | void SetMasterGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} | ||||
void SetMusicGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} | void SetMusicGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} | ||||
void SetAmbientGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} | void SetAmbientGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} | ||||
void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} | void SetActionGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} | ||||
void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float gain){} | void SetUIGain(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), float UNUSED(gain)){} | ||||
#endif | #endif | ||||
void RegisterScriptFunctions(const ScriptInterface& scriptInterface) | void RegisterScriptFunctions(const ScriptInterface& scriptInterface) | ||||
{ | { | ||||
scriptInterface.RegisterFunction<void, &StartMusic>("StartMusic"); | scriptInterface.RegisterFunction<void, &StartMusic>("StartMusic"); | ||||
scriptInterface.RegisterFunction<void, &StopMusic>("StopMusic"); | scriptInterface.RegisterFunction<void, &StopMusic>("StopMusic"); | ||||
scriptInterface.RegisterFunction<void, &ClearPlaylist>("ClearPlaylist"); | scriptInterface.RegisterFunction<void, &ClearPlaylist>("ClearPlaylist"); | ||||
Show All 13 Lines |
Wildfire Games · Phabricator