2006-02-24 04:48:15 +00:00
|
|
|
/*
|
|
|
|
** farchive.h
|
|
|
|
**
|
|
|
|
**---------------------------------------------------------------------------
|
2006-06-11 01:37:00 +00:00
|
|
|
** Copyright 1998-2006 Randy Heit
|
2006-02-24 04:48:15 +00:00
|
|
|
** All rights reserved.
|
|
|
|
**
|
|
|
|
** Redistribution and use in source and binary forms, with or without
|
|
|
|
** modification, are permitted provided that the following conditions
|
|
|
|
** are met:
|
|
|
|
**
|
|
|
|
** 1. Redistributions of source code must retain the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer.
|
|
|
|
** 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
** notice, this list of conditions and the following disclaimer in the
|
|
|
|
** documentation and/or other materials provided with the distribution.
|
|
|
|
** 3. The name of the author may not be used to endorse or promote products
|
|
|
|
** derived from this software without specific prior written permission.
|
|
|
|
**
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
**---------------------------------------------------------------------------
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __FARCHIVE_H__
|
|
|
|
#define __FARCHIVE_H__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "dobject.h"
|
2011-07-06 14:20:54 +00:00
|
|
|
#include "r_state.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
class FFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum EOpenMode
|
|
|
|
{
|
|
|
|
EReading,
|
2006-05-12 03:14:40 +00:00
|
|
|
EWriting,
|
|
|
|
ENotOpen
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum ESeekPos
|
|
|
|
{
|
|
|
|
ESeekSet,
|
|
|
|
ESeekRelative,
|
|
|
|
ESeekEnd
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual ~FFile () {}
|
|
|
|
|
|
|
|
virtual bool Open (const char *name, EOpenMode mode) = 0;
|
|
|
|
virtual void Close () = 0;
|
|
|
|
virtual void Flush () = 0;
|
|
|
|
virtual EOpenMode Mode () const = 0;
|
|
|
|
virtual bool IsPersistent () const = 0;
|
|
|
|
virtual bool IsOpen () const = 0;
|
|
|
|
|
|
|
|
virtual FFile& Write (const void *, unsigned int) = 0;
|
|
|
|
virtual FFile& Read (void *, unsigned int) = 0;
|
|
|
|
|
|
|
|
virtual unsigned int Tell () const = 0;
|
|
|
|
virtual FFile& Seek (int, ESeekPos) = 0;
|
|
|
|
inline FFile& Seek (unsigned int i, ESeekPos p) { return Seek ((int)i, p); }
|
|
|
|
};
|
|
|
|
|
|
|
|
class FCompressedFile : public FFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FCompressedFile ();
|
|
|
|
FCompressedFile (const char *name, EOpenMode mode, bool dontcompress = false);
|
|
|
|
FCompressedFile (FILE *file, EOpenMode mode, bool dontcompress = false, bool postopen=true);
|
|
|
|
~FCompressedFile ();
|
|
|
|
|
|
|
|
bool Open (const char *name, EOpenMode mode);
|
|
|
|
void Close ();
|
|
|
|
void Flush ();
|
|
|
|
EOpenMode Mode () const;
|
|
|
|
bool IsPersistent () const { return true; }
|
|
|
|
bool IsOpen () const;
|
|
|
|
unsigned int GetSize () const { return m_BufferSize; }
|
|
|
|
|
|
|
|
FFile &Write (const void *, unsigned int);
|
|
|
|
FFile &Read (void *, unsigned int);
|
|
|
|
unsigned int Tell () const;
|
|
|
|
FFile &Seek (int, ESeekPos);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
unsigned int m_Pos;
|
|
|
|
unsigned int m_BufferSize;
|
|
|
|
unsigned int m_MaxBufferSize;
|
|
|
|
unsigned char *m_Buffer;
|
|
|
|
bool m_NoCompress;
|
|
|
|
EOpenMode m_Mode;
|
|
|
|
FILE *m_File;
|
|
|
|
|
|
|
|
void Implode ();
|
|
|
|
void Explode ();
|
|
|
|
virtual bool FreeOnExplode () { return true; }
|
|
|
|
void PostOpen ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void BeEmpty ();
|
|
|
|
};
|
|
|
|
|
|
|
|
class FCompressedMemFile : public FCompressedFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FCompressedMemFile ();
|
|
|
|
FCompressedMemFile (FILE *file); // Create for reading
|
2006-05-12 03:14:40 +00:00
|
|
|
~FCompressedMemFile ();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
bool Open (const char *name, EOpenMode mode); // Works for reading only
|
|
|
|
bool Open (void *memblock); // Open for reading only
|
|
|
|
bool Open (); // Open for writing only
|
|
|
|
bool Reopen (); // Re-opens imploded file for reading only
|
|
|
|
void Close ();
|
|
|
|
bool IsOpen () const;
|
2012-06-16 04:05:31 +00:00
|
|
|
void GetSizes(unsigned int &one, unsigned int &two) const;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void Serialize (FArchive &arc);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool FreeOnExplode () { return !m_SourceFromMem; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_SourceFromMem;
|
|
|
|
unsigned char *m_ImplodedBuffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
class FPNGChunkFile : public FCompressedFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FPNGChunkFile (FILE *file, DWORD id); // Create for writing
|
|
|
|
FPNGChunkFile (FILE *file, DWORD id, size_t chunklen); // Create for reading
|
|
|
|
|
|
|
|
void Close ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
DWORD m_ChunkID;
|
|
|
|
};
|
|
|
|
|
|
|
|
class FArchive
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FArchive (FFile &file);
|
|
|
|
virtual ~FArchive ();
|
|
|
|
|
|
|
|
inline bool IsLoading () const { return m_Loading; }
|
|
|
|
inline bool IsStoring () const { return m_Storing; }
|
|
|
|
inline bool IsPeristent () const { return m_Persistent; }
|
|
|
|
|
|
|
|
void SetHubTravel () { m_HubTravel = true; }
|
|
|
|
|
|
|
|
void Close ();
|
|
|
|
|
|
|
|
virtual void Write (const void *mem, unsigned int len);
|
|
|
|
virtual void Read (void *mem, unsigned int len);
|
|
|
|
|
|
|
|
void WriteString (const char *str);
|
|
|
|
void WriteCount (DWORD count);
|
|
|
|
DWORD ReadCount ();
|
|
|
|
|
2010-04-03 04:07:17 +00:00
|
|
|
void UserWriteClass (PClass *info);
|
|
|
|
void UserReadClass (PClass *&info);
|
|
|
|
template<typename T> void UserReadClass(T *&info)
|
2010-03-24 02:49:37 +00:00
|
|
|
{
|
2010-04-03 04:07:17 +00:00
|
|
|
PClass *myclass;
|
2010-03-24 02:49:37 +00:00
|
|
|
UserReadClass(myclass);
|
2010-04-03 04:07:17 +00:00
|
|
|
info = dyn_cast<T>(myclass);
|
2010-03-24 02:49:37 +00:00
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
FArchive& operator<< (BYTE &c);
|
|
|
|
FArchive& operator<< (WORD &s);
|
|
|
|
FArchive& operator<< (DWORD &i);
|
|
|
|
FArchive& operator<< (QWORD &i);
|
- The sound code now handles restarting looping sounds itself. As far as
the rest of the game is concerned, these sounds will never stop once they
have been started until they are explicitly stopped. If they are evicted
from their channels, the sound code will restart them as soon as possible.
This means that instead of this:
if (!S_IsActorPlayingSomething(actor, CHAN_WEAPON, -1))
{
S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
}
The following is now just as effective:
S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
There are also a couple of other ramifications presented by this change:
* The full state of the sound system (sans music) is now stored in save
games. Any sounds that were playing when you saved will still be
playing when you load. (Try saving while Korax is making a speech in
Hexen to hear it.)
* Using snd_reset will also preserve any playing sounds.
* Movie playback is disabled, probably forever. I did not want to
update the MovieDisable/ResumeSound stuff for the new eviction
tracking code. A properly updated movie player will use the VMR,
which doesn't need these functions, since it would pipe the sound
straight through the sound system like everything else, so I decided
to dump them now, which leaves the movie player in a totally unworkable
state.
June 26, 2008
- Changed S_Sound() to take the same floating point attenuation that the
internal S_StartSound() uses. Now ambient sounds can use the public
S_Sound() interface.
- Fixed: S_RelinkSound() compared the points of the channels against the
from actor's point, rather than checking the channels' mover.
- Changed Strife's animated doors so that their sounds originate from the
interior of the sector making them and not from the entire vertical height
of the map.
SVN r1055 (trunk)
2008-06-29 04:19:38 +00:00
|
|
|
FArchive& operator<< (QWORD_UNION &i) { return operator<< (i.AsOne); }
|
2006-02-24 04:48:15 +00:00
|
|
|
FArchive& operator<< (float &f);
|
|
|
|
FArchive& operator<< (double &d);
|
|
|
|
FArchive& operator<< (char *&str);
|
2006-05-03 22:45:01 +00:00
|
|
|
FArchive& operator<< (FName &n);
|
2006-05-11 04:00:58 +00:00
|
|
|
FArchive& operator<< (FString &str);
|
2006-02-24 04:48:15 +00:00
|
|
|
FArchive& SerializePointer (void *ptrbase, BYTE **ptr, DWORD elemSize);
|
2006-05-10 02:40:43 +00:00
|
|
|
FArchive& SerializeObject (DObject *&object, PClass *type);
|
2006-02-24 04:48:15 +00:00
|
|
|
FArchive& WriteObject (DObject *obj);
|
2006-05-10 02:40:43 +00:00
|
|
|
FArchive& ReadObject (DObject *&obj, PClass *wanttype);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void WriteName (const char *name);
|
|
|
|
const char *ReadName (); // The returned name disappears with the archive, unlike strings
|
|
|
|
|
|
|
|
void WriteSprite (int spritenum);
|
|
|
|
int ReadSprite ();
|
|
|
|
|
|
|
|
inline FArchive& operator<< (SBYTE &c) { return operator<< ((BYTE &)c); }
|
|
|
|
inline FArchive& operator<< (SWORD &s) { return operator<< ((WORD &)s); }
|
|
|
|
inline FArchive& operator<< (SDWORD &i) { return operator<< ((DWORD &)i); }
|
|
|
|
inline FArchive& operator<< (SQWORD &i) { return operator<< ((QWORD &)i); }
|
|
|
|
inline FArchive& operator<< (unsigned char *&str) { return operator<< ((char *&)str); }
|
|
|
|
inline FArchive& operator<< (signed char *&str) { return operator<< ((char *&)str); }
|
|
|
|
inline FArchive& operator<< (bool &b) { return operator<< ((BYTE &)b); }
|
|
|
|
inline FArchive& operator<< (DObject* &object) { return ReadObject (object, RUNTIME_CLASS(DObject)); }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
enum { EObjectHashSize = 137 };
|
|
|
|
|
2010-04-16 02:57:51 +00:00
|
|
|
DWORD MapObject (DObject *obj);
|
2010-04-03 04:07:17 +00:00
|
|
|
DWORD WriteClass (PClass *info);
|
|
|
|
PClass *ReadClass ();
|
|
|
|
PClass *ReadClass (const PClass *wanttype);
|
|
|
|
PClass *ReadStoredClass (const PClass *wanttype);
|
2006-02-24 04:48:15 +00:00
|
|
|
DWORD AddName (const char *name);
|
|
|
|
DWORD AddName (unsigned int start); // Name has already been added to storage
|
|
|
|
DWORD FindName (const char *name) const;
|
|
|
|
DWORD FindName (const char *name, unsigned int bucket) const;
|
|
|
|
|
|
|
|
bool m_Persistent; // meant for persistent storage (disk)?
|
|
|
|
bool m_Loading; // extracting objects?
|
|
|
|
bool m_Storing; // inserting objects?
|
|
|
|
bool m_HubTravel; // travelling inside a hub?
|
|
|
|
FFile *m_File; // unerlying file object
|
|
|
|
|
2010-04-16 02:57:51 +00:00
|
|
|
TMap<PClass *, DWORD> ClassToArchive; // Maps PClass to archive type index
|
|
|
|
TArray<PClass *> ArchiveToClass; // Maps archive type index to PClass
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2010-04-16 02:57:51 +00:00
|
|
|
TMap<DObject *, DWORD> ObjectToArchive; // Maps objects to archive index
|
|
|
|
TArray<DObject *> ArchiveToObject; // Maps archive index to objects
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
struct NameMap
|
|
|
|
{
|
|
|
|
DWORD StringStart; // index into m_NameStorage
|
|
|
|
DWORD HashNext; // next in hash bucket
|
|
|
|
enum { NO_INDEX = 0xffffffff };
|
|
|
|
};
|
|
|
|
TArray<NameMap> m_Names;
|
|
|
|
TArray<char> m_NameStorage;
|
|
|
|
unsigned int m_NameHash[EObjectHashSize];
|
|
|
|
|
|
|
|
int *m_SpriteMap;
|
|
|
|
size_t m_NumSprites;
|
|
|
|
|
|
|
|
FArchive ();
|
|
|
|
void AttachToFile (FFile &file);
|
|
|
|
|
|
|
|
private:
|
2006-12-21 04:34:43 +00:00
|
|
|
FArchive (const FArchive &) {}
|
|
|
|
void operator= (const FArchive &) {}
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Create an FPNGChunkFile and FArchive in one step
|
|
|
|
class FPNGChunkArchive : public FArchive
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
FPNGChunkArchive (FILE *file, DWORD chunkid);
|
|
|
|
FPNGChunkArchive (FILE *file, DWORD chunkid, size_t chunklen);
|
|
|
|
~FPNGChunkArchive ();
|
|
|
|
FPNGChunkFile Chunk;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline FArchive &operator<< (FArchive &arc, PalEntry &p)
|
|
|
|
{
|
|
|
|
return arc << p.a << p.r << p.g << p.b;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<class T>
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, T* &object)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2012-10-18 03:19:27 +00:00
|
|
|
return arc.SerializeObject ((DObject*&)object, RUNTIME_TEMPLATE_CLASS(T));
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
2008-09-15 14:11:05 +00:00
|
|
|
class FFont;
|
|
|
|
FArchive &SerializeFFontPtr (FArchive &arc, FFont* &font);
|
|
|
|
template<> inline FArchive &operator<< <FFont> (FArchive &arc, FFont* &font)
|
|
|
|
{
|
|
|
|
return SerializeFFontPtr (arc, font);
|
|
|
|
}
|
|
|
|
|
2010-08-20 12:20:51 +00:00
|
|
|
struct FStrifeDialogueNode;
|
2010-12-12 15:43:35 +00:00
|
|
|
struct FSwitchDef;
|
|
|
|
struct FDoorAnimation;
|
2010-08-20 12:20:51 +00:00
|
|
|
template<> FArchive &operator<< (FArchive &arc, FStrifeDialogueNode *&node);
|
2010-12-12 15:43:35 +00:00
|
|
|
template<> FArchive &operator<< (FArchive &arc, FSwitchDef* &sw);
|
|
|
|
template<> FArchive &operator<< (FArchive &arc, FDoorAnimation* &da);
|
2010-08-20 12:20:51 +00:00
|
|
|
|
|
|
|
|
2008-09-15 14:11:05 +00:00
|
|
|
|
2008-03-19 02:20:19 +00:00
|
|
|
template<class T,class TT>
|
|
|
|
inline FArchive &operator<< (FArchive &arc, TArray<T,TT> &self)
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
{
|
|
|
|
if (arc.IsStoring())
|
|
|
|
{
|
|
|
|
arc.WriteCount(self.Count);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
DWORD numStored = arc.ReadCount();
|
|
|
|
self.Resize(numStored);
|
|
|
|
}
|
2008-03-19 02:20:19 +00:00
|
|
|
for (unsigned int i = 0; i < self.Count; ++i)
|
- Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
compatible: Custom door sounds can now use different opening and closing
sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
it's implemented the way it is.
<http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
their names rather than on their connection order. Using connection
order was sensible when -net was the only way to start a network game,
but with -host/-join, it's not so nice. Also, if there aren't enough
players in the save, then the extra players will be spawned normally,
so you can continue a saved game with more players than you started it
with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
delayonce, and restart. With these, it is basically possible to obsolete
all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
act like a redundant playrepeat. I have removed all the logic that
caused playloop to play repeating sounds, and now it acts like an
infinite sequence of play/delay commands until the sequence is
stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
the delay commands were timed incorrectly and varied depending on your
framerate. Since this is useful for restarting looping sounds that got
cut off, I have not changed this. Instead, the delay commands now
record the tic when execution should resume, not the number of tics
left to delay.
SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
|
|
|
{
|
|
|
|
arc << self.Array[i];
|
|
|
|
}
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
2011-07-06 14:20:54 +00:00
|
|
|
struct sector_t;
|
|
|
|
struct line_t;
|
|
|
|
struct vertex_t;
|
|
|
|
struct side_t;
|
|
|
|
|
|
|
|
FArchive &operator<< (FArchive &arc, sector_t *&sec);
|
|
|
|
FArchive &operator<< (FArchive &arc, const sector_t *&sec);
|
|
|
|
FArchive &operator<< (FArchive &arc, line_t *&line);
|
|
|
|
FArchive &operator<< (FArchive &arc, vertex_t *&vert);
|
|
|
|
FArchive &operator<< (FArchive &arc, side_t *&side);
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
#endif //__FARCHIVE_H__
|