Commit Graph

25 Commits

Author SHA1 Message Date
Randy Heit 3a552d4aa0 - It turns out that the Visual C++ 2005 runtime calls IsDebuggerPresent, which
is not available under Windows 95. Since this is (or at least should be) the
  only thing preventing us from running under Windows 95, I added a stub that
  replaces __imp__IsDebuggerPresent@0 with a pointer to a function that checks
  for the real thing.


SVN r279 (trunk)
2006-08-02 04:57:36 +00:00
Randy Heit 9fdcb553aa - Added some hackery at the start of MouseRead_Win32() that prevents it from
yanking the mouse around if they keys haven't been read yet to combat the
  same situation that causes the keyboard to return DIERR_NOTACQUIRED in
  KeyRead(): The window is sort of in focus and sort of not. User.dll
  considers it to be focused and it's drawn as such, but another focused
  window is on top of it, and DirectInput doesn't see it as focused.
- Fixed: KeyRead() should handle DIERR_NOTACQUIRED errors the same way it
  handles DIERR_INPUTLOST errors. This can happen if our window had the
  focus stolen away from it before we tried to acquire the keyboard in
  DI_Init2(). Strangely, MouseRead_DI() already did this.
- When a stack overflow occurs, report.txt now only includes the first and
  last 16KB of the stack to make it more manageable.
- Limited StreamEditBinary() to the first 64KB of the file to keep it from
  taking too long on large dumps.
- And now I know why gathering crash information in the same process that
  crashed can be bad: Stack overflows. You get one spare page to play with
  when the stack overflows. MiniDumpWriteDump() needs more than that and
  causes an access violation when it runs out of leftover stack, silently
  terminating the application. Windows XP x64 offers SetThreadStackGuarantee()
  to increase this, but that isn't available on anything older, including
  32-bit XP. To get around this, a new thread is created to write the mini
  dump when the stack overflows.
- Changed A_Burnination() to be closer to Strife's.
- Fixed: When playing back demos, DoAddBot() can be called without an
  associated call to SpawnBot(). So if the bot can't spawn, botnum can
  go negative, which will cause problems later in DCajunMaster::Main()
  when it sees that wanted_botnum (0) is higher than botnum (-1).
- Fixed: Stopping demo recording in multiplayer games should not abruptly
  drop the recorder out of the game without notifying the other players.
  In fact, there's no reason why it should drop them out of multiplayer at
  all.
- Fixed: Earthquakes were unreliable in multiplayer games because
  P_PredictPlayer() did not preserve the player's xviewshift.
- Fixed: PlayerIsGone() needs to stop any scripts that belong to the player
  who left, in addition to executing disconnect scripts.
- Fixed: APlayerPawn::AddInventory() should also check for a NULL player->mo
  in case the player left but somebody still has a reference to their actor.
- Fixed: DDrawFB::PaintToWindow() should simulate proper unlocking behavior
  and set Buffer to NULL.
- Improved feedback for network game initialization with the console ticker.
- Moved i_net.cpp and i_net.h out of sdl/ and win32/ and into the main source
  directory. They are identical, so keeping two copies of them is bad.
- Fixed: (At least with Creative's driver's,) EAX settings are global and not
  per-application. So if you play a multiplayer ZDoom game on one computer
  (or even another EAX-using application), ZDoom needs to restore the
  environment when it regains focus.
- Maybe fixed: (See http://forum.zdoom.org/potato.php?t=10689) Apparently,
  PacketGet can receive ECONNRESET from nodes that aren't in the game. It
  should be safe to just ignore these packets.
- Fixed: PlayerIsGone() should set the gone player's camera to NULL in case
  the player who left was player 0. This is because if a remaining player
  receives a "recoverable" error, they will become player 0. Once that happens,
  they game will try to update sounds through their camera and crash in
  FMODSoundRenderer::UpdateListener() because the zones array is now NULL.
  G_NewInit() should also clear all the player structures.


SVN r233 (trunk)
2006-06-30 02:13:26 +00:00
Randy Heit 9eb0aa1a02 - Fixed: G_InitLevelLocals() needs to OR in the crouching bits, otherwise it
discards the jumping bits.
- ProcessActor() now sets C mode before retrieving the actor's name.
- Fixed: The new SC_GetString() scanner accepted slashes at the end of tokens
  when not in C mode, even if they were the start of a comment. Now if you
  want a slash at the end, you must quote it.


SVN r211 (trunk)
2006-06-21 23:22:17 +00:00
Randy Heit c54f2f66fc - Unlimited the monster pain sounds in Hexen after playing as the Cleric a
while and killing centaurs with the flechette.
- Fixed: Moving to an old level in a hub caused the old player's inventory to
  spawn owned by the current player (but still hanging off the old player), so
  the game would hang when trying to delete it.
- Modified re2c so that it doesn't add a date to the file it generates. Thus,
  if it regenerates a file during a full rebuild, SVN won't see it as a change.
  Also updated it to 0.10.5.
- Fixed: SC_GetString() did not properly terminate sc_String when the last
  token in the file had no white space after it. Since I could not actually
  find the problem (it works fine in debug mode and I saw no logic errors),
  I decided to take this opportunity to reimplement it using an re2c-generated
  scanner. Now it's 1.6x faster than before and correctness is easier to
  verify.
- Fixed: FMODSoundRenderer::Shutdown() also needs to reset NumChannels.
- Added back the Manifest to zdoom.rc for non-VC8 Windows compilers.
- Fixed MinGW compilation again. Now it uses the same method as Makefile.linux
  to find all the source files so that it doesn't need to be manually updated
  each time source files are added or removed.
- Added the SVN revision number to the version string. A new tool is used to
  obtain this information from the svnversion command and write it into a
  header file. If you don't have the svn command line tools installed or didn't
  check it out from the repository, you can still build. I added some rules for
  this to Makefile.linux, and I assume they work because they do for
  Makefile.mingw.
- Fixed: MIDISong2 did not delete MusHeader in its destructor.


SVN r200 (trunk)
2006-06-20 20:30:39 +00:00
Christoph Oelckers 1bd6ac028b - Converted a_doomhealth.cpp to DECORATE.
- Added a PickupMessage property to the internal actor parser, replaced
  most of the virtual PickupMessages with it and placed the code that
  reads the metadata into AInventory::PickupMessage. Now the
  PickupMessage method is truly virtual and I can do:
   Added a Health.LowMessage property to define double message items like
   Doom's medikit in DECORATE.
- Since defining Mana3 as an ammo type and then overriding the TryPickup
  method means that this item defeats all ammo checks in the game it might
  as well be defined as a CustomInventory item. At least this fixes the
  amount given in easy and very hard skills.
- Converted all ammo items to DECORATE.
- Changed internal property setting of ammo types and sister weapons
  to use fuglyname as for DECORATE definitions. This allows to export
  the ammo definitions into DECORATE definitions without doing it for
  the weapons themselves.
- Replaced obituary methods with actor properties.
- Fixed: The secret map check didn't work for maps inside Zips.



SVN r196 (trunk)
2006-06-17 20:29:41 +00:00
Randy Heit 7a601515df - ClassifyLine now chooses either SSE2 or regular x87 math depending on whether
or not SSE2 is available at runtime. Since most of the time is spent in
  ClassifyLine, using SSE2 in just this one function helps the most.
- Nodebuilding is a little faster if we inline PointOnSide.
- Changed FEventTree into a regular binary tree, since there just aren't enough
  nodes inserted into it to make a red-black tree worthwhile.
- Added more checks at the start of ClassifyLine so that it has a better chance
  of avoiding the more complicated checking, and it seems to have paid off with
  a reasonably modest performance boost.
- Added a "vertex map" for ZDBSP's vertex selection. (Think BLOCKMAP for
  vertices instead of lines.) On large maps, this can result in a very
  significant speed up. (In one particular map, ZDBSP had previously
  spent 40% of its time just scanning through all the vertices in the
  map. Now the time it spends finding vertices is immeasurable.) On small maps,
  this won't make much of a difference, because the number of vertices to search
  was so small to begin with.


SVN r173 (trunk)
2006-06-06 21:39:08 +00:00
Randy Heit f50b284fda SVN r142 (trunk) 2006-05-24 15:31:21 +00:00
Randy Heit cccf66f34b - Added missing linker dependencies for Visual C++ 2005 Express Edition and
fixed building of the assembly files when the source is located in a path
  with spaces.

SVN r139 (trunk)
2006-05-23 23:59:41 +00:00
Randy Heit cb18719d05 - Fixed: The new sound pausing on menu open interrupted Strife conversations.
- Did some very preliminary support for x64 compiling.
- Now I see why makewad is using the __fastcall calling convention by default:
  Because the release zlib is built with it as well.
- Fixed: Conversion from 'const char *' to 'char *' in DEM_SAVEGAME case in
  Net_DoCommand().
- Updated the project files for Visual C++ 2005.


SVN r138 (trunk)
2006-05-23 04:25:49 +00:00
Randy Heit ba01f00d7c SVN r126 (trunk) 2006-05-18 01:43:19 +00:00
Randy Heit ac53ed6ecd SVN r116 (trunk) 2006-05-16 02:50:18 +00:00
Randy Heit 8fcf93d65a - Merged a lot of these static destructor-only structs into regular
functions added to the exit chain with atterm so that they can be called
  in a deterministic order and not whatever order the linker decides to put
  them in.
- Fixed: DCajunMaster did not free its getspawned.
- Fixed: P_FreeLevelData() did not free ACS scripts.
- Fixed: Level snapshots were not freed at exit.
- Fixed: The save/load menu list was not freed at exit.
- Fixed: FCompressedMemFile needs a destructor to free the m_ImplodedBuffer.
- Fixed: G_DoLoadGame() did not free the engine string.
- Fixed: M_ReadSaveStrings() did not free the engine string.
- Fixed: Processing DEM_SAVEGAME did not free the pathname string.
- Added a check for truncated flats to FFlatTexture::MakeTexture() because
  Heretic's F_SKY1 is only four bytes long.
- Added a dump of the offending state to the "Cannot find state..." diagnostic.
- Fixed: FCompressedFile did not initialize m_Mode in its default constructor.
- Fixed: Heretic and Hexen status bars did not initialize ArtiRefresh.
- Fixed: PNGHandle destructor should use delete[] to free TextChunks.


SVN r111 (trunk)
2006-05-12 03:14:40 +00:00
Randy Heit def53bdd5d - Fixed?: WallSpriteColumn apparently needs to set dc_texturefrac. At least
Valgrind seems to say so.
- Fixed: The FWadCollection destructor needs to use free to free the LumpInfo
  and Wads arrays.
- Fixed: The ColorMapKiller needs to use the delete[] form of delete.
- Fixed: FConfigFile::ClearCurrentSection() should be calling the delete[] form
  of delete to free the entry.
- Fixed: FPatchTexture::MakeTexture() does not need to blindly recreate the
  Spans if they already exist.
- Fixed: The FMultiPatchTexture destructor did not call its Unload() method.
- Restored the original padding calculation to FMultiPatchTexture::MakeTexture().
  I believe the Valgrind errors were caused by accessing off the end of the
  screen buffer, not from accessing off the end of a texture.


SVN r98 (trunk)
2006-05-10 03:08:27 +00:00
Randy Heit d878c2e7d6 - Backported the classnames-are-names changes from the FP code.
SVN r97 (trunk)
2006-05-10 02:40:43 +00:00
Randy Heit 748d7bf4b1 - The game is now free of leaks up to the point just after the wads are loaded.
- Fixed: Although TypeInfos are now deleted at exit, their FlatPointers or ActorInfo
  data was not freed. I chose not to use a destructor to handle this, because then it
  would no longer be a POD type that can be statically initialized.
- Fixed: Aliases were not deleted at exit.
- Fixed: FWadCollection did not free its hash tables, lump info, full names, or the
  list of open files when destroyed.


SVN r85 (trunk)
2006-05-09 00:02:37 +00:00
Christoph Oelckers 605a9a7715 May 6, 2006 (Changes by Graf Zahl)
- Converted a_zombie.cpp and most of a_strifestuff.cpp to DECORATE.
- Converted a_strifekeys.cpp to DECORATE and moved the pickup messages to the
  string table.
- Removed the WIF_HITS_GHOSTS weapon flag and replaced it with MF2_THRUGHOST. 
  There is no need to keep two flags around with virtually the same meaning.
- Changed the ShadowArmor to use the VISIBILITYPULSE flag to change its translucency.
  It looks much better now than the cheap code pointer based blinking it used before.
- Converted most of a_strifeitems.cpp to DECORATE and moved the pickup messages 
  to the string table.
- Converted a_strifearmor.cpp to DECORATE and moved the pickup messages to the
  string table.
- Moved the messages for killing spectres to the string table.
- Converted the quest items to DECORATE. Also changed A_GiveQuestItem to get
  the messages it prints from the string table instead of the quest item's tag
  string.

May 5, 2006 (Changes by Graf Zahl)
- Removed the hopelessly outdated thingdef_doc.txt file from the repository.
- Converted a_peasant.cpp and a_ratbuddy.cpp to DECORATE.
- Fixed: C_DoKey didn't treat an empty string as 'no binding' when checking for
  valid double bindings.
- Converted a_merchants.cpp to DECORATE.
- Added MF5_NODAMAGE flag to generalize the behavior of Strife's merchants which
  can be shot but take no damage from getting hurt.
- Converted a_beggars.cpp to DECORATE.
- Added an Inventory.GiveQuest property. This makes it possible to define all of
  Strife's original items that also give a quest item in DECORATE but it is also 
  useful to define items like the ones in Day of the Acolyte without ugly workarounds.
- Added a Tag property and Strife teaser conversation IDs to DECORATE so now it is 
  possible to define many of Strife's items.
- Added a FastSpeed property to DECORATE so that projectiles can finally be
  assigned a higher speed for fast mode.
- Added a ACS_LockedExecuteDoor special. It is basically the same as the existing
  ACS_LockedExecute but it uses the 'door' message instead of 'remote'. This
  cannot be integrated into ACS_LockedExecute because all its arguments are already
  in use.
- Added a fully customizable A_CustomMeleeAttack function for DECORATE.


SVN r83 (trunk)
2006-05-07 00:27:22 +00:00
Christoph Oelckers 650d07b8c1 May 4, 2006 (Changes by Graf Zahl)
- Converted A_Hexendecorations.cpp
- Changed the lower decal spawning code to transfer the main decal's color if
  the lower decal's default color is the same as the main decal's.
- Changed the decal stretcher back to use the specified size parameters as a 
  scaling factor and not a destination size because this is more consistent with 
  the rest of the decal code. Also adjusted the blood smear definition in DECALDEF
  and the description in the Wiki for this.
- Added Jim's most recent fixes.


SVN r77 (trunk)
2006-05-04 12:40:39 +00:00
Christoph Oelckers 0e69196370 May 3, 2006 (Changes by Graf Zahl)
- Removed doom.x, heretic.x and strife.x from the SVN repository. These
  are generated files.
- Fixed: A_PainDie has to check whether a valid target exists before 
  calling IsFriend.
- Fixed: FDecalLib::FindAnimator needs a signed counter to work properly.

May 1, 2006 (Changes by Graf Zahl)
- Added support for game specific pickup messages, if only to be able
  to define Raven's invulnerability item in DECORATE.
- Removed A_TreeDeath because it is no longer used.
- Fixed: When picking up a PowerupGiver for an active powerup the
  blend color and the duration were transferred to a temorary item
  and never took effect. They have to be trnasferred to the newly created
  powerup item before trying to give it to the player, not afterward.
- Made the colormap of the InvulnerabilitySphere item specific. 
  The base power class still needs to have its color adjusted
  per game though and since Raven's invulnerability item is used in both
  Hexen and Heretic it can't define its own colormap/blend.
- Separated the invulnerability colormaps from the game being played
  and made them item specific. They can also be specified as regular
  blend colors in DECORATE now.
- Converted a_hereticarmor.cpp and most of a_doomartifacts.cpp,
  a_hereticartifacts.cpp and a_heretickeys.cpp to DECORATE.
- Changed the Soulsphere to be a real health item with the Dehacked
  modifications made in d_dehacked.cpp as for most other items which
  need to be adjusted.
- Added IF_BIGPOWERUP flag to AInventory to expose the RESPAWN_SUPER
  dmflag to DECORATE. Also removed the now obsolete ShouldRespawn methods
  from AInvulnerabilitySphere and ABlurSphere.
- Converted a_splashes.cpp to DECORATE.
- Converted most of a_debris.cpp to DECORATE.


SVN r73 (trunk)
2006-05-03 14:54:48 +00:00
Christoph Oelckers 29cd024aba SVN r71 (trunk) 2006-04-30 21:49:18 +00:00
Randy Heit 7e7ab6b4ec - Fixed compilation with mingw again.
- Added multiple-choice sound sequences. These overcome one of the major
  deficiences of the Hexen-inherited SNDSEQ system while still being Hexen
  compatible: Custom door sounds can now use different opening and closing
  sequences, for both normal and blazing speeds.
- Added a serializer for TArray.
- Added a countof macro to doomtype.h. See the1's blog to find out why
  it's implemented the way it is.
    <http://blogs.msdn.com/the1/articles/210011.aspx>
- Added a new method to FRandom for getting random numbers larger than 255,
  which lets me:
- Fixed: SNDSEQ delayrand commands could delay for no more than 255 tics.
- Fixed: If you're going to have sector_t.SoundTarget, then they need to
  be included in the pointer cleanup scans.
- Ported back newer name code from 2.1.
- Fixed: Using -warp with only one parameter in Doom and Heretic to
  select a map on episode 1 no longer worked.
- New: Loading a multiplayer save now restores the players based on
  their names rather than on their connection order. Using connection
  order was sensible when -net was the only way to start a network game,
  but with -host/-join, it's not so nice. Also, if there aren't enough
  players in the save, then the extra players will be spawned normally,
  so you can continue a saved game with more players than you started it
  with.
- Added some new SNDSEQ commands to make it possible to define Heretic's
  ambient sounds in SNDSEQ: volumerel, volumerand, slot, randomsequence,
  delayonce, and restart. With these, it is basically possible to obsolete
  all of the $ambient SNDINFO commands.
- Fixed: Sound sequences would only execute one command each time they were
  ticked.
- Fixed: No bounds checking was done on the volume sound sequences played at.
- Fixed: The tic parameter to playloop was useless and caused it to
  act like a redundant playrepeat. I have removed all the logic that
  caused playloop to play repeating sounds, and now it acts like an
  infinite sequence of play/delay commands until the sequence is
  stopped.
- Fixed: Sound sequences were ticked every frame, not every tic, so all
  the delay commands were timed incorrectly and varied depending on your
  framerate. Since this is useful for restarting looping sounds that got
  cut off, I have not changed this. Instead, the delay commands now
  record the tic when execution should resume, not the number of tics
  left to delay.


SVN r57 (trunk)
2006-04-21 01:22:55 +00:00
Christoph Oelckers da51ac7446 SVN r49 (trunk) 2006-04-16 13:29:50 +00:00
Randy Heit 2bfc183154 SVN r47 (trunk) 2006-04-16 03:31:40 +00:00
Christoph Oelckers 153d3b4681 SVN r45 (trunk) 2006-04-14 16:25:57 +00:00
Christoph Oelckers 25f90d6221 SVN r27 (trunk) 2006-04-11 16:27:41 +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