MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / GetSound

Method GetSound

Source/Versions.cpp:281–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281std::shared_ptr<cSound> sGameVersion::GetSound() const {
282
283 // Check for JON.INS in the game data folder, this allows replacing PC audio with Amiga for both CF1 and CF2
284 if (CanUseAmigaSound())
285 return std::make_shared<cSound_Amiga>();
286
287 if (isPC()) {
288 if (isCannonFodder2())
289 return std::make_shared<cSound_PC2>();
290
291 return std::make_shared<cSound_PC>();
292 }
293 else if (isAmiga()) {
294 return std::make_shared<cSound_Amiga>();
295 }
296 return 0;
297}
298
299std::string sGameVersion::getDataPath() const {
300

Callers 1

VersionSwitchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected