MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / SetMusicTheme

Method SetMusicTheme

CrySystem/ScriptObjectSound.cpp:1087–1106  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1085
1086//////////////////////////////////////////////////////////////////////////
1087int 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//////////////////////////////////////////////////////////////////////////
1109int CScriptObjectSound::ResetMusicThemeOverride(IFunctionHandler *pH)

Callers

nothing calls this directly

Calls 6

EndFunctionMethod · 0.80
GetILogMethod · 0.80
GetParamCountMethod · 0.45
GetParamMethod · 0.45
SetThemeMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected