2008-01-27 11:25:03 +00:00
|
|
|
//**************************************************************************
|
|
|
|
//**
|
|
|
|
//** sn_sonix.c : Heretic 2 : Raven Software, Corp.
|
|
|
|
//**
|
|
|
|
//** $RCSfile: sn_sonix.c,v $
|
|
|
|
//** $Revision: 1.17 $
|
|
|
|
//** $Date: 95/10/05 18:25:44 $
|
|
|
|
//** $Author: paul $
|
|
|
|
//**
|
|
|
|
//**************************************************************************
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "doomtype.h"
|
|
|
|
#include "doomstat.h"
|
|
|
|
#include "sc_man.h"
|
|
|
|
#include "m_random.h"
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "s_sndseq.h"
|
|
|
|
#include "w_wad.h"
|
|
|
|
#include "i_system.h"
|
|
|
|
#include "cmdlib.h"
|
|
|
|
#include "p_local.h"
|
|
|
|
#include "gi.h"
|
|
|
|
#include "templates.h"
|
|
|
|
#include "c_dispatch.h"
|
2008-09-15 23:47:00 +00:00
|
|
|
#include "g_level.h"
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
// MACROS ------------------------------------------------------------------
|
|
|
|
|
|
|
|
#define GetCommand(a) ((a) & 255)
|
|
|
|
#define GetData(a) (SDWORD(a) >> 8 )
|
|
|
|
#define MakeCommand(a,b) ((a) | ((b) << 8))
|
|
|
|
#define HexenPlatSeq(a) (a)
|
|
|
|
#define HexenDoorSeq(a) ((a) | 0x40)
|
|
|
|
#define HexenEnvSeq(a) ((a) | 0x80)
|
|
|
|
#define HexenLastSeq (0xff)
|
|
|
|
|
|
|
|
#define TIME_REFERENCE level.time
|
|
|
|
|
|
|
|
// TYPES -------------------------------------------------------------------
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
SS_STRING_PLAY,
|
|
|
|
SS_STRING_PLAYUNTILDONE,
|
|
|
|
SS_STRING_PLAYTIME,
|
|
|
|
SS_STRING_PLAYREPEAT,
|
|
|
|
SS_STRING_PLAYLOOP,
|
|
|
|
SS_STRING_DELAY,
|
|
|
|
SS_STRING_DELAYONCE,
|
|
|
|
SS_STRING_DELAYRAND,
|
|
|
|
SS_STRING_VOLUME,
|
|
|
|
SS_STRING_VOLUMEREL,
|
|
|
|
SS_STRING_VOLUMERAND,
|
|
|
|
SS_STRING_END,
|
|
|
|
SS_STRING_STOPSOUND,
|
|
|
|
SS_STRING_ATTENUATION,
|
|
|
|
SS_STRING_NOSTOPCUTOFF,
|
|
|
|
SS_STRING_SLOT,
|
|
|
|
SS_STRING_RANDOMSEQUENCE,
|
|
|
|
SS_STRING_RESTART,
|
|
|
|
// These must be last and in the same order as they appear in seqtype_t
|
|
|
|
SS_STRING_PLATFORM,
|
|
|
|
SS_STRING_DOOR,
|
|
|
|
SS_STRING_ENVIRONMENT
|
|
|
|
} ssstrings_t;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
SS_CMD_NONE,
|
|
|
|
SS_CMD_PLAY,
|
|
|
|
SS_CMD_WAITUNTILDONE, // used by PLAYUNTILDONE
|
|
|
|
SS_CMD_PLAYTIME,
|
|
|
|
SS_CMD_PLAYREPEAT,
|
|
|
|
SS_CMD_PLAYLOOP,
|
|
|
|
SS_CMD_DELAY,
|
|
|
|
SS_CMD_DELAYRAND,
|
|
|
|
SS_CMD_VOLUME,
|
|
|
|
SS_CMD_VOLUMEREL,
|
|
|
|
SS_CMD_VOLUMERAND,
|
|
|
|
SS_CMD_STOPSOUND,
|
|
|
|
SS_CMD_ATTENUATION,
|
|
|
|
SS_CMD_RANDOMSEQUENCE,
|
|
|
|
SS_CMD_BRANCH,
|
|
|
|
SS_CMD_LAST2NOP,
|
|
|
|
SS_CMD_SELECT,
|
|
|
|
SS_CMD_END
|
|
|
|
} sscmds_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
ENamedName Name;
|
|
|
|
BYTE Seqs[4];
|
|
|
|
} hexenseq_t;
|
|
|
|
|
|
|
|
class DSeqActorNode : public DSeqNode
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
DECLARE_CLASS(DSeqActorNode, DSeqNode)
|
2008-01-27 11:25:03 +00:00
|
|
|
HAS_OBJECT_POINTERS
|
|
|
|
public:
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqActorNode(AActor *actor, int sequence, int modenum);
|
|
|
|
void Destroy();
|
|
|
|
void Serialize(FArchive &arc);
|
|
|
|
void MakeSound(int loop, FSoundID id)
|
|
|
|
{
|
|
|
|
S_Sound(m_Actor, CHAN_BODY|loop, id, clamp(m_Volume, 0.f, 1.f), m_Atten);
|
|
|
|
}
|
|
|
|
bool IsPlaying()
|
|
|
|
{
|
|
|
|
return S_IsActorPlayingSomething (m_Actor, CHAN_BODY, m_CurrentSoundID);
|
|
|
|
}
|
|
|
|
void *Source()
|
|
|
|
{
|
|
|
|
return m_Actor;
|
|
|
|
}
|
|
|
|
DSeqNode *SpawnChild(int seqnum)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (m_Actor, seqnum, SEQ_NOTRANS, m_ModeNum, true);
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
private:
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqActorNode() {}
|
2008-03-12 15:21:17 +00:00
|
|
|
TObjPtr<AActor> m_Actor;
|
2008-01-27 11:25:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DSeqPolyNode : public DSeqNode
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
DECLARE_CLASS(DSeqPolyNode, DSeqNode)
|
2008-01-27 11:25:03 +00:00
|
|
|
public:
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqPolyNode(FPolyObj *poly, int sequence, int modenum);
|
|
|
|
void Destroy();
|
|
|
|
void Serialize(FArchive &arc);
|
|
|
|
void MakeSound(int loop, FSoundID id)
|
|
|
|
{
|
2008-07-04 16:54:29 +00:00
|
|
|
S_Sound (m_Poly, CHAN_BODY|loop, id, clamp(m_Volume, 0.f, 1.f), m_Atten);
|
2008-06-15 17:17:31 +00:00
|
|
|
}
|
|
|
|
bool IsPlaying()
|
|
|
|
{
|
2008-07-04 16:54:29 +00:00
|
|
|
return S_GetSoundPlayingInfo (m_Poly, m_CurrentSoundID);
|
2008-06-15 17:17:31 +00:00
|
|
|
}
|
|
|
|
void *Source()
|
|
|
|
{
|
|
|
|
return m_Poly;
|
|
|
|
}
|
|
|
|
DSeqNode *SpawnChild (int seqnum)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (m_Poly, seqnum, SEQ_NOTRANS, m_ModeNum, true);
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
private:
|
|
|
|
DSeqPolyNode () {}
|
Update to ZDoom r1017:
- Fixed: MAPINFO's 'lookup' option should only work for actual strings but
not for lump and file names.
- Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some
changes that won't work with only a seg list being maintained.
(SBarInfo update #23)
- Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar. You must specify a
powerupgiver. Although drawnumber goes in seconds the powerup has left
drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag. If an unknown
game mode is provided for sbarinfo's gamemode command it will ignore it and
continue.
- Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
object's position.
- Fixed: Ouch state was far to easy to achieve.
- Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
FMultiPatchTexture only calls a virtual function instead of doing any
type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.
- Renamed player_s to player_t globally to get rid of the duplicate names
for this class.
- Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody
uses a hud message as if a hud size was specified, but forgot to actually
set the hud size.
- Consolidated the mug shot code shared by DSBarInfo and DDoomStatusBar
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.
- If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.
- Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused.
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of
Flags.
- Fixed: DSBarInfo::updateState() and DDoomStatusBar::UpdateState() sprung
leaks and didn't allocate enough space for the fullStateName string.
- Disabled DUMB's mono destination mixers. It's not like I'm ever going to
target an original SoundBlaster, so they're a waste of space to have around.
This trims resample.obj down to ~60k now.
- Fixed: PrtScn/SysRq key did not work on Linux.
- Added an alternate module replay engine that uses foo_dumb's replayer, a
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
It has been slightly modified by me:
* Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
* Removed excessive mallocs from the replay core.
* Rerolled the loops in resample.c. Unrolling them made the object file
~250k large while providing little benefit. Even at ~100k, I think it's
still larger than it ought to be, but I'll live with it for now.
Other than that, it's essentially the same thing you'd hear in foobar2000,
minus some subsong detection features. Release builds of the library look
like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@113 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-03 21:48:49 +00:00
|
|
|
FPolyObj *m_Poly;
|
2008-01-27 11:25:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DSeqSectorNode : public DSeqNode
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
DECLARE_CLASS(DSeqSectorNode, DSeqNode)
|
2008-01-27 11:25:03 +00:00
|
|
|
public:
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqSectorNode(sector_t *sec, int chan, int sequence, int modenum);
|
|
|
|
void Destroy();
|
|
|
|
void Serialize(FArchive &arc);
|
|
|
|
void MakeSound(int loop, FSoundID id)
|
|
|
|
{
|
|
|
|
Channel = (Channel & 7) | CHAN_AREA | loop;
|
|
|
|
S_Sound(m_Sector, Channel, id, clamp(m_Volume, 0.f, 1.f), m_Atten);
|
|
|
|
}
|
|
|
|
bool IsPlaying()
|
|
|
|
{
|
2008-07-04 16:54:29 +00:00
|
|
|
return S_GetSoundPlayingInfo (m_Sector, m_CurrentSoundID);
|
2008-06-15 17:17:31 +00:00
|
|
|
}
|
|
|
|
void *Source()
|
|
|
|
{
|
|
|
|
return m_Sector;
|
|
|
|
}
|
|
|
|
DSeqNode *SpawnChild(int seqnum)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (m_Sector, Channel, seqnum, SEQ_NOTRANS, m_ModeNum, true);
|
|
|
|
}
|
|
|
|
int Channel;
|
2008-01-27 11:25:03 +00:00
|
|
|
private:
|
|
|
|
DSeqSectorNode() {}
|
|
|
|
sector_t *m_Sector;
|
|
|
|
};
|
|
|
|
|
|
|
|
// When destroyed, destroy the sound sequences too.
|
|
|
|
struct FSoundSequencePtrArray : public TArray<FSoundSequence *>
|
|
|
|
{
|
|
|
|
~FSoundSequencePtrArray()
|
|
|
|
{
|
|
|
|
for (unsigned int i = 0; i < Size(); ++i)
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
M_Free((*this)[i]);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
|
|
|
|
2008-01-27 15:34:47 +00:00
|
|
|
static void AssignTranslations (FScanner &sc, int seq, seqtype_t type);
|
2008-01-27 11:25:03 +00:00
|
|
|
static void AssignHexenTranslations (void);
|
2008-06-15 17:17:31 +00:00
|
|
|
static void AddSequence (int curseq, FName seqname, FName slot, int stopsound, const TArray<DWORD> &ScriptTemp);
|
2008-01-27 11:25:03 +00:00
|
|
|
static int FindSequence (const char *searchname);
|
|
|
|
static int FindSequence (FName seqname);
|
|
|
|
static bool TwiddleSeqNum (int &sequence, seqtype_t type);
|
|
|
|
|
|
|
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
|
|
|
|
|
|
|
FSoundSequencePtrArray Sequences;
|
|
|
|
int ActiveSequences;
|
|
|
|
DSeqNode *DSeqNode::SequenceListHead;
|
|
|
|
|
|
|
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
|
|
|
|
|
|
|
static const char *SSStrings[] = {
|
|
|
|
"play",
|
|
|
|
"playuntildone",
|
|
|
|
"playtime",
|
|
|
|
"playrepeat",
|
|
|
|
"playloop",
|
|
|
|
"delay",
|
|
|
|
"delayonce",
|
|
|
|
"delayrand",
|
|
|
|
"volume",
|
|
|
|
"volumerel",
|
|
|
|
"volumerand",
|
|
|
|
"end",
|
|
|
|
"stopsound",
|
|
|
|
"attenuation",
|
|
|
|
"nostopcutoff",
|
|
|
|
"slot",
|
|
|
|
"randomsequence",
|
|
|
|
"restart",
|
|
|
|
// These must be last and in the same order as they appear in seqtype_t
|
|
|
|
"platform",
|
|
|
|
"door",
|
|
|
|
"environment",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
static const char *Attenuations[] = {
|
|
|
|
"none",
|
|
|
|
"normal",
|
|
|
|
"idle",
|
|
|
|
"static",
|
|
|
|
"surround",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
static const hexenseq_t HexenSequences[] = {
|
|
|
|
{ NAME_Platform, { HexenPlatSeq(0), HexenPlatSeq(1), HexenPlatSeq(3), HexenLastSeq } },
|
|
|
|
{ NAME_PlatformMetal, { HexenPlatSeq(2), HexenLastSeq } },
|
|
|
|
{ NAME_Silence, { HexenPlatSeq(4), HexenDoorSeq(4), HexenLastSeq } },
|
|
|
|
{ NAME_Lava, { HexenPlatSeq(5), HexenDoorSeq(5), HexenLastSeq } },
|
|
|
|
{ NAME_Water, { HexenPlatSeq(6), HexenDoorSeq(6), HexenLastSeq } },
|
|
|
|
{ NAME_Ice, { HexenPlatSeq(7), HexenDoorSeq(7), HexenLastSeq } },
|
|
|
|
{ NAME_Earth, { HexenPlatSeq(8), HexenDoorSeq(8), HexenLastSeq } },
|
|
|
|
{ NAME_PlatformMetal2, { HexenPlatSeq(9), HexenLastSeq } },
|
|
|
|
{ NAME_DoorNormal, { HexenDoorSeq(0), HexenLastSeq } },
|
|
|
|
{ NAME_DoorHeavy, { HexenDoorSeq(1), HexenLastSeq } },
|
|
|
|
{ NAME_DoorMetal, { HexenDoorSeq(2), HexenLastSeq } },
|
|
|
|
{ NAME_DoorCreak, { HexenDoorSeq(3), HexenLastSeq } },
|
|
|
|
{ NAME_DoorMetal2, { HexenDoorSeq(9), HexenLastSeq } },
|
|
|
|
{ NAME_Wind, { HexenEnvSeq(10), HexenLastSeq } },
|
|
|
|
{ NAME_None }
|
|
|
|
};
|
|
|
|
|
|
|
|
static int SeqTrans[64*3];
|
|
|
|
|
|
|
|
static FRandom pr_sndseq ("SndSeq");
|
|
|
|
|
|
|
|
// CODE --------------------------------------------------------------------
|
|
|
|
|
|
|
|
void DSeqNode::SerializeSequences (FArchive &arc)
|
|
|
|
{
|
|
|
|
arc << SequenceListHead;
|
|
|
|
}
|
|
|
|
|
2008-03-12 15:21:17 +00:00
|
|
|
IMPLEMENT_POINTY_CLASS (DSeqNode)
|
|
|
|
DECLARE_POINTER(m_ChildSeqNode)
|
|
|
|
DECLARE_POINTER(m_ParentSeqNode)
|
|
|
|
DECLARE_POINTER(m_Next)
|
|
|
|
DECLARE_POINTER(m_Prev)
|
|
|
|
END_POINTERS
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
DSeqNode::DSeqNode ()
|
|
|
|
: m_SequenceChoices(0)
|
|
|
|
{
|
|
|
|
m_Next = m_Prev = m_ChildSeqNode = m_ParentSeqNode = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DSeqNode::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
int seqOffset;
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
Super::Serialize (arc);
|
|
|
|
if (arc.IsStoring ())
|
|
|
|
{
|
|
|
|
seqOffset = SN_GetSequenceOffset (m_Sequence, m_SequencePtr);
|
|
|
|
arc << seqOffset
|
|
|
|
<< m_DelayUntilTic
|
|
|
|
<< m_Volume
|
|
|
|
<< m_Atten
|
|
|
|
<< m_ModeNum
|
|
|
|
<< m_Next
|
|
|
|
<< m_Prev
|
|
|
|
<< m_ChildSeqNode
|
|
|
|
<< m_ParentSeqNode
|
2008-06-15 17:17:31 +00:00
|
|
|
<< m_CurrentSoundID
|
2008-01-27 11:25:03 +00:00
|
|
|
<< Sequences[m_Sequence]->SeqName;
|
|
|
|
|
|
|
|
arc.WriteCount (m_SequenceChoices.Size());
|
|
|
|
for (i = 0; i < m_SequenceChoices.Size(); ++i)
|
|
|
|
{
|
|
|
|
arc << Sequences[m_SequenceChoices[i]]->SeqName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FName seqName;
|
2008-06-15 17:17:31 +00:00
|
|
|
int delayTics = 0;
|
|
|
|
FSoundID id;
|
2008-01-27 11:25:03 +00:00
|
|
|
float volume;
|
|
|
|
int atten = ATTN_NORM;
|
|
|
|
int seqnum;
|
|
|
|
unsigned int numchoices;
|
|
|
|
|
|
|
|
arc << seqOffset
|
|
|
|
<< delayTics
|
|
|
|
<< volume
|
|
|
|
<< atten
|
|
|
|
<< m_ModeNum
|
|
|
|
<< m_Next
|
|
|
|
<< m_Prev
|
|
|
|
<< m_ChildSeqNode
|
|
|
|
<< m_ParentSeqNode
|
2008-06-15 17:17:31 +00:00
|
|
|
<< id
|
2008-01-27 11:25:03 +00:00
|
|
|
<< seqName;
|
|
|
|
|
|
|
|
seqnum = FindSequence (seqName);
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{
|
|
|
|
ActivateSequence (seqnum);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
I_Error ("Unknown sound sequence '%s'\n", seqName.GetChars());
|
|
|
|
// Can I just Destroy() here instead of erroring out?
|
|
|
|
}
|
|
|
|
|
|
|
|
ChangeData (seqOffset, delayTics - TIME_REFERENCE, volume, id);
|
|
|
|
|
|
|
|
numchoices = arc.ReadCount();
|
|
|
|
m_SequenceChoices.Resize(numchoices);
|
|
|
|
for (i = 0; i < numchoices; ++i)
|
|
|
|
{
|
|
|
|
arc << seqName;
|
|
|
|
m_SequenceChoices[i] = FindSequence (seqName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DSeqNode::Destroy()
|
|
|
|
{
|
|
|
|
// If this sequence was launched by a parent sequence, advance that
|
|
|
|
// sequence now.
|
|
|
|
if (m_ParentSeqNode != NULL && m_ParentSeqNode->m_ChildSeqNode == this)
|
|
|
|
{
|
|
|
|
m_ParentSeqNode->m_SequencePtr++;
|
|
|
|
m_ParentSeqNode->m_ChildSeqNode = NULL;
|
|
|
|
m_ParentSeqNode = NULL;
|
|
|
|
}
|
2008-03-12 15:21:17 +00:00
|
|
|
if (SequenceListHead == this)
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
{
|
2008-03-12 15:21:17 +00:00
|
|
|
SequenceListHead = m_Next;
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
GC::WriteBarrier(m_Next);
|
|
|
|
}
|
2008-03-12 15:21:17 +00:00
|
|
|
if (m_Prev)
|
|
|
|
{
|
|
|
|
m_Prev->m_Next = m_Next;
|
|
|
|
GC::WriteBarrier(m_Prev, m_Next);
|
|
|
|
}
|
|
|
|
if (m_Next)
|
|
|
|
{
|
|
|
|
m_Next->m_Prev = m_Prev;
|
|
|
|
GC::WriteBarrier(m_Next, m_Prev);
|
|
|
|
}
|
|
|
|
ActiveSequences--;
|
2008-01-27 11:25:03 +00:00
|
|
|
Super::Destroy();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DSeqNode::StopAndDestroy ()
|
|
|
|
{
|
|
|
|
if (m_ChildSeqNode != NULL)
|
|
|
|
{
|
|
|
|
m_ChildSeqNode->StopAndDestroy();
|
|
|
|
}
|
|
|
|
Destroy();
|
|
|
|
}
|
|
|
|
|
|
|
|
void DSeqNode::AddChoice (int seqnum, seqtype_t type)
|
|
|
|
{
|
|
|
|
if (TwiddleSeqNum (seqnum, type))
|
|
|
|
{
|
|
|
|
m_SequenceChoices.Push (seqnum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FName DSeqNode::GetSequenceName () const
|
|
|
|
{
|
|
|
|
return Sequences[m_Sequence]->SeqName;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPLEMENT_POINTY_CLASS (DSeqActorNode)
|
|
|
|
DECLARE_POINTER (m_Actor)
|
|
|
|
END_POINTERS
|
|
|
|
|
|
|
|
void DSeqActorNode::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
|
|
|
arc << m_Actor;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPLEMENT_CLASS (DSeqPolyNode)
|
|
|
|
|
|
|
|
void DSeqPolyNode::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
2008-07-04 16:54:29 +00:00
|
|
|
arc << m_Poly;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
IMPLEMENT_CLASS (DSeqSectorNode)
|
|
|
|
|
|
|
|
void DSeqSectorNode::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
2008-06-15 17:17:31 +00:00
|
|
|
arc << m_Sector << Channel;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// AssignTranslations
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
2008-01-27 15:34:47 +00:00
|
|
|
static void AssignTranslations (FScanner &sc, int seq, seqtype_t type)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.Crossed = false;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2008-03-25 16:19:31 +00:00
|
|
|
while (sc.GetString() && !sc.Crossed)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-03-25 16:19:31 +00:00
|
|
|
if (IsNum(sc.String))
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
SeqTrans[(atoi(sc.String) & 63) + type * 64] = seq;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
2008-03-25 16:19:31 +00:00
|
|
|
sc.UnGet();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// AssignHexenTranslations
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
static void AssignHexenTranslations (void)
|
|
|
|
{
|
|
|
|
unsigned int i, j, seq;
|
|
|
|
|
|
|
|
for (i = 0; HexenSequences[i].Name != NAME_None; i++)
|
|
|
|
{
|
|
|
|
for (seq = 0; seq < Sequences.Size(); seq++)
|
|
|
|
{
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
if (Sequences[seq] != NULL && HexenSequences[i].Name == Sequences[seq]->SeqName)
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (seq == Sequences.Size())
|
|
|
|
continue;
|
|
|
|
|
|
|
|
for (j = 0; j < 4 && HexenSequences[i].Seqs[j] != HexenLastSeq; j++)
|
|
|
|
{
|
|
|
|
int trans;
|
|
|
|
|
|
|
|
if (HexenSequences[i].Seqs[j] & 0x40)
|
2008-03-25 16:19:31 +00:00
|
|
|
{
|
|
|
|
trans = 64 * SEQ_DOOR;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
else if (HexenSequences[i].Seqs[j] & 0x80)
|
2008-03-25 16:19:31 +00:00
|
|
|
trans = 64 * SEQ_ENVIRONMENT;
|
2008-01-27 11:25:03 +00:00
|
|
|
else
|
2008-03-25 16:19:31 +00:00
|
|
|
trans = 64 * SEQ_PLATFORM;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
SeqTrans[trans + (HexenSequences[i].Seqs[j] & 0x3f)] = seq;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// S_ParseSndSeq
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void S_ParseSndSeq (int levellump)
|
|
|
|
{
|
|
|
|
TArray<DWORD> ScriptTemp;
|
|
|
|
int lastlump, lump;
|
|
|
|
char seqtype = ':';
|
|
|
|
FName seqname;
|
|
|
|
FName slot;
|
|
|
|
int stopsound;
|
|
|
|
int delaybase;
|
|
|
|
float volumebase;
|
|
|
|
int curseq = -1;
|
|
|
|
|
|
|
|
// First free the old SNDSEQ data. This allows us to reload this for each level
|
|
|
|
// and specify a level specific SNDSEQ lump!
|
|
|
|
for (unsigned int i = 0; i < Sequences.Size(); i++)
|
|
|
|
{
|
|
|
|
if (Sequences[i])
|
|
|
|
{
|
2008-02-20 16:51:40 +00:00
|
|
|
M_Free(Sequences[i]);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Sequences.Clear();
|
|
|
|
|
|
|
|
// be gone, compiler warnings
|
|
|
|
stopsound = 0;
|
|
|
|
|
|
|
|
memset (SeqTrans, -1, sizeof(SeqTrans));
|
|
|
|
lastlump = 0;
|
|
|
|
|
|
|
|
while (((lump = Wads.FindLump ("SNDSEQ", &lastlump)) != -1 || levellump != -1) && levellump != -2)
|
|
|
|
{
|
|
|
|
if (lump == -1)
|
|
|
|
{
|
|
|
|
lump = levellump;
|
|
|
|
levellump = -2;
|
|
|
|
}
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
FScanner sc(lump);
|
2008-01-27 15:34:47 +00:00
|
|
|
while (sc.GetString ())
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
if (*sc.String == ':' || *sc.String == '[')
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (curseq != -1)
|
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.ScriptError ("S_ParseSndSeq: Nested Script Error");
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
2008-01-27 15:34:47 +00:00
|
|
|
seqname = sc.String + 1;
|
|
|
|
seqtype = sc.String[0];
|
2008-01-27 11:25:03 +00:00
|
|
|
for (curseq = 0; curseq < (int)Sequences.Size(); curseq++)
|
|
|
|
{
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
if (Sequences[curseq] != NULL && Sequences[curseq]->SeqName == seqname)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-02-20 16:51:40 +00:00
|
|
|
M_Free (Sequences[curseq]);
|
2008-01-27 11:25:03 +00:00
|
|
|
Sequences[curseq] = NULL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (curseq == (int)Sequences.Size())
|
|
|
|
{
|
|
|
|
Sequences.Push (NULL);
|
|
|
|
}
|
|
|
|
ScriptTemp.Clear();
|
|
|
|
stopsound = 0;
|
|
|
|
slot = NAME_None;
|
|
|
|
if (seqtype == '[')
|
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.SetCMode (true);
|
2008-01-27 11:25:03 +00:00
|
|
|
ScriptTemp.Push (0); // to be filled when definition is complete
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (curseq == -1)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (seqtype == '[')
|
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
if (sc.String[0] == ']')
|
2008-01-27 11:25:03 +00:00
|
|
|
{ // End of this definition
|
|
|
|
ScriptTemp[0] = MakeCommand(SS_CMD_SELECT, (ScriptTemp.Size()-1)/2);
|
2008-06-15 17:17:31 +00:00
|
|
|
AddSequence (curseq, seqname, slot, stopsound, ScriptTemp);
|
2008-01-27 11:25:03 +00:00
|
|
|
curseq = -1;
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.SetCMode (false);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Add a selection
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.UnGet();
|
|
|
|
if (sc.CheckNumber())
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-01-27 15:34:47 +00:00
|
|
|
ScriptTemp.Push (sc.Number);
|
|
|
|
sc.MustGetString();
|
|
|
|
ScriptTemp.Push (FName(sc.String));
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-03-25 16:19:31 +00:00
|
|
|
seqtype_t seqtype = seqtype_t(sc.MustMatchString (SSStrings + SS_STRING_PLATFORM));
|
|
|
|
AssignTranslations (sc, curseq, seqtype);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
2008-01-27 15:34:47 +00:00
|
|
|
switch (sc.MustMatchString (SSStrings))
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
case SS_STRING_PLAYUNTILDONE:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_PLAY, S_FindSound (sc.String)));
|
2008-01-27 11:25:03 +00:00
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_WAITUNTILDONE, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_PLAY:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_PLAY, S_FindSound (sc.String)));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_PLAYTIME:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_PLAY, S_FindSound (sc.String)));
|
|
|
|
sc.MustGetNumber ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_DELAY, sc.Number));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_PLAYREPEAT:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
ScriptTemp.Push(MakeCommand (SS_CMD_PLAYREPEAT, S_FindSound (sc.String)));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_PLAYLOOP:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
ScriptTemp.Push(MakeCommand (SS_CMD_PLAYLOOP, S_FindSound (sc.String)));
|
|
|
|
sc.MustGetNumber ();
|
|
|
|
ScriptTemp.Push(sc.Number);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_DELAY:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetNumber ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_DELAY, sc.Number));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_DELAYONCE:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetNumber ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_DELAY, sc.Number));
|
2008-01-27 11:25:03 +00:00
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_LAST2NOP, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_DELAYRAND:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetNumber ();
|
|
|
|
delaybase = sc.Number;
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_DELAYRAND, sc.Number));
|
|
|
|
sc.MustGetNumber ();
|
|
|
|
ScriptTemp.Push(MAX(1, sc.Number - delaybase + 1));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_VOLUME: // volume is in range 0..100
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetFloat ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_VOLUME, int(sc.Float * (FRACUNIT/100.f))));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_VOLUMEREL:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetFloat ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_VOLUMEREL, int(sc.Float * (FRACUNIT/100.f))));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_VOLUMERAND:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetFloat ();
|
|
|
|
volumebase = sc.Float;
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_VOLUMERAND, int(sc.Float * (FRACUNIT/100.f))));
|
|
|
|
sc.MustGetFloat ();
|
|
|
|
ScriptTemp.Push(int((sc.Float - volumebase) * (256/100.f)));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_STOPSOUND:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
stopsound = S_FindSound (sc.String);
|
2008-01-27 11:25:03 +00:00
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_STOPSOUND, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_NOSTOPCUTOFF:
|
|
|
|
stopsound = -1;
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_STOPSOUND, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_ATTENUATION:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString ();
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_ATTENUATION, sc.MustMatchString(Attenuations)));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_RANDOMSEQUENCE:
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_RANDOMSEQUENCE, 0));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_RESTART:
|
|
|
|
ScriptTemp.Push(MakeCommand(SS_CMD_BRANCH, ScriptTemp.Size()));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_END:
|
2008-06-15 17:17:31 +00:00
|
|
|
AddSequence (curseq, seqname, slot, stopsound, ScriptTemp);
|
2008-01-27 11:25:03 +00:00
|
|
|
curseq = -1;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_PLATFORM:
|
2008-01-27 15:34:47 +00:00
|
|
|
AssignTranslations (sc, curseq, SEQ_PLATFORM);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_DOOR:
|
2008-01-27 15:34:47 +00:00
|
|
|
AssignTranslations (sc, curseq, SEQ_DOOR);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_ENVIRONMENT:
|
2008-01-27 15:34:47 +00:00
|
|
|
AssignTranslations (sc, curseq, SEQ_ENVIRONMENT);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_STRING_SLOT:
|
2008-01-27 15:34:47 +00:00
|
|
|
sc.MustGetString();
|
|
|
|
slot = sc.String;
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
if (curseq > 0)
|
|
|
|
{
|
|
|
|
sc.ScriptError("End of file encountered before the final sequence ended.");
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (gameinfo.gametype == GAME_Hexen)
|
|
|
|
AssignHexenTranslations ();
|
|
|
|
}
|
|
|
|
|
2008-06-15 17:17:31 +00:00
|
|
|
static void AddSequence (int curseq, FName seqname, FName slot, int stopsound, const TArray<DWORD> &ScriptTemp)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
Sequences[curseq] = (FSoundSequence *)M_Malloc (sizeof(FSoundSequence) + sizeof(DWORD)*ScriptTemp.Size());
|
|
|
|
Sequences[curseq]->SeqName = seqname;
|
|
|
|
Sequences[curseq]->Slot = slot;
|
|
|
|
Sequences[curseq]->StopSound = stopsound;
|
|
|
|
memcpy (Sequences[curseq]->Script, &ScriptTemp[0], sizeof(DWORD)*ScriptTemp.Size());
|
|
|
|
Sequences[curseq]->Script[ScriptTemp.Size()] = MakeCommand(SS_CMD_END, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
DSeqNode::DSeqNode (int sequence, int modenum)
|
|
|
|
: m_ModeNum(modenum), m_SequenceChoices(0)
|
|
|
|
{
|
|
|
|
ActivateSequence (sequence);
|
|
|
|
if (!SequenceListHead)
|
|
|
|
{
|
|
|
|
SequenceListHead = this;
|
|
|
|
m_Next = m_Prev = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
SequenceListHead->m_Prev = this; GC::WriteBarrier(SequenceListHead->m_Prev, this);
|
|
|
|
m_Next = SequenceListHead; GC::WriteBarrier(this, SequenceListHead);
|
2008-01-27 11:25:03 +00:00
|
|
|
SequenceListHead = this;
|
|
|
|
m_Prev = NULL;
|
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
GC::WriteBarrier(this);
|
2008-01-27 11:25:03 +00:00
|
|
|
m_ParentSeqNode = m_ChildSeqNode = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DSeqNode::ActivateSequence (int sequence)
|
|
|
|
{
|
|
|
|
m_SequencePtr = Sequences[sequence]->Script;
|
|
|
|
m_Sequence = sequence;
|
|
|
|
m_DelayUntilTic = 0;
|
|
|
|
m_StopSound = Sequences[sequence]->StopSound;
|
|
|
|
m_CurrentSoundID = 0;
|
|
|
|
m_Volume = 1; // Start at max volume...
|
|
|
|
m_Atten = ATTN_IDLE; // ...and idle attenuation
|
|
|
|
|
|
|
|
ActiveSequences++;
|
|
|
|
}
|
|
|
|
|
|
|
|
DSeqActorNode::DSeqActorNode (AActor *actor, int sequence, int modenum)
|
|
|
|
: DSeqNode (sequence, modenum),
|
|
|
|
m_Actor (actor)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
Update to ZDoom r1017:
- Fixed: MAPINFO's 'lookup' option should only work for actual strings but
not for lump and file names.
- Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some
changes that won't work with only a seg list being maintained.
(SBarInfo update #23)
- Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar. You must specify a
powerupgiver. Although drawnumber goes in seconds the powerup has left
drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag. If an unknown
game mode is provided for sbarinfo's gamemode command it will ignore it and
continue.
- Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
object's position.
- Fixed: Ouch state was far to easy to achieve.
- Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
FMultiPatchTexture only calls a virtual function instead of doing any
type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.
- Renamed player_s to player_t globally to get rid of the duplicate names
for this class.
- Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody
uses a hud message as if a hud size was specified, but forgot to actually
set the hud size.
- Consolidated the mug shot code shared by DSBarInfo and DDoomStatusBar
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.
- If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.
- Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused.
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of
Flags.
- Fixed: DSBarInfo::updateState() and DDoomStatusBar::UpdateState() sprung
leaks and didn't allocate enough space for the fullStateName string.
- Disabled DUMB's mono destination mixers. It's not like I'm ever going to
target an original SoundBlaster, so they're a waste of space to have around.
This trims resample.obj down to ~60k now.
- Fixed: PrtScn/SysRq key did not work on Linux.
- Added an alternate module replay engine that uses foo_dumb's replayer, a
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
It has been slightly modified by me:
* Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
* Removed excessive mallocs from the replay core.
* Rerolled the loops in resample.c. Unrolling them made the object file
~250k large while providing little benefit. Even at ~100k, I think it's
still larger than it ought to be, but I'll live with it for now.
Other than that, it's essentially the same thing you'd hear in foobar2000,
minus some subsong detection features. Release builds of the library look
like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@113 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-03 21:48:49 +00:00
|
|
|
DSeqPolyNode::DSeqPolyNode (FPolyObj *poly, int sequence, int modenum)
|
2008-01-27 11:25:03 +00:00
|
|
|
: DSeqNode (sequence, modenum),
|
|
|
|
m_Poly (poly)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqSectorNode::DSeqSectorNode (sector_t *sec, int chan, int sequence, int modenum)
|
2008-01-27 11:25:03 +00:00
|
|
|
: DSeqNode (sequence, modenum),
|
2008-06-15 17:17:31 +00:00
|
|
|
Channel (chan),
|
2008-01-27 11:25:03 +00:00
|
|
|
m_Sector (sec)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_StartSequence
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
static bool TwiddleSeqNum (int &sequence, seqtype_t type)
|
|
|
|
{
|
|
|
|
if (type < SEQ_NUMSEQTYPES)
|
|
|
|
{
|
|
|
|
// [GrafZahl] Needs some range checking:
|
|
|
|
// Sector_ChangeSound doesn't do it so this makes invalid sequences play nothing.
|
|
|
|
if (sequence >= 0 && sequence < 64)
|
|
|
|
{
|
|
|
|
sequence = SeqTrans[sequence + type * 64];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sequence == -1 || Sequences[sequence] == NULL)
|
|
|
|
return false;
|
|
|
|
else
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
DSeqNode *SN_StartSequence (AActor *actor, int sequence, seqtype_t type, int modenum, bool nostop)
|
|
|
|
{
|
|
|
|
if (!nostop)
|
|
|
|
{
|
|
|
|
SN_StopSequence (actor); // Stop any previous sequence
|
|
|
|
}
|
|
|
|
if (TwiddleSeqNum (sequence, type))
|
|
|
|
{
|
|
|
|
return new DSeqActorNode (actor, sequence, modenum);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqNode *SN_StartSequence (sector_t *sector, int chan, int sequence, seqtype_t type, int modenum, bool nostop)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (!nostop)
|
|
|
|
{
|
|
|
|
SN_StopSequence (sector);
|
|
|
|
}
|
|
|
|
if (TwiddleSeqNum (sequence, type))
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
return new DSeqSectorNode (sector, chan, sequence, modenum);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
Update to ZDoom r1017:
- Fixed: MAPINFO's 'lookup' option should only work for actual strings but
not for lump and file names.
- Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some
changes that won't work with only a seg list being maintained.
(SBarInfo update #23)
- Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar. You must specify a
powerupgiver. Although drawnumber goes in seconds the powerup has left
drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag. If an unknown
game mode is provided for sbarinfo's gamemode command it will ignore it and
continue.
- Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
object's position.
- Fixed: Ouch state was far to easy to achieve.
- Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
FMultiPatchTexture only calls a virtual function instead of doing any
type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.
- Renamed player_s to player_t globally to get rid of the duplicate names
for this class.
- Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody
uses a hud message as if a hud size was specified, but forgot to actually
set the hud size.
- Consolidated the mug shot code shared by DSBarInfo and DDoomStatusBar
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.
- If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.
- Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused.
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of
Flags.
- Fixed: DSBarInfo::updateState() and DDoomStatusBar::UpdateState() sprung
leaks and didn't allocate enough space for the fullStateName string.
- Disabled DUMB's mono destination mixers. It's not like I'm ever going to
target an original SoundBlaster, so they're a waste of space to have around.
This trims resample.obj down to ~60k now.
- Fixed: PrtScn/SysRq key did not work on Linux.
- Added an alternate module replay engine that uses foo_dumb's replayer, a
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
It has been slightly modified by me:
* Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
* Removed excessive mallocs from the replay core.
* Rerolled the loops in resample.c. Unrolling them made the object file
~250k large while providing little benefit. Even at ~100k, I think it's
still larger than it ought to be, but I'll live with it for now.
Other than that, it's essentially the same thing you'd hear in foobar2000,
minus some subsong detection features. Release builds of the library look
like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@113 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-03 21:48:49 +00:00
|
|
|
DSeqNode *SN_StartSequence (FPolyObj *poly, int sequence, seqtype_t type, int modenum, bool nostop)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (!nostop)
|
|
|
|
{
|
|
|
|
SN_StopSequence (poly);
|
|
|
|
}
|
|
|
|
if (TwiddleSeqNum (sequence, type))
|
|
|
|
{
|
|
|
|
return new DSeqPolyNode (poly, sequence, modenum);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_StartSequence (named)
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
DSeqNode *SN_StartSequence (AActor *actor, const char *seqname, int modenum)
|
|
|
|
{
|
|
|
|
int seqnum = FindSequence (seqname);
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (actor, seqnum, SEQ_NOTRANS, modenum);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
DSeqNode *SN_StartSequence (AActor *actor, FName seqname, int modenum)
|
|
|
|
{
|
|
|
|
int seqnum = FindSequence (seqname);
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (actor, seqnum, SEQ_NOTRANS, modenum);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-06-15 17:17:31 +00:00
|
|
|
DSeqNode *SN_StartSequence (sector_t *sec, int chan, const char *seqname, int modenum)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
int seqnum = FindSequence (seqname);
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
return SN_StartSequence (sec, chan, seqnum, SEQ_NOTRANS, modenum);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-06-28 13:29:59 +00:00
|
|
|
DSeqNode *SN_StartSequence (sector_t *sec, int chan, FName seqname, int modenum)
|
|
|
|
{
|
|
|
|
int seqnum = FindSequence (seqname);
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (sec, chan, seqnum, SEQ_NOTRANS, modenum);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
Update to ZDoom r1017:
- Fixed: MAPINFO's 'lookup' option should only work for actual strings but
not for lump and file names.
- Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some
changes that won't work with only a seg list being maintained.
(SBarInfo update #23)
- Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar. You must specify a
powerupgiver. Although drawnumber goes in seconds the powerup has left
drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag. If an unknown
game mode is provided for sbarinfo's gamemode command it will ignore it and
continue.
- Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
object's position.
- Fixed: Ouch state was far to easy to achieve.
- Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
FMultiPatchTexture only calls a virtual function instead of doing any
type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.
- Renamed player_s to player_t globally to get rid of the duplicate names
for this class.
- Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody
uses a hud message as if a hud size was specified, but forgot to actually
set the hud size.
- Consolidated the mug shot code shared by DSBarInfo and DDoomStatusBar
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.
- If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.
- Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused.
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of
Flags.
- Fixed: DSBarInfo::updateState() and DDoomStatusBar::UpdateState() sprung
leaks and didn't allocate enough space for the fullStateName string.
- Disabled DUMB's mono destination mixers. It's not like I'm ever going to
target an original SoundBlaster, so they're a waste of space to have around.
This trims resample.obj down to ~60k now.
- Fixed: PrtScn/SysRq key did not work on Linux.
- Added an alternate module replay engine that uses foo_dumb's replayer, a
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
It has been slightly modified by me:
* Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
* Removed excessive mallocs from the replay core.
* Rerolled the loops in resample.c. Unrolling them made the object file
~250k large while providing little benefit. Even at ~100k, I think it's
still larger than it ought to be, but I'll live with it for now.
Other than that, it's essentially the same thing you'd hear in foobar2000,
minus some subsong detection features. Release builds of the library look
like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@113 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-03 21:48:49 +00:00
|
|
|
DSeqNode *SN_StartSequence (FPolyObj *poly, const char *seqname, int modenum)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
int seqnum = FindSequence (seqname);
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{
|
|
|
|
return SN_StartSequence (poly, seqnum, SEQ_NOTRANS, modenum);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int FindSequence (const char *searchname)
|
|
|
|
{
|
|
|
|
FName seqname (searchname, true);
|
|
|
|
|
|
|
|
if (seqname != NAME_None)
|
|
|
|
{
|
|
|
|
return FindSequence (seqname);
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int FindSequence (FName seqname)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = Sequences.Size(); i-- > 0; )
|
|
|
|
{
|
- Fixed: The players were not added to FS's list of spawned things.
- Update to ZDoom r882
- Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it.
- Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData function and replaced all calls to P_OpenMapData that
only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
but keeps all existing information in the default and just adds to it. This
is needed because Hexen and Strife set some information in their base
MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
* Finale texts loaded from a text lump
* Demos
* Local SNDINFOs
* Local SNDSEQs
* Image names in FONTDEFS
* intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in
the map and the actor type they spawned.
SBarInfo Update #16
- Added: fillzeros flag for drawnumber. When set the string will always have
a length of the specified size and zeros will fill in for the missing places.
If the number is negative the negative sign will take the place of the last
digit.
- Added: globalarray type to drawnumber which will display the value in a
global array with the index set to the player's number. Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
most of the gaps caused by round off errors. At least for now anyways and it
is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture()
- Increased limit for demon/melee to 4.
- Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
(MELEERANGE) and didn't set the puff to its melee state if the range
was different. Even worse, it checked a global variable for this so
the behavior was undefined when P_SpawnPuff was called from anywhere
else but P_LineAttack. To reduce the amount of parameters I combined
this information with the hitthing and temporary parameters into one
flags parameter. Also changed P_LineAttack so that it gets passed
an additional parameter that specifies whether the attack is a melee
attack or not and set this to true in all calls that are to be considered
melee attacks. I couldn't use the damage type because A_CustomPunch
and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET
and FX_GRENADE.
- Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
a level using this cluster. Now it will only do that if HexenHack is true,
i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format
MAPINFOs it will now be the same as for the other games which means that
'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
code for any actor with this flag. Mostly useful for particle effects where
the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
but that still caused some blending of the channels.
- Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
the same lump name no longer involves any degree of guesswork in
determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
pointer checks, in case an improper sequence was encountered during
parsing but not early enough to avoid creating a slot for it in the array.
- Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
MUSSong2 works just as well. There are still lots of leftover bits in
the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
in_adlib calculates the song length for this format wrong, even though
the exact length is stored right in the header. (But in_adlib seems buggy
in general; too bad it's the only Windows version of Adplug that seems to
exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@86 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-05 13:28:48 +00:00
|
|
|
if (Sequences[i] != NULL && seqname == Sequences[i]->SeqName)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_StopSequence
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void SN_StopSequence (AActor *actor)
|
|
|
|
{
|
|
|
|
SN_DoStop (actor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SN_StopSequence (sector_t *sector)
|
|
|
|
{
|
|
|
|
SN_DoStop (sector);
|
|
|
|
}
|
|
|
|
|
Update to ZDoom r1017:
- Fixed: MAPINFO's 'lookup' option should only work for actual strings but
not for lump and file names.
- Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some
changes that won't work with only a seg list being maintained.
(SBarInfo update #23)
- Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar. You must specify a
powerupgiver. Although drawnumber goes in seconds the powerup has left
drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag. If an unknown
game mode is provided for sbarinfo's gamemode command it will ignore it and
continue.
- Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
object's position.
- Fixed: Ouch state was far to easy to achieve.
- Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
FMultiPatchTexture only calls a virtual function instead of doing any
type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.
- Renamed player_s to player_t globally to get rid of the duplicate names
for this class.
- Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody
uses a hud message as if a hud size was specified, but forgot to actually
set the hud size.
- Consolidated the mug shot code shared by DSBarInfo and DDoomStatusBar
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.
- If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.
- Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused.
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of
Flags.
- Fixed: DSBarInfo::updateState() and DDoomStatusBar::UpdateState() sprung
leaks and didn't allocate enough space for the fullStateName string.
- Disabled DUMB's mono destination mixers. It's not like I'm ever going to
target an original SoundBlaster, so they're a waste of space to have around.
This trims resample.obj down to ~60k now.
- Fixed: PrtScn/SysRq key did not work on Linux.
- Added an alternate module replay engine that uses foo_dumb's replayer, a
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
It has been slightly modified by me:
* Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
* Removed excessive mallocs from the replay core.
* Rerolled the loops in resample.c. Unrolling them made the object file
~250k large while providing little benefit. Even at ~100k, I think it's
still larger than it ought to be, but I'll live with it for now.
Other than that, it's essentially the same thing you'd hear in foobar2000,
minus some subsong detection features. Release builds of the library look
like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@113 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-03 21:48:49 +00:00
|
|
|
void SN_StopSequence (FPolyObj *poly)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
SN_DoStop (poly);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SN_DoStop (void *source)
|
|
|
|
{
|
|
|
|
DSeqNode *node;
|
|
|
|
|
|
|
|
for (node = DSeqNode::FirstSequence(); node; )
|
|
|
|
{
|
|
|
|
DSeqNode *next = node->NextSequence();
|
|
|
|
if (node->Source() == source)
|
|
|
|
{
|
|
|
|
node->StopAndDestroy ();
|
|
|
|
}
|
|
|
|
node = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-03-12 15:21:17 +00:00
|
|
|
void DSeqActorNode::Destroy ()
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (m_StopSound >= 0)
|
|
|
|
S_StopSound (m_Actor, CHAN_BODY);
|
|
|
|
if (m_StopSound >= 1)
|
2008-06-15 17:17:31 +00:00
|
|
|
MakeSound (0, m_StopSound);
|
2008-03-12 15:21:17 +00:00
|
|
|
Super::Destroy();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
2008-03-12 15:21:17 +00:00
|
|
|
void DSeqSectorNode::Destroy ()
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (m_StopSound >= 0)
|
2008-07-04 16:54:29 +00:00
|
|
|
S_StopSound (m_Sector, Channel & 7);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (m_StopSound >= 1)
|
2008-06-15 17:17:31 +00:00
|
|
|
MakeSound (0, m_StopSound);
|
2008-03-12 15:21:17 +00:00
|
|
|
Super::Destroy();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
2008-03-12 15:21:17 +00:00
|
|
|
void DSeqPolyNode::Destroy ()
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
if (m_StopSound >= 0)
|
2008-07-04 16:54:29 +00:00
|
|
|
S_StopSound (m_Poly, CHAN_BODY);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (m_StopSound >= 1)
|
2008-06-15 17:17:31 +00:00
|
|
|
MakeSound (0, m_StopSound);
|
2008-03-12 15:21:17 +00:00
|
|
|
Super::Destroy();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_IsMakingLoopingSound
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
bool SN_IsMakingLoopingSound (sector_t *sector)
|
|
|
|
{
|
|
|
|
DSeqNode *node;
|
|
|
|
|
|
|
|
for (node = DSeqNode::FirstSequence (); node; )
|
|
|
|
{
|
|
|
|
DSeqNode *next = node->NextSequence();
|
|
|
|
if (node->Source() == (void *)sector)
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
return !!(static_cast<DSeqSectorNode *>(node)->Channel & CHAN_LOOP);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
node = next;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_UpdateActiveSequences
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void DSeqNode::Tick ()
|
|
|
|
{
|
|
|
|
if (TIME_REFERENCE < m_DelayUntilTic)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
switch (GetCommand(*m_SequencePtr))
|
|
|
|
{
|
|
|
|
case SS_CMD_NONE:
|
|
|
|
m_SequencePtr++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_PLAY:
|
|
|
|
if (!IsPlaying())
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
m_CurrentSoundID = FSoundID(GetData(*m_SequencePtr));
|
|
|
|
MakeSound (0, m_CurrentSoundID);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
m_SequencePtr++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_WAITUNTILDONE:
|
|
|
|
if (!IsPlaying())
|
|
|
|
{
|
|
|
|
m_SequencePtr++;
|
|
|
|
m_CurrentSoundID = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_PLAYREPEAT:
|
|
|
|
if (!IsPlaying())
|
|
|
|
{
|
|
|
|
// Does not advance sequencePtr, so it will repeat as necessary.
|
2008-06-15 17:17:31 +00:00
|
|
|
m_CurrentSoundID = FSoundID(GetData(*m_SequencePtr));
|
|
|
|
MakeSound (CHAN_LOOP, m_CurrentSoundID);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SS_CMD_PLAYLOOP:
|
|
|
|
// Like SS_CMD_PLAYREPEAT, sequencePtr is not advanced, so this
|
|
|
|
// command will repeat until the sequence is stopped.
|
2008-06-15 17:17:31 +00:00
|
|
|
m_CurrentSoundID = FSoundID(GetData(m_SequencePtr[0]));
|
|
|
|
MakeSound (0, m_CurrentSoundID);
|
2008-01-27 11:25:03 +00:00
|
|
|
m_DelayUntilTic = TIME_REFERENCE + m_SequencePtr[1];
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SS_CMD_RANDOMSEQUENCE:
|
|
|
|
// If there's nothing to choose from, then there's nothing to do here.
|
|
|
|
if (m_SequenceChoices.Size() == 0)
|
|
|
|
{
|
|
|
|
m_SequencePtr++;
|
|
|
|
}
|
|
|
|
else if (m_ChildSeqNode == NULL)
|
|
|
|
{
|
|
|
|
int choice = pr_sndseq() % m_SequenceChoices.Size();
|
|
|
|
m_ChildSeqNode = SpawnChild (m_SequenceChoices[choice]);
|
2008-03-12 15:21:17 +00:00
|
|
|
GC::WriteBarrier(this, m_ChildSeqNode);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (m_ChildSeqNode == NULL)
|
|
|
|
{ // Failed, so skip to next instruction.
|
|
|
|
m_SequencePtr++;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Copy parameters to the child and link it to this one.
|
|
|
|
m_ChildSeqNode->m_Volume = m_Volume;
|
|
|
|
m_ChildSeqNode->m_Atten = m_Atten;
|
|
|
|
m_ChildSeqNode->m_ParentSeqNode = this;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// If we get here, then the child sequence is playing, and it
|
|
|
|
// will advance our sequence pointer for us when it finishes.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_DELAY:
|
|
|
|
m_DelayUntilTic = TIME_REFERENCE + GetData(*m_SequencePtr);
|
|
|
|
m_SequencePtr++;
|
|
|
|
m_CurrentSoundID = 0;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SS_CMD_DELAYRAND:
|
|
|
|
m_DelayUntilTic = TIME_REFERENCE + GetData(m_SequencePtr[0]) + pr_sndseq(m_SequencePtr[1]);
|
|
|
|
m_SequencePtr += 2;
|
|
|
|
m_CurrentSoundID = 0;
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SS_CMD_VOLUME:
|
|
|
|
m_Volume = GetData(*m_SequencePtr) / float(FRACUNIT);
|
|
|
|
m_SequencePtr++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_VOLUMEREL:
|
|
|
|
// like SS_CMD_VOLUME, but the new volume is added to the old volume
|
|
|
|
m_Volume += GetData(*m_SequencePtr) / float(FRACUNIT);
|
|
|
|
m_SequencePtr++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_VOLUMERAND:
|
|
|
|
// like SS_CMD_VOLUME, but the new volume is chosen randomly from a range
|
|
|
|
m_Volume = GetData(m_SequencePtr[0]) / float(FRACUNIT) + (pr_sndseq() % m_SequencePtr[1]) / 255.f;
|
|
|
|
m_SequencePtr += 2;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_STOPSOUND:
|
|
|
|
// Wait until something else stops the sequence
|
|
|
|
return;
|
|
|
|
|
|
|
|
case SS_CMD_ATTENUATION:
|
|
|
|
m_Atten = GetData(*m_SequencePtr);
|
|
|
|
m_SequencePtr++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_BRANCH:
|
|
|
|
m_SequencePtr -= GetData(*m_SequencePtr);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_SELECT:
|
|
|
|
{ // Completely transfer control to the choice matching m_ModeNum.
|
|
|
|
// If no match is found, then just advance to the next command
|
|
|
|
// in this sequence, which should be SS_CMD_END.
|
|
|
|
int numchoices = GetData(*m_SequencePtr++);
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < numchoices; ++i)
|
|
|
|
{
|
|
|
|
if (m_SequencePtr[i*2] == m_ModeNum)
|
|
|
|
{
|
|
|
|
int seqnum = FindSequence (ENamedName(m_SequencePtr[i*2+1]));
|
|
|
|
if (seqnum >= 0)
|
|
|
|
{ // Found a match, and it's a good one too.
|
|
|
|
ActiveSequences--;
|
|
|
|
ActivateSequence (seqnum);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == numchoices)
|
|
|
|
{ // No match (or no good match) was found.
|
|
|
|
m_SequencePtr += numchoices * 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_LAST2NOP:
|
|
|
|
*(m_SequencePtr - 1) = MakeCommand(SS_CMD_NONE, 0);
|
|
|
|
*m_SequencePtr = MakeCommand(SS_CMD_NONE, 0);
|
|
|
|
m_SequencePtr++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SS_CMD_END:
|
|
|
|
Destroy ();
|
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
Printf ("Corrupted sound sequence: %s\n", Sequences[m_Sequence]->SeqName.GetChars());
|
|
|
|
Destroy ();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void SN_UpdateActiveSequences (void)
|
|
|
|
{
|
|
|
|
DSeqNode *node;
|
|
|
|
|
|
|
|
if (!ActiveSequences || paused)
|
|
|
|
{ // No sequences currently playing/game is paused
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
for (node = DSeqNode::FirstSequence(); node; node = node->NextSequence())
|
|
|
|
{
|
|
|
|
node->Tick ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_StopAllSequences
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void SN_StopAllSequences (void)
|
|
|
|
{
|
|
|
|
DSeqNode *node;
|
|
|
|
|
|
|
|
for (node = DSeqNode::FirstSequence(); node; )
|
|
|
|
{
|
|
|
|
DSeqNode *next = node->NextSequence();
|
|
|
|
node->m_StopSound = 0; // don't play any stop sounds
|
|
|
|
node->Destroy ();
|
|
|
|
node = next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_GetSequenceOffset
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
ptrdiff_t SN_GetSequenceOffset (int sequence, SDWORD *sequencePtr)
|
|
|
|
{
|
|
|
|
return sequencePtr - Sequences[sequence]->Script;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_GetSequenceSlot
|
|
|
|
//
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
FName SN_GetSequenceSlot (int sequence, seqtype_t type)
|
|
|
|
{
|
|
|
|
if (TwiddleSeqNum (sequence, type))
|
|
|
|
{
|
|
|
|
return Sequences[sequence]->Slot;
|
|
|
|
}
|
|
|
|
return NAME_None;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// SN_ChangeNodeData
|
|
|
|
//
|
|
|
|
// nodeNum zero is the first node
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
void SN_ChangeNodeData (int nodeNum, int seqOffset, int delayTics, float volume,
|
|
|
|
int currentSoundID)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
DSeqNode *node;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
node = DSeqNode::FirstSequence();
|
|
|
|
while (node && i < nodeNum)
|
|
|
|
{
|
|
|
|
node = node->NextSequence();
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
if (!node)
|
|
|
|
{ // reached the end of the list before finding the nodeNum-th node
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
node->ChangeData (seqOffset, delayTics, volume, currentSoundID);
|
|
|
|
}
|
|
|
|
|
2008-06-15 17:17:31 +00:00
|
|
|
void DSeqNode::ChangeData (int seqOffset, int delayTics, float volume, FSoundID currentSoundID)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
m_DelayUntilTic = TIME_REFERENCE + delayTics;
|
|
|
|
m_Volume = volume;
|
|
|
|
m_SequencePtr += seqOffset;
|
|
|
|
m_CurrentSoundID = currentSoundID;
|
|
|
|
}
|
|
|
|
|
|
|
|
//==========================================================================
|
|
|
|
//
|
|
|
|
// CCMD playsequence
|
|
|
|
//
|
|
|
|
// Causes the player to play a sound sequence.
|
|
|
|
//==========================================================================
|
|
|
|
|
|
|
|
CCMD(playsequence)
|
|
|
|
{
|
|
|
|
if (argv.argc() < 2 || argv.argc() > 3)
|
|
|
|
{
|
|
|
|
Printf ("Usage: playsequence <sound sequence name> [choice number]\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SN_StartSequence (players[consoleplayer].mo, argv[1], argv.argc() > 2 ? atoi(argv[2]) : 0);
|
|
|
|
}
|
|
|
|
}
|