Commit graph

8334 commits

Author SHA1 Message Date
Christoph Oelckers
7d4a5898ac - removed most inline assembly. Integer multiplication gets handled fine by all current compilers and fixed point division is too infrequently used to justify this mess.
That only leaves the Scale function which is still being used in a few places and which would create considerably worse code without assembly on 32 bit platforms. This is also far too primitive (2 or 3 assembly instructions) to claim any copyright on it, so I think m_fixed.h can now be considered free of Build-related issues. The deficated inline headers have been removed because that sole remaining function could be easily moved into m_fixed.h.
2016-12-10 13:58:18 +01:00
Christoph Oelckers
3563718049 - removed all fixed point inlines that aren't used anywhere. Note that most of the rest are only being used in one single function: R_DrawVoxel. 2016-12-10 12:12:29 +01:00
Christoph Oelckers
6c86a33f5d - fixed compilation of cursor scaling code. This reported 'std::vector' not defined, so now it just uses TArray, like the rest of ZDoom. 2016-12-10 12:05:46 +01:00
WilliamFeely
0e448a6450 Change DPI Awareness to per-monitor on Windows8.1+ 2016-12-10 10:30:23 +01:00
Magnus Norddahl
54759782b3 Fix cursor size 2016-12-10 10:29:43 +01:00
Magnus Norddahl
c4ca70101d Fix console window geometry size 2016-12-10 10:29:43 +01:00
Christoph Oelckers
a7c80ae858 - fixed: The message for invalid class extensions did not pass the class name to the error function. 2016-12-10 10:22:13 +01:00
Christoph Oelckers
902a4b839c - fixed: Type determination of multi-dimensional arrays failed, apparently because ZCCCompiler::Simplify is too broken to leave the node's ring list intact.
Instead of trying to fix Simplify, which seems to be a lost cause, the ring list now gets unraveled into an array which is immune from this type of problem.
2016-12-09 23:01:12 +01:00
Major Cooke
b17bd65279 Fixed: A_CustomMissile's CMF_AIMDIRECTION's pitch calculations were also backwards. 2016-12-09 16:27:29 +01:00
Christoph Oelckers
c7cddcac0b - removed Build notice from r_segs.cpp because there is no Build code left in this file. 2016-12-09 15:12:16 +01:00
Magnus Norddahl
6806b498f8 Fix null pointer crash in rt column drawers if rt_init is not called before the first draw 2016-12-09 15:07:49 +01:00
Christoph Oelckers
5da9f71589 - renamed the WallMost functions because again: No more Build code -> no Build names! 2016-12-09 14:46:05 +01:00
Christoph Oelckers
356e55f0a2 - made the general entry point to the wall drawer a single function instead of requiring the caller to check for NPOT textures.
- renamed all functions in r_walldraw.cpp to give them names more in line with Doom's naming conventions. Since this is not Build code anymore it also shouldn't use Build names to avoid giving a false impression.
2016-12-09 14:25:51 +01:00
Christoph Oelckers
86909ecdb2 - removed several unused fixed point math functions from the inlines headers. 2016-12-09 13:27:30 +01:00
Christoph Oelckers
eab06ef086 - more Build cleanup: Moved clearbufshort out of Build derived headers, removed the inline version for GCC 32 bit which was actually Build derived and renamed the C-version of this function, which does not originate from Build to 'fillshort'.
- cleaned out a lot the SafeDivScale stuff in m_fixed.h. The only SafeDivScale variant still in use was #16 for FixedDiv, so all the SafeDivScale stuff has been removed and the 16 variant renamed to FixedDiv because that's the only form in which it is still being used. (2x in R_DrawVoxel and 1x in ACS's FixedDiv PCode.)
- removed Build notice from m_fixed.h because aside from the inlines includes there is nothing here from Build anymore.
2016-12-09 13:04:53 +01:00
Christoph Oelckers
12a99c3f3c - got rid of clearbuf.
This was used in only 4 places, 3 of which could easily be replaced with a memset, and the fourth, in the Strife status bar, suffering from a pointless performance optimization, rendering the code unreadable - the code spent here per frame is utterly insignificant so clarity should win here.
2016-12-09 12:48:10 +01:00
Christoph Oelckers
f3389ff5b7 - let's be a bit clearer and not name non-Build stuff with Build terms. 2016-12-09 12:21:27 +01:00
Christoph Oelckers
34d551fe1f - moved wallscan code into its own file so that it can get an appropriate copyright notice and does not inflate an already large source file even more. 2016-12-09 11:49:18 +01:00
Christoph Oelckers
8748b9ef6d - removed some unused functions from m_fixed.h.
- removed the Build license note from r_bsp.cpp.

This note was for code in R_AddLine which had been both refactored into several subfunctions and completely replaced with a floating point version. What is left is just some basic common math without any traits that resemble anything in Build.
2016-12-09 10:31:17 +01:00
Christoph Oelckers
5536184bee - got rid of ksgn.
Because every bit of Build code that can be removed is a good thing.
This was only used in two places, one of which could be done better, the other one in the voxel drawer setup now uses a local C-inline version.
2016-12-09 00:43:54 +01:00
Edoardo Prezioso
67b2e2f52e - Remove valgrind code, now that the assembly stuff is gone. 2016-12-08 22:44:23 +01:00
Christoph Oelckers
3fbe41957d - removed GZDoom call. 2016-12-08 21:05:31 +01:00
Christoph Oelckers
6c628c9584 - changed sprite setup to work without global work variables. 2016-12-08 19:27:49 +01:00
Christoph Oelckers
d46ceafd35 - fixed: A_Face* had the sign for the pitch inverted (In Doom, negative pitch is upward, this had positive pitch upward.) 2016-12-08 19:07:50 +01:00
Christoph Oelckers
a4d2468d34 - disable weapon interpolation for offset changes.
This has been causing far too many problems so now it will only be done if a A_Weaponoffset is either used with WOF_ADD or WOF_INTERPOLATE.
2016-12-08 17:52:59 +01:00
Magnus Norddahl
fb4e34d178 Fix crash reporter for 64 bit 2016-12-08 14:36:17 +01:00
Christoph Oelckers
d741e0eb26 - fixed: P_CheckSight returned incorrect results when having to traverse the collected lines just for adding more portals to the list. 2016-12-08 11:23:08 +01:00
Christoph Oelckers
66d287ea81 - fixed: Stepping through a ceiling portal on a two-sided line did not work.
- fixed: Stepping up an actor checked against the sector's own ceiling, even if it was a crossable portal.
2016-12-08 10:16:22 +01:00
Christoph Oelckers
6adcba3c4b - fixed linkage for fuzzviewheight
- fixed naming conflict with GCC's virtual table.
2016-12-07 18:39:09 +01:00
Edoardo Prezioso
e4c208602d - Fixed GCC/Clang warning/error. 2016-12-07 16:07:25 +01:00
Christoph Oelckers
2677976cae - r_drawt.cpp is no longer needed. 2016-12-07 15:44:25 +01:00
Christoph Oelckers
a118903e3e - complete removal of assembly stuff. Nothing of this gets used anymore. 2016-12-07 14:41:21 +01:00
Christoph Oelckers
ed141943e1 - removed use of BestColor_MMX because there is no measurable improvement at all on a modern system. On top of that this function does not get called nearly often enough to justify the hassle. Like DoBlending this would require hundreds of calls per frame to make any impact that would be measurable. 2016-12-07 14:40:19 +01:00
Christoph Oelckers
5910067c44 - discontinue using the MMX assembly version of DoBlending.
Some benchmarking shows that on SSE systems it only harms performance and compared to the intrinsics version the gains are too marginal for something this infrequently called.
Doing 100000 calls of DoBlending results in a 5 ms decrease of using assembly vs intrinsics on a 3.4 GHz Core i7, meaning that even on a computer that is 10x slower you can still do 1000 or so blends per frame without a speed hit.
2016-12-07 14:40:18 +01:00
Christoph Oelckers
42346c58d3 - disabled assembly entirely to make the MT drawer submission compile.
This still requires a review of the two non-drawer functions that get 'lost'.
2016-12-07 12:31:43 +01:00
Christoph Oelckers
1e42c6f227 - added copyright headers to two files missing them. 2016-12-07 11:40:59 +01:00
Magnus Norddahl
3ff91807b8 Move swrenderer into a namespace, add multithreading framework, and move drawers to commands 2016-12-07 09:34:49 +01:00
Christoph Oelckers
52645afb4b - for the time being, make ZScript command line switch locked so that everybody understands that it's not ready for use in released mods yet. 2016-12-06 22:42:10 +01:00
Christoph Oelckers
b2d1b0d7a6 - fixed: FTranslatedLineTarget::angleFromSource returned the attack angle, not the angle between actors when returned from P_LineAttack.
For most attack functions this is wrong, it's only the Hexen fighter attack needing this particular value, so it has been split up into two return values now.
2016-12-06 11:04:54 +01:00
Christoph Oelckers
daaa6e7831 - fixed bad parameter in AActor::ModifyDamage. 2016-12-06 00:00:56 +01:00
Christoph Oelckers
092461ed34 - make dynamic object casts a dedicated VM instruction instead of a builtin function.
This can see some heavy use in iterators where saving several hundreds of function calls can be achieved. In these cases, using a function to do the job will become a significant time waster.
2016-12-05 14:52:34 +01:00
Christoph Oelckers
f722967abe - added automatic type deduction capabilities for local variables. If you type 'let variable = value;' the type of 'variable' will be deduced from the given value. This is mostly of interest for type casting pointers, because 'let p = Classtype(objectvar);' does not require writing the class type name twice. 2016-12-05 13:24:42 +01:00
Christoph Oelckers
67bdac5227 Merge branch 'master' into zscript 2016-12-05 12:03:59 +01:00
Christoph Oelckers
7624973ef3 - updated list of render styles in UDMF spec. 2016-12-05 11:50:41 +01:00
Christoph Oelckers
c0a622eb54 - removed pointless assignment. 2016-12-05 02:08:26 +01:00
Christoph Oelckers
f6fb27b683 - deleted rt_copy*col and rt_map*col assembly versions after running benchmarks that show inferior performance to the C++ versions on both older and newer CPUs. 2016-12-05 00:46:58 +01:00
Christoph Oelckers
86fcc3fd21 - added a heavily optimized version of vlinec4 for x64. The original loaded everything from the global variables. While this is acceptable in 32 bit code because it has an immediate register load instruction, for 64 bit this does not exist. Accessing these variables from the stack or a register doubles the execution speed of this function and on a Core i7-3770 from 2012 is even faster than the assembly version. Right now the assembly version is still there, pending a benchmark run on an older 64 bit system. 2016-12-04 23:53:36 +01:00
Christoph Oelckers
f4454d2e00 - minor, but very effective optimization for R_DrawSpanMasked: Do not store the texel value in a byte. Store it in a local int variable. This allows the compiler to read it with a zero extending instruction instead of using a byte reading instruction and then later having it to convert to an int anyway. This removes one instruction from the loop which results in a 10% performance increase on 32 bit. 2016-12-04 19:32:54 +01:00
Christoph Oelckers
c9caaf08c8 - removed asm version of R_DrawFuzzColumn, because even on my 9 year old laptop this was significantly slower than the C version. 2016-12-04 18:38:38 +01:00
Christoph Oelckers
13efb34964 - removed the asm version of R_DrawColumn because it doesn't provide any significant benefit.
On modern systems it is actually slower than the C version, only on old ones it is marginally faster - but the overall execution time for this function is so low that even in the worst case scenario the minor loss of performance on older systems is still not relevant.
2016-12-04 18:05:34 +01:00