MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / StartTextureSounds

Function StartTextureSounds

Descent3/gamesequence.cpp:1736–1757  ·  view source on GitHub ↗

Go through the level and start and sounds associated with textures

Source from the content-addressed store, hash-verified

1734
1735// Go through the level and start and sounds associated with textures
1736void StartTextureSounds() {
1737 int r, f;
1738 room *rp;
1739 face *fp;
1740
1741 for (r = 0, rp = Rooms; r <= Highest_room_index; r++, rp++) {
1742 if (rp->used) {
1743 for (f = 0, fp = rp->faces; f < rp->num_faces; f++, fp++) {
1744 int sound = GameTextures[fp->tmap].sound;
1745 if ((sound != -1) && (sound != SOUND_NONE_INDEX)) {
1746 vector pos;
1747 pos_state ps;
1748 ComputeCenterPointOnFace(&pos, rp, f);
1749 ps.position = &pos;
1750 ps.roomnum = r;
1751 ps.orient = (matrix *)&Identity_matrix;
1752 Sound_system.Play3dSound(sound, SND_PRIORITY_LOWEST, &ps);
1753 }
1754 }
1755 }
1756 }
1757}
1758
1759// Starts all the sounds on this level
1760void StartLevelSounds() {

Callers 1

StartLevelSoundsFunction · 0.85

Calls 2

ComputeCenterPointOnFaceFunction · 0.85
Play3dSoundMethod · 0.80

Tested by

no test coverage detected