Commit Graph

35 Commits

Author SHA1 Message Date
Gaerzi 580094a792 More editing flags
PSX-inspired flags to change the render styles of monsters (and other
things).
2014-04-10 12:32:23 +02:00
Randy Heit f500947814 - Apply fix from previous commit to Doom-format maps. (Previous commit only did it for Hexen.)
SVN r3440 (trunk)
2012-03-15 22:59:39 +00:00
Randy Heit ef88515dda - Remove all restrictions on what you can do with tags as line special arguments in xlat.
Something like 「(tag & 5) + (tag & 2) / 2」 is now a valid argument for a standard line
  translation.

SVN r3345 (trunk)
2012-01-23 04:18:37 +00:00
Randy Heit 4b2ae689ed - Added modulus to FParseContext/xlat.
- Fixed: Division of tag arguments for xlat was in the wrong order.

SVN r3344 (trunk)
2012-01-23 02:47:51 +00:00
Randy Heit b21062c39a - Added more tag operators for xlat: * / & | ^
SVN r3343 (trunk)
2012-01-23 00:24:42 +00:00
Randy Heit f28393263b - Improve tag support for xlat: Any combination of arguments can now be tags, and you can
add (or subtract) a constant to them. If you do wish to add a constant, tag must come first.
  e.g. tag+3 is good, but 3+tag will not work. (As a bonus, the parser is simpler, too.)

SVN r3342 (trunk)
2012-01-22 22:55:20 +00:00
Christoph Oelckers 17ed7aaabd - moved the code from r_data.cpp to some better fitting places and deleted this file and r_data.h because the remaining parts of it were just a random collection of unrelated functions.
SVN r3248 (trunk)
2011-07-05 10:02:38 +00:00
Christoph Oelckers f3b19fcca2 - fixed an uninitialized variable in p_xlat.cpp .
SVN r2004 (trunk)
2009-11-27 21:45:17 +00:00
Christoph Oelckers 9357ed82ed - extended Doom map format linedef translator so that it also handles the flags.
SVN r1992 (trunk)
2009-11-21 23:11:12 +00:00
Randy Heit e9121b607d - Fixed: When using BOOM-style sector flags and specials together, the
special was ignored unless it was "secret".


SVN r1462 (trunk)
2009-03-04 23:07:18 +00:00
Christoph Oelckers dbcc246cf3 - Added Blzut3's patch for a real Chex Quest game mode.
SVN r1188 (trunk)
2008-08-30 19:44:19 +00:00
Christoph Oelckers ef2c9243c5 - Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.


SVN r1132 (trunk)
2008-08-08 19:47:18 +00:00
Christoph Oelckers 0869b51928 - Fixed: Parsing sector special bit masks must be done backwards so that later
definitions take precedence.
- Added base translation tables for UDMF compatibility maps which only should
  handle the native line and sector types of each game.
- Turned the inactive SILENT_INSTANT_FLOORS define into a compatibility option
  so that it can be (un)set in a map definition and the menu. 

SVN r966 (trunk)
2008-05-12 17:14:38 +00:00
Christoph Oelckers 6c21616c85 - 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.
- 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)
2008-05-11 21:16:32 +00:00
Christoph Oelckers 9a410f864f - 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 

SVN r954 (trunk)
2008-05-02 10:55:48 +00:00
Randy Heit 39940fe20a - Added FMOD_OPENONLY to the callback version of CreateStream() to prevent it
from doing prebuffering of the song. This was causing the Linux version to
  hang while waiting for input from the pipe, since Timidity hadn't been
  started yet. I tried using a select call in the FillStream() method, but it
  always seems to return the pipe as having nothing available. Unfortunately,
  the game still falls all over itself if Timidity isn't available. Instead
  of execvp failing nicely, X errors kill the game. I don't know why it's
  doing that. My advice for Linux music: Skip Timidity++ and get a DLS patch
  set (/WINDOWS/system32/drivers/gm.dls is probably the most common by far)
  and set the snd_midipatchset cvar to point to it. It's faster and also
  sounds a whole lot better than the crappy freepats Ubuntu wants to install
  with Timidity++.
- GCC fixes.



SVN r858 (trunk)
2008-03-27 04:25:52 +00:00
Christoph Oelckers a6e9accedb - Fixed: The sector translators must clear unused bits because they might
render a sector's special inoperable.


SVN r844 (trunk)
2008-03-23 20:52:34 +00:00
Christoph Oelckers a665663c15 - Added sector type translation to xlat_parser and removed the old sectorx
lump.


SVN r841 (trunk)
2008-03-23 00:23:47 +00:00
Christoph Oelckers 8ea316e33b - Integrated xlatcc into ZDoom.exe so that the linedef translation files
don't need to be compiled and can be stored as text in zdoom.pk3.


SVN r815 (trunk)
2008-03-19 21:09:53 +00:00
Christoph Oelckers 7c87465d35 - VC++ doesn't seem to like the TArray serializer so I added a workaround
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)
2008-03-18 18:18:18 +00:00
Randy Heit e5572a1c4e - Updated lempar.c to v1.31.
- 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)
2008-01-25 23:57:44 +00:00
Randy Heit 72c93b479e - Added support for damage-specific player pain sounds.
- Removed the constraint that all $playerreserve SNDINFO commands must come
  before the other $player commands.
- Fixed: TArray::Reserve did not construct its newly allocated entries.
- Changed the damage type for drowning from 'Water' to 'Drowning'.


SVN r466 (trunk)
2007-01-28 04:59:04 +00:00
Randy Heit ba5e77e021 - Fixed: Since FMemLump is now implemented on top of FString, it never
contains a NULL point, so the GetMem() method should fake it by
  returning NULL when the string is empty. Reverted p_xlat.cpp to its
  old revision.


SVN r465 (trunk)
2007-01-28 03:17:02 +00:00
Christoph Oelckers 37f701a462 - Fixed: The rewrite of FMemLump broke the non-standard use of it in
P_TranslateLinedefs.
- Fixed: ShowErrorPane can be called before ST_NetDone is valid so it has to
  check whether it is NULL.
- Fixed: The Megasphere had an incorrect pickup sound.
- Fixed: The new video initialization code could set the screen's Font pointer
  to NULL, causing a crash with levels that start in a secret sector.


SVN r464 (trunk)
2007-01-26 21:46:47 +00:00
Christoph Oelckers 753f280e04 - Moved the sector type translation for Doom format maps into a simple lump
in zdoom.pk3.
- Changed Line_SetIdentification so that the fifth arg is a high-byte for the line ID.


SVN r361 (trunk)
2006-10-25 16:21:08 +00:00
Randy Heit c412b42703 - Fixed: cycle_t was still a DWORD and not a QWORD under GCC.
- 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)
2006-09-14 00:02:31 +00:00
Christoph Oelckers e2ac4c1168 - Fixed: PIT_StompThing never checked for COMPATF_NO_PASSMOBJ.
- Fixed: COMPATF_TRACE returned true for all two-sided lines, not just for
  those with the same sector on both sides.

SVN r206 (trunk)
2006-06-21 11:47:27 +00:00
Randy Heit e2179d5c2d Guess what. It's not 2005 anymore.
SVN r184 (trunk)
2006-06-11 01:37:00 +00:00
Randy Heit 3f51b80cac - Implemented Quasar's suggestion to use line flag 2048 as a "reserved" flag
that, if set, clears all the non-original-Doom flags on a line. This is
  only for Doom format maps when playing Doom.

SVN r124 (trunk)
2006-05-17 02:19:20 +00:00
Randy Heit 981f663319 - Updated Jim's Makefile.linux.
- Added support for wrapping midtextures vertically.
- Since zdoom.wad is now zdoom.pk3, the default mapinfos can use full pathnames.
  So now they do.
- Fixed: The DSimpleCanvas constructor used a pitch too narrow on screens wider
  than 640 pixels when using a non-AMD processor and the processor's L1 cache
  line size could not be determined. I think this should fix the issue of
  weirdly rendered 8 pixel wide borders on the left and right of the screen that
  some people experienced.
- Fixed: The secnodes were never freed.


SVN r93 (trunk)
2006-05-09 21:30:31 +00:00
Christoph Oelckers 19a7cf743e SVN r68 (trunk) 2006-04-27 15:12:17 +00:00
Christoph Oelckers da51ac7446 SVN r49 (trunk) 2006-04-16 13:29:50 +00:00
Christoph Oelckers e06ba32525 SVN r26 (trunk) 2006-04-11 08:36:23 +00:00
Randy Heit 09c28e5bf9 - Fixed: ActorFlagSetOrReset() wasn't receiving the + or - character from
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)
2006-03-14 06:11:39 +00:00
Randy Heit cf11cbdb30 Directory restructuring to make it easier to version projects that don't build zdoom.exe.
SVN r4 (trunk)
2006-02-24 04:48:15 +00:00