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

Method Sound_Play

Source/PC/Sound_PC2.cpp:192–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void cSound_PC2::Sound_Play( int16 pTileset, int16 pSoundEffect, int16 pVolume, int16 pIndex) {
193 Mix_Chunk* chunk = 0;
194
195 if (pSoundEffect >= 65)
196 return;
197
198 auto map = stru_496DB[pSoundEffect];
199 if (map.mEffectID == -1)
200 return;
201
202 chunk = mSoundEffects[map.mEffectID];
203 if (!chunk) {
204 return;
205 }
206
207 auto Channel = Mix_PlayChannel(-1, chunk, 0);
208 Mix_Volume(Channel, 100 - pVolume);
209 mMixerChunks.push_back({ Channel, chunk });
210}
211
212void cSound_PC2::Music_PlayFile( const char* pFilename ) {
213

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected