registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
SVN r1134 (trunk)
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
SVN r1129 (trunk)
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
- added an abstract base class for special map spots that are maintained in
lists and rewrote the boss brain, the mace and DSparil to use it.
- fixed: RandomSpawners didn't destroy themselves after finishing their work.
SVN r1076 (trunk)
- Added a generalized version of Skulltag's A_CheckRailReload function.
- Fixed: DrawImage didn't take 0 as a valid image index.
- Added Gez's RandomSpawner submission with significant changes.
- Added optional blocks for MAPINFO map definitions. ZDoom doesn't use
this feature itself but it allows other ports based on ZDoom
to implement their own sets of options without making such a MAPINFO
unreadable by ZDoom.
SVN r1044 (trunk)
that animated icons can be done with it.
- Changed FImageCollection to use a TArray to hold its data.
- Fixed: SetChanHeadSettings did an assignment instead of comparing
the channel ID witg CHAN_CEILING.
- Changed sound sequence names for animated doors to FNames.
- Automatically fixed: DCeiling didn't properly serialize its texture id.
- Replaced integers as texture ID representation with a specific new type
to track down all potentially incorrect uses and remaining WORDs used
for texture IDs so that more than 32767 or 65535 textures can be defined.
SVN r1036 (trunk)
any zone you want.
- Using a too-recent version of FMOD now gives an error, since there may be
breaking changes to the API from one version to the next (excluding
revisions in stable branches, which only represent bug fixes).
- Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone
unnoticed before: The delayhi and delaylo parameters for Channel::setDelay()
and getDelay() were swapped.
SVN r1032 (trunk)
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.
SVN r1012 (trunk)
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.
SVN r1009 (trunk)
texture definitions. HIRESTEX is still supported but deprecated.
- Removed all 16 bit values from texture manager.
- Changed: The texture manager now sorts all textures for a WAD by type
to avoid priority issues with HIRESTEX defined textures.
- Changed sidedef flag WALLF_ADDTRANS into a linedef flag because it is
always the same for both sides of a linedef. This also makes handling
this in the UDMF parser easier because the linedef parsing function does
not need to access the sidedef data.
- Added new ZDoom specific UDMF linedef and sidedef properties to map parser.
- Added new ZDoom specific UDMF sector properties to map parser.
- Added class definitions for new interpolators that are better
equipped to interact with the interpolated objects.
- Separated interpolation code into its own file r_interpolate.cpp.
- Added some simple customization options to the end game screens.
- Fixed: Polyobject detection in the internal node builder did not work
anymore due to some code rearrangement for UDMF map loading. To keep
it compatible between all map formats the THINGS lump of binary format
maps must be loaded before building the nodes. This also means that
the spawning itself can be done in the same function for all map types
(except Build) now.
- Changed 'Smooth mouse movement' menu option from m_filter to smooth_mouse
which is more what would be expected from this option.
- Fixed: Weapons and ammo items that were modified by Dehacked gave full
ammo when being dropped by monsters. To properly handle this the
handling of spawning Dehacked modified pickups was changed to use
the DECORATE replacement feature instead of hacking the spawn state
of the original item and calling a spawn function from there.
SVN r1001 (trunk)
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.
SVN r995 (trunk)
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.
- 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.
SVN r964 (trunk)
- 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.
- Added support for quoted strings to the TiMidity config parser.
SVN r957 (trunk)
3D panning.
- The listener's velocity is now set at 0 for the sound engine. The player
moves so fast that you can hear the doppler shift just by running around,
otherwise.
- Changed the sound code so that all sounds that start playing on a single
tic actually start playing at the exact same sample position.
SVN r927 (trunk)
rid of timidity/tables.cpp, which conflicts in name with the main Doom
tables.cpp. (And interestingly, VC++ automatically renamed the object file,
so I wasn't aware of the problem with GCC.)
SVN r902 (trunk)
channel when restarting the song, rather than emitting a single note off
event which only has a 1 in 127 chance of being for a note that's playing
on that channel. Then I decided it would probably be a good idea to reset
all the controllers as well.
- Increasing the size of the internal Timidity stream buffer from 1/14 sec
(copied from the OPL player) improved its sound dramatically, so apparently
Timidity has issues with short stream buffers. It's now at 1/2 sec in
length. However, there seems to be something weird going on with
corazonazul_ff6boss.mid near the beginning where it stops and immediately
restarts a guitar on the exact same note.
- Added a new sound debugging cvar: snd_drawoutput, which can show various
oscilloscopes and spectrums.
- Internal TiMidity now plays music.
- Changed the progdir global variable into an FString.
SVN r900 (trunk)
freed and each iterator allocated a new one as a result.
- Split the Xlat parser context class into a generic part that can be
used for other Lemon-based parsers in the future and a smaller
Xlat-specific part.
SVN r892 (trunk)
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.
SVN r872 (trunk)
advanced sound options menu. Removed opl_enable from the menu.
- Added OPL synth as MIDI device -3. Since this is based on the MUS player
code, it only supports those events and controllers supported by MUS.
Some of Duke's MIDIs sound awful, but I think that may be more because
it's using different instruments... There's a thread in the MIDI streamer
class that could be taken out for Linux, since it doesn't need to deal
with the Windows Multimedia API, but for now, this is still Windows-only.
SVN r864 (trunk)
- Added a debuganimated CCMD that can be used to output some information
if a WAD shows broken animations.
- Fixed: The handling for enum values in Xlat was incorrect. The rule with
value assignment must set the counter one higher than the current value.
- Fixed: The definition of enums in the Xlat grammar was right-recursive
which could create stack overflows in the parser. Made it left-recursive as
recommended in Lemon's docs.
SVN r850 (trunk)
xlat_parser.y because both files had the same time stamp after an update,
and Lemon only rewrites the header file if it's changed.
- Added $volume SNDINFO command. This is multiplied with the volume the sound
is played at to arrive at the final volume (before distance attenuation).
- Added the CHAN_AREA flag to disable 3D panning within the min distance of a
sound. Sector sound sequences (except doors) use this flag.
- Added the CHAN_LOOP flag to replace the S_Looped* sound functions.
- Restored the sound limiting.
SVN r849 (trunk)
- Changed savegame versioning so that the written version is never lower
than the minmum one reported as compatible.
- Added mirrored movement modes for linked sectors.
- Added Eternity-style initialization for linked sectors as a new subtype
of Static_Init.
- Added linked sectors. The control sector determines how they move but if
any one of the linked sectors is blocked, movement for all linked sectors
will be affected. This will allow lifts consisting out of more than one
sector without the risk of breaking them if only one of the sectors is
blocked.
- Fixed: A_Mushroom created an actor on the stack.
SVN r825 (trunk)
- deleted src/xlat/xlat_parser.c from the repository. Its content depend on the directory
directory structure it is generated in and it gets recreated each time the project is
compiled (why?) so it'd be changed with each SVN commit. VC++ doesn't seem to mind if
it can't be found so I think it's better this way.
SVN r822 (trunk)
- Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the
proper object type.
- Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo.
- Removed dobject.err from the repository. It only contained a list of compiler
errors for some very old version of dobject.cpp.
- Fixed: A_JumpIfCloser was missing a z-check.
- Added Blzut3's SBARINFO update #13:
- Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp
- Rewrote the mug shot system for SBarInfo to allow for scripting and custom
states for different means of death.
- SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing
status bar definitions will now be cleared before the bar is read.
- Fixed: When using transparency with bars the new drawing method (bg over fg)
didn't work. In the case that the border value is set to 0 it will revert to
the old method (fg over bg).
- Fixed: drawbar lost any high res information it was given.
- Added: ACS command SetMugShotState(str state) which sets the mug shot state
for the activating player.
- Added: keepoffsets flag to drawbar. When set the offsets in the fg image will
also be applied when displaying the bar.
SVN r812 (trunk)
to be able to save the 3dMidtex attachment info.
- Fixed: The TArray serializer needs to be declared as a friend of TArray
in order to be able to access its fields.
- Since there are no backwards compatibility issues due to savegame version
bumping I closed all gaps in the level flag set.
- Bumped min. Savegame version and Netgame version for 3dMidtex related
changes.
- Changed Jump and Crouch DMFlags into 3-way switches:
0: map default, 1: off, 2: on. Since I needed new bits the rest of
the DMFlag bit values had to be changed as a result.
- fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding
actors without MF3_NOBLOCKMONST.
- Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange'
that can enable or disable switch range checking globally per map.
- Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE.
- Added a ML_CHECKSWITCHRANGE flag which allows checking whether the
player can actually reach the switch he wants to use.
- Made DActiveButton::EWhere global so that I can use it outside thr
DActiveButton class.
March 17, 2008 (Changes by Graf Zahl)
- Changed P_LineOpening to pass its result in a struct instead of global
variables.
- Added Eternity's 3DMIDTEX feature (no Eternity code used though.)
It should be feature complete with the exception of the ML_BLOCKMONSTERS
flag handling. That particular part of Eternity's implementation is
sub-optimal because it hijacks an existing flag and doesn't seem to make
much sense to me. Maybe I'll implement it as a separate flag later.
SVN r810 (trunk)
spc_amp from a x.4 fixed point number to a normal float.
- Switched SPC playback from the external SNESAPU.DLL to Blargg's LGPL
snes_spc library. I've compiled it with the fast DSP rather than the
highly accurate one, since I didn't notice a meaningful difference between
the two in my limited testing. In short: SPC playback is now built in to
ZDoom. You don't need to download anything extra to make it work, and it
also works on Linux as well as Windows (though building with Linux is
currently untested).
- Fixed: Stereo separation was calculated very wrongly when in 2D sound mode.
SVN r794 (trunk)
for FMOD Ex while at the same time removing support for FMOD 3. Be sure to update
your SDKs. GCC users, be sure to do a "make cleandep && make clean" before
building, or you will likely get inexplicable errors.
- Fixed: If you wanted to make cleandep with MinGW, you had to specifically
specify Makefile.mingw as the makefile to use.
- Added a normalizer to the OPL synth. It helped bring up the volume a little,
but not nearly as much as I would have liked.
- Removed MIDI Mapper references. It doesn't work with the stream API, and
it doesn't really exist on NT kernels, either.
- Reworked music volume: Except for MIDI, all music volume is controlled
through GSnd and not at the individual song level.
- Removed the mididevice global variable.
- Removed snd_midivolume. Now that all music uses a linear volume scale,
there's no need for two separate music volume controls.
- Increased snd_samplerate default up to 48000.
- Added snd_format, defaulting to "PCM-16".
- Added snd_speakermode, defaulting to "Auto".
- Replaced snd_fpu with snd_resampler, defaulting to "Linear".
- Bumped the snd_channels default up from a pitiful 12 to 32.
- Changed snd_3d default to true. The new cvar snd_hw3d determines if
hardware 3D support is used and default to false.
- Removed the libFLAC source, since FMOD Ex has native FLAC support.
- Removed the altsound code, since it was terribly gimped in comparison to
the FMOD code. It's original purpose was to have been as a springboard for
writing a non-FMOD sound system for Unix-y systems, but that never
happened.
- Finished preliminary FMOD Ex support.
SVN r789 (trunk)
it seems to have a working volume control.
- Renamed music_midi_stream.cpp to music_midi_base.cpp.
- Moved the WinMM MIDI code into a new container class.
SVN r787 (trunk)
class so they all the low-level details of MIDI streaming are kept in
one place.
- Converted the SMF MIDI playback to use the same MIDI streams as MUS
playback.
- Moved MUS playback back into its own thread so that it can continue
uninterrupted if the main thread is too busy to service it in a timely
manner.
- Fixed: The MEVT_* values are not defined shifted into their spot for a
MIDIEVENT, so I need to do it myself.
- Fixed: Pausing a MUS and the changing snd_midivolume caused the paused
notes to become audible.
SVN r784 (trunk)
- Got rid of R_InitPatches because the new texture init code needs to preload
everything to work correctly.
- Rewrote texture manager initialization to order textures primarily by WAD
rather than by type. This way later textures will always override earlier
ones. The only exception is that TEX_MiscPatch are only used as a fallback
if nothing else can be found.
- Optimized the tryany case of FTextureManager::CheckForTexture. It is not
necessary to scan the hash chain twice. The required information can be
retrieved during the first pass as easily and even offers a little more
control.
- Made FFont destructor virtual.
- Added 'Ice' translation to DECORATE.
(Caution: Not fully tested yet!)
SVN r715 (trunk)
error handling.
- Fixed: dehsupp/scanner.re defined "}" as the token RPAREN. dehsupp/parse.y
also defined action_list_def as needing a RBARCE. I'm surprised it worked
at all before. I guess Lemon really was too accepting.
- Changed the way that xlatcc handles include statements so that I don't need
to modify the logic of lempar.c. I also discovered that the grammar was
improperly defined and only accepted the first statement. It worked before
because Lemon used to accept multiple times before reaching the EOF token.
I have also verified that it is still generating the proper lumps.
- Removed some unused wadsrc files from the repository.
- Fixed my re2c upgrade.
- Updated lemon.c to v1.53.
SVN r711 (trunk)
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)