Debian Codegraph @

prboom2/src/dsda/memory.c

raw
1 //
2 // Copyright(C) 2020 by Ryan Krafnick
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // DESCRIPTION:
15 // DSDA Memory
16 //
17
18 #include "i_sound.h"
19 #include "sounds.h"
20 #include "w_wad.h"
21 #include "lprintf.h"
22
23 #include "dsda/time.h"
24
25 #include "memory.h"
26
27 void dsda_CacheSoundLumps(void) {
28 int i;
29
30 for (i = 0; i < num_sfx; ++i) {
31 sfxinfo_t *sfx = &S_sfx[i];
32 sfx->lumpnum = I_GetSfxLumpNum(sfx);
33
34 if (sfx->lumpnum >= 0)
35 W_LockLumpNum(sfx->lumpnum);
36 }
37 }