/////////////////////////////////////////////////////////////////////
| 1085 | |
| 1086 | ////////////////////////////////////////////////////////////////////////// |
| 1087 | int CScriptObjectSound::SetMusicTheme(IFunctionHandler *pH) |
| 1088 | { |
| 1089 | if(!m_pMusicSystem) |
| 1090 | return pH->EndFunction(); |
| 1091 | |
| 1092 | if (pH->GetParamCount()<1) |
| 1093 | { |
| 1094 | CHECK_PARAMETERS(1); |
| 1095 | } |
| 1096 | const char *pszTheme; |
| 1097 | bool bOverride=false; |
| 1098 | if (!pH->GetParam(1, pszTheme)) |
| 1099 | return pH->EndFunction(false); |
| 1100 | if (pH->GetParamCount()>=2) |
| 1101 | pH->GetParam(2, bOverride); |
| 1102 | bool bRes=m_pMusicSystem->SetTheme(pszTheme, bOverride); |
| 1103 | if (!bRes) |
| 1104 | m_pSystem->GetILog()->Log("Unable to set music-theme \"%s\" !", pszTheme); |
| 1105 | return pH->EndFunction(bRes); |
| 1106 | } |
| 1107 | |
| 1108 | ////////////////////////////////////////////////////////////////////////// |
| 1109 | int CScriptObjectSound::ResetMusicThemeOverride(IFunctionHandler *pH) |
nothing calls this directly
no test coverage detected