Commit graph

112 commits

Author SHA1 Message Date
Christoph Oelckers
c1b44a5694 - let's make some use of AActor::Pos and get rid of some of those X() and Y() calls...
- restore proper actor.h file.
2016-01-18 21:01:52 +01:00
Christoph Oelckers
3e446ea04d - replaced access to AActor's coordinate members with access functions
(first 200 compile errors down...)
2016-01-17 13:48:16 +01:00
Edoardo Prezioso
6678c3550e - Improve the TFlags code and fix the new errors.
The previous version didn't detect some real mistakes in code which used operator& with the wrong flagset (for now 'converted' to the correcly equivalent counterpart, waiting for the proper fix).
2015-10-13 00:30:06 +02:00
Edoardo Prezioso
cda4fece1b - Fixed compiler errors and warnings from TFlags. 2015-04-30 12:35:29 +02:00
Teemu Piippo
ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Christoph Oelckers
6423b2fece - fixed: Dehacked text patching needs to alter all occurences of the source string. 2015-02-09 10:15:11 +01:00
Christoph Oelckers
ec58178695 - replace all \0 characters in Dehacked patches with spaces.
This is needed to make some old and broken patches in some WolfenDoom mods load.
2015-02-07 15:27:31 +01:00
Christoph Oelckers
95bed868d3 - gcc warnings suck... 2014-12-07 14:46:53 +01:00
Christoph Oelckers
8a98be00dc - fixed: ZDoom did not understand Boom's name for the Red Skull Key pickup message due to a typo.
Of course, just changing the name would break many old ZDoom mods so now Boom's name is explicitly being translated into ZDoom's before setting the string.
2014-12-07 09:30:16 +01:00
Christoph Oelckers
de68361f27 - fixed: When a sprite is being renamed by Dehacked it also needs to be changed in the list of original sprite names, otherwise any subsequent attempt to use the altered sprite in a frame definition will fail. 2014-09-13 11:54:19 +02:00
Edoardo Prezioso
0dc70f847c - Be more compatible with C++11 narrowing conversions system. 2013-07-31 12:27:54 +02:00
Edoardo Prezioso
8cab8f180b - Be clear about the safe 'memset/memcpy' operations on virtual classes.
Since I remember that 'memset/memcpy' is safe in this code, it should be okay to cast to the generic pointer all the 'virtual class' arguments before calling the above functions. Shuts up Clang warnings.
2013-07-31 12:23:31 +02:00
Christoph Oelckers
81334809c4 - changed autoloading of *.deh lumps: it is now controlled by a CVAR with 3 options: never load *.deh lumps, load all of them or only load the last one. *.deh loading is disabled by default. 2013-07-30 09:32:33 +02:00
Christoph Oelckers
27de9f45af - commented out autoloading of .DEH lumps for maint branch. 2013-07-30 09:25:07 +02:00
Christoph Oelckers
aa5f223051 - added _mental_'s patch for loading .deh/.bex files if no Dehacked lump can be found. 2013-06-23 18:34:57 +02:00
Randy Heit
1c71c1dce1 - Added support for random state durations. Instead of defining a frame like this:
POSS A 10 A_Look
  You can define it as:
    POSS A random(10,20) A_Look
  and the state will last a random duration between 10 and 20 tics, inclusive.

SVN r3847 (trunk)
2012-08-23 01:00:30 +00:00
Randy Heit
dc641766d3 - Fixed: Editing the player (thing #1) with DeHacked would remove its MF2_PUSHWALL flag.
SVN r3740 (trunk)
2012-07-06 03:04:06 +00:00
Christoph Oelckers
b044c134d3 - fixed ammo usage issues with Dehacked modified weapons that switch attack code pointers. Unless Dehacked specifies an 'ammo use' value for a weapon any Dehacked modified weapon determines ammo use by attack function, like Doom did originally, and not by the weapon's AmmoUse property. This also addresses that the Cells/BFG shot value always modified the BFG itself.
- fixed: A_Saw depleted ammo after the attack so it still went through with it, even though it was out of ammo.


SVN r3522 (trunk)
2012-04-07 11:33:35 +00:00
Randy Heit
77a4b9a29b - Give actors modified via Dehacked than CANUSEWALLS flag, whether they look like monsters
at first glance or not.

SVN r3386 (trunk)
2012-02-23 03:24:13 +00:00
Christoph Oelckers
893455ef61 - sync source with latest GZDoom:
Includes:
- Made the move tried from checking missile spawns ignore drop off height. This solves the Voodoo Gun ghostly civilian issue.
- Fixed: the NOTELEPORT flag is removed from Dehacked missiles which lose the MISSILE flag. This caused problems with certain special effects based on dehacked spawn cubes.
- Fixed: all Boom silent teleporters preserve relative height.
- support for palette independent particle colors if the renderer can handle them.


SVN r3329 (trunk)
2011-12-06 08:36:28 +00:00
Randy Heit
04387a6924 - Initialize all parameters when converting MBF_PlaySound to A_PlaySound,
because volume was being passed as 0 to A_PlaySound.



SVN r3317 (trunk)
2011-11-24 03:59:02 +00:00
Christoph Oelckers
163301dcd5 - took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it.
SVN r3259 (trunk)
2011-07-06 14:20:54 +00:00
Christoph Oelckers
03177090c0 - removed some unnecessary r_ header #includes.
SVN r3257 (trunk)
2011-07-06 10:55:04 +00:00
Christoph Oelckers
fbff5ca932 - moved r_interpolate.cpp and r_translate.cpp to r_data.
- merged r_jpeg.h into jpegtexture.cpp because that's the only place where it's ever used.


SVN r3255 (trunk)
2011-07-06 08:50:15 +00:00
Randy Heit
d3b44a4172 - Fix errors/warnings from MinGW 4.5.0 (tdm-1).
- Disable the missing field initializers warnings that -Wextra produces from GCC.

SVN r3173 (trunk)
2011-03-29 05:20:33 +00:00
Christoph Oelckers
1993e969b7 - GCC warning fixes (GCC stupidity for the most part.)
SVN r3154 (trunk)
2011-02-19 08:59:43 +00:00
Christoph Oelckers
770a879f6a - fixed: The TouchedActors array in the Dehacked parser was not freed after parsing was done.
- Initialize the alt HUD explicitly in D_DoomMain.
- don't let S_UnloadReverbDef leave a broken list of sound environments behind.
- Added more code to explicitly delete data before initializing it.

SVN r3039 (trunk)
2010-12-15 00:09:31 +00:00
Christoph Oelckers
df138fe4f9 - added a ClearCounters function to AActor that handles everything necessary to un-count an item that is not supposed to be counted but has some of the COUNT* flags set.
- merged all places where secrets are credited into one common function.
- added the Doom64 COUNTSECRET actor flag.
- fixed: AInventory::CreateCopy did not clear the COUNTITEM flag.
- fixed: Dropping an item did not increase the item count but the dropped item could still have the COUNTITEM flag. Now this flag gets cleared when the item gets picked up so that dropped items don't count a second time.

SVN r2826 (trunk)
2010-09-19 00:06:45 +00:00
Christoph Oelckers
35ba99ed31 - Added Gez's automap enhancements but made the new key icon optional.
SVN r2462 (trunk)
2010-07-25 21:46:51 +00:00
Christoph Oelckers
545a892faa - added Firebrand's patch to rename 'swap' due to naming conflicts in newer MSVC compilers.
SVN r2449 (trunk)
2010-07-23 21:19:59 +00:00
Randy Heit
178587fff2 - Merged SetState and SetStateNF into a single function.
- Added new sprite #### and frame character # to specify the behavior of sprite ---- on a
  per-sprite and per-frame basis respectively.

SVN r2291 (trunk)
2010-04-19 02:46:50 +00:00
Christoph Oelckers
593a050778 - fixed: Items spawned internally by ADehackedPickup::TryPickup must not count towards item statistics.
SVN r2204 (trunk)
2010-03-07 11:13:57 +00:00
Randy Heit
d19878efcb - Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because
of this:
  * A cluster's flat definition can now be preceded by a $ to do a string table lookup.
  * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution
    for these is no longer handled specially and so will not be automatically disabled merely
    by providing your own MAPINFO.

SVN r2195 (trunk)
2010-03-06 03:28:22 +00:00
Randy Heit
735294884e - Fixed: savepatchsize was declared incorrectly in d_dehacked.cpp:DoInclude().
SVN r2040 (trunk)
2009-12-25 00:34:34 +00:00
Christoph Oelckers
cc3b7967a1 - Fixed: The Dehacked parser could read past the end of the file if the last
element was improperly defined.


SVN r2035 (trunk)
2009-12-20 19:14:10 +00:00
Randy Heit
30b21b2eea - Removed the one embedded DeHackEd lump restriction.
SVN r1972 (trunk)
2009-11-12 02:47:28 +00:00
Christoph Oelckers
9cc67f565c - Added a check to Dehacked code which tries to set the blend color.
It must set it to 0 if the alpha is 0 to avoid problems with special
  colormap detection.
- Changed SPECIALCOLORMAP_MASK again so that it does not interfere with
  any valid setting. It must use a value with a 0-alpha because these
  are guaranteed not to be produced by the DECORATE code elsewhere.
- Fixed precision issues with AddFixedColormap's search for identical colormaps.
- Added custom colormap support to texture composition code.
- Fixed initialization of FSpecialColormap::GrayscaleToColor. This is not
  a mapping from the palette but from a [0,255] grayscale ramp and used to
  apply colormaps to true color images for texture composition.

SVN r1867 (trunk)
2009-09-22 08:06:52 +00:00
Randy Heit
7b23effc02 - Now that I think about it, why is MBFParamStates an array of pointers, anyway?
SVN r1840 (trunk)
2009-09-15 23:31:28 +00:00
Randy Heit
f1dc490151 - Fixed: The MBFParamStates array leaked memory.
SVN r1839 (trunk)
2009-09-15 22:44:07 +00:00
Christoph Oelckers
e5357d1b65 - added Gez's latest bugfix patch.
SVN r1836 (trunk)
2009-09-15 17:19:30 +00:00
Christoph Oelckers
3a6d66e230 - fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by
yesterday's additions. Changed it so that the parser first checks for 
  the presence of a '-' sign before deciding whether to use strtol or
  strtoul to convert the string into a number.


SVN r1831 (trunk)
2009-09-15 05:59:55 +00:00
Christoph Oelckers
4a057c1fdc - Added Gez's cleanup patch for MBF support but undid the deletion of the MF6_JUMPDOWN flag which will be implemented later.
SVN r1827 (trunk)
2009-09-14 23:50:21 +00:00
Christoph Oelckers
afab7855c4 - removed the COMPATF_MBFDEHACKED flag because it wouldn't work and is more or less useless anyway.
The range checks this protected against can be safely omitted now that the misc fields are large enough.
- added MBF Dehacked emulation.

SVN r1824 (trunk)
2009-09-14 22:12:31 +00:00
Randy Heit
c1a578ba08 - Split the bounce types completely into separate flags and consolidated
the various bounce-related flags spread across the different Actor flags
  field into a single BounceFlags field.
- Fixed: P_BounceWall() should calculate the XY velocity using a real
  square root and not P_AproxDistance(), because the latter can cause
  them to speed up or slow down.


SVN r1796 (trunk)
2009-09-06 01:49:17 +00:00
Christoph Oelckers
ba28749df7 - fixed: WIF_STAFF2_KICKBACK did not work anymore because it depended on conditions
that were changed some time ago.
- fixed: The damage inflictor for a rail attack was the shooter, not the puff.
- Fixed: Floor and ceiling huggers may not change their z-velocity when seeking.
- Fixed: UDMF set the secret sector flag before parsing the sector's properties,
  resulting in it always being false.
- Renamed sector's oldspecial variable to secretsector to better reflect its
  only use.
- Fixed: A_BrainSpit stored as the SpawnShot's target the intended BossTarget, 
  not itself contrarily to other projectile spawning functions. 
  A_SpawnFly then used the target for CopyFriendliness, thinking it'll be the 
  BossEye when in fact it wasn't.
- Added Gez's submission for a DEHACKED hack introduced by Boom.
  (using code pointers of the form 'Pointer 0 (x statenumber)'.
- fixed: Attaching 3DMidtex lines by sector tag did not work because lines
  were marked by index in the sector's line list but needed to be marked by
  line index in the global array.
- fixed: On Linux ZDoom was creating a directory called "~.zdoom" for 
  save files because of a missing slash.
- fixed: UDMF was unable to read floating point values in exponential format
  because the C Mode scanner was missing a definition for them.
- fixed: The recent changes for removing pointer aliasing got the end sequence
  info from an incorrect variable. To make this more robust the sequence index
  is now stored as a hexadecimal string to avoid storing binary data in a string.
  Also moved end sequence lookup from f_finale.cpp to the calling code so that
  the proper end sequences can be retrieved for secret exits, too.

SVN r1777 (trunk)
2009-08-30 10:43:51 +00:00
Christoph Oelckers
54c4e26f7d - Changed: DEHACKED parsing is disabled now when a user supplied DEHSUPP lump
is found. This mimics the old behavior which also disabled DEHACKED when
  the DEHSUPP lump was incompatible with the current engine. This behavior is
  needed to ensure that WADs that contain a ZDaemon-exclusive DEHSUPP lump
  continue to work as intended.

SVN r1748 (trunk)
2009-08-02 18:23:05 +00:00
Christoph Oelckers
641f946e32 - Fixed: The big endian version of PalEntry did not add the DWORD d field.
- Fixed: TObjPtr did not use a union to map its 2 pointers together.
- Added a compatibility mode for A_Mushroom. For DECORATE it is an additional
  parameter but to force it for Dehacked mods some minor hacks using the
  Misc1 variable were needed.


SVN r1746 (trunk)
2009-08-02 10:48:58 +00:00
Christoph Oelckers
1c8d442c32 - fixed some GCC warnings.
SVN r1738 (trunk)
2009-07-25 15:00:45 +00:00
Christoph Oelckers
627838f379 - Added loading directories into the lump directory.
- fixed: The Dehacked parser could not parse flag values with the highest bit
  set because it used atoi to convert the string into a number.

SVN r1624 (trunk)
2009-05-31 10:49:47 +00:00
Christoph Oelckers
e61b4b3c76 - Fixed: A_CountdownArg and A_Die must ensure a certain kill.
- Changed bounce flags into a property and added real bouncing sound properties.
  Compatibility modes to preserve use of the SeeSound are present and the old
  flags map to these.


SVN r1599 (trunk)
2009-05-23 08:30:36 +00:00