Commit Graph

1714 Commits

Author SHA1 Message Date
Randy Heit 7ea11cd169 - Allocate VM script code and constants in a single block for better locality of
reference.

SVN r1924 (scripting)
2009-10-17 02:09:29 +00:00
Randy Heit e209a2f208 - Stop aliasing strings onto names for function parameters.
SVN r1923 (scripting)
2009-10-17 01:38:54 +00:00
Randy Heit e5ef25591d - Use a union, rather than pointer aliasing, to access the parts of a VM instruction.
SVN r1922 (scripting)
2009-10-17 00:33:23 +00:00
Randy Heit c424c61ffc - Added fixed registers that won't be freed automatically, so that parameters
can actually be used. In the end, all temporaries should be assigned to
  unique virtual registers, and a register allocator can alias them to real
  registers, but as long as we don't do any CSE, this is good enough for now.


SVN r1920 (scripting)
2009-10-15 23:11:54 +00:00
Randy Heit 3cbac657d6 - Added type coercion for action function parameters.
- I add PARAMI, and then I don't even do it right...

SVN r1919 (scripting)
2009-10-15 22:15:55 +00:00
Randy Heit 126c738116 - Added PARAMI for the common case of passing an integer constant to a function.
- Made FxParameter::Emit free its operand's register.

SVN r1918 (scripting)
2009-10-15 21:59:37 +00:00
Randy Heit caa5f6dbdc - Send disassembly to a file, since it gets way too slow when sending a disassembly
of every single thing to the rich edit control.

SVN r1917 (scripting)
2009-10-15 21:23:59 +00:00
Randy Heit 85cc335725 - Added dummy code generation for states that pass parameters to action functions.
Currently, they're only good for disassembly and pasting into a proper text editor
  for viewing.
- Fixed some problems with the FxExpression emitters that were revealed by actually
  using them on the standard actors.

SVN r1911 (scripting)
2009-10-15 03:58:23 +00:00
Randy Heit 4fa94390d0 - Add parameter tracking to VMBuilder::Emit().
SVN r1910 (scripting)
2009-10-14 02:39:13 +00:00
Randy Heit 3001708d16 - Added some code for generating VM code from FxExpressions. This is completely untested, since
it isn't even used anywhere yet. In retrospect, I probably should have targeted an intermediate
  representation and done codegen with that instead, since that would be something I can reuse.

SVN r1908 (scripting)
2009-10-11 00:02:14 +00:00
Randy Heit e9db2c83a5 - Just some stuff.
SVN r1878 (scripting)
2009-09-25 03:44:58 +00:00
Randy Heit affed111fe - Add THashTrait specializations for FString, double, and float.
SVN r1877 (scripting)
2009-09-25 03:43:00 +00:00
Randy Heit 1a442742f7 - Sync with trunk.
SVN r1872 (scripting)
2009-09-23 00:24:47 +00:00
Randy Heit 3e7b69a12e - All states now use thunk functions to call the action functions. This is the bare
minimum to be able to say that VM is being used.
- Added tags for the pointer constants table.

SVN r1871 (scripting)
2009-09-23 00:23:24 +00:00
Randy Heit 11fbc57178 - Added a technique to try and minimize input lag with vsync enabled: Two
surfaces are alternately locked for read-only access each frame, forcing
  the driver to stop buffering more than one frame at a time. The input lag
  on my system doesn't seem to be as bad as it once was (I can no longer
  see it obviously with my naked eye), but turning antilag on "feels"
  slightly more responsive. The cvar d3d_antilag turns this technique on and
  off. See <http://www.xyzw.de/c120.html> for more details.


SVN r1870 (trunk)
2009-09-22 20:17:54 +00:00
Randy Heit 1263d015cb - Don't initialize GrayscaleToColor 256 times for each special colormap.
SVN r1869 (trunk)
2009-09-22 18:59:36 +00:00
Christoph Oelckers a3c80447d4 - fixed Powerup.Colormap 6 parameter version.
SVN r1868 (trunk)
2009-09-22 10:05:27 +00:00
Christoph Oelckers 9cc67f565c - Added a check to Dehacked code which tries to set the blend color.
It must set it to 0 if the alpha is 0 to avoid problems with special
  colormap detection.
- Changed SPECIALCOLORMAP_MASK again so that it does not interfere with
  any valid setting. It must use a value with a 0-alpha because these
  are guaranteed not to be produced by the DECORATE code elsewhere.
- Fixed precision issues with AddFixedColormap's search for identical colormaps.
- Added custom colormap support to texture composition code.
- Fixed initialization of FSpecialColormap::GrayscaleToColor. This is not
  a mapping from the palette but from a [0,255] grayscale ramp and used to
  apply colormaps to true color images for texture composition.

SVN r1867 (trunk)
2009-09-22 08:06:52 +00:00
Randy Heit d502655866 - For hardware 2D, apply fixed colormaps when copying to video memory instead
of doing it directly during the rendering, in order to improve visual
  fidelity for colormaps that aren't grayscale.


SVN r1866 (trunk)
2009-09-22 04:21:27 +00:00
Randy Heit 84a018f05a - Added support for defining the full color range of a special colormap.
SVN r1865 (trunk)
2009-09-22 02:54:19 +00:00
Randy Heit 79298285f7 - Making any blends with full red a special colormap seems like it would be far too
easy to accidentally trigger.

SVN r1864 (trunk)
2009-09-22 01:31:36 +00:00
Randy Heit e9d61a3f46 - Fixed: In letterbox modes, the clipping window needs to be adjusted down.
SVN r1863 (trunk)
2009-09-22 01:28:13 +00:00
Randy Heit 8377927412 - Apply BHS's ThingActivation patch.
SVN r1862 (trunk)
2009-09-22 01:16:54 +00:00
Christoph Oelckers 85a058436b - added missing death sound to Strife's barrel.
SVN r1861 (trunk)
2009-09-21 19:58:04 +00:00
Christoph Oelckers c285f38a02 - Fixed: When drawing with a special colormap the quad's flags weren't cleared
which could cause crashes.
- Added custom special colormaps to DECORATE.
- Cleaned up special colormap code and removed lots of dependencies on the
  knowledge of the tables' contents.



SVN r1860 (trunk)
2009-09-21 13:15:36 +00:00
Christoph Oelckers d51c0c047d - Changed call to R_DrawRemainingPlayerSprites into a virtual function
of DFrameBuffer because its implementation is specific to the software
  renderer and needs to be overridable.

SVN r1859 (trunk)
2009-09-20 06:23:10 +00:00
Randy Heit b8eb530a0d - Fixed: Wall drawing handled fixed light levels improperly (but did not
completely ignore them, either).
- Separated light level fixing out of player_t's fixedcolormap parameter.
  Using a fixed light level (e.g. PowerTorch) will no longer wipe out
  colored lighting.
- Moved the blending rectangle drawing into a separate discrete stage, since
  doing it while copying the 3D view window to the display now blends
  underneath the weapon instead of on top of it.
- Consolidated the special colormaps into a single 2D table.
- Tweaked the special colormaps slightly to make the true color results more
  closely match the paletted approximations.
- fb_d3d9_shaders.h was getting unwieldy, so I moved the shaders out of the
  executable and into zdoom.pk3. Shaders are still precompiled so I don't need
  to pull in a dependancy on D3DX.
- Added a few more shaders to accomodate drawing weapons with all the in-game
  lighting models. These are accessed with the new DrawTexture tags
  DTA_SpecialColormap and DTA_ColormapStyle.
- Player weapon sprites are now drawn using Direct3D and receive all the
  benefits thereof.


SVN r1858 (trunk)
2009-09-20 03:50:05 +00:00
Christoph Oelckers 857002e12f - Added Gez's real morph fix.
SVN r1857 (trunk)
2009-09-18 05:46:15 +00:00
Randy Heit f646a89216 - Size optimize PNG sprites.
SVN r1856 (trunk)
2009-09-17 22:59:20 +00:00
Christoph Oelckers 5613c3e14f - Fixed: Unmorphing while invulnerable was blocked.
SVN r1855 (trunk)
2009-09-17 20:58:43 +00:00
Christoph Oelckers 2fbcc13652 - Gez's latest cleanup patch.
SVN r1854 (trunk)
2009-09-17 20:54:07 +00:00
Christoph Oelckers f3f209160e - Renamed plane flags from SECF_* to PLANEF_*.
- Changed Heretic's plat raise type to use a flag to block further sector movement
  instead of keeping the dead thinker around.


SVN r1853 (trunk)
2009-09-17 10:40:38 +00:00
Randy Heit 1eb7912bd8 - Make the autosegs read-only.
- Derive PClass from dobject.cpp. This has one major ramification: Since the PClass
  is not allocated until runtime, you cannot initialize any static/global data
  structures with pointers to PClasses using RUNTIME_CLASS. Attempting to do so
  will just initialize with a NULL pointer. Instead, you can initialize using
  the address of the pointer returned by RUNTIME_CLASS and dereference that. By
  the time you have an opportunity to dereference it, it will no longer be NULL.
- Sync CmakeLists.txt.
- Random fixes for problems GCC spotted.

SVN r1852 (scripting)
2009-09-17 01:36:14 +00:00
Christoph Oelckers 555f41b0ba damn
SVN r1851 (trunk)
2009-09-16 23:21:16 +00:00
Christoph Oelckers f39c5c3b5a - Last commit did not work.
SVN r1850 (trunk)
2009-09-16 22:47:04 +00:00
Christoph Oelckers 35a4526c1d - Fixed: A_LookEx did not work for monsters having the MF_NOSECTOR flag.
SVN r1849 (trunk)
2009-09-16 22:45:28 +00:00
Christoph Oelckers 5822729943 - Fixed: The deprecated flag handler for the old bounce flags needs to clear
BOUNCE_MBF and BOUNCE_UseSeeSound, too, when clearing one of these flags.
- Fixed: When adding the AVOIDMELEE code the code was accidentally changed so that
  friendly monsters could no longer acquire targets by themselves.
- Renamed WIF_BOT_MELEE to WIF_MELEEWEAPON because it's no longer a bot only flag.
- Added MBF's monster_backing feature as an actor flag: AVOIDMELEE.


SVN r1848 (trunk)
2009-09-16 21:03:09 +00:00
Christoph Oelckers a6d9a37ef7 - Gez's misc. bugs patch:
* Moves the dog sound out of the Doom-specific sounds in SNDINFO to address this,
* Renames the dog actor to MBFHelperDog to prevent name conflicts,
* Adds APROP_Score to CheckActorProperty,
* Completes the randomspawner update (the reason I moved the recursion counter out of 
  special1 was that I found some projectiles had this set to them, for example in 
  A_LichAttack, but I forgot to add transfer for them),
* Provides centered sprites for beta plasma balls if this is deemed deserving correction.


SVN r1847 (trunk)
2009-09-16 15:57:08 +00:00
Christoph Oelckers dc292caaa3 - Added some pieces of MBF's friendly AI.
- Cleaned up A_LookEx code and merged most of it with the base functions.
  The major difference was a common piece of code that was repeated 5 times
  throughout the code so I moved it into a subfunction.
- Changed P_BlockmapSearch to pass a user parameter to its callback so that
  A_LookEx does not need to store its info inside the actor itself.


SVN r1846 (trunk)
2009-09-16 15:54:04 +00:00
Christoph Oelckers c7a6b796f9 - fixed: The linetarget CCMD duplicated all of the info CCMD.
- fixed: PrintActorInfo crashed due to some incomplete implementation.


SVN r1845 (trunk)
2009-09-16 05:44:24 +00:00
Randy Heit 92766165f5 OMG! Wrong directory!
SVN r1844 (scripting)
2009-09-16 03:01:40 +00:00
Randy Heit b7ad95446f - Fixed VMParamFiller to use proper A register tags.
- Changed RET so that it will still work if the caller expects fewer return values.

SVN r1843 (scripting)
2009-09-16 02:53:05 +00:00
Randy Heit fefc306a54 - Make PClass derive from DObject so that it can participate in garbage collection.
- Import VM.

SVN r1841 (scripting)
2009-09-16 01:39:44 +00:00
Randy Heit 7b23effc02 - Now that I think about it, why is MBFParamStates an array of pointers, anyway?
SVN r1840 (trunk)
2009-09-15 23:31:28 +00:00
Randy Heit f1dc490151 - Fixed: The MBFParamStates array leaked memory.
SVN r1839 (trunk)
2009-09-15 22:44:07 +00:00
Christoph Oelckers 45842e28bd - added PinkSilver's A_Respawn enhancement patch.
SVN r1837 (trunk)
2009-09-15 21:57:51 +00:00
Christoph Oelckers e5357d1b65 - added Gez's latest bugfix patch.
SVN r1836 (trunk)
2009-09-15 17:19:30 +00:00
Christoph Oelckers 5910d90a19 - added RandomSpawner update from Gez's experimental build.
- added thing activation types for BUMPSPECIAL and USESPECIAL. Also added
  a new ClearSpecial flag to the activation type.
- added MBF's code for dogs jumping down, controlled by the MF6_JUMPDOWN
  flag.


SVN r1835 (trunk)
2009-09-15 14:16:55 +00:00
Christoph Oelckers f2a122e076 GCC compile fix.
SVN r1834 (trunk)
2009-09-15 11:53:12 +00:00
Christoph Oelckers 9d00d4f41e - sgrna1.png was missing.
SVN r1833 (trunk)
2009-09-15 06:38:11 +00:00