Commit Graph

33 Commits

Author SHA1 Message Date
Christoph Oelckers 8ca7c05e9d - Changed FImageCollection to return translated texture indices so
that animated icons can be done with it.
- Changed FImageCollection to use a TArray to hold its data.
- Fixed: SetChanHeadSettings did an assignment instead of comparing
  the channel ID witg CHAN_CEILING.
- Changed sound sequence names for animated doors to FNames.
- Automatically fixed: DCeiling didn't properly serialize its texture id.
- Replaced integers as texture ID representation with a specific new type
  to track down all potentially incorrect uses and remaining WORDs used
  for texture IDs so that more than 32767 or 65535 textures can be defined.


SVN r1036 (trunk)
2008-06-15 18:36:26 +00:00
Christoph Oelckers 47aacc45c8 - Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
  FMultiPatchTexture only calls a virtual function instead of doing any
  type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
  because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.


SVN r1012 (trunk)
2008-06-01 20:43:02 +00:00
Christoph Oelckers dbf4677da9 - Added speed factors for texture warp commands.
- Added damage type parameter to A_Die.

SVN r942 (trunk)
2008-04-26 08:46:55 +00:00
Christoph Oelckers 4667bfe46f - Added translucent blending modes to FMultipatchTexture (not tested yet!)
- Also changed all true color texture creation functions to use proper alpha
  values instead of inverted ones.
- Changed FRemapTable so that all palette entries must contain proper alpha
  values. 
- Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check.
- Changed: The boss brain's explosions play weapons/rocklx which is an 
  unlimited sound. This can become extremely loud. Replaced with a new
  sound which is just an alias to weapons/rocklx but has a limit of 4.


SVN r932 (trunk)
2008-04-22 18:48:30 +00:00
Christoph Oelckers d5738e3876 - Made translation support for multipatch textures operational.
SVN r919 (trunk)
2008-04-16 18:17:20 +00:00
Christoph Oelckers b2bfad0c50 - Added translation support to multipatch textures. Incomplete and not tested yet!
- Added Martin Howe's morph weapon update.


SVN r916 (trunk)
2008-04-15 22:17:30 +00:00
Christoph Oelckers ce5d4dba02 - Changed true color texture creation to use a newly defined Bitmap class
instead of having the copy functions in the frame buffer class.
- Fixed: The WolfSS didn't have its obituary defined.


SVN r915 (trunk)
2008-04-15 18:05:39 +00:00
Christoph Oelckers adc9f090ef - Added rotation 90° angles only) and mirroring to the Multipatch texture
composition code.
- Fixed: The game crashed when a level was ended while a player was morphed
  by a powerup. 

SVN r912 (trunk)
2008-04-14 18:51:05 +00:00
Christoph Oelckers b54b9bad7a - Fixed: A_VileAttack positioned the fire on the wrong side of the target.
- Reorganized the HackHack code so that the image creation was moved into
  MakeTexture. This was necessary because Unload deleted the pixel data
  and broke the whole thing.
- Fixed: FPatchTexture::HackHack and FDoomStatusbarTexture::DrawToBar used the
  obsolete and uninitialized variable Near255. 
- Removed the span creation code specific to FPatchTexture. It only has an
  advantage when the lump has already been loaded in memory but since that
  is no longer the case now the generic version in FTexture is actually better.
- Changed: FTexture::CopyToBlock no longer uses the spans but the pixel buffer
  directly. Since most patches in multipatch textures are non transparent
  the added overhead from creating the spans far outweighs any savings they
  might provide. It is also simpler to handle for mirrored or rotated patches now.
- Changed: Textures only create the spans when really needed. Flats and native
  textures, for example, do not and it only created needless overhead that they
  were always created along with the pixel buffer.
- Made use of player and actor variables consistent in a_hereticweaps.cpp.
- Fixed: A few calls to P_SpawnPlayerMissile passed 0 as angle



SVN r911 (trunk)
2008-04-14 12:10:45 +00:00
Christoph Oelckers a53bfa7113 - Fixed a few bufs in the parser for composite textures.
- Changed: When loading Zips all patches in the patches/ directory should
  be loaded, not only those used by a texture in TEXTUREx. 
- Disabled timidity_mastervolume for the internal Timidity again because
  with the altered volume calculation it is no longer needed and the default
  volume is on the same level as OPL and FMOD.


SVN r909 (trunk)
2008-04-13 11:40:53 +00:00
Christoph Oelckers 6b2a7b8b03 - Added Martin Howe's morph system update.
- Added support for defining composite textures in HIRESTEX. It is not fully tested
  and right now can't do much more than the old TEXTUREx method.
- Added a few NULL pointer checks to the texture code.
- Made duplicate class names in DECORATE non-fatal. There is really no stability
  concern here and the worst that can happen is that the wrong actor is spawned.
  This was a constant hassle when testing with WADs that contain duplicate resources.


SVN r905 (trunk)
2008-04-12 15:31:18 +00:00
Christoph Oelckers 14533f867d - Fixed: ANIMATED allowed animations between different texture types.
- Added a debuganimated CCMD that can be used to output some information
  if a WAD shows broken animations.
- Fixed: The handling for enum values in Xlat was incorrect. The rule with 
  value assignment must set the counter one higher than the current value.
- Fixed: The definition of enums in the Xlat grammar was right-recursive
  which could create stack overflows in the parser. Made it left-recursive as
  recommended in Lemon's docs. 


SVN r850 (trunk)
2008-03-25 09:43:50 +00:00
Randy Heit ce811319a7 - Fixed: If an object is flagged for euthanization while it's in the gray
list, it should just be ignored during the propagation stage.
- After sleeping on it and realizing what was really going in, I generalized
  the inventory fix from the 13th: The actor is flagged by Destroy(), then it
  is later inserted into the thinker list by DThinker::SerializeAll(). So
  rather than unlinking the skipped player from their inventory, just make
  sure any flagged thinkers aren't inserted into a list.
- Fixed: FCanvasTextureInfo::Viewpoint needed a read barrier, and the whole
  list should serve as a root.
- Reimplemented SPC playback as a custom codec for FMOD.
- Removed spc_frequency, because snes_spc only supports the SPC's native
  frequency of 32000 Hz.


SVN r806 (trunk)
2008-03-16 00:54:53 +00:00
Christoph Oelckers a329efe9a4 - Added a check to Wads.CheckNumForName to return -1 for names longer than
8 characters which contain path separators.
- Fixed: Hires texture replacement must replace all matching textures, not
  just the first one found. This is particularly important for icons based
  on sprites.
- added a con_alpha CVAR to set the console's translucency.
- Added MartinHowe's submission for A_CustomBulletAttack aimfacing parameter.
- Added MartinHowe's submission for A_PlaySoundEx attenuation parameter.
- Fixed: Bots shouldn't target friendly monsters.
- Fixed a typo in sbarinfo.cpp (noatribox instead of noartibox.)

SVN r654 (trunk)
2007-12-28 11:17:52 +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
Randy Heit 834e4bef32 - Changed the way gamma works for D3DFB: In windowed mode, the display is
drawn to a texture, then that texture is copied to the real back buffer
  using a gamma-correcting pixel shader. In fullscreen mode, SetGammaRamp
  is used.
- Fixed flashing of vid_fps display when fps > 1000.
- Fixed loading of RGB textures for native 2D mode.
- Changed the first rotozoomer's data because it just became too obvious when
  the backdrop is drawn with a full 256 distinct colors available.
- Set the player backdrop to update no more frequently than 35 FPS, so opening
  the player setup menu before starting a game won't produce a very fast
  moving backdrop.
- Changed the player backdrop into a texture so that it can be drawn like
  anything else.


SVN r648 (trunk)
2007-12-27 04:30:12 +00:00
Christoph Oelckers b88f46736b - Added true color processing to FDDSTexture. This is untested so far
because I don't have any DDS textures to check it with.


SVN r609 (trunk)
2007-12-20 20:00:05 +00:00
Christoph Oelckers 28db2d9f15 - Fixed: FTexture::~FTexture() must destroy the associated native texture
if present.
- Modified GZDoom's true color texture copy functions and added them
  to generate 32 bit D3D textures. Paletted TGAs and PCXs are also handled
  this way but I don't think these 2 formats are worth some more special
  handling.
  (Question: Is it worth it to implement special handling for paletted PNGs
   so that they are used as 8 bit textures internally?)


SVN r608 (trunk)
2007-12-20 18:53:35 +00:00
Randy Heit 111853e623 - Added a framework for drawing the 2D screen elements with Direct3D textures.
They are not actually drawn with it yet, nor is it complete, but it's
  something to start with.
- Split up DCanvas::DrawTexture() into more pieces to make it easier to
  virtualize.
- Removed support for non-32-bit palette textures from D3DFB. What kind of
  card supports pixel shaders but not 32-bit textures?


SVN r605 (trunk)
2007-12-20 04:36:43 +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 a69d7f529e - Added support for DDS textures compressed with DXT1, DXT3, or DXT5.
SVN r309 (trunk)
2006-08-24 18:30:34 +00:00
Christoph Oelckers 5c7eeed018 - Added support for PCX textures (1, 4, 8 and 24 bit variants.)
SVN r303 (trunk)
2006-08-21 13:09:55 +00:00
Christoph Oelckers 93beb4d42e Fixed a few problems with the new texture code.
SVN r301 (trunk)
2006-08-20 17:07:22 +00:00
Christoph Oelckers 2536eca01d - Changed: Patch and IMGZ textures now initialize their dimensions upon creation.
The lump is open anyway at that time so deferring this action until the information
  is needed doesn't give any speed improvements. Now GetDimensions and all its
  associated overhead is gone.
- Added support for TGA textures. It can handle all of the common variations
  of this format.
- Changed: GI_PAGESARERAW is no longer checked. It wasn't really necessary before
  because the chance of texture misidentification is absolutely minimal.
  But raw pages are now restricted to textures of type TEX_MiscPatch only.
- Changed the automap parchment to use a regular texture. The previous 
  FAutomapTexture is only used as a last resort fallback now. If the code
  finds a recognizable graphic it will create a proper texture for it now.
- Fixed: Flats were only auto-scaled when in Doom flat format.
- Fixed: FMultiPatchTexture::CheckForHacks blindly assumed that all patches
  were FPstchTextures. Since the texture code does not have any type information
  I added a new flag bIsPatch for this purpose.
- Moved all texture classes into their own source files and created a new
  subdirectory 'textures' for that.
- Cleaned up the texture management code and added some stricter checks for
  the validity of Doom patches. The old code liked to crash when being passed
  some non-graphic data.

SVN r300 (trunk)
2006-08-20 12:55:46 +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
Randy Heit ed12bdc0f4 - Switched to IJG code for reading JPEG images. I have included a stripped-
down version of the library with the ZDoom source. (It actually uses less
  space than zlib now.) Unix users probably ought to use the system-supplied
  libjpeg instead. I modified Makefile.linux to hopefully do that. I'm sure
  Jim or someone will correct me if it doesn't actually work.


SVN r293 (trunk)
2006-08-16 18:08:39 +00:00
Randy Heit 21869a6c08 - Added JPEG texture support, courtesy of Ken's Picture Library. I will
probably switch to the IJG library once I pare it down. (Ken's code is 18K
  of C source but does not support progressive JPEG. The IJG library is over
  a megabyte of source and supports pretty much everything you would ever
  need ever.)
- Fixed endianness issue in FTextureManager::CreateTexture().
- Added support for interlaced PNGs. Now ZDoom is a mostly complete PNG
  reader. The only thing missing is 48-bit RGB and 16-bit grayscale support,
  which are just wastes of bits here, but also less likely to appear than
  an interlaced PNG. (However, if you are using interlaced PNGs for textures,
  then you are needlessly wasting space, since the image won't display
  progressively.)
- Fixed: Writing named screenshots didn't work.

SVN r292 (trunk)
2006-08-15 04:34:35 +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 27c00bcb95 - Fixed: FWarpTexture::MakeTexture must be declared virtual so that
the FWarp2Texture version of it can be called.

SVN r215 (trunk)
2006-06-23 08:20:08 +00:00
Christoph Oelckers a42f98af15 - Added another set of ACS inventory functions which take a tid for the actor
and aren't limited to the script's activator.
- Added GetSectorLightLevel(tag), GetActorCeilingZ(tid) and
  SetActorPosition(tid, x, y, z, fog) ACS functions.
- Fixed: First initialization of camera textures should not mark the rendered
  lines as mapped.

SVN r198 (trunk)
2006-06-18 15:49:00 +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 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