Commit Graph

49 Commits

Author SHA1 Message Date
Randy Heit 30ef6a0c2d - Game time is now frozen during screen wipes. This obsoletes the DEM_WIPEON
and DEM_WIPEOFF commands. Fixes multimap demos desyncing when played back
  or recorded with wipes enabled, and prevents multiplayer games from
  starting until all players' wipes have finished.


SVN r1272 (trunk)
2008-10-21 02:27:21 +00:00
Christoph Oelckers b07542ddd6 More header cleanup.
SVN r1225 (trunk)
2008-09-15 00:47:31 +00:00
Christoph Oelckers db5723997c - Cleaned up some include dependencies.
SVN r1224 (trunk)
2008-09-14 23:54:38 +00:00
Christoph Oelckers 47d8a41540 - Fixed: Thew sounds of Strife's intro need CHAN_UI.
- Changed all instances of playing the chat sounds to use CHAN_UI.


SVN r1085 (trunk)
2008-07-23 19:39:01 +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
Randy Heit 776d89428d - Changed D3DFB to explicitly request double buffering instead of assuming
that the drivers will treat a BackBufferCount of 0 as a request for
  double buffering.
- Fixed: Unsetting a cvar did not remove it from the list of tab
  completions.
- Added "" as a synonym for "nullimage" in SBARINFO.
- Fixed: MAKESAVESIG's stringifier in version.h did not work as expected.
  It stringified the passed macro name, not the value of the macro.
- Moved DCajunMaster off the DObject hierarchy.
- Changed DCajunMaster::getspawned into a TArray of FStrings. It was
  mysteriously being left pointing to uninitialized memory during the
  final GC at exit and crashing.
- Fixed: The code that removed hexdd.wad from the list of IWADs when
  hexen.wad was not present did not work.


SVN r861 (trunk)
2008-03-28 00:38:17 +00:00
Christoph Oelckers 997533e0c8 - Fixed: DCajunMaster::End was missing a write barrier for getspawned. The
same problem in D_DoomMain.
- Made bglobal a pointer because it was causing problems with the garbage 
  collector.


SVN r859 (trunk)
2008-03-27 22:37:13 +00:00
Christoph Oelckers a01aaf35ad - Added Karate Chris's submission for multiplayer Strife conversations.
SVN r855 (trunk)
2008-03-26 08:29:02 +00:00
Randy Heit 6715b84d0d - Fixed: DACSThinker::ActiveThinker was missing a read barrier.
- Loading a save game now initiates a collection.
- Added a finalization cost to the sweep stage.


SVN r801 (trunk)
2008-03-13 03:14:33 +00:00
Randy Heit 1e8064306e - Changed the sentinels in the thinker lists into a proper thinker. The old
way wasn't playing well with the write barriers.
- Fixed: DFrameBuffer::WriteSavePic needs to fix the canvas in place while
  using it.
- Fixed: The sound system was updated every frame, which is a complete waste
  of time. Doing it only once each tic is quite sufficient, since nothing
  really moves between tics, even if the display makes it look otherwise.


SVN r799 (trunk)
2008-03-13 00:41:16 +00:00
Randy Heit f2660dc336 - Merged the GC branch back into the trunk, so now it can receive more
testing from the people who download SVN trunk builds.

SVN r795 (trunk)
2008-03-12 02:56:11 +00:00
Randy Heit 0dccb97819 - Fixed: PO_Busy() did not check for a NULL return from GetPolyobj().
- Fixed two problems with printfs from the net controller stuff: one of them
  is totally valid, and the other is GCC not being as nice as VC++.
- Fixed: The case for defining SAVESIG when SVN_REVISION_NUMBER == 0 did not
  work for GCC (and presumably VC++, though I never ran into that case with
  it) because it tried to stringify something that wasn't a macro argument.


SVN r762 (trunk)
2008-02-22 00:20:11 +00:00
Christoph Oelckers d412266bfc - Added a modified version of Karate Chris's submission for killing specific
monsters with the 'Kill' ccmd.


SVN r759 (trunk)
2008-02-20 21:28:55 +00:00
Randy Heit 133350fb9c - Fixed AInventory::PickupFlash setting with GCC.
- Fixed: The MusicVolumes list was allocated with M_Malloc but freed with
  delete.
- Fixed: demobuffer was inconsistantly handled with new[]/delete[] and
  malloc/free.
- Added used memory tracking to M_Malloc() and M_Realloc(). This
  necessitated the addition of an M_Free() call to track frees.
- Removed M_Calloc since it was only used in one place, and can just as well
  be done with an M_Malloc/memset pair.
- Bumped DEMOGAMEVERSION for the new net controller codes.


SVN r751 (trunk)
2008-02-17 02:40:03 +00:00
Christoph Oelckers 39bff11693 Added patch by Karate Chris:
- The net arbitrator can add or remove players to an access list so they 
    can or cannot control game settings:
 * net_addcontroller <player number> - Adds a player to the control list. Only net arbitrators have access to this command.
 * net_removecontroller <player number> - Removes a player from the control list. Only net arbitrators have access to this command.
 * net_listcontrollers - Lists the players who are able to control the game settings.
- Fixed: The 'Printf'' occurrences in the 'addplayerclass' console command were all missing a '\n' at the end.
- Enhanced the 'playerinfo' console command so more information about each setting is shown.


SVN r750 (trunk)
2008-02-16 15:02:52 +00:00
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
Christoph Oelckers ac04233590 - Added Karate Chris's 'Take' console command submission.
SVN r624 (trunk)
2007-12-23 14:23:52 +00:00
Christoph Oelckers b48cc1792b - Added Karate Chris's TEAMINFO submission.
SVN r610 (trunk)
2007-12-20 20:22:31 +00:00
Randy Heit a849564d62 - Fixed: When the game starts with the net pane open, the abort button
receives the input focus. When the pane is closed, the focus doesn't
  return to any window, so even though the window is still active, it no
  longer has the focus and does not receive input events.
- Fixed: The network synch timer was still left running after the game
  started. (Windows only)
- Fixed: When a player leaves the game at the exact moment they are being
  damaged, the game could crash because their actor still had a valid player
  pointer, but the player's mo pointer had been NULLed.


SVN r588 (trunk)
2007-12-09 01:14:35 +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
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 ecc45d5d6e - Added two new net commands: DEM_WIPEON and DEM_WIPEOFF. They keep track of
when a player is going through a screen wipe and act like a pause, so the
  game doesn't run several tics afterward to catch up with it.


SVN r485 (trunk)
2007-02-15 00:01:21 +00:00
Randy Heit f1c41539de - Fixed: LocalViewPitch could overflow and wrap around when a netgame stalls.
SVN r459 (trunk)
2007-01-22 23:50:09 +00:00
Randy Heit f0f976c4f5 - Added a summonfoe CCMD, which is analagous to summonfriend but forces the
summoned creature to be hostile instead.


SVN r453 (trunk)
2007-01-16 03:04:00 +00:00
Randy Heit 4899fa91f1 - Fixed the new network status display for the Linux terminal.
SVN r428 (trunk)
2006-12-29 01:48:47 +00:00
Randy Heit 83373fba88 Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.

- Reorganized the network startup loops so now they are event driven. There is
  a single function that gets called to drive it, and it uses callbacks to
  perform the different stages of the synchronization. This lets me have a nice,
  responsive abort button instead of the previous unannounced hit-escape-to-
  abort behavior, and I think the rearranged code is slightly easier to
  understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
  in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
  releasing a DirectDraw or Direct3D interface, the DWM can still use the
  last image drawn using them when it composites the window. It doesn't always
  do it but it does often enough that it is a real problem. At this point, I
  don't know if it's a problem with the release version of Vista or not.
  After messing around, I discovered the problem was caused by ~Win32Video()
  hiding the window and then having it immediately shown soon after. The DWM
  kept an image of the window to do the transition effect with, and then when
  it didn't get a chance to do the transition, it didn't properly forget about
  its saved image and kept plastering it on top of everything else
  underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
  Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
  sound if initialization failed, so this only applies when snd_output is set
  to "alternate" which now also falls back to no sound. In addition, it wasn't
  working right, and I didn't feel like fixing it for the probably 0% of users
  it affected.
- Fixed: The edit control used for logging output added text in reverse order
  on Win9x.
- Went back to the roots and made graphics initialization one of the last
  things to happen during setup. Now the startup text is visible again. More
  importantly, the main window is no longer created invisible, which seems
  to cause trouble with it not always appearing in the taskbar. The fatal
  error dialog is now also embedded in the main window instead of being a
  separate modal dialog, so you can play with the log window to see any
  problems that might be reported there.
  
  Rather than completely restoring the original startup order, I tried to
  keep things as close to the way they were with early graphics startup. In
  particular, V_Init() now creates a dummy screen so that things that need
  screen dimensions can get them. It gets replaced by the real screen later
  in I_InitGraphics(). Will need to check this under Linux to make sure it
  didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
    - I_StartModeIterator()
    - I_NextMode()
    - I_DisplayType()
  I_FullscreenChanged() was also removed, and a new fullscreen parameter
  was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
  initialized post-1.22.


SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
Randy Heit bcca366e8f - Removed A_JumpSet and merged its functionality with A_Jump by turning
A_Jump into a varargs function.
- Fixed: P_MorphPlayer() should check that the desired type is actually a
  PlayerPawn.
- Added an optional parameter to the morphme ccmd that specifies the player
  class to morph into.
- Changed the SetActorPitch, SetActorAngle, Thing_Spawn*, Thing_Projectile*,
  and Thing_Move functions so that TID 0 affects the activator.


SVN r362 (trunk)
2006-10-27 03:03:34 +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 bbfc149bd7 - Fixed: Summoned friendly monsters added to the total kill count.
SVN r334 (trunk)
2006-09-20 08:09:00 +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 a6d656b108 - Updated thingdef_specials.h for the new thingdef_specials.gperf file.
- Created a new MorphedMonster class that Chicken and Pig now derive from.
  This class automatically takes care of unmorphing the monster when its
  time is up.
- Made PlayerClass and MonsterClass properties of EggFX. You can override
  these in a subclass to create new kinds of morpher projectiles. Along with
  that, MorphWeapon is a new property of PlayerPawn that controls what type
  of weapon you have available while morphed ("None" means you have no
  weapons).
- Changed morphed monsters to record the time when they want to unmorph, not
  the time left until they unmorph. This simplifies calling
  P_UpdateMorhpedMonster() because you don't need to pass it a tic count.
- Added an optional second parameter to A_SpawnDebris and an optional
  fifth parameter to A_SpawnItem that both do the same thing: If you set it
  to 1, then the spawned actor will be assigned the same translation table
  as the actor that called the function.
- Moved the blood colorization in P_SpawnBlood() ahead of the SetDamage()
  call so that the blood color will available to the states of the blood
  actor.
- Extended the puke command so that giving it a negative script number will
  act like ACS_ExecuteAlways and always execute the script. (Ugh. Why did I
  use's Raven's cheat code to name this command?)


SVN r296 (trunk)
2006-08-17 00:19:26 +00:00
Christoph Oelckers ecce60e8f9 SVN r258 (trunk) 2006-07-16 09:10:45 +00:00
Randy Heit 38a073626f - Changed decorate replacement to be opt-in instead of opt-out. This allows for
greater flexibility in what can be replaced (replaced actors need not be ancestors
  of actors that replace them) at the expense of not having universal actor
  replacement. Instances where replacements work:
   - Line specials that spawn things (Thing_Spawn and related)
   - ACS spawning commands (SpawnSpot and the like)
   - Spawning mapthings at level load time in P_SpawnMapThing()
   - Spawning items off of dead dudes in P_DropItem()
   - The A_SpawnItem decorate function
   - The summon and summonfriend console commands
   - ThingCount will count both original actors and their replacements as the same
     things.
  TBD: Should the ACS inventory functions use replacements too, or not?


SVN r249 (trunk)
2006-07-13 03:34:50 +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
Christoph Oelckers a0c912ef2d - Fixed: Jumping and crouching at the same time created jerky results.
Now jumping takes precedence and you can't crouch while pressing the
  jump key (which causes an uncrouch.)

SVN r213 (trunk)
2006-06-22 09:36:48 +00:00
Christoph Oelckers e7f21912a5 Fixed: Player could crouch while dead.
SVN r209 (trunk)
2006-06-21 17:59:34 +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 df799ade24 - Fixed GCC 4 warnings in FNodeBuilder::CreateSubsectorsForReal().
- Changed f_finale.cpp/atkstates[] into a static variable, since its
  anonymous type prevents it from being accessed from other files anyway.
- Fixed: The behavior of the eventtail advancement in d_net.cpp/CheckAbort()
  was compiler-dependant.
- Fixed warnings GCC 4 threw up while compiling re2c and lemon.
- Removed __cdecl from makewad.c again. This is already defined as a builtin
  for MinGW, and redefining it produces a warning. (Why is main explicitly
  declared __cdecl anyway?)
- Fixed building ccdv-win32 with GCC 4. GCC 4 creates a memcpy call, which
  won't work because it doesn't get linked with the standard C library.


SVN r135 (trunk)
2006-05-22 01:34:07 +00:00
Randy Heit 62b7dd3efc - Fixed default.cbd and Makefile.mingw for current code state.
- New: Pausing the game (through any means, not just the pause key) now pauses
  sound effects as well as music. "PauseMusicInMenus" has been added as a
  MAPINFO flag to also pause the music when a menu or the console are open.


SVN r134 (trunk)
2006-05-21 02:10:16 +00:00
Randy Heit ac53ed6ecd SVN r116 (trunk) 2006-05-16 02:50:18 +00:00
Christoph Oelckers caed57baa5 SVN r114 (trunk) 2006-05-14 14:30:13 +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 a0c88a9b31 - Yay! We now seem to be free of memory leaks! The next step will be to
merge 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. (Interestingly, the amount of memory used when repeatedly
  executing the same map command at the console varies up and down, but it
  now stays relatively stable rather than increasing unbounded.)
- Fixed: The list of resolutions in the video modes menu was not freed
  at exit.
- Fixed: mus_playing.name was not freed at exit.
- Fixed: SN_StopAllSequences() should be called at the start of
  P_FreeLevelData(), not just before the call to P_SetupLevel() in
  G_DoLoadLevel(), so it can run even at exit. And C_FullConsole() can
  call P_FreeLevelData() to free more memory too.
- Fixed: StatusBar was not freed at exit.
- Fixed: spritesorter was not freed at exit.
- Fixed: Bad things happened if FString's data pool was destroyed before
  all C_RemoveTabCommand() calls were made.
- Added an overload for FArchive << FString.
- Fixed: The players' log text was not freed at exit.
- Fixed: Bot information was not freed at exit.
- Fixed: doomcom was not freed at exit. But since it's always created,
  there's no reason why it needs to be allocated from the heap. My guess
  is that in the DOS days, the external packet driver was responsible for
  allocating doomcom and passed its location with the -net parameter.
- Fixed: FBlockNodes were not freed at exit.
- Fixed: Openings were not freed at exit.
- Fixed: Drawsegs were not freed at exit.
- Fixed: Vissprites were not freed at exit.
- Fixed: Console command history was not freed at exit.
- Fixed: Visplanes were not freed at exit.
- Fixed: Call P_FreeLevelData() at exit.
- Fixed: Channel, SoundCurve, and PlayList in s_sound.cpp were not freed at
  exit.
- Fixed: Sound sequences were not freed at exit.
- Fixed: DSeqNode::Serialize() did not resize the m_SequenceChoices array
  when loading.


SVN r106 (trunk)
2006-05-11 04:00:58 +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 c8cdb52863 - Removed generational garbage collection from the string pool because it didn't
actually work.
- Turned the list of TabCommands into a TArray because I saw lots of console
  commands in the memory leak report at exit. Then I realized those were actually
  key bindings, so I changed the Bindings and DoubleBindings arrays into FString
  arrays.
- Fixed: FStringCVar was missing a destructor.
- Added TArray::Insert().
- Fixed: TArray::Delete() used memmove().
- Renamed Malloc(), Realloc(), and Calloc() to M_Malloc(), M_Realloc(), and
  M_Calloc() so that the debug versions can be defined as macros.
- Enabled the CRT's memory leak detection in WinMain().
- Moved contents of PO_DeInit() into P_FreeLevelData().
- Removed "PolyBlockMap = NULL;" from P_SetupLevel(), because the P_FreeLevelData()
  call it makes next does the exact same thing, but also freeing it if needed.
- Fixed: Unneeded memcpy in UnpackUserCmd() when ucmd and basis are the same


SVN r75 (trunk)
2006-05-04 03:49:46 +00:00
Randy Heit ea3b76815d - Removed -bpal parameter. Blood's blood.pal is loaded from blood.rff, and
its tiles are loaded from the same directory.
- RFF files now load their entire directories into the lumplist.
- Added char * and const char * type coversions for FString, so FStrings can be
  freely passed to functions expecting C strings. (Except varargs functions,
  which still require manually fetching the C string out of it.)
- Renamed the name class to FName.
- Renamed the string class to FString to emphasize that it is not std::string.


SVN r74 (trunk)
2006-05-03 22:45:01 +00:00
Randy Heit 8ea6569de8 - Fixed: Crash when opening the player setup menu when you're so dead that
your head has popped off your body.
- Fixed: When item respawning is on and you play on skill 1 or 5, picking
  up ammo would permanently double the amount of ammo received from that
  item the next time it gets picked up.
- Added a check to PlayerIsGone() for players who have already had their
  actors destroyed before calling it.
- Fixed: G_CheckDemoStatus() only restored your name, autoaim, and color
  settings after playing back a demo.
- Added DEM_SPRAY net command so that sprayed decals work in multiplayer
  and demos.
- Changed DEM_GIVECHEAT to use a word for specifying the item quantity.
  This is useful mainly for giving yourself more than 255 health at a time.
- Fixed: DEM_SUMMONFRIEND was not handled by Net_SkipCommand().


SVN r58 (trunk)
2006-04-21 05:44:21 +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