Commit Graph

27 Commits

Author SHA1 Message Date
Christoph Oelckers 43ddce519c - Fixed: Inventory.Icon printed error message for all the missing icons in
Strife's teaser.
- Fixed: st_start.cpp needed a 
  #define _WIN32_WINNT 0x0501.
- Fixed a few uninitialized variables warnings for GCC.


SVN r418 (trunk)
2006-12-19 16:08:48 +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 419724dd02 - Assembly code is disabled when building with __APPLE__ defined, for now.
- If you aren't targeting x86, m_fixed.h only includes basicinlines.h now.
- Moved x64inlines.h into basicinlines.h.
- Replaced uses of __int64 with types from doomtype.h.
- The stop console command no longer ends single player games, just the demo
  that was being recorded.
- In C mode, the sc_man parser no longer allows multi-line string constants
  without using the \ character to preface the newline character. This makes
  it much easier to diagnose errors where you forget the closing quote of a
  string.
- Fixed: V_BreakLines() added the terminating '\0' to the last line of the
  input string.
- Added font as a parameter to V_BreakLines and removed its keepspace
  parameter, which was never passed as anything other than the default.


SVN r331 (trunk)
2006-09-19 23:25:51 +00:00
Randy Heit c412b42703 - Fixed: cycle_t was still a DWORD and not a QWORD under GCC.
- The stat meters now return an FString instead of sprintfing into a fixed
  output buffer.
- NOASM is now automatically defined when compiling for a non-x86 target.
- Some changes have been made to the integral types in doomtype.h:
  - For consistancy with the other integral types, byte is no longer a
    synonym for BYTE.
  - Most uses of BOOL have been change to the standard C++ bool type. Those
    that weren't were changed to INTBOOL to indicate they may contain values
    other than 0 or 1 but are still used as a boolean.
  - Compiler-provided types with explicit bit sizes are now used. In
    particular, DWORD is no longer a long so it will work with both 64-bit
    Windows and Linux.
  - Since some files need to include Windows headers, uint32 is a synonym
    for the non-Windows version of DWORD.
- Removed d_textur.h. The pic_t struct it defined was used nowhere, and that
  was all it contained.


SVN r326 (trunk)
2006-09-14 00:02:31 +00:00
Christoph Oelckers aef5df6628 - Did some minor reorganization of code in r_data.cpp (mostly to make
handling of textures easier in GZDoom.)
- Did some preparations to allow loading folders on the HD into the lump
  directory.


SVN r298 (trunk)
2006-08-17 22:10:50 +00:00
Christoph Oelckers 31c749058b - Generalized Hexen's class-based spawning to be a property of the player class
so now it is available in all games.
- Replaced the call to A_FlameSnd in the HereticPlayer's burn death sequence
  with A_FireScream and defined *burndeath for Heretic.
- Added Grubber's custom player class support.


SVN r250 (trunk)
2006-07-13 10:17:56 +00:00
Randy Heit 18af8a57cf - Restored the previous level flag values to avoid needlessly breaking some
savegames at this point in time.
- Fixed: R_ClearPlanes() did not clear skybox planes for a full clear.
- Streamlined zip file loading by delaying the processing of the local file
  header until it is actually needed.


SVN r247 (trunk)
2006-07-12 03:35:55 +00:00
Randy Heit 6695e255ce - Added actor replacement for DECORATE. This works at a higher level than
using duplicate DoomEdNums and will affect all attempts to spawn the
  replaced actor. However, because this happens for all spawns and not just
  at map load, the replacing actor must be compatible with the replaced
  actor, which means that an actor can only serve as a replacement for one
  of its baseclasses. For example, if you want to use a modified imp, you can
  use this DECORATE:
      actor MyImp : DoomImp replaces DoompImp
      {
          // Put changed properties here
      }
- New: The IWAD dialog now remembers the last IWAD you picked and
  automatically highlights it the next time you run the game. This also
  applies if you check "Don't ask me this again": The IWAD selected will be
  the one that gets automatically loaded, not the one located first. (Using
  the -iwad parameter will not change the default IWAD.) In addition, you
  can now bring the dialog up even if you disable it by holding down SHIFT
  during startup.
- Changed ExtractFilePath() and ExtractFileBase() to return FStrings instead
  of writing to a provided output buffer. ExtractFileBase() can also
  optionally keep the file's extension in the result.
- Removed the -heapsize parameter entirely. The informational message should
  no longer be needed.
- Removed -maxdemo parameter. There's no point to having it around since
  the demo buffer grows automatically.


SVN r238 (trunk)
2006-07-08 02:17:35 +00:00
Christoph Oelckers cf7d8ab43b - Removed the unused sfx_ variables for the chainsaw sounds.
- Fixed map name checks in idclev, hxvisit, for +map and the titlemap.
- Changed handling of Zips so that the patches/, graphics/, sounds/ and
  music/ subdirectories no longer are placed in the global namespace. Instead
  new namespaces are defined. These namespaces aren't merged, however and 
  searching in them either returns a lump inside it or one from the global
  namespace when it doesn't come from a Zip file. Proper order of files is
  still observed though. As a result proper use of the directories inside Zips 
  is strictly enforced now so that for example anything used as a patch must be 
  in the patches/ directory and won't be found anywhere else.


SVN r199 (trunk)
2006-06-19 15:31:10 +00:00
Christoph Oelckers 461f8a796a More map loader fixes.
SVN r194 (trunk)
2006-06-15 17:26:27 +00:00
Randy Heit d99f5b4b99 SVN r191 (trunk) 2006-06-15 03:31:19 +00:00
Christoph Oelckers fd79fac52c - Fixed: Saving on maps that don't contain a MAPINFO definition didn't work.
- Fixed: The Zip loader loaded all WADs inside a Zip into the lump directory.
  This is only supposed to be done for WADs in the root directory.
- Complete restructuring of the map loading code. Previously the only way
  to put maps into Zips was to load them as embedded WADs which caused
  some problems, most importantly that the map's file name was irrelevant
  and the internal map label was used instead. With the new code there
  is now a properly defined way to add maps to Zips:
  * Maps are placed in a subdirectory called 'maps'.
  * Maps are stored as WADs that contain all map related lumps.
  * The first lump in the map's WAD directory must be the map label.
  * All lumps not belonging to the first map are ignored.
  * The map's file name determines the name the map is identified with. 
    For maps stored this way the internal map label is ignored so with this 
    method renaming maps is as easy as renaming a file and it is no longer 
    necessary to manipulate the map label.
  With the new code it is also possible to load external maps without
  adding them to the WAD list. Type 'open mapfile.wad' in the console
  to start such a map.
  The new code also performs stricter lump name checks to prevent accidental
  loading of non-map data.


SVN r188 (trunk)
2006-06-14 15:56:56 +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
Christoph Oelckers bb617dfbfd - Changed: The decision whether blood splatter sprites are spawned is no
longer determined by game. Instead there's a new flag, MF5_BLOODSPLATTER
  which is deciding what to do. To keep backwards compatibility this flag
  is unset for projectiles in Doom and Strife and set for them in Heretic 
  and Hexen. The same applies to DECORATE but of course the flag can be
  manipulated here.
- BLODxx sprites are now globally renamed to BLUDxx when not playing Doom. 
  This allows using the same states in every game, including the 
  Raven-specific blood actors.
- Gave the bullet puff and the axe blood masses of 5 so that the make small
  splashes.
- Added A_Light(value) code pointer for DECORATE to generalize the weapon
  light effect.
- Added 'noskillmenu' option to MAPINFO episode definitions. This is for
  WADs that want to implement a skill selection level.
- Added APROP_ChaseGoal and APROP_Frightened actor properties for ACS.
- Added MF5_CHASEGOAL flag that makes monsters to go after their goal even
  if they have a valid target.
- Fixed some issues with the changes to P_NewChaseDir I made to include
  MBF's dropoff logic.
- Added a PowerFrightener powerup class. It seemed like such a waste to
  have this cool feature but no means to use it in a decent fashion.
- Fixed: S_Init and S_ParseSndInfo should call atterm only once but not
  each time they are called.

SVN r112 (trunk)
2006-05-13 12:41:15 +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
Christoph Oelckers 7ed597fcbe - Fixed: The FSpecialFont constructor created the name string twice.
- Fixed: The animated door parser was still leaking memory when it encountered
  an invalid animation due to missing textures.
- Fixed: The music volume list wasn't freed.
- Fixed: The image for WADs that were loaded from inside Zips was never freed.


SVN r92 (trunk)
2006-05-09 21:21:57 +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
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 01a41a6f13 - Made loading of Build's palette.dat automatic if it's found inside a loaded
group file, but the -bpal parameter remains for now.
- Made loading of Build art tiles automatic if they are found inside a group
  file. Removed the corresponding command-line parameter.
- Added support for Ken Silverman's group files.


SVN r72 (trunk)
2006-05-02 04:38:12 +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 153d3b4681 SVN r45 (trunk) 2006-04-14 16:25:57 +00:00
Christoph Oelckers 07f35a7008 SVN r44 (trunk) 2006-04-14 12:58:52 +00:00
Randy Heit e815474cbe - Fixed: ACS improperly calculated the address of local variables when
returning from one function to another function when the function that
  was called was used as part of an expression.
- Fixed: Using Thing_Hate with arg0 (hater) set to 0 from an open script
  could crash.
- Fixed: Some items along ledges in Hexen's MAP32 (Orchard of Lamentations)
  appeared at the bottom of the ledge (and consequently inside it) instead
  of on top of it because the items were placed directly on the lines.
  AActor::LinkToWorldForMapThing() needs to use the original R_PointOnLineSide()
  code to handle situations like this. Previously, it just used the original
  code for straight horizontal/vertical lines and used the new code for
  diagonal lines.
- Fixed: FWadCollection::MergeLumps() used in incorrect realloc.
- Fixed: FPlayList::NextLine() did not properly handle blank lines in the
  playlist.
- Changed: Decals now use lightweight thinkers instead of actors. (76 bytes
  versus 396, so you save 320k if you have 1024 decals present.)
- Fixed: Wads added with pullin were loaded immediately after the IWAD.
  Exec files are now processed immediately before -file but after autoloading
  wads in D_DoomMain().
- Fixed: sdl/i_system.h unconditionally defined SHARE_DIR, preventing
  redefinition from the command line.
- Fixed: The standard way to include SDL.h is <SDL.h>, not <SDL/SDL.h>.
- Fixed: Returned FActiveInterpolation::HashKey()'s return type to size_t,
  avoiding a pointer truncation warning.


SVN r30 (trunk)
2006-04-12 01:50:09 +00:00
Randy Heit 16c085e146 - Fixed: The strupr() implementation in w_wad.cpp relied on compiler-dependant
behavior.
- Fixed fix: ParseActorProperties() still wasn't sending + or - to
  ActorFlagSetOrReset().
- Fixed: [GZ] An item without use state won't be removed when being picked up.
  The call to GoAwayAndDie is missing.
- Fixed: [GZ]  A_GiveInventory sets the amount to give to a value passed to
  this function. This is ok for everything except Health items. They should
  give their original amount multiplied with the passed parameter.
- Fixed: Potential buffer overrun when launching timidity.


SVN r21 (trunk)
2006-04-09 19:34:35 +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