- Increased the limit for 'imp/active' to 6. This sound definitely benefits

from a higher limit.
- Fixed: $limit should not apply to sounds played from the menu.
- Fixed: The SNDSEQ parser tried to set bDoorSound before actually creating
  the sound sequence data.


SVN r852 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-25 12:21:30 +00:00
parent 6eca1036c3
commit f9b05c2b0c
4 changed files with 19 additions and 11 deletions

View file

@ -1,4 +1,9 @@
March 25, 2008 (Changes by Graf Zahl) March 25, 2008 (Changes by Graf Zahl)
- Increased the limit for 'imp/active' to 6. This sound definitely benefits
from a higher limit.
- Fixed: $limit should not apply to sounds played from the menu.
- Fixed: The SNDSEQ parser tried to set bDoorSound before actually creating
the sound sequence data.
- Changed Lemon so that it always writes the header. It still kept recompiling - Changed Lemon so that it always writes the header. It still kept recompiling
the grammar over and over again once it had been changed locally. the grammar over and over again once it had been changed locally.
- Fixed: ANIMATED allowed animations between different texture types. - Fixed: ANIMATED allowed animations between different texture types.

View file

@ -161,7 +161,7 @@ struct FSoundSequencePtrArray : public TArray<FSoundSequence *>
static void AssignTranslations (FScanner &sc, int seq, seqtype_t type); static void AssignTranslations (FScanner &sc, int seq, seqtype_t type);
static void AssignHexenTranslations (void); static void AssignHexenTranslations (void);
static void AddSequence (int curseq, FName seqname, FName slot, int stopsound, const TArray<DWORD> &ScriptTemp); static void AddSequence (int curseq, FName seqname, FName slot, int stopsound, const TArray<DWORD> &ScriptTemp, bool bDoorSound);
static int FindSequence (const char *searchname); static int FindSequence (const char *searchname);
static int FindSequence (FName seqname); static int FindSequence (FName seqname);
static bool TwiddleSeqNum (int &sequence, seqtype_t type); static bool TwiddleSeqNum (int &sequence, seqtype_t type);
@ -413,10 +413,6 @@ static void AssignTranslations (FScanner &sc, int seq, seqtype_t type)
if (IsNum(sc.String)) if (IsNum(sc.String))
{ {
SeqTrans[(atoi(sc.String) & 63) + type * 64] = seq; SeqTrans[(atoi(sc.String) & 63) + type * 64] = seq;
if (type == SEQ_DOOR)
{
Sequences[seq]->bDoorSound |= true;
}
} }
} }
sc.UnGet(); sc.UnGet();
@ -506,6 +502,8 @@ void S_ParseSndSeq (int levellump)
FScanner sc(lump, "SNDSEQ"); FScanner sc(lump, "SNDSEQ");
while (sc.GetString ()) while (sc.GetString ())
{ {
bool bDoorSound;
if (*sc.String == ':' || *sc.String == '[') if (*sc.String == ':' || *sc.String == '[')
{ {
if (curseq != -1) if (curseq != -1)
@ -530,6 +528,7 @@ void S_ParseSndSeq (int levellump)
ScriptTemp.Clear(); ScriptTemp.Clear();
stopsound = 0; stopsound = 0;
slot = NAME_None; slot = NAME_None;
bDoorSound = false;
if (seqtype == '[') if (seqtype == '[')
{ {
sc.SetCMode (true); sc.SetCMode (true);
@ -546,7 +545,7 @@ void S_ParseSndSeq (int levellump)
if (sc.String[0] == ']') if (sc.String[0] == ']')
{ // End of this definition { // End of this definition
ScriptTemp[0] = MakeCommand(SS_CMD_SELECT, (ScriptTemp.Size()-1)/2); ScriptTemp[0] = MakeCommand(SS_CMD_SELECT, (ScriptTemp.Size()-1)/2);
AddSequence (curseq, seqname, slot, stopsound, ScriptTemp); AddSequence (curseq, seqname, slot, stopsound, ScriptTemp, bDoorSound);
curseq = -1; curseq = -1;
sc.SetCMode (false); sc.SetCMode (false);
} }
@ -561,7 +560,9 @@ void S_ParseSndSeq (int levellump)
} }
else else
{ {
AssignTranslations (sc, curseq, seqtype_t(sc.MustMatchString (SSStrings + SS_STRING_PLATFORM))); seqtype_t seqtype = seqtype_t(sc.MustMatchString (SSStrings + SS_STRING_PLATFORM));
AssignTranslations (sc, curseq, seqtype);
if (seqtype == SEQ_DOOR) bDoorSound = true;
} }
} }
continue; continue;
@ -660,7 +661,7 @@ void S_ParseSndSeq (int levellump)
break; break;
case SS_STRING_END: case SS_STRING_END:
AddSequence (curseq, seqname, slot, stopsound, ScriptTemp); AddSequence (curseq, seqname, slot, stopsound, ScriptTemp, bDoorSound);
curseq = -1; curseq = -1;
break; break;
@ -670,6 +671,7 @@ void S_ParseSndSeq (int levellump)
case SS_STRING_DOOR: case SS_STRING_DOOR:
AssignTranslations (sc, curseq, SEQ_DOOR); AssignTranslations (sc, curseq, SEQ_DOOR);
bDoorSound = true;
break; break;
case SS_STRING_ENVIRONMENT: case SS_STRING_ENVIRONMENT:
@ -688,13 +690,13 @@ void S_ParseSndSeq (int levellump)
AssignHexenTranslations (); AssignHexenTranslations ();
} }
static void AddSequence (int curseq, FName seqname, FName slot, int stopsound, const TArray<DWORD> &ScriptTemp) static void AddSequence (int curseq, FName seqname, FName slot, int stopsound, const TArray<DWORD> &ScriptTemp, bool bDoorSound)
{ {
Sequences[curseq] = (FSoundSequence *)M_Malloc (sizeof(FSoundSequence) + sizeof(DWORD)*ScriptTemp.Size()); Sequences[curseq] = (FSoundSequence *)M_Malloc (sizeof(FSoundSequence) + sizeof(DWORD)*ScriptTemp.Size());
Sequences[curseq]->SeqName = seqname; Sequences[curseq]->SeqName = seqname;
Sequences[curseq]->Slot = slot; Sequences[curseq]->Slot = slot;
Sequences[curseq]->StopSound = stopsound; Sequences[curseq]->StopSound = stopsound;
Sequences[curseq]->bDoorSound = false; Sequences[curseq]->bDoorSound = bDoorSound;
memcpy (Sequences[curseq]->Script, &ScriptTemp[0], sizeof(DWORD)*ScriptTemp.Size()); memcpy (Sequences[curseq]->Script, &ScriptTemp[0], sizeof(DWORD)*ScriptTemp.Size());
Sequences[curseq]->Script[ScriptTemp.Size()] = MakeCommand(SS_CMD_END, 0); Sequences[curseq]->Script[ScriptTemp.Size()] = MakeCommand(SS_CMD_END, 0);
} }

View file

@ -708,7 +708,7 @@ static void S_StartSound (fixed_t *pt, AActor *mover, int channel,
// If this sound doesn't like playing near itself, don't play it if // If this sound doesn't like playing near itself, don't play it if
// that's what would happen. // that's what would happen.
if (sfx->NearLimit && S_CheckSoundLimit(sfx, pos)) if (sfx->NearLimit && pt != NULL && S_CheckSoundLimit(sfx, pos))
return; return;
// Make sure the sound is loaded. // Make sure the sound is loaded.

View file

@ -304,6 +304,7 @@ imp/death1 dsbgdth1
imp/death2 dsbgdth2 imp/death2 dsbgdth2
imp/attack dsfirsht imp/attack dsfirsht
imp/shotx dsfirxpl imp/shotx dsfirxpl
$limit imp/active 6
// Demon // Demon