Commit Graph

27 Commits

Author SHA1 Message Date
Christoph Oelckers b37d0ba2ea - Fixed: Completely empty patches (8 0-bytes) could not be handled by the
texture manager. They now get assigned a new FEmptyTexture object
  that is just a 1x1 pixel transparent texture.
- Fixed: Multiple namespace markers of the same type were no longer detected.
- Fixed sprite renaming.


SVN r1566 (trunk)
2009-04-30 11:10:38 +00:00
Christoph Oelckers cc066bc409 - complete restructuring of resource file handling for more flexibility and future
extensions.
- Removed merging of special namespaces. For the texture manager this has
  become totally useless so there is no need to do this anymore. Not merging
  the namespaces also allows a much more reliable detection of lumps belonging
  to special namespaces so the ScanForFlatHack function is no longer needed.
  Instead, any lump up to F_END with a length of 4096 will be marked for 
  inclusion as a flat texture if no F_START marker is found.
- Made the counting of intermission stats in Doom a GAMEINFO option so that
  it can be activated in all games.


SVN r1555 (trunk)
2009-04-23 22:49:38 +00:00
Randy Heit 7e7429e3d2 - Added support for 7z archives.
SVN r1545 (trunk)
2009-04-15 03:58:10 +00:00
Christoph Oelckers 505031fa5a - removed gamemission variable because it wasn't used anywhere.
- removed gamemode variable. All it was used for were some checks that
  really should depend on GI_MAPxx.
- Externalized all internal gameinfo definitions.
- added include to MAPINFO parser.
- split IWAD detection code off from d_main.cpp into its own file.
- disabled gamemission based switch filtering because it is not useful.
- added GAMEINFO submission by Blzut3 with significant modifications. There
  is no GAMEINFO lump. Instead all information is placed in MAPINFO, except
  the data that is needed to decide which WADs to autoload.


SVN r1497 (trunk)
2009-03-22 11:37:56 +00:00
Christoph Oelckers 81f834e3f4 - fixed: The WAD manager's hash chains could not handle more than 65535 lumps.
- Reinitializing the WAD manager will now delete all data.
- Preparation for GAMEINFO: zdoom.pk3 will be opened separately before checking the IWAD
  so that the internal GAMEINFOs can be externalized, too.


SVN r1494 (trunk)
2009-03-21 09:03:08 +00:00
Christoph Oelckers 4cba91a936 - Added a Gets function to the FileReader class which I planned to use
to enable Timidity to read its config from Zips. 
  I put this on hold though after finding out that the sound quality 
  isn't even near that of Timidity++.
- GCC-Fixes (FString::GetChars() for Printf calls)
- Added a dummy Weapon.NOLMS flag so that Skulltag weapons using this flag
  can be loaded


SVN r901 (trunk)
2008-04-11 10:16:29 +00:00
Randy Heit d2c275bbb3 - Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
  the same lump name no longer involves any degree of guesswork in
  determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
  sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
  pointer checks, in case an improper sequence was encountered during
  parsing but not early enough to avoid creating a slot for it in the array.


SVN r874 (trunk)
2008-04-03 03:19:21 +00:00
Christoph Oelckers d5c3693fd9 - Added SnowKate709's A_DamageMaster/A_DamageChildren patch.
- Added a SFX_TRANSFERAMBUSHFLAG for A_SpawnItemEx.
- Added "Shaded" as a valid parameter for DECORATE's RenderStyle.
- Added Karate Chris's patch for a MAPINFO option making Strife conversations
  not halt the game.
- Extended the $limit fix that $alias and $random definitions can have their
  own $limit now.
- Fixed: When resolving a linked sound the limit of the current sound was
  ignored and the one of the referenced sound being used. This was particularly
  noticable when using the chaingun in a group of Zombiemen.
- Added a namespc parameter to FWadCollection::CheckNumForFullName which is
  used when a normal lump name has to be looked up and changed all
  CheckNumForFullName/CheckNumForName combinations in the source to use
  the extended version of CheckNumForFullName only to have consistent
  behavior for lump name lookup. 

SVN r865 (trunk)
2008-03-29 22:59:41 +00:00
Christoph Oelckers 8ea316e33b - Integrated xlatcc into ZDoom.exe so that the linedef translation files
don't need to be compiled and can be stored as text in zdoom.pk3.


SVN r815 (trunk)
2008-03-19 21:09:53 +00:00
Christoph Oelckers 1b28557341 - Got rid of most TexMan.AddPatch calls because they are no longer needed.
- Got rid of R_InitPatches because the new texture init code needs to preload
  everything to work correctly.
- Rewrote texture manager initialization to order textures primarily by WAD 
  rather than by type. This way later textures will always override earlier 
  ones. The only exception is that TEX_MiscPatch are only used as a fallback
  if nothing else can be found.
- Optimized the tryany case of FTextureManager::CheckForTexture. It is not
  necessary to scan the hash chain twice. The required information can be
  retrieved during the first pass as easily and even offers a little more
  control.
- Made FFont destructor virtual.
- Added 'Ice' translation to DECORATE.

(Caution: Not fully tested yet!)

SVN r715 (trunk)
2008-01-26 23:20:34 +00:00
Randy Heit e5572a1c4e - Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
  loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
  support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
  with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
  on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
  scope than before. The skipped entry is assumed to always be at 248, and
  it is assumed that all Shader Model 1.4 cards suffer from this. That's
  because all SM1.4 cards are based on variants of the ATI R200 core, and the
  RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
  other flavors of the R200 are any different. (Interesting note: With the
  Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
  debug Direct3D 9 runtime, but it works perfectly fine with the retail
  Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
  math inside pixel shaders. That would explain perfectly why I can't use
  constants greater than 1 with PS1.4 and why it can't do an exact mapping to
  every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
  "color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
  completely setup, meaning that Shader Model 1.4 cards could not change
  resolution.
- I have decided to let remap palettes specify variable alpha values for
  their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
  reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
  when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
  (Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
  gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
  unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
  being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
  accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
  multiple script scanner states can be stored without being forced to do so
  recursively. I think I might be taking advantage of that in the near
  future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
  * Fixed: When using even length values in drawnumber it would cap to a 98
    value instead of a 99 as intended.
  * The SBarInfo parser can now accept negatives for coordinates. This
    doesn't allow much right now, but later I plan to add better fullscreen
    hud support in which the negatives will be more useful. This also cleans
    up the source a bit since all calls for (x, y) coordinates are with the
    function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
  software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
  space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
  STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
  gets blended with the background, since that seems like a good idea for
  reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
  Since the ERenderStyle enumeration was getting rather unwieldy, I converted
  it into a new FRenderStyle structure that lets each parameter of the
  blending equation be set separately. This simplified the set up for the
  blend quite a bit, and it means a number of new combinations are available
  by setting the parameters properly.


SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
Randy Heit 522e7fe07f - Removed DCanvas::Blit(), as it's no longer used.
- Added a function to create a texture from a stand-alone PNG file. The save/
  load menus now use this to get their thumbnails.


SVN r652 (trunk)
2007-12-28 01:54:14 +00:00
Christoph Oelckers 6fad457592 - Fixed: GetLumpOffset must call SetLumpAddress when being called for uncompressed
Zip entries.
- Fixed: Some of Doom's weapon obituaries didn't have the $-prefix that indicates a 
  reference to the string table.
- Fixed: The check for a valid weapon's spawn state for weapon dropping was incorrect.


SVN r523 (trunk)
2007-04-30 08:09:51 +00:00
Randy Heit 72c93b479e - Added support for damage-specific player pain sounds.
- Removed the constraint that all $playerreserve SNDINFO commands must come
  before the other $player commands.
- Fixed: TArray::Reserve did not construct its newly allocated entries.
- Changed the damage type for drowning from 'Water' to 'Drowning'.


SVN r466 (trunk)
2007-01-28 04:59:04 +00:00
Randy Heit ba5e77e021 - Fixed: Since FMemLump is now implemented on top of FString, it never
contains a NULL point, so the GetMem() method should fake it by
  returning NULL when the string is empty. Reverted p_xlat.cpp to its
  old revision.


SVN r465 (trunk)
2007-01-28 03:17:02 +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
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
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
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 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 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 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