Commit Graph

115 Commits

Author SHA1 Message Date
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
Christoph Oelckers ea8c94d637 - Fixed: Argument count for UsePuzzleItem was wrong.
- Added more things from Gez's experimental build:
  * MBF grenade and bouncing code.
  * Arch Vile ghosts emulation (only for compatibility.txt.)
  * Several MBF related compatibility options.



SVN r1821 (trunk)
2009-09-14 20:47:53 +00:00
Christoph Oelckers 238d4c3fac - More things from Gez's experimental build:
* info CCMD to print extended actor information (not fully implemented yet)
  * summonmbf CCMD.
  * Beta BFG code pointer (but not the related missiles yet.)
  * PowerInvisibility enhancements.
  * ScoreItem with one significant change: Added a score variable that can be
    checked through ACS and DECORATE. The engine itself will do nothing with it.
  * Nailgun option for A_Explode.
  * A_PrintBold and A_Log.
  * A_SetSpecial.


SVN r1819 (trunk)
2009-09-14 19:44:14 +00:00
Randy Heit f9088bd2cf - Added buddha cheat.
SVN r1756 (trunk)
2009-08-07 04:08:38 +00:00
Randy Heit f2b7417020 - MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
  from being thrusted while taking damage. (Non-players were already
  unthrusted.)


SVN r1695 (trunk)
2009-06-30 23:23:12 +00:00
Randy Heit 37b6e547cd - A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.


SVN r1694 (trunk)
2009-06-30 22:37:40 +00:00
Randy Heit e4af82ae96 - Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
  are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
  are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
  continue to work as aliases from DECORATE. The ACS functions, however,
  require you to use the new name, since they never saw an official release
  yet.


SVN r1689 (trunk)
2009-06-30 20:57:51 +00:00
Randy Heit ed0d804792 - Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
  may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
  crashed after giving you the warning.


SVN r1688 (trunk)
2009-06-30 19:20:39 +00:00
Christoph Oelckers 9c4cbedc26 - Added 'EndTitle' nextmap option which goes to the regular title loop after
the game has finished.
- Added NOBOSSRIP flag. Note: we are now at flags6!
- Added SetSkyScrollSpeed(int skyplane, fixed speed) ACS function.
- Added THRUACTORS flag that disables all actor<->actor collision detection.
- Added DONTSEEKINVISIBLE flag for missiles that can't home in on invisible
  targets.
- Added SFX_TRANSFERPITCH flag to A_SpawnItemEx.
- Added Ultimate Freedoom IWAD detection.
- Added GetAirSupply and SetAirSupply functions to ACS.
- Fixed: The *surface sound was not played when drowning was switched off
  by setting the level's air supply to 0.

SVN r1619 (trunk)
2009-05-30 08:56:40 +00:00
Christoph Oelckers a732687548 - Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were 
  still triggered.
  These #pragmas were responsible for >90% of the GCC warnings that were not
  listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
  parameter handling of the sound functions for attenuation was changed.
  Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values. 
  Also added the option to specify attenuation with direct values in addition 
  to the predefined names.

SVN r1583 (trunk)
2009-05-15 10:39:40 +00:00
Randy Heit 7dd75670f4 - Fixed: After loading a savegame or unmorphing, a player's weapon slots
were empty.


SVN r1477 (trunk)
2009-03-13 03:18:06 +00:00
Randy Heit 69c2c4de64 - Moved weapon slot initialization into APlayerPawn::PostBeginPlay() so that
they can be initialized when players respawn in multiplayer.


SVN r1476 (trunk)
2009-03-12 03:54:23 +00:00
Randy Heit a71e87b9df - Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.


SVN r1444 (trunk)
2009-02-24 04:13:38 +00:00
Christoph Oelckers 666e40c8bb - Added MF5_CANTSEEK flag to prevent seeker missiles from homing in on
certain actors and added an option to APowerInvisibility to set this
  flag when active.
- Added map specific automap backgrounds.
- Fixed: Voodoo dolls did not play a sound when dying.
- Added colorized error messages to DECORATE and made a few more error
  conditions that do not block further parsing not immediately abort.
- Made all errors in CreateNewActor not immediately fatal so that the
  rest of the DECORATE lump can be parsed normally to look for more errors.
- Fixed: Defining classes with the same name as their immediate base class
  was legal. It should not be allowed that a class has another one with the
  same name in its ancestry.
- Fixed: Formatting of the intermission screen on Heretic, Hexen and Strife
  was broken. Changed it to use WI_Drawpercent which does it properly and
  also allows showing percentage in these games now.
- Fixed: The MAPINFO parser ignored missing terminating braces of the last
  block in the file.

SVN r1425 (trunk)
2009-02-19 14:36:37 +00:00
Christoph Oelckers cccdfd6336 - fixed: The compatibility parser applied the last map's settings to all
maps in the compatibility list.
- Added compatibility settings for a few more levels in some classic WADs.
- Added spechit overflow workaround for Strain MAP07. This is highly map
  specific because the original behavior cannot be restored.
- Added a check for Doom's IWAD levels that forces COMPAT_SHORTTEX for them.
  MD5 cannot be used well here because there's many different IWADs with 
  slightly different levels. This is only done for Doom format levels to
  ensure that custom IWADs for ZDoom are not affected.
- fixed: level.flags2 was not reset at level start.
- Fixed: Morph powerups can change the actor picking up the item so 
  AInventory::CallTryPickup must be able to return the new actor.
- Fixed: ACS's GiveInventory may not assume that a PlayerPawn is still
  attached to the player data after an item has been given.
- Added a missing NULL pointer check to DBaseStatusBar::Blendview.


SVN r1405 (trunk)
2009-02-06 00:16:57 +00:00
Christoph Oelckers 4bcd3faef8 - moved all code related to global ACS variables to p_acs.cpp where it belongs.
- fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew.
- merged MAPINFO branch back into trunk.

SVN r1393 (trunk)
2009-02-03 19:11:43 +00:00
Christoph Oelckers 78933df10d - added GZDoom's 3D floor physics code. This is not active yet so anything compiled from this code won't have any support for it!
SVN r1351 (trunk)
2009-01-04 15:00:29 +00:00
Christoph Oelckers 37d056c041 - Fixed: The correct player class was not remembered when the menu had both
a player class selection menu and an episode menu.
- Fixed: AddToConsole could write outside its working buffer.
- Fixed: 0 was no longer recognized as placeholder for 'no state' in A_Chase.
- Fixed: When picking up weapons the code did not check if it should switch away
  from weak weapons.


SVN r1332 (trunk)
2008-12-27 20:18:31 +00:00
Christoph Oelckers 6227906072 - Fixed: SNDINFO must be loaded before the textures. However, this required
some changes to the MAPINFO parser which tried to access the texture manager
  to check if the level name patches exist. That check had to be moved to
  where the intermission screen is set up.
- Fixed: 'bloodcolor' ignored the first parameter value when given a list
  of integers.
  Please note that this creates an incompatibility between old and new 
  versions so if you want to create something that works with both 2.2.0
  and current versions better use the string format version for the color
  parameter!
- Rewrote the DECORATE property parser so that the parser is completely
  separated from the property handlers. This should allow reuse of all 
  the handler code for a new format if Doomscript requires one.
- Fixed: PClass::InitializeActorInfo copied too many bytes if a subclass's
  defaults were larger than the parent's.
- Moved A_ChangeFlag to thingdef_codeptr.cpp.
- Moved translation related code from thingdef_properties.cpp to r_translate.cpp
  and rewrote the translation parser to use FScanner instead of strtol.
- replaced DECORATE's 'alpha default' by 'defaultalpha' for consistency.
  Since this was never used outside zdoom.pk3 it's not critical.
- Removed support for game specific pickup messages because the only thing
  this was ever used for - Raven's invulnerability item - has already been
  split up into a Heretic and Hexen version.

SVN r1240 (trunk)
2008-09-21 18:02:38 +00:00
Randy Heit 00b21e4b96 - Apparently, YASM is not a suitable substitute for NASM when doing Win32 builds.
- Removed extraneous printf parameter for Texman.Init startup message.
- Added newlines to the ends of a few headers that were missing them.
- Fixed more GCC errors/warnings.

SVN r1232 (trunk)
2008-09-17 20:24:08 +00:00
Christoph Oelckers 760f70d3f1 - Changed compilation for g_doom, g_heretic, g_hexen and g_strife folders
so that all files are included by a central one instead of compiling 
  each one separately. This speeds up the compilation process by 25%
  when doing a complete rebuild in Visual C.
- Cleaned up more header dependencies.

SVN r1226 (trunk)
2008-09-15 14:11:05 +00:00
Christoph Oelckers db5723997c - Cleaned up some include dependencies.
SVN r1224 (trunk)
2008-09-14 23:54:38 +00:00
Christoph Oelckers 2cad1c2c19 - Moved IF_ALWAYSPICKUP and GiveQuest into CallTryPickup so that they are
automatically used by all inventory classes.
- The previous change made it necessary to replace all TryPickup calls with
  another function that just calls TryPickup.
- Fixed: AInventory::TryPickup can change the toucher so this must be reported
  to subclasses calling the super function. Changed TryPickup to pass the
  toucher pointer by reference.


SVN r1221 (trunk)
2008-09-13 22:08:41 +00:00
Christoph Oelckers 90e3bef2ab - Fixed: Crouching no longer worked due to a bug introduced by the
player input code.


SVN r1218 (trunk)
2008-09-13 07:22:13 +00:00
Randy Heit 5cd4604f81 - Added GetPlayerInput() for examining a player's inputs from ACS. Most
buttons are now passed across the network, and there are four new user
  buttons specifically for use with this command. Also defined +zoom
  and +reload for future implementation.

  See http://zdoom.org/files/examples/playerinput.zip for an example.


SVN r1215 (trunk)
2008-09-13 02:55:45 +00:00
Christoph Oelckers 8832b66ce4 - Gave the PlayerPawn base class a default damage fade color instead of
hacking it into the actor when actually used.
- Fixed: The DamageFade color was not saved in savegames.


SVN r1190 (trunk)
2008-09-01 18:16:53 +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 1c034c1150 - Macro-fied access to action function parameters.
- Deactivated debug output code in d_Dehacked.cpp.
- fixed: A_FreezeDeathChunks crashed when a player's head got spawned.


SVN r1168 (trunk)
2008-08-13 22:54:24 +00:00
Christoph Oelckers 1957659b1b - Restructured the action function interface to remove the dependence on
the global CallingState variable.


SVN r1163 (trunk)
2008-08-12 14:30:07 +00:00
Christoph Oelckers 1983b5c586 - Changed action function definition so that they have to be defined with a
DEFINE_ACTION_FUNCTION macro. This should make it easier to improve the
  whole system.


SVN r1148 (trunk)
2008-08-10 20:48:55 +00:00
Christoph Oelckers f4c07c45ec - Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
  into misc1 with SF_BIGTIC anymore. 
- Changed sprite processing so that sprite names are converted to indices 
  during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the 
  internal property parser which is no longer needed.


SVN r1146 (trunk)
2008-08-10 14:19:47 +00:00
Christoph Oelckers ae54e13428 IMPORTANT NOTE: I uncommented some code depending on the missing x86.cpp file to allow this to compile, These changes must be reverted as soon as this file is added (see v_palette.cpp and win32/i_system.cpp.)
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
  integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with 
  DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
  number.


SVN r1137 (trunk)
2008-08-09 11:35:42 +00:00
Christoph Oelckers b695330e90 - Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
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)
2008-08-08 10:24:08 +00:00
Randy Heit fb50df2c63 About a week's worth of changes here. As a heads-up, I wouldn't be
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)
2008-07-23 04:57:26 +00:00
Christoph Oelckers 5dc42121b7 - Fixed: When Heretic's Mace was replaced by a non-child class A_SpawnMace still
treated it as a mace and wrote into some undefined memory.
- Fixed: A_BishopMissileWeave didn't initialize special2 for proper movement.
- Added a speed parameter to A_SkullAttack.
- Fixed: Black as first or only blood color didn't work.
- Fixed: Sounds played in wi_stuff.cpp and f_finale.cpp need the CHAN_UI flag.
- Fixed: Spawning a player could play the *gasp sound.
- Fixed: SBARINFO's health display didn't scale to the proper maximum.
- Added Skulltag's Teleport_NoStop action special.


SVN r1074 (trunk)
2008-07-19 12:40:10 +00:00
Christoph Oelckers de53c3cd4c - Fixed: UseType was not properly set for textures defined in TEXTURES.
- Fixed: You couldn't set an offset for sprites defined in TEXTURES.
- Fixed some problems with last revision.

SVN r1040 (trunk)
2008-06-16 07:40:28 +00:00
Christoph Oelckers d4c8cdf45a - Added read barriers to all actor pointers within player_t except for
mo, ReadyWeapon and PendingWeapon.


SVN r1039 (trunk)
2008-06-16 07:10:08 +00:00
Christoph Oelckers 7a215e538a - Added a read barrier to player_t::PrewmorphWeapon.
- Fixed: After spawning a deathmatch player P_PlayerStartStomp must
  be called.
- Fixed: SpawnThings must check if the players were spawned before
  calling P_PlayerStartStomp.


SVN r1038 (trunk)
2008-06-15 23:09:01 +00:00
Randy Heit 7c40cf9ce0 - Increased the duration of respawn invulnerability by one second.
- DF2_YES_RESPAWN_INVUL and DF_FORCE_RESPAWN now apply to all multiplayer 
  games, not just deathmatch, without the need for turning on
  alwaysapplydmflags.
- Fixed: DF2_YES_RESPAWN_INVUL only worked in deathmatch, even with
  alwaysapplydmflags turned on.
- Fixed: DF_COOP_LOSE_ARMOR did not empty the starting armor items.


SVN r1035 (trunk)
2008-06-15 03:46:04 +00:00
Randy Heit 9e42cdaf08 - Replaced the naive area sound implementation with one that takes into
consideration the size and shape of the sector producing the sound. See
  the lifts on Doom 2 MAP30 and compare with previous versions.
- Fixed: The stop sound for sector-based sound sequences was not played with
  the CHAN_AREA flag.
- Removed the distinction between S_Sound() and S_SoundID() functions. Use
  S_Sound() for both names and IDs from now on.


SVN r1034 (trunk)
2008-06-15 02:25:09 +00:00
Christoph Oelckers 71b0d4d074 - Renamed player_s to player_t globally to get rid of the duplicate names for this class.
SVN r1011 (trunk)
2008-06-01 07:52:33 +00:00
Christoph Oelckers ab6b5e337e - Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
  railing handling and shooting lines with a non-zero but unassigned tag.)
  With UDMF such semantics have to be handled diffently. 
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.


SVN r987 (trunk)
2008-05-22 19:35:38 +00:00
Randy Heit 34f6aa8ad3 - Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.


SVN r984 (trunk)
2008-05-21 01:30:00 +00:00
Randy Heit a0d5463b49 - Added the C99 printf size specifiers 't' (ptrdiff_t) and 'z' (size_t) to
FString::Format() so that I can fix all the problem printf strings that a
  64-bit GCC compile finds.



SVN r968 (trunk)
2008-05-14 03:39:30 +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
Randy Heit 1f8e471eba - Separated the skin scale values into separate X and Y values so that skins
automatically generated for different player classes can use both the
  scaling values that can be set for the actor.


SVN r947 (trunk)
2008-04-27 22:33:19 +00:00
Christoph Oelckers 29c6615e50 - Fixed: DFlashFader did some operations in its destructor that had to be moved
to its Destroy method.
- Fixed: Dropped weapons from dying players should not double ammo. 

SVN r935 (trunk)
2008-04-24 17:17:46 +00:00
Christoph Oelckers b2bfad0c50 - Added translation support to multipatch textures. Incomplete and not tested yet!
- Added Martin Howe's morph weapon update.


SVN r916 (trunk)
2008-04-15 22:17:30 +00:00
Christoph Oelckers 6b2a7b8b03 - Added Martin Howe's morph system update.
- Added support for defining composite textures in HIRESTEX. It is not fully tested
  and right now can't do much more than the old TEXTUREx method.
- Added a few NULL pointer checks to the texture code.
- Made duplicate class names in DECORATE non-fatal. There is really no stability
  concern here and the worst that can happen is that the wrong actor is spawned.
  This was a constant hassle when testing with WADs that contain duplicate resources.


SVN r905 (trunk)
2008-04-12 15:31:18 +00:00
Christoph Oelckers a424a2f2a9 - Added Martin Howe's morph system enhancement.
SVN r889 (trunk)
2008-04-08 08:53:42 +00:00