- The type systems used by PField and FxExpression are completely
incompatible, but I think I got the differences taken care of as far
as ParseNativeVariable(), ParseUserVariable(), and FxClassMember are
concerned.
- Support for declaring native bool variables has been removed for the time
being. It wasn't used anyway.
- Removed PSymbolVariable.
- Fixed: Don't access class metadata at all in DObject::PropagateMark if the type system is shutdown.
- Fixed: If FCompressedMemFile::Reopen() fails, then it would try to double-free memory when deleted.
SVN r3688 (trunk)
* savegames stored an index in the switch table and performed no validation when loading a savegame.
* setting of a random switch animation duration was broken.
* separated the 2 values stored in the Time variable into 2 separate variables.
* defining a switch with one texture already belonging to another switch could leave broken definitions in the switch table.
- added function for serializing switch and door animation pointers.
- bumped min. savegame versions due to changes to DButtonThinker and removed all current savegame compatibility code.
SVN r3030 (trunk)
instead of PClass::m_Types (now PClass::AllClasses).
- Removed ClassIndex from PClass. It was only needed by FArchive, and maps take care of the
problem just as well.
- Moved PClass into a larger type system (which is likely to change some/lots once I try and actually use it and have a better feel for what I need from it).
SVN r2281 (scripting)
A_SetUserVar/SetUserVariable/GetUserVariable now take a variable name
instead of an array index. A_SetUserArray/SetUserArray/GetUserArray
have been added to access elements in user-defined arrays.
SVN r1933 (trunk)
- Derive PClass from dobject.cpp. This has one major ramification: Since the PClass
is not allocated until runtime, you cannot initialize any static/global data
structures with pointers to PClasses using RUNTIME_CLASS. Attempting to do so
will just initialize with a NULL pointer. Instead, you can initialize using
the address of the pointer returned by RUNTIME_CLASS and dereference that. By
the time you have an opportunity to dereference it, it will no longer be NULL.
- Sync CmakeLists.txt.
- Random fixes for problems GCC spotted.
SVN r1852 (scripting)
that the drivers will treat a BackBufferCount of 0 as a request for
double buffering.
- Fixed: Unsetting a cvar did not remove it from the list of tab
completions.
- Added "" as a synonym for "nullimage" in SBARINFO.
- Fixed: MAKESAVESIG's stringifier in version.h did not work as expected.
It stringified the passed macro name, not the value of the macro.
- Moved DCajunMaster off the DObject hierarchy.
- Changed DCajunMaster::getspawned into a TArray of FStrings. It was
mysteriously being left pointing to uninitialized memory during the
final GC at exit and crashing.
- Fixed: The code that removed hexdd.wad from the list of IWADs when
hexen.wad was not present did not work.
SVN r861 (trunk)
- Removed movie volume from the sound menu and renamed some of the other
options to give the MIDI device name more room to display itself.
- Moved the midi device selection into the main sound menu.
- Added FMOD as MIDI device -1, to replace the MIDI mapper. This is still the
default device. By default, it uses exactly the same DLS instruments as the
Microsoft GS Wavetable Synth. If you have another set DLS level 1 patch set
you want to use, set the snd_midipatchfile cvar to specify where it should
load the instruments from.
- Changed the ProduceMIDI function to store its output into a TArray<BYTE>.
An overloaded version wraps around it to continue to supply file-writing
support for external Timidity++ usage.
- Added an FMOD credits banner to comply with their non-commercial license.
- Reimplemented the snd_buffersize cvar for the FMOD Ex sound system. Rather
than a time in ms, this is now the length in samples of the DSP buffer.
Also added the snd_buffercount cvar to offer complete control over the
call to FMOD::System::setDSPBufferSize(). Note that with any snd_samplerate
below about 44kHz, you will need to set snd_buffersize to avoid long
latencies.
- Reimplemented the snd_output cvar for the FMOD Ex sound system.
- Changed snd_samplerate default to 0. This now means to use the default
sample rate.
- Made snd_output, snd_output_format, snd_speakermode, snd_resampler, and
snd_hrtf available through the menu.
- Split the HRTF effect selection into its own cvar: snd_hrtf.
- Removed 96000 Hz option from the menu. It's still available through the
cvar, if desired.
- Fixed: If Windows sound init failed, retry with DirectSound. (Apparently,
WASAPI doesn't work with more than two speakers and PCM-Float output at the
same time.)
- Fixed: Area sounds only played from the front speakers once you got within
the 2D panning area.
SVN r854 (trunk)
copies of the players stored in the archive would be destroyed and break
apart the STAT_INVENTORY thinker list. Now they aren't destroyed while
loading the archive but are unlinked from the inventory list instead, so
the garbage collector will get them later.
- Changed pointer substitution to return the number of pointers changed.
SVN r803 (trunk)
way wasn't playing well with the write barriers.
- Fixed: DFrameBuffer::WriteSavePic needs to fix the canvas in place while
using it.
- Fixed: The sound system was updated every frame, which is a complete waste
of time. Doing it only once each tic is quite sufficient, since nothing
really moves between tics, even if the display makes it look otherwise.
SVN r799 (trunk)
- Fixed: Right after teleporting P_SlideMove could cause player movement.
Added a check for reactiontime to prevent that.
- Fixed: PainChances and Damagefactors were never freed.
- Added option to A_Chase that prevents the monster from moving.
- Fixed: The stained glass shards were missing the HEXENBOUNCE flag.
- Added some NULL pointer checks to AActor::GiveAmmo.
- Fixed: The FSwordMissile was missing the special damage handling that
reduces damage when hitting a player.
SVN r555 (trunk)
- The stat meters now return an FString instead of sprintfing into a fixed
output buffer.
- NOASM is now automatically defined when compiling for a non-x86 target.
- Some changes have been made to the integral types in doomtype.h:
- For consistancy with the other integral types, byte is no longer a
synonym for BYTE.
- Most uses of BOOL have been change to the standard C++ bool type. Those
that weren't were changed to INTBOOL to indicate they may contain values
other than 0 or 1 but are still used as a boolean.
- Compiler-provided types with explicit bit sizes are now used. In
particular, DWORD is no longer a long so it will work with both 64-bit
Windows and Linux.
- Since some files need to include Windows headers, uint32 is a synonym
for the non-Windows version of DWORD.
- Removed d_textur.h. The pic_t struct it defined was used nowhere, and that
was all it contained.
SVN r326 (trunk)
- Changed type PClass::FreeIndices to TArray<unsigned int> because that's
the type of the indices.
- Fixed: makewad.c needs __cdecl for non-Windows builds.
- Fixed: FinishThingdef didn't check whether the WeaponClass pointer in
AWeaponPiece was a valid name.
SVN r133 (trunk)
memcpy to copy the player structures.
- Fixed compilation with MinGW again and removed most of the new warnings.
And following is the log that I forgot to paste in for the previous commit:
- Changed the memory management for FString. Instead of using a garbage
collected heap, it now uses normal heap calls and reference counting to
implement lazy copying. You may now use bitwise operators to move
(but not copy!) FStrings around in memory. This means that the
CopyForTArray template function is gone, since TArrays can now freely
move their contents around without bothering with their specifics.
There is one important caveat, however. It is not acceptable to blindly 0
an FString's contents. This necessitated the creation of a proper
constructor for player_s so that it can be reset without using memset. I
did a quick scan of all memsets in the source and didn't see anything else
with a similar problem, but it's possible I missed something.
- Fixed: Build tiles were never deallocated.
- Fixed: Using Build's palette.dat only got half the palette right.
SVN r117 (trunk)
functions added to the exit chain with atterm so that they can be called
in a deterministic order and not whatever order the linker decides to put
them in.
- Fixed: DCajunMaster did not free its getspawned.
- Fixed: P_FreeLevelData() did not free ACS scripts.
- Fixed: Level snapshots were not freed at exit.
- Fixed: The save/load menu list was not freed at exit.
- Fixed: FCompressedMemFile needs a destructor to free the m_ImplodedBuffer.
- Fixed: G_DoLoadGame() did not free the engine string.
- Fixed: M_ReadSaveStrings() did not free the engine string.
- Fixed: Processing DEM_SAVEGAME did not free the pathname string.
- Added a check for truncated flats to FFlatTexture::MakeTexture() because
Heretic's F_SKY1 is only four bytes long.
- Added a dump of the offending state to the "Cannot find state..." diagnostic.
- Fixed: FCompressedFile did not initialize m_Mode in its default constructor.
- Fixed: Heretic and Hexen status bars did not initialize ArtiRefresh.
- Fixed: PNGHandle destructor should use delete[] to free TextChunks.
SVN r111 (trunk)
- Fixed: FDoomEdMap needed a destructor.
- Fixed: Decal animators were never freed.
- Fixed: Colormaps were never freed.
- Fixed: Memory allocated in R_InitTranslationTables() was never freed.
- Fixed: R_InitParticles() allocated way more memory than it needed to. (And the
particle memory was never freed, either.)
- Fixed: FMetaTable::FreeMeta() should use delete[] to free string metadata.
- Fixed: FConfigFile::ClearCurrentSection() must cast the entry to a char *
before deleting it, because that's the way it was allocated.
- Fixed definitions of DeadZombieMan and DeadShotgunGuy in doom/deadthings.txt.
Skip_super resets the dropitem list, so having it after "DropItem None" is
pointless.
- Fixed: Decorate DropItem information was never freed.
- Fixed: FinishStates() allocated even 0-entry state arrays.
- Fixed: Default actor instances were never freed.
- Fixed: FRandomSoundList never freed its sound list.
- Fixed: Level and cluster strings read from MAPINFO were never freed.
- Fixed: Episode names were never freed.
- Fixed: InverseColormap and GoldColormap were never freed. Since they're always
allocated, they can just be arrays rather than pointers.
- Fixed: FFont destructor never freed any of the character data or the font's name.
- Fixed: Fonts were not freed at exit.
- Fixed: FStringTable::LoadLanguage() did not call SC_Close().
- Fixed: When using the -iwad parameter, IdentifyVersion() did not release the
buffer it created to hold the parameter's path.
SVN r88 (trunk)
- Fixed: Although TypeInfos are now deleted at exit, their FlatPointers or ActorInfo
data was not freed. I chose not to use a destructor to handle this, because then it
would no longer be a POD type that can be statically initialized.
- Fixed: Aliases were not deleted at exit.
- Fixed: FWadCollection did not free its hash tables, lump info, full names, or the
list of open files when destroyed.
SVN r85 (trunk)
- The CRT no longer detects any memory leaks when I run to the IWAD picker and quit.
- Fixed: The memory used to hold the path to zdoom.wad/.pk3 was not freed if
the IWAD picker was cancelled.
- Fixed: Some implementations of cvar->GetGenericRep (CVAR_String) returned a
statically allocated string and others returned a dynamically allocated string.
To be consistant, they should all be static.
- Fixed: DObject also has three static TArrays that should not be explicitly
initialized: Objects, FreeIndices, and ToDestroy.
- Added a new do-nothing constructor for TArray that can be used for BSS objects
that are manipulated before startup. Specifically, this was added because
C_AddTabCommand() is called before main, but the TabCommands constructor is
called after the array already has over 100 entries in it, orphaning everything
that was already inserted. And since the code is much nicer-looking now, I didn't
want to revert to the old non-TArray version.
This could also have been used to fix FName, but I consider the current
implementation to be better than the old one, so I'm leaving it as-is.
- Fixed: Scanned IWAD paths were not freed if you exited without selecting one.
- Fixed: Dynamically allocated cvars were not freed on exit.
- Fixed: FConfigFile's destructor did not free space used for Values.
SVN r82 (trunk)
without any explicit constructors being called.
- Fixed: ZTwinedTorchUnlit, ZWallTorchUnlit, ZFireBullUnlit, and ZCauldronUnlit
were missing game filters.
SVN r79 (trunk)
- Fixed some functions that were declared as taking size_t's but defined as taking
unsigned ints.
- Added a dummy object to delete sound environments on exit.
- Fixed: FWarpTexture did not delete its Spans when destroyed.
- Changed wadclusterinfos and wadlevelinfos arrays into TArrays.
- Added the TypeInfo::AutoTypeInfoPtr for TypeInfo::m_RuntimeActors so they can
be automatically deleted.
- Changed TypeInfo::m_Types into a TArray so it will be automatically deleted
on exit.
- Fixed: TArray::Resize() did not deconstruct entries when shrinking the array.
- Changed TArray::Push() so that it calls Grow() instead of duplicating the growth
calculations itself.
- Calling TArray::Grow() for a small amount when the array is short should grow it
a bit more than it was doing.
SVN r76 (trunk)
actually work.
- Turned the list of TabCommands into a TArray because I saw lots of console
commands in the memory leak report at exit. Then I realized those were actually
key bindings, so I changed the Bindings and DoubleBindings arrays into FString
arrays.
- Fixed: FStringCVar was missing a destructor.
- Added TArray::Insert().
- Fixed: TArray::Delete() used memmove().
- Renamed Malloc(), Realloc(), and Calloc() to M_Malloc(), M_Realloc(), and
M_Calloc() so that the debug versions can be defined as macros.
- Enabled the CRT's memory leak detection in WinMain().
- Moved contents of PO_DeInit() into P_FreeLevelData().
- Removed "PolyBlockMap = NULL;" from P_SetupLevel(), because the P_FreeLevelData()
call it makes next does the exact same thing, but also freeing it if needed.
- Fixed: Unneeded memcpy in UnpackUserCmd() when ucmd and basis are the same
SVN r75 (trunk)
- 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)
ParseActorProperties().
- Fixed: The decorate FindFlag() function returned flags from ActorFlags
instead of the passed flags set.
- Fixed: The CHT_CHAINSAW, CHT_POWER, CHT_HEALTH, and CHT_RESSURECT needed
NULL player->mo checks.
- Fixed: The "give all" command didn't give the backpack in Doom, and it
must give the backpack before giving ammo.
- Fixed: P_SetPsprite() must not call the action function if the player is
not attached to an actor. This can happen, for instance, if the level is
destroyed while the player is holding a powered-up Phoenix Rod. As part
of its EndPowerup() function, it sets the psprite to the regular version,
but the player actor has already been destroyed.
- Fixed: FinishThingdef() needs to check for valid names, because weapons
could have inherited valid pointers from their superclass.
- Fixed: fuglyname didn't work.
- Fixed: Redefining $ambient sounds leaked memory.
- Added Jim's crashcatcher.c fix for better shell support.
- VC7.1 seems to have no trouble distinguishing between passing a (const
TypeInfo *) reference to operator<< and the generic, templated (object *)
version, so a few places that can benefit from it now use it. I believe
VC6 had problems with this, which is why I didn't do it all along. The
function's implementation was also moved out of dobject.cpp and into
farchive.cpp.
- Fixed: UnpackPixels() unpacked all chunks in a byte, which is wrong for the
last byte in a row if the image width is not an even multiple of the number
pixels per byte.
- Fixed: P_TranslateLineDef() should only clear monster activation for secret
useable lines, not crossable lines.
- Fixed: Some leftover P_IsHostile() calls still needed to be rewritten.
- Fixed: AWeaponHolder::Serialize() wrote the class type in all circumstances.
SVN r20 (trunk)