Commit graph

6553 commits

Author SHA1 Message Date
Christoph Oelckers
44a6cafd4b - we are using C++11 now, so all those old VC 2005 project files are of no use anymore. 2016-03-01 09:38:49 +01:00
Randy Heit
7c9fd12fc0 Don't generate code to call DECORATE cast functions
- All the cast functions do is return their parameter, so skip the
  function call and use the parameter directly.
2016-02-29 22:26:05 -06:00
Randy Heit
92f74634d6 Remove FxParameter and use a single function instead 2016-02-29 22:08:06 -06:00
Randy Heit
fb8d8dc775 Remove "state" from "Invalid state parameter" error message
- It's confusing to see this from inside an anonymous function. Actually,
  maybe it should be reworded altogether?
2016-02-29 21:44:12 -06:00
Randy Heit
cb1d9597f2 Allow if {} else if {} with DECORATE
This is as opposed to `if {} else { if {} }`, which is what was required
previously to express the same construct.
2016-02-29 21:40:10 -06:00
Randy Heit
f23c0121c5 Use new type system with DECORATE 2016-02-29 21:11:59 -06:00
Christoph Oelckers
15b6c11748 - did some cleanup on FPathTraverse::PortalRelocate. 2016-03-01 02:06:31 +01:00
Christoph Oelckers
5e7ecb3c44 - hm. I thouggr thia has been saved before committing. 2016-03-01 01:53:09 +01:00
Christoph Oelckers
2584108200 - removed the one-sided line portals on polyobjects only limitation. Using Eternity's polyportal testmap shows that it expects one-sided crossable portals on non-polyobject walls.
- converted the P_TranslatePortal* functions to use floating point trigonometry. The combination of R_PointToAngle and finesine even created discrepancies with perfectly parallel portals which is just not acceptable.
- added a function to FPathTraverse to relocate the trace and restart from the new position.
- made P_UseLines portal aware. Traversal through line portals is complete (all types, even teleporters), whether sector portals need better treatment remains to be seen - at the moment it only checks the range at the player's vertical center.
2016-03-01 01:36:36 +01:00
Christoph Oelckers
6bcaa51968 - updates eternity.xlat. 2016-02-29 21:40:37 +01:00
Christoph Oelckers
0c7aea88db - made particles portal-aware. 2016-02-29 16:40:28 +01:00
Christoph Oelckers
07771bd56e - changed parameter of P_GetOffsetPosition to a simple coordinate so that it can be used for other things than actors. 2016-02-29 16:29:51 +01:00
Christoph Oelckers
38c1b8588c - made spawning of teleport fog portal aware. 2016-02-29 16:21:05 +01:00
alexey.lysiuk
2b74ee1eef Fixed assertion failure caused by a missing class to spawn
This fixes debugging troubles with states that have action functions like A_SpawnItem("MissingClass")
2016-02-29 12:54:30 +01:00
Christoph Oelckers
2321c9973f - fixed some serious efficiency problems with clipping masked geometry against portals.
The function to do the work scanned the full list of drawsegs to find portals, which with a large amount of masked geometry and/or drawsegs could become extremely slow.
Changed it so that R_DrawMasked collects all portal related drawsegs up front so that the actual clipping code can
 a) scan a far shorter list and
 b) can skip half of the validation.

Also using P_PointOnLinePrecise to shave off a small bit of additional time.
2016-02-29 12:39:03 +01:00
Christoph Oelckers
0cf9cae7f3 - added some #pragma warnings to i_crash.cpp to silence a warning message in Microsoft's headers. 2016-02-29 10:48:51 +01:00
Christoph Oelckers
6c37ab2310 - changed: If the IWAD contains a MENUDEF lump the one in zdoom.pk3 should not print texture warnings.
The reason is that in such a case it is very likely that the IWAD defines its own menu and will most likely not provide all assets for the base definitions. See 'Adventures of Square' for an example.
2016-02-29 10:45:14 +01:00
Christoph Oelckers
7242a0ef94 - fixed: Rendering 2-sided walls with 3D floor light effects had the 'is3dfloor' flag of GetLightLevel inverted. 2016-02-29 10:26:07 +01:00
Christoph Oelckers
fadc7de636 - added a sight check to A_Blast for cross-portal effects. 2016-02-29 01:36:39 +01:00
alexey.lysiuk
0822485593 Used ISO Latin 1 encoding for text in startup window on OS X
Attempts to output errors with bad characters encountered during text lumps parsing were failed miserably because of UTF-8 conversion
Example: loading of GZ-Models-r16.pk3 with GZDoom caused 'NSConcreteAttributedString initWithString:: nil value' exception
2016-02-28 23:15:23 +01:00
alexey.lysiuk
243f59d96d Made sure that the last text line is always visible in OS X startup window
These case are handled specifically:
* When waiting for clients or host to join
* When showing a fatal error
2016-02-28 23:15:22 +01:00
alexey.lysiuk
067b421f39 Fixed default width of progress bar in OS X startup window
If window was resized before progress bar appears it will have hardcoded and so incorrect width
2016-02-28 23:15:21 +01:00
alexey.lysiuk
64f80456ad Initialized scroll view with the same rectangle as other controls in OS X startup window 2016-02-28 23:15:20 +01:00
alexey.lysiuk
145b7be0a1 Fixed particular slowdown in OS X startup window
During loading of .pk3 that stores hundred of .wad's significant amount of time were spent on scrolling text to the last line
The same applies to other cases like output of thousands warnings/errors
2016-02-28 23:15:19 +01:00
alexey.lysiuk
c687394f72 Added generic way to do periodic updates of OS X startup window
It's used to avoid updating of window (progress bar in particular) too often
Most of time were spent on UI events processing but not on data loading
2016-02-28 23:15:18 +01:00
alexey.lysiuk
0fba6563c7 Disabled fullscreen mode for OS X startup window
There is no use for auxiliary fullscreen window because it behaves really weird
2016-02-28 23:15:17 +01:00
Christoph Oelckers
d4f87203bd - added portal awareness to several functions.
* Arch-Vile resurrection
 * Boom point pushers (due to complete lack of z-handling only for line portals.)
 * A_RadiusGive

These also require a more thorough collection of portal groups than simple position checks.
2016-02-28 23:08:32 +01:00
Christoph Oelckers
8be690fbf2 - fixed type truncation warning. 2016-02-28 21:16:16 +01:00
Christoph Oelckers
27ac207f4c - added oortal handlong to P_RecursiveSound. 2016-02-28 18:03:42 +01:00
Christoph Oelckers
4bb0ca5889 - consolidated some nearly identical code repetitions in Hexen's attack functions. 2016-02-28 16:06:48 +01:00
Christoph Oelckers
c390b98966 - fixed: Not all paths in A_CStaffCheck did proper checks on the player's health. 2016-02-28 15:14:05 +01:00
Christoph Oelckers
94f37bde30 - Forgot changing two comparisons when cleaning up the if statement in FindRefPoint. 2016-02-28 14:03:57 +01:00
Christoph Oelckers
e9fa53c54d - fixed dropoff calculation over portals.
It can easily happen that the lower sector has no lines below the checked area, in which case it would not set the dropoffz correctly. To prevent this, P_LineOpening must, when it checks the opening over a sector portal, actually calculate the dropoff to the lower portal itself by calling sector_t::NextLowestPointAt. It also means that FindRefPoint must calculate a proper reference point when one side of the line to be checked is part of a floor portal.
2016-02-28 13:59:15 +01:00
Christoph Oelckers
b0f1e9b8f3 - fixed typo in portal blockmap code. 2016-02-28 12:16:58 +01:00
Christoph Oelckers
9e3bde0913 - fixed: invisible line within a portal could affect floor height checks in P_CheckPosition. 2016-02-28 12:14:37 +01:00
Christoph Oelckers
3272f180cb - added missing damagemod sector property to extradata parser. 2016-02-28 09:32:10 +01:00
Edoardo Prezioso
cd85f6768c - Improve Mac GCC errors fix to work only for GCC.
This fixes Clang complaining about unknown command option '-Wno-unused-but-set-variable' when compiling dumb.
Also I got no new warnings on Clang by excluding '-Wno-unused-result'.
2016-02-27 23:49:02 +01:00
Christoph Oelckers
a9ca53bc00 - added a check for the destination of a portal to P_CheckPosition. This needs to run a separate BlockLinesIterator that only sets selected fields. 2016-02-27 23:35:13 +01:00
Christoph Oelckers
047070d180 - made arbitrary portals passable.
This includes:

* allow one sided portal linedefs to be crossable when part of a polyobject. Due to the limitations, two-sided linedefs won't work here. For general use this is still not allowed because making them passable would require some crippling fudging.
* delay portal finalization until after polyobjects have been spawned.
* the camera interpolation also needs to handle angle differences.

The code is still not 100% complete - the most important thing that is still missing is proper handling of P_CheckPosition through arbitrary portals.
2016-02-27 18:07:39 +01:00
alexey.lysiuk
fcb38a9419 Made index of VM intrinsic functions unsigned
No more 'comparison of integers of different signs: int and unsigned long' warning
2016-02-27 15:14:13 +02:00
alexey.lysiuk
d49f4a5d84 Removed redundant comparison
No more 'comparison of unsigned expression >= 0 is always true' warning
2016-02-27 15:05:01 +02:00
alexey.lysiuk
3c044ebd5e Removed usage of register keyword
No more 'register storage class specifier is deprecated' warnings
2016-02-27 15:03:44 +02:00
alexey.lysiuk
9e016bbfc3 Removed useless operations from OS X system code
No more 'expression result unused' warnings
2016-02-27 12:48:26 +02:00
alexey.lysiuk
202aea61e5 Fixed incorrect comparison in OS X console window
No more 'comparison between pointer and integer' error
2016-02-27 12:48:12 +02:00
Braden Obrzut
6baa1b0674 - Compile with -std=c++14 or -std=c++11 on GCC/Clang.
- Fixed initialization crossing goto.
2016-02-27 02:20:34 -05:00
Christoph Oelckers
8d58d63b60 - implemented line portal transition. Not yet tested for arbitrary portals but for static ones it is working - including camera interpolation. 2016-02-27 01:23:43 +01:00
Christoph Oelckers
451cac457b - added NULL pointer check in AActor::ClearInterpolation. 2016-02-26 18:05:58 +01:00
Christoph Oelckers
7da8112f12 - now that C++11 is allowed, these annoying 'narrowing conversion' warnings can finally be fixed... 2016-02-26 18:03:45 +01:00
Christoph Oelckers
f7a3314a0a - added an iterator to TArray so that it can be used with range-bases 'for' statements. 2016-02-26 16:20:27 +01:00
Christoph Oelckers
60c2a55ec4 - added P_GetOffsetPosition calls to all needed functions. 2016-02-26 11:52:53 +01:00