Commit Graph

91 Commits

Author SHA1 Message Date
Randy Heit c694c55afd - Fixed: When starting a teamplay netgame, players who did not specify a team
were not informed about which team they ended up joining.
- Added Skulltag's DF2_SAME_SPAWN_SPOT flags.
- Fixed: DF2_YES_DEGENERATION was pretty much guaranteed to go out of sync
  because it used gametic for timing.
- Added DoubleAmmoFactor as a skill property for the DF2_YES_DOUBLEAMMO flag.
- Renumbered the dmflags2 entries to match Skulltag's again.
- Added Karate Chris's infinite ammo patch.


SVN r683 (trunk)
2008-01-09 02:53:38 +00:00
Randy Heit 016ac67376 - Fixed: Thing_SetTranslation still used a 16-bit word to hold the translation.
- Bumped the maximum resolution up to 2560x1600.
- Fixed: DCanvas::DrawTexture() only expanded virtual screen sizes for widescreen
  resolutions but left 5:4 modes alone. This fix neccessitated the addition of
  DTA_Bottom320x200 for the status bar to use so that it could be flush with the
  bottom of the screen rather than sitting slightly above it.
- Fixed: FConfigFile::ReadConfig()'s definition of whitespace was too broad.
- Fixed: Defining custom translation ranges in descending order and/or with gaps
  made for crashes.


SVN r676 (trunk)
2008-01-08 01:08:27 +00:00
Christoph Oelckers ed242b32df - Fixed: translationtables cannot use a TAutoGrowArray because it doesn't
initialize newly added fields when growing.


SVN r675 (trunk)
2008-01-07 22:07:25 +00:00
Christoph Oelckers 935eeb06f1 - Added: Automap markers are stored in savegames now. Also moved the call
to AM_LevelInit to its proper place in G_DoLoadLevel, right after
  the call to P_SetupLevel to make it work as intended.


SVN r667 (trunk)
2008-01-05 12:15:10 +00:00
Randy Heit 3017f7646d - Fixed: FBarShader::PrepareShader() set a member variable to point at a
local variable just before returning. Then I made some more changes so that
  it can be a properly functioning texture. After doing that, I decided to
  rewrite the texture generation to be easier for me to read and hopefully
  faster, since this thing is getting generated every frame. (Please don't
  hurt me if I got it wrong. I'm basing this on the description in the wiki,
  since I couldn't wrap my head around what the code was doing by looking
  at it.) Then I realized that there's really no reason to have more than four
  of these ever, and they can be statically generated, so I simplified it some
  more.
- Added Blzut3's latest SBARINFO patch:
 * Fixed a massive memory leak in SBARINFO. The leak also lead to progressive
   CPU usage.
 * Fixed: Playerclass didn't work in SBARINFO.
 * Fixed: Artiflash was improperly initialized causing it not to display the
   first time.
 * Changed the variable SBarInfoScript to be a pointer to prevent more memory
   leaks.


SVN r665 (trunk)
2008-01-05 04:23:34 +00:00
Christoph Oelckers f1241099f8 - Darkened the console background a little after finding out that on
very bright title pics it became quite hard to read the console's contents.
- Fixed: PROP_Translation needed to be changed for the new value format.
- Added GZDoom's MAPINFO fog parameters as no op dummies so I can use
  WADs that contain them without constantly having to edit the MAPINFO.
  It also allows using them to optimize hardware fog for WADs that should
  run with ZDoom as well.


SVN r649 (trunk)
2007-12-27 11:25:25 +00:00
Christoph Oelckers 0535d15df3 - Split off the entire translation code from r_draw.cpp into r_translate.cpp.
- Moved the common code of ACS and DECORATE translation generation into the
  FRemapTable class.
- Fixed: The DECORATE translation code was not changed for the new data structures.
- Expanded range of ACS and DECORATE translations to 65535. 
- Fixed: R_CopyTranslation was not altered for the new functionality.
  I removed the function and replaced the one use with a simple assignment.


SVN r644 (trunk)
2007-12-26 16:06:03 +00:00
Randy Heit 682e0dbe95 - Fixed: The fullscreen console crashed when opened before starting a game.
SVN r642 (trunk)
2007-12-26 05:20:30 +00:00
Randy Heit 1acc3d00c4 - Discovered that Shader Model 1.4 clamps my constants, so I can't use
palettes smaller than 256 entries with the shader I wrote for it. Is there
  a list of gotchas like this listed some where? I'd really like to see it.
  
  Well, when compiled with SM2.0, the PalTex shader seems to be every-so-
  slightly faster on my GF7950GT than the SM1.4 version, so I guess it's a
  minor win for cards that support it.
- Fixed: ST_Endoom() failed to free the bitmap it used.
- Added the DTA_ColorOverlay attribute to blend a color with the texture
  being drawn. For software, this (currently) only works with black. For
  hardware, it works with any color. The motiviation for this was so I could
  rewrite the status bar calls that passed DIM_MAP to DTA_Translation to
  draw darker icons into something that didn't require making a whole new
  remap table.
- After having an "OMG! How could I have been so stupid?" moment, I have
  removed the off-by-one check from D3DFB. I had thought the off-by-one error
  was caused by rounding errors by the shader hardware. Not so. Rather, I
  wasn't sampling what I thought I was sampling. A texture that uses palette
  index 255 passes the value 1.0 to the shader. The shader needs to adjust the
  range of its palette indexes, or it will end up trying to read color 256
  from the palette texture when it should be reading color 255. Doh!
- The TranslationToTable() function has been added to map from translation
  numbers used by actors to the tables those numbers represent. This function
  performs validation for the input and returns NULL if the input value
  is invalid.
- Major changes to the way translation tables work: No longer are they each a
  256-byte array. Instead, the FRemapTable structure is used to represent each
  one. It includes a remap array for the software renderer, a palette array
  for a hardware renderer, and a native texture pointer for D3DFB. The
  translationtables array itself is now an array of TArrays that point to the
  real tables. The DTA_Translation attribute must also be passed a pointer
  to a FRemapTable, not a byte array as previously.
- Modified DFrameBuffer::DrawRateStuff() so that it can do its thing properly
  for D3DFB's 2D mode. Before, any fullscreen graphics (like help images)
  covered it up.


SVN r640 (trunk)
2007-12-26 04:42:15 +00:00
Christoph Oelckers d12ede252f - also replaced the AM crosshair drawer by a DCanvas::DrawPixel function.
- moved the AM line drawer into DCanvas as a virtual function. While testing
  this code I discovered that the antialias precalculation was never used
  except for the very first frame of AM drawing. However, since I couldn't
  detect even a marginal performance improvement using this code on 2 computers
  I just disabled it completely because it severely complicates a more generic
  implementation. I also disabled am_ovtrans in the process because I couldn't
  see any positive effects of using this cvar. All it does is adding some 
  ugly distortion to the lines it affects without any apparent benefits.
* Added fix by Karate Chris containing:
- Added a 'No team changing' DMFlag2 which prevents players from changing teams 
  unless they are not on a team.
- Added a 'No respawn' DMFlag2 which prevents a player from respawning after 
  they have died.
- Added a 'Keep frags gained' DMFlag2 which allows you to choose whether you 
  want to reset the frags of each player next level or not.
- Added a small visual enhancement to the cooperative scoreboard to show 
  if a player has died.
- Fixed: If the 'teamplay' console variable was set to 'true' in a cooperative 
  game, the scoreboard would show team play related items as opposed to 
  cooperative items.
- Fixed: The 'bot_observer' console variable should not work in network games.
- Fixed: Bots made intermission skip really fast.


SVN r634 (trunk)
2007-12-24 14:24:24 +00:00
Christoph Oelckers 4131ec141d - Added Karate Chris's teamdamage in MAPINFO submission.
- Added Blzut3's second SBARINFO update.


SVN r621 (trunk)
2007-12-22 22:04:20 +00:00
Christoph Oelckers 5ffda41c7e - Added Blzut3's SBARINFO submission.
SVN r613 (trunk)
2007-12-20 22:35:02 +00:00
Randy Heit f618134f15 - Fixed: The MAPINFO flags that control jumping, crouching, and freelook,
rather than overriding the dmflags values, actually overwrote the dmflags
  values, so they would continue to be in effect on later maps that didn't
  explicitly specify them.


SVN r595 (trunk)
2007-12-11 04:03:40 +00:00
Randy Heit e666cde418 - Fixed some more GCC warnings.
- Updated project files for nasm 2.0, which is now named nasm.exe for the
  Windows version, rather than nasmw.exe. Also fixed the annoying new warnings
  it generated.


SVN r593 (trunk)
2007-12-11 02:38:38 +00:00
Randy Heit 1225071f78 - Fixed: Skill level confirmation only worked with Doom. Also fixed parsing
of MustConfirm: It looked for TK_String when it should have used TK_StringConst.
- Fixed: When travelling to a new non-hub map, any items being carried with
  amounts of 0 would be upped to 1.


SVN r589 (trunk)
2007-12-09 02:27:02 +00:00
Randy Heit 282e9f5f01 - Fixed: MAPINFO is parsed before the text colors are read, so the TextColor
option for skills wouldn't work.


SVN r587 (trunk)
2007-12-08 22:57:55 +00:00
Christoph Oelckers 580b03e684 SVN r578 (trunk) 2007-12-06 10:49:10 +00:00
Christoph Oelckers 47dafa3824 - Fixed: A_PainDie and A_DualPainAttack could fail to spawn the correct actor
if the first spawned one died and executed some code in its death state.
- Added Karate Chris's submission for 'allowrespawn' MAPINFO option.
- Added Karate Chris's submission for customizable skill confirmation text.
- Fixed: Doom's statusbar only checked for primary attacks, not secondary ones when
  setting Doomguy's face. (Thanks to Karate Chris for the fix.)
- added Skulltag's FORCEYBILLBOARD and FORCEXYBILLBOARD flags to the DECORATE parser.
  Even though the software renderer has no use for them it is necessary to support them
  so that mods can use these flags without becoming incompatible with ZDoom.


SVN r576 (trunk)
2007-12-06 08:55:17 +00:00
Christoph Oelckers ba61c60d52 - Fixed: When the DONTMOVE flag for A_Chase was used, movecount was not decreased
resulting in missile attacks not working.
- Fixed: Hitscan attacks used the puff's position to calculate the trajectory for
  weapon kickback.


SVN r568 (trunk)
2007-11-19 08:13:23 +00:00
Christoph Oelckers 621fe2ed98 - Changed PowerFlight so that Hexen's infiniteness is not controlled by being
in a hub but by a level flag instead.
- Fixed: Floor and ceiling huggers must set themselves to floor and ceiling each
  time they move.
- Added a LEVEL_NOMONSTERS flag so that G_ChangeLevel doesn't have to mess with
  the dmflags CVAR to start the level without monsters.


SVN r563 (trunk)
2007-11-08 09:22:06 +00:00
Christoph Oelckers 8f5dd5d028 - Fixed: Backpacks didn't increase the ammo capacity to BackpackMaxAmount if
an ammo type's BackpackAmount was 0.
- Fixed some minor bugs in custom skill code.

SVN r562 (trunk)
2007-11-04 08:39:05 +00:00
Christoph Oelckers 6d3e239678 - Changed names of skill properties to be the same as for episodes if possible.
SVN r560 (trunk)
2007-11-03 11:56:30 +00:00
Christoph Oelckers 659107cacf - Added text color options to menu code so that the skill definitions can set
the color of the menu's text.
- Externalized skill settings to ZDoom.pk3


SVN r559 (trunk)
2007-11-03 11:41:42 +00:00
Christoph Oelckers 52e5f8b8e1 - Added skill definitions to MAPINFO.
SVN r558 (trunk)
2007-11-02 22:03:03 +00:00
Christoph Oelckers 170b633e91 - added two new things which can set a sector's color without the need of tags
or scripts. ColorSetter (#9038) sets the sector's color and FadeSetter (#9039)
  sets the fog color.
- added new flags MF5_ALWAYSFAST and MF5_NEVERFAST. These flags unconditionally
  enable or disable fast movement logic, regardless of skill settings.
- added an abstraction layer for skill related settings. This is a preparation
  for implementing custom skill definitions but right now all it does is
  returning the original values but keeping the related information all in one
  place


SVN r557 (trunk)
2007-10-29 22:15:46 +00:00
Christoph Oelckers f94d971c06 - Fixed: F_StartFinale shouldn't get the information if the game is about
to end from level.nextmap. For example, this check is wrong for a secret
  exit.

SVN r549 (trunk)
2007-09-26 21:50:05 +00:00
Christoph Oelckers d0c3ebb5c2 - Fixed: Several options while changing maps only worked for the regular exit
but caused problems when used with the secret exit. Rewrote the code to
  set the next map at the beginning and removed all subsequent parts that
  tried to resolve it from the original data again.

SVN r544 (trunk)
2007-09-06 09:54:57 +00:00
Christoph Oelckers c06bd09ee7 - Fixed: dumpmap crashed when used outside a map.
- Exported A_DeQueueCorpse to DECORATE. It seems I forgot this when exporting
  A_QueueCorpse.



SVN r542 (trunk)
2007-09-02 09:57:08 +00:00
Christoph Oelckers 6a3a47d77a - Moved setting of gameskill from M_ChooseSkill to G_DoNewGame because it
doesn't work in M_ChooseSkill when the full console is open.


SVN r541 (trunk)
2007-08-09 08:42:15 +00:00
Christoph Oelckers f4dcfad331 - Copied railgun sound fix from Skulltag.
- Made infighting a level flag. The old method still exists but the level flags
  will take precedence if set.



SVN r532 (trunk)
2007-05-20 11:08:36 +00:00
Christoph Oelckers ea2ea7dbf0 - fixed: meleethreshold only has meaning when the attacking monster actually
has a melee attack.
- copied a colormap fix from Skulltag.


SVN r531 (trunk)
2007-05-13 20:21:26 +00:00
Christoph Oelckers a6a5821f04 - Added a compatibility option to restore the original behavior of the Invisibility
powerup.
- Changed: Weapons are no longer checked for the EXTREMEDEATH and NOEXTREMEDEATH flags.
  For all damage related actions it will always be the projectile (or puff for hitscan
  attacks) that is treated as the damage inflictor.
- Fixed: Hexen's fourth weapons made extreme death depend on the weapon the player
  is holding, not the projectile that did the kill. The WIF_EXTREME_DEATH flag
  no longer exists as a result.
- Expanded PowerSpeed so that subclasses can be derived that alter the speed factor.
- Added an MF5_USESPECIAL flag that allows using things to execute their specials.
- added MF4_FORCERADIUSDMG flag so that exploding items can be created which
  are able to hurt boss monsters.
- moved ML_BLOCK_PLAYERS to the value 0x4000 to bring it in line with Skulltag's 
  implementation.


SVN r530 (trunk)
2007-05-12 11:14:09 +00:00
Christoph Oelckers d60a5ee1b9 - added Skulltag's custom F1 help screen MAPINFO option.
- Fixed: Resurrecting a player must restore all flags words, not just the first one.
- Fixed: APowerWeaponLevel2::EndEffect must check PendingWeapon for WP_NOCHANGE.
- added Skulltag's high jump rune as a powerup
- Added Skulltag's Drain and Regeneration runes as powerups and used specific player
  sounds for their sound effects instead of using misc/i_pkup.
  (If I ever decide to implement runes it will be in a way that can use the regular
  powerups instead of having to define specific classes for them.)
- Added Skulltag's PowerQuadDamage and PowerQuarterDamage as more customizable
  PowerDamage and PowerProtection. These new powerups allow free customization of
  the damage modification per damage type by inheriting from these classes and
  setting specific values. Such derived damage/protection powerups will be considered
  as separate powers so that for example a QuadDamage and a DoubleDamage item can be
  stacked which would result in 8x damage.
- merged player_t::cheats and player_t::Powers into one variable.


SVN r529 (trunk)
2007-05-10 22:22:38 +00:00
Christoph Oelckers f11525f90f - Moved most of the menu strings (except options and player setup menu) into the
string table.


SVN r525 (trunk)
2007-05-01 07:57:08 +00:00
Randy Heit f48ad6c4c3 - Switched ACS world and global arrays to the TMap class instead of
TAutoGrowArray. A map can handle a wide range of key values better than
  an array.
- Added a templated associative array class, TMap, that uses Lua's "chained
  scatter table with Brent's variation" algorithm. I had considered using
  hash_map until I discovered that it's not standard STL, and there are two
  major but incompatible implementations of it. So I rolled my own, and Lua
  seemed like a good place to go to for an efficient algorithm, since it
  makes heavy use of tables.


SVN r513 (trunk)
2007-04-12 23:00:52 +00:00
Randy Heit 560d4f8140 - Fixed: Thing_ProjectileAimed did not set the missile's speed correctly.
- The net start pane is now given focus when it is created, so it can
  receive keyboard input.
- Added playback of the "WeaponPickup" sound when a Hexen net game starts.
- Separated the different startup screens into classes for better
  modularization (which I should have done in the first place). (Sorry,
  have not done it for Linux yet, so that won't compile as-is.)


SVN r496 (trunk)
2007-03-06 01:33:18 +00:00
Randy Heit 7c2fc08f35 - Added two new MAPINFO flags to control what actor activates impact lines:
* MissileShootersActivateImpactLines - the current behavior.
    * MissilesActivateImpactLines - the original Hexen behavior.


SVN r477 (trunk)
2007-02-04 02:12:54 +00:00
Randy Heit af13d6d686 - Fixed: If you called the FString assignment operator that accepts a
const char * with a string inside its buffer, it released the buffer
  before copying the string.
- Added a new FString constructor that creates the string from a lump.
- Fixed: G_DoReborn() calls G_InitNew() with mapname set to level.mapname.
  G_InitNew() then copies it onto level.mapname, which is undefined
  behavior (although it does work as we want it to).
- Modified FMemLump to store its data using FString. That class provides
  a convenient method of storing reference counted data, so now FMemLump
  doesn't need to muck about sneakily using const_casts and possibly
  tricking its users into thinking that an old one is still valid after
  being assigned to a new one.
- Fixed: The IMGZ, PNG, PCX, and JPEG loaders assumed the files were
  large enough for their headers without actually checking.



SVN r463 (trunk)
2007-01-25 04:02:06 +00:00
Christoph Oelckers ec2e63c6d3 - Added customizable border textures. They will be defined with the
MAPINFO keyword 'bordertexture' and are settable per map.
- Fixed: When used in DECORATE A_Explode must use A_ExplodeParms.
- Added custom label support to A_Chase. To enable resurrection from the
  customizable version I also moved all A_VileChase stuff into p_enemy.cpp.


SVN r437 (trunk)
2007-01-05 22:08:57 +00:00
Randy Heit 82cf5d703f - Fixed: APlayerPawn::GiveDefaultInventory() used two different variables
both named item.
- Switched ddraw.dll to be delay loaded. With D3D9 now being the default
  display code, this avoids wasting time loading DDraw if it isn't needed.
- Fixed: The Win32 I_FatalError() did not set alreadyThrown, so it could get
  stuck in an endless fatal error loop.

SVN r433 (trunk)
2006-12-29 20:28:23 +00:00
Randy Heit 851bf89442 - Fixed all the warnings from GCC 4.2, including a handful that were
present in
  older GCCs.



SVN r430 (trunk)
2006-12-29 03:38:37 +00:00
Christoph Oelckers 063c85b157 - Fixed: The global WeaponSection string was never freed. It has been replaced
with an FString now.
- Fixed: The music strings in the default level info were never freed and
  caused memory leaks when used repeatedly.
- Fixed: The intermusic string in the level info was never freed.
- Fixed: The default fire obituary should only be printed if the damage
  came from the environment. If it comes from a monster the monster specific
  obituary should be used instead.
- Added custom damage types from the floating point test release.
- Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage 
  type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also 
  be used by other actors so a more generalized approach is needed than hard
  coding it into the Pain Elemental.
- Converted a few of Doom's monsters to DECORATE because I couldn't test the
  first version of the custom state code with the corpses inheriting from them.
- Added custom states from last year's floating point test release and fixed
  some bugs I found in that code. Unfortunately it wasn't all salvageable
  and it was easier to recreate some parts from scratch.



SVN r368 (trunk)
2006-10-31 14:53:21 +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 7c1fbe7ee5 - Modified the way autosaves are done. Instead of setting gameaction to
ga_autosave, write DEM_CHECKAUTOSAVE to the net stream. When this is
  processed, it will check if it's okay to do an autosave. If it is, it writes
  DEM_DOAUTOSAVE to the net stream, which the sets gameaction to ga_autosave.
  Essentially, about half of the functionality was moved out of G_DoAutoSave()
  and into Net_DoCommand().
- Minor changes to OS detection: The os_WinNT enumeration has been renamed to
  os_WinNT4, since every new OS coming out of Microsoft these days is
  essentially NT. NT 5.2 and 6.0 are now properly identified as "Windows
  Server 2003" and "Windows Vista" respectively, and any unknown NT versions
  Microsoft introduces in the future will now be displayed as "Windows NT"
  instead of "Windows 2000" if the minor version is 0 and "Windows XP" if the
  minor version is non-0. Win32s detection has also been removed. Presumably
  if somebody is foolish enough to try to run this on Windows 3.x with Win32s,
  it won't even load due to missing DLLs.
- Fixed: Demos with NETD chunks should not set netgame to true unless they
  have more than one player. And since netdemo is ignored if netgame is
  false, it doesn't need to set that either.
- Fixed: FTexture::GetScaled* functions did not check for scale values of 0.


SVN r354 (trunk)
2006-10-19 20:20:56 +00:00
Christoph Oelckers 3dabd38359 - Fixed: Hires texture replacements must call AddPatch if the texture
isn't defined yet in order to replace lumps that are not in the
  list of preinitialized graphics.
- Changed font initialization to occur after textures have been completely
  initialized. This is necessary so that the font characters can be
  replaced with hires versions.


SVN r351 (trunk)
2006-10-06 21:07:58 +00:00
Christoph Oelckers 28ea15d8f4 - When exiting the level on a damaging floor the player could be in the pain
state and make its pain noise at the start of the next level.
- Fixed: The FPS counter obstructed the key display in Doom's fullscreen HUD.


SVN r348 (trunk)
2006-10-04 07:45:44 +00:00
Randy Heit 65bb04b7e8 - Fixed: V_BreakLines() failed to produce output for the final line if it was
only one character long.
- Fixed: When players respawned in multiplayer, scripts that started on their
  old body kept executing on that body instead of being transferred to the new
  one. I'm doing this with general pointer substitution now, so everything
  that pointed to the old body will use the new one; not sure if that's best,
  or if it should applied exclusively to scripts, though.
- Fixed: Hexen's delay ACS command actually waited one extra tic. Now if
  you're playing Hexen and an old-style ACS script delays it will wait one
  extra tic in ZDoom as well.
- Fixed: When G_FinishTravel() created a temporary player, P_SpawnPlayer()
  thought the old player actor was a voodoo doll and stopped its scripts
  and moved its inventory.


SVN r347 (trunk)
2006-10-03 03:14:28 +00:00
Christoph Oelckers adf6579b37 - Fixed: Starting a new game didn't remove the deferred scripts.
SVN r337 (trunk)
2006-09-23 20:14:06 +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
Randy Heit da32156d41 - Changed: Starting a new game or reloading an old one reset the chasecam.
SVN r319 (trunk)
2006-09-01 01:52:50 +00:00