Commit graph

12236 commits

Author SHA1 Message Date
alexey.lysiuk
889a2ae6aa Fixed compilation with GCC/Clang 2017-03-16 11:13:02 +02:00
Christoph Oelckers
3aa7687d91 - made 'nocoloredspritelighting' a global option and also implemented it in the software renderer. 2017-03-16 00:56:03 +01:00
Christoph Oelckers
91da8aecdb - fixed fog init for SW Truecolor. 2017-03-15 23:38:12 +01:00
Christoph Oelckers
76d3ae5ba2 made the sector's color_* properties work in the software renderer.
With no 3D floors this appears to be ok, but there are so many places where colormaps are being set in the software renderer that I cannot guarantee that I got all of them correct. This will need some testing.
2017-03-15 23:24:53 +01:00
Christoph Oelckers
921bc763fb - separated the software-renderer-specific parts of colormap processing from the common parts.
- moved testcolor and test fades into SWRenderer files.

These CCMDs work by hacking the default colormap and were never implemented for hardware rendering because they require many checks throughout the code.
2017-03-15 22:04:59 +01:00
Christoph Oelckers
cd015f9340 - make the colormap comparison against NormalLight inline because this is by far the most frequent case and any cycle being saved here counts. 2017-03-15 22:04:59 +01:00
Christoph Oelckers
9a24771a7d - refactored FDynamicColormap out of sector_t.
This has increasingly become an obstacle with the hardware renderer, so now the values are being stored as plain data in the sector, with the software renderer getting the actual color tables when needed. While this is a bit slower than storing the pregenerated colormap, in realistic situations the added time is mostly negligible in the microseconds range.
2017-03-15 22:04:59 +01:00
Rachael Alexanderson
a2fc2fb707 - Add new drawer: AddClampShadedSprite
- fixed: AddShaded did not have a drawer associated with it in the software renderer - used new drawer for this purpose.
2017-03-15 14:40:22 -04:00
Christoph Oelckers
d0c77d7264 - added a GetRenderStyle function to Actor, so that the internal render style can be retrieved in a format suitable for scripting. 2017-03-15 10:36:41 +01:00
Magnus Norddahl
fea2361815 - fix broken voxel palette colors when using the game palette 2017-03-15 04:33:01 +01:00
Magnus Norddahl
225ce82a5a - turned r_scene_multithreaded back off as zdcmp2 revealed some problems 2017-03-15 04:01:28 +01:00
Magnus Norddahl
366d1637ce - enable r_scene_multithreaded 2017-03-15 03:01:43 +01:00
Magnus Norddahl
80f9c81e36 - move PrepareTexture out of the inner drawer loops 2017-03-15 02:59:33 +01:00
Christoph Oelckers
64bdc8c495 - fixed some incomplete checks for static arrays.
- made AActor::OkaytoSwitchTarget scripted virtual.
2017-03-15 01:39:59 +01:00
Christoph Oelckers
d283beb063 - implemented static constant arrays in class scope. 2017-03-14 23:55:30 +01:00
Magnus Norddahl
93908bc2ef - fix crash if a worker thread is the first thread to queue drawer commands 2017-03-14 23:47:41 +01:00
Magnus Norddahl
3838ec3edc - allow drawer queues to run immediately to improve r_scene_multithreaded performance
- removed unused pass ranges in DrawerThread
2017-03-14 23:03:14 +01:00
Christoph Oelckers
6926875b21 - allow parsing of static constant arrays in class scope.
This is only the parsing part, the arrays are not yet getting evaluated.
This required quite a hacky workaround because the gramma couldn't be made to accept the rule. The scanner will check if a 'static' token is immediately followed by a 'const' token and will combine both to a new 'staticconst' token that does not create conflicts with other rules.
2017-03-14 20:22:37 +01:00
Christoph Oelckers
539af96b8e - fixed variable size mismatch and some warnings for 32 bit builds. 2017-03-14 18:48:51 +01:00
Christoph Oelckers
d86bd470e5 - moved two MAPINFO settings that are not exclusively used by the OpenGL renderer to the common code. 2017-03-14 18:31:11 +01:00
alexey.lysiuk
e1cd034698 Fixed compilation with GCC/Clang 2017-03-14 18:24:34 +02:00
Christoph Oelckers
3c6e9f361c - fixed typo in fog boundary check. 2017-03-14 16:13:00 +01:00
alexey.lysiuk
6b8ea7ead3 Fixed comparison of class names for functions and fields
https://mantis.zdoom.org/view.php?id=426
2017-03-14 15:50:05 +01:00
Christoph Oelckers
44a087554f - moved the OpenGL fog properties to FLevelLocals to simplify their handling.
- added access to the glow properties for ZSCript and ACS.
2017-03-14 13:54:24 +01:00
Christoph Oelckers
72ecaba50a - fixed: When vr_quadbuffering is on and context creation fails, first retry without it before falling back on the compatibility handler. 2017-03-14 13:50:33 +01:00
Christoph Oelckers
0ebe98d1e0 - added support for reading JASC palette files. I hope it's correct, considering I have no such files to test. The format should be simple enough, though. 2017-03-14 12:16:42 +01:00
Christoph Oelckers
f70d0a6ced - added a setinv cheat CCMD. 2017-03-14 11:44:21 +01:00
Christoph Oelckers
dd8963142f - fixed: P_RailAttack must send DMG_PLAYERATTACK if the attack originates from a player. 2017-03-14 11:13:52 +01:00
Christoph Oelckers
6db355a947 - added a callback to menu items for when a new menu gets created.
- added a StartSlideshow ACS and ZScript command and extended the functionality to specify the slideshow's name when starting it.

This is for triggering any kind of intermission definition in the middle of a level - keep in mind that this may not be set up to loop!
2017-03-14 10:41:13 +01:00
Christoph Oelckers
fbcf1b2c45 - restored a line of accidentally deleted code in the animated door thinker. 2017-03-14 10:08:43 +01:00
Christoph Oelckers
e7a677ef61 - fixed bad menu size calculation, this was particularly visible in Hexen's skill menu. 2017-03-13 23:02:59 +01:00
Christoph Oelckers
303ccb3ecc - this is past version 2.4 2017-03-13 21:24:30 +01:00
Christoph Oelckers
d1ce5e37fc - fixed another error in DispatchScriptProperty. That AST's data organization is really messed up... :( 2017-03-13 21:22:11 +01:00
Christoph Oelckers
5141fee8c0 - reverted the change of position where polyobjects get linked to the subsectors. 2017-03-13 21:17:25 +01:00
alexey.lysiuk
3a039b1e44 Fixed compilation error reported by GCC 2017-03-13 22:05:55 +02:00
Christoph Oelckers
6037ecb6a1 - fixed: Getting the offset to the 'Size' field for static arrays should use a fixed offset, not the size of the defining variable, which, depending on where things are defined, can be different. 2017-03-13 20:27:46 +01:00
Christoph Oelckers
cc60b005a1 - fixed processing of parameter-less ZScript properties. 2017-03-13 19:57:20 +01:00
Magnus Norddahl
a08f35fe3b Fix missing player sprites in some situations when r_scene_multithreaded is on 2017-03-13 19:19:46 +01:00
Magnus Norddahl
22d3599ea1 Fix warp texture crash in software renderer true color mode 2017-03-13 18:02:44 +01:00
Magnus Norddahl
a408ea312f Remove if statement that was always false 2017-03-13 17:54:05 +01:00
Christoph Oelckers
cd392e50e9 - added a dummy struct named '_' to define global variables. This can only be used internally.
This method was chosen because it avoids adding variable declarations to the global namespace which would have required a lot more work while polluting the grammar.
This way the global variables can be handled by a small bit of special coding in the struct generator.
2017-03-13 14:42:14 +01:00
Christoph Oelckers
feb680a4eb - Removed the RSQRTSS code from GLSeg::Normal.
If we have to write compiler specific code for micro-optimizations I am out.
The Posix compatible version nullified most the advantage on MSVC by writing out the XMM register to memory and then reading back the float.
That's not worth the hassle for an optimization that brings a few microseconds at best.
2017-03-13 13:17:15 +01:00
Christoph Oelckers
5fd86cf98c - added some syntactic help to the ZScript parser to allow defining the arrays with native structs on the script side instead of having to define them internally. 2017-03-13 12:51:09 +01:00
alexey.lysiuk
fc8b697e33 Fixed compilation of POSIX targets
TODO: Need better way to detect SSE support
2017-03-13 12:51:06 +02:00
Christoph Oelckers
822cda652b - fixed: A_FireProjectile was still using the inverted pitch from A_FireCustomMissile it was supposed to correct. 2017-03-13 10:03:42 +01:00
Christoph Oelckers
2533ff3ffc - fixed: ListMenuItemStaticText used the wrong default color. 2017-03-13 09:30:33 +01:00
Christoph Oelckers
1fccec32d6 - add limits.h include to vectors.h for FLT_EPSILON. 2017-03-13 09:23:57 +01:00
Christoph Oelckers
60fd79ce23 - some menu reorganization:
* dynamic lights also work in the true color software renderer and have been moved out of the OpenGL menu.
* created a separate software renderer menu and moved all relevant options there.
* delete non-applicable options when running in legacy mode.
* moved the OpenGL preferences menu one level up to eliminate a two-entry GL top level menu.
2017-03-13 01:17:46 +01:00
Christoph Oelckers
f9bb64a5f3 - fixed: MIDIStreamer::Update did not check if the device was still valid.
Stopping a song can delete device while the streamer is still valid.
2017-03-13 00:38:59 +01:00
Christoph Oelckers
439e4f9f94 Merge remote-tracking branch 'remotes/origin/3.0_work' 2017-03-13 00:02:16 +01:00