- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any

marker lumps it inserted.
- Fixes to placate GCC.



SVN r963 (trunk)
This commit is contained in:
Randy Heit 2008-05-11 03:02:33 +00:00
parent 6f7c6e4dac
commit 8ffd79eeca
5 changed files with 69 additions and 69 deletions

View File

@ -1,4 +1,6 @@
May 10, 2008 May 10, 2008
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead. - Fixed: Need write barriers when modifying SequenceListHead.
May 9, 2008 May 9, 2008

View File

@ -153,7 +153,7 @@ FString FPlayList::NextLine (FILE *file)
void FPlayList::Shuffle () void FPlayList::Shuffle ()
{ {
unsigned int numsongs = Songs.Size(); unsigned int numsongs = Songs.Size();
int i; unsigned int i;
for (i = 0; i < numsongs; ++i) for (i = 0; i < numsongs; ++i)
{ {

View File

@ -1335,7 +1335,7 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
else else
{ {
int lumpnum = -1; int lumpnum = -1;
int offset, length; int offset = 0, length = 0;
int device = MDEV_DEFAULT; int device = MDEV_DEFAULT;
void *handle = NULL; void *handle = NULL;
@ -1398,11 +1398,6 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
} }
} }
} }
else
{
offset = 0;
length = 0;
}
// shutdown old music // shutdown old music
S_StopMusic (true); S_StopMusic (true);

View File

@ -42,70 +42,70 @@ struct GenDef
static const GenDef GenDefs[] = static const GenDef GenDefs[] =
{ {
/* 0 */ 0, 32767, cindex(startAddrsOffset), GENF_InstrOnly, /* 0 */ { 0, 32767, cindex(startAddrsOffset), GENF_InstrOnly },
/* 1 */ -32768, 0, cindex(endAddrsOffset), GENF_InstrOnly, /* 1 */ { -32768, 0, cindex(endAddrsOffset), GENF_InstrOnly },
/* 2 */ -32768, 32767, cindex(startLoopAddrsOffset), GENF_InstrOnly, /* 2 */ { -32768, 32767, cindex(startLoopAddrsOffset), GENF_InstrOnly },
/* 3 */ -32768, 32767, cindex(endLoopAddrsOffset), GENF_InstrOnly, /* 3 */ { -32768, 32767, cindex(endLoopAddrsOffset), GENF_InstrOnly },
/* 4 */ 0, 32767, cindex(startAddrsCoarseOffset), GENF_InstrOnly, /* 4 */ { 0, 32767, cindex(startAddrsCoarseOffset), GENF_InstrOnly },
/* 5 */ -12000, 12000, cindex(modLfoToPitch), 0, /* 5 */ { -12000, 12000, cindex(modLfoToPitch), 0 },
/* 6 */ -12000, 12000, cindex(vibLfoToPitch), 0, /* 6 */ { -12000, 12000, cindex(vibLfoToPitch), 0 },
/* 7 */ -12000, 12000, cindex(modEnvToPitch), 0, /* 7 */ { -12000, 12000, cindex(modEnvToPitch), 0 },
/* 8 */ 1500, 13500, cindex(initialFilterFc), 0, /* 8 */ { 1500, 13500, cindex(initialFilterFc), 0 },
/* 9 */ 0, 960, cindex(initialFilterQ), 0, /* 9 */ { 0, 960, cindex(initialFilterQ), 0 },
/* 10 */ -12000, 12000, cindex(modLfoToFilterFc), 0, /* 10 */ { -12000, 12000, cindex(modLfoToFilterFc), 0 },
/* 11 */ -12000, 12000, cindex(modEnvToFilterFc), 0, /* 11 */ { -12000, 12000, cindex(modEnvToFilterFc), 0 },
/* 12 */ -32768, 0, cindex(endAddrsCoarseOffset), 0, /* 12 */ { -32768, 0, cindex(endAddrsCoarseOffset), 0 },
/* 13 */ -960, 960, cindex(modLfoToVolume), 0, /* 13 */ { -960, 960, cindex(modLfoToVolume), 0 },
/* 14 */ 0, 0, 255 /* unused1 */, 0, /* 14 */ { 0, 0, 255 /* unused1 */, 0 },
/* 15 */ 0, 1000, cindex(chorusEffectsSend), 0, /* 15 */ { 0, 1000, cindex(chorusEffectsSend), 0 },
/* 16 */ 0, 1000, cindex(reverbEffectsSend), 0, /* 16 */ { 0, 1000, cindex(reverbEffectsSend), 0 },
/* 17 */ -500, 500, cindex(pan), 0, /* 17 */ { -500, 500, cindex(pan), 0 },
/* 18 */ 0, 0, 255 /* unused2 */, 0, /* 18 */ { 0, 0, 255 /* unused2 */, 0 },
/* 19 */ 0, 0, 255 /* unused3 */, 0, /* 19 */ { 0, 0, 255 /* unused3 */, 0 },
/* 20 */ 0, 0, 255 /* unused4 */, 0, /* 20 */ { 0, 0, 255 /* unused4 */, 0 },
/* 21 */ -12000, 5000, cindex(delayModLFO), GENF_32768_Ok, /* 21 */ { -12000, 5000, cindex(delayModLFO), GENF_32768_Ok },
/* 22 */ -16000, 4500, cindex(freqModLFO), 0, /* 22 */ { -16000, 4500, cindex(freqModLFO), 0 },
/* 23 */ -12000, 5000, cindex(delayVibLFO), GENF_32768_Ok, /* 23 */ { -12000, 5000, cindex(delayVibLFO), GENF_32768_Ok },
/* 24 */ -16000, 4500, cindex(freqVibLFO), 0, /* 24 */ { -16000, 4500, cindex(freqVibLFO), 0 },
/* 25 */ -12000, 5000, cindex(delayModEnv), GENF_32768_Ok, /* 25 */ { -12000, 5000, cindex(delayModEnv), GENF_32768_Ok },
/* 26 */ -12000, 8000, cindex(attackModEnv), GENF_32768_Ok, /* 26 */ { -12000, 8000, cindex(attackModEnv), GENF_32768_Ok },
/* 27 */ -12000, 5000, cindex(holdModEnv), GENF_32768_Ok, /* 27 */ { -12000, 5000, cindex(holdModEnv), GENF_32768_Ok },
/* 28 */ -12000, 8000, cindex(decayModEnv), 0, /* 28 */ { -12000, 8000, cindex(decayModEnv), 0 },
/* 29 */ 0, 1000, cindex(sustainModEnv), 0, /* 29 */ { 0, 1000, cindex(sustainModEnv), 0 },
/* 30 */ -12000, 8000, cindex(releaseModEnv), 0, /* 30 */ { -12000, 8000, cindex(releaseModEnv), 0 },
/* 31 */ -1200, 1200, cindex(keynumToModEnvHold), 0, /* 31 */ { -1200, 1200, cindex(keynumToModEnvHold), 0 },
/* 32 */ -1200, 1200, cindex(keynumToModEnvDecay), 0, /* 32 */ { -1200, 1200, cindex(keynumToModEnvDecay), 0 },
/* 33 */ -12000, 5000, cindex(delayVolEnv), GENF_32768_Ok, /* 33 */ { -12000, 5000, cindex(delayVolEnv), GENF_32768_Ok },
/* 34 */ -12000, 8000, cindex(attackVolEnv), GENF_32768_Ok, /* 34 */ { -12000, 8000, cindex(attackVolEnv), GENF_32768_Ok },
/* 35 */ -12000, 5000, cindex(holdVolEnv), GENF_32768_Ok, /* 35 */ { -12000, 5000, cindex(holdVolEnv), GENF_32768_Ok },
/* 36 */ -12000, 5000, cindex(decayVolEnv), 0, /* 36 */ { -12000, 5000, cindex(decayVolEnv), 0 },
/* 37 */ 0, 1440, cindex(sustainVolEnv), 0, /* 37 */ { 0, 1440, cindex(sustainVolEnv), 0 },
/* 38 */ -12000, 8000, cindex(releaseVolEnv), 0, /* 38 */ { -12000, 8000, cindex(releaseVolEnv), 0 },
/* 39 */ -1200, 1200, cindex(keynumToVolEnvHold), 0, /* 39 */ { -1200, 1200, cindex(keynumToVolEnvHold), 0 },
/* 40 */ -1200, 1200, cindex(keynumToVolEnvDecay), 0, /* 40 */ { -1200, 1200, cindex(keynumToVolEnvDecay), 0 },
/* 41 */ -32768, 32767, 255 /* instrument */, GENF_Index | GENF_PresetOnly, /* 41 */ { -32768, 32767, 255 /* instrument */, GENF_Index | GENF_PresetOnly },
/* 42 */ 0, 0, 255 /* reserved1 */, 0, /* 42 */ { 0, 0, 255 /* reserved1 */, 0 },
/* 43 */ 0, 127, 255 /* keyRange */, GENF_Range, /* 43 */ { 0, 127, 255 /* keyRange */, GENF_Range },
/* 44 */ 0, 127, 255 /* velRange */, GENF_Range, /* 44 */ { 0, 127, 255 /* velRange */, GENF_Range },
/* 45 */ -32768, 32767, cindex(startLoopAddrsCoarseOffset), GENF_InstrOnly, /* 45 */ { -32768, 32767, cindex(startLoopAddrsCoarseOffset), GENF_InstrOnly },
/* 46 */ 0, 127, cindex(keynum), GENF_InstrOnly, /* 46 */ { 0, 127, cindex(keynum), GENF_InstrOnly },
/* 47 */ 1, 127, cindex(velocity), GENF_InstrOnly, /* 47 */ { 1, 127, cindex(velocity), GENF_InstrOnly },
/* 48 */ 0, 1440, cindex(initialAttenuation), 0, /* 48 */ { 0, 1440, cindex(initialAttenuation), 0 },
/* 49 */ 0, 0, 255 /* reserved2 */, 0, /* 49 */ { 0, 0, 255 /* reserved2 */, 0 },
/* 50 */ -32768, 32767, cindex(endLoopAddrsCoarseOffset), GENF_InstrOnly, /* 50 */ { -32768, 32767, cindex(endLoopAddrsCoarseOffset), GENF_InstrOnly },
/* 51 */ -120, 120, cindex(coarseTune), 0, /* 51 */ { -120, 120, cindex(coarseTune), 0 },
/* 52 */ -99, 99, cindex(fineTune), 0, /* 52 */ { -99, 99, cindex(fineTune), 0 },
/* 53 */ -32768, 32767, 255 /* sampleID */, GENF_Index | GENF_InstrOnly, /* 53 */ { -32768, 32767, 255 /* sampleID */, GENF_Index | GENF_InstrOnly },
/* 54 */ -32768, 32767, cindex(sampleModes), GENF_InstrOnly, /* 54 */ { -32768, 32767, cindex(sampleModes), GENF_InstrOnly },
/* 55 */ 0, 0, 255 /* reserved3 */, 0, /* 55 */ { 0, 0, 255 /* reserved3 */, 0 },
/* 56 */ 0, 1200, cindex(scaleTuning), 0, /* 56 */ { 0, 1200, cindex(scaleTuning), 0 },
/* 57 */ 1, 127, cindex(exclusiveClass), GENF_InstrOnly, /* 57 */ { 1, 127, cindex(exclusiveClass), GENF_InstrOnly },
/* 58 */ 0, 127, cindex(overridingRootKey), GENF_InstrOnly, /* 58 */ { 0, 127, cindex(overridingRootKey), GENF_InstrOnly },
}; };
static const SFGenComposite DefaultGenerators = static const SFGenComposite DefaultGenerators =
{ {
{ 0, 127 }, // keyRange { { 0, 127 } }, // keyRange
{ 0, 127 }, // velRange { 0, 127 }, // velRange
{ 0 }, // instrument/sampleID { 0 }, // instrument/sampleID
0, // modLfoToPitch 0, // modLfoToPitch

View File

@ -1426,11 +1426,12 @@ int FWadCollection::MergeLumps (const char *start, const char *end, int space)
{ {
newlumps++; newlumps++;
strncpy (newlumpinfos[0].name, ustart, 8); strncpy (newlumpinfos[0].name, ustart, 8);
newlumpinfos[0].fullname=NULL; newlumpinfos[0].fullname = NULL;
newlumpinfos[0].wadnum = -1; newlumpinfos[0].wadnum = -1;
newlumpinfos[0].position = newlumpinfos[0].position =
newlumpinfos[0].size = 0; newlumpinfos[0].size = 0;
newlumpinfos[0].namespc = ns_global; newlumpinfos[0].namespc = ns_global;
newlumpinfos[0].flags = 0;
} }
newlumpinfos[newlumps++] = LumpInfo[i]; newlumpinfos[newlumps++] = LumpInfo[i];
@ -1447,11 +1448,12 @@ int FWadCollection::MergeLumps (const char *start, const char *end, int space)
{ {
newlumps++; newlumps++;
strncpy (newlumpinfos[0].name, ustart, 8); strncpy (newlumpinfos[0].name, ustart, 8);
newlumpinfos[0].fullname=NULL; newlumpinfos[0].fullname = NULL;
newlumpinfos[0].wadnum = -1; newlumpinfos[0].wadnum = -1;
newlumpinfos[0].position = newlumpinfos[0].position =
newlumpinfos[0].size = 0; newlumpinfos[0].size = 0;
newlumpinfos[0].namespc = ns_global; newlumpinfos[0].namespc = ns_global;
newlumpinfos[0].flags = 0;
} }
} }
else else
@ -1499,6 +1501,7 @@ int FWadCollection::MergeLumps (const char *start, const char *end, int space)
LumpInfo[NumLumps].position = LumpInfo[NumLumps].position =
LumpInfo[NumLumps].size = 0; LumpInfo[NumLumps].size = 0;
LumpInfo[NumLumps].namespc = ns_global; LumpInfo[NumLumps].namespc = ns_global;
LumpInfo[NumLumps].flags = 0;
NumLumps++; NumLumps++;
} }