Commit graph

10372 commits

Author SHA1 Message Date
Christoph Oelckers
12477216ef - did some cleanup on the OPL files to remove all use of homegrown integer types in favor of the standard ones. This already helps getting rid of one of the MUSLIB files still left. 2017-02-06 19:26:45 +01:00
Magnus Norddahl
58495ea714 Renamed Clip3DFloors to Clip3D to fix gcc compile error 2017-02-06 16:04:27 +01:00
Magnus Norddahl
7e6c91d73c Remove yslope loopup table and StepColumn 2017-02-06 15:15:09 +01:00
ZZYZX
f368e70f89 Fixed overflows in String.Mid 2017-02-06 13:31:01 +01:00
ZZYZX
124d025131 More string methods 2017-02-06 12:35:21 +01:00
Rachael Alexanderson
942f90a759 Merge remote-tracking branch 'gzdoom/master' 2017-02-05 16:07:48 -05:00
Christoph Oelckers
d90f2ba1fa - wrap the va_list that gets passed around by the Draw functions into a struct so that the templates can use reliable, identical semantics for both this and the VM's arg list. 2017-02-05 21:54:09 +01:00
Christoph Oelckers
a4dbbf6969 - fixed P_NightmareRespawn did not respawn a map defined spawn health and neither made skill-related adjustments. 2017-02-05 21:43:16 +01:00
Christoph Oelckers
810efe517d - fixed: AActor::SetOrigin lost its 'virtual' qualifier in the ZScript merge, but ADynamicLight needs this to work properly. 2017-02-05 21:38:06 +01:00
Christoph Oelckers
e55406bc23 - changed clean scaling factor calculation so that it doesn't prefer larger scales on high resolution displays.
This was a tweak that only makes sense when the scaling factors are low, i.e. 2 vs. 3, but for modern high resolutions it will enlarge things a bit too much.
2017-02-05 18:48:49 +01:00
alexey.lysiuk
481bddf628 Fixed incorrect offscreen rendering of player's blend 2017-02-05 18:16:27 +01:00
Christoph Oelckers
72810c969d - added ChangeCamera script function. 2017-02-05 18:07:12 +01:00
Christoph Oelckers
9e038b75fa - exported DrawChar and DrawText. 2017-02-05 16:47:33 +01:00
Christoph Oelckers
52bec33c0d - exported BrokenLines to scripting as a new class.
- removed the hard limit of 128 lines for V_BreakLines.
2017-02-05 16:18:41 +01:00
Christoph Oelckers
d8a1ce88b0 - a few more exports from FFont. 2017-02-05 13:55:38 +01:00
alexey.lysiuk
ef871ec09f Fixed compilation with GCC/Clang
error: cannot pass non-trivial object of type 'FName' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
2017-02-05 14:52:17 +02:00
Christoph Oelckers
b570d0819b - streamlined font handling for scripts a bit.
- moved the two 'you raised the alarm' messages for Strife to the string table
2017-02-05 13:14:22 +01:00
Rachael Alexanderson
9c50600286 - fix compile errors 2017-02-05 00:53:36 -05:00
Rachael Alexanderson
59f32d497d Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/r_things.cpp
#	src/v_draw.cpp
2017-02-05 00:08:01 -05:00
Christoph Oelckers
5cfac78116 - added write barriers to the menu code.
The GC was causing some crash issues with the items not having been subjected to a write barrier.
2017-02-05 01:52:09 +01:00
Magnus Norddahl
4172d70d95 Make Frozen Time rendering 4 times faster by grouping draw segments in batches of 100 (old algorithm processed 32000 draw segs per sprite!) 2017-02-05 00:42:42 +01:00
Christoph Oelckers
470dc138c6 - got rid of all DTA_Translation uses. 2017-02-05 00:17:29 +01:00
Christoph Oelckers
dadc8e2ec2 - removed all uses of DTA_Translation except for the single one that passes a custom built table.
This means that with the exception of 3 pointers the DrawTexture interface only accepts numeric values now.
Still need to get rid of the last 3 to have this ready for scripting.
2017-02-04 23:26:28 +01:00
Christoph Oelckers
d50e52ea59 - use DrawChar to draw font characters instead of calling DrawTexture directly.
Mostly done to remove uses of DTA_Translation.
2017-02-04 22:50:23 +01:00
Christoph Oelckers
6dea3eef8e - exported DrawTexture to scripting.
This uses templates to avoid source duplication of ParseDrawTextureTags. Not tested yet.
2017-02-04 22:09:49 +01:00
Magnus Norddahl
bf6ab1efc8 Clip sprites by thread slice 2017-02-04 21:55:56 +01:00
Magnus Norddahl
d1cbb76b63 Only render player sprites on main thread 2017-02-04 21:00:05 +01:00
Magnus Norddahl
beae9a3dc7 Stop using validcount for sprites 2017-02-04 20:32:06 +01:00
Christoph Oelckers
a102807737 - atags for null pointers have no meaning so do not assert on them. 2017-02-04 19:37:19 +01:00
Magnus Norddahl
cfe4c55973 Remove software renderer internals from F3DFloor 2017-02-04 19:13:56 +01:00
alexey.lysiuk
e8c2444ddd Fixed compilation with GCC/Clang
error: use of undeclared identifier 'op'
error: no matching function for call to 'ListEnd'
error: no matching function for call to 'ListGetInt'
error: no matching function for call to 'ListGetDouble'
...
2017-02-04 18:10:30 +02:00
Magnus Norddahl
8ad132b64f Execute scene slices on worker threads 2017-02-04 16:45:36 +01:00
Christoph Oelckers
ec15c7f4c3 - removed the fatal errors for invalid actor->movedir.
These can be silently mapped to DI_NODIR to let the engine get the actor back on track.
2017-02-04 16:29:01 +01:00
Christoph Oelckers
43d759782d - fixed: Stack based local VM object pointers should not be subjected to a read barrier.
This isn't done for register based variables so for consistency it should not be done for stack based variables, too.
This difference in handling made it impossible to check the target of a hitscan attack if it was destroyed by getting damaged.
2017-02-04 16:23:14 +01:00
Magnus Norddahl
d9e545a519 Hook up thread slices and eliminate some statics hiding in misc functions 2017-02-04 15:51:54 +01:00
Magnus Norddahl
f50532af8a Reorder scene setup to do the stuff that can't be threaded first 2017-02-04 14:20:58 +01:00
Magnus Norddahl
5bae06a3c6 Make RenderScene the work dispatching class 2017-02-04 14:00:21 +01:00
Magnus Norddahl
5105a5d254 Fix msvc compile error 2017-02-04 13:43:39 +01:00
Christoph Oelckers
d3ed83942f - did some preparations to ParseDrawTextureTags to allow using the same code for parsing tag lists generated by the VM.
- removed the fixed point alpha tag from DrawTexture and replaced all uses with the floating point version.
2017-02-04 13:11:12 +01:00
Magnus Norddahl
6f5e720576 Split drawer command queue from drawer threads 2017-02-04 12:38:05 +01:00
Rachael Alexanderson
ebb8da563a Merge https://github.com/coelckers/gzdoom 2017-02-04 02:56:18 -05:00
Magnus Norddahl
45f623faf4 Move frame memory allocator into RenderThread 2017-02-04 02:50:52 +01:00
Christoph Oelckers
abac756289 - exported some stuff for fonts and screen size that will be needed for the menus. 2017-02-04 00:46:22 +01:00
Magnus Norddahl
627a388d57 Move renderer singletons into a RenderThread class 2017-02-04 00:25:37 +01:00
Christoph Oelckers
d5b908186c - some work on the base classes for menus. None of this is being used yet. 2017-02-04 00:19:25 +01:00
Christoph Oelckers
8578a5a12e - added a 'new' intrinsic to create new objects from inside scripts.
This is not tested yet and likely to not working correctly yet. Will be fixed once I get far enough to use it later.
2017-02-03 22:56:03 +01:00
Christoph Oelckers
d5962b290c - turned all menu items into actual objects.
This is needed for script export.
2017-02-03 21:35:42 +01:00
Magnus Norddahl
4fadc4e9a3 Fix typo 2017-02-03 21:25:51 +01:00
Magnus Norddahl
da346427d3 Change draw segment list to use TArray 2017-02-03 21:11:55 +01:00
alexey.lysiuk
c6e42d6fa0 Added handling of modifier keys for mouse events in Cocoa backend 2017-02-03 22:01:34 +02:00
alexey.lysiuk
f04b0d129d Removed useless assignment in Cocoa backend 2017-02-03 21:56:14 +02:00
Christoph Oelckers
82eae78f7e - fixed a small memory leak in the texture manager. 2017-02-03 13:11:55 +01:00
Christoph Oelckers
a5f417b1e5 - removed all uses of BYTE as function return value or functio parameter from the dynamic light code.
These were truncating the actual light values.
2017-02-03 10:13:41 +01:00
Magnus Norddahl
812cc61b16 Fix some typos 2017-02-03 09:08:00 +01:00
Magnus Norddahl
892350ac2e Add functions to CameraLight 2017-02-03 09:00:46 +01:00
Magnus Norddahl
a0a40281b3 Simplify skyplane light selection 2017-02-03 08:19:59 +01:00
Magnus Norddahl
191438b238 Move Drawers function to viewport 2017-02-03 08:06:47 +01:00
Christoph Oelckers
1515ab8f4a - removed the long broken and obsolete PlayMovie code. 2017-02-02 23:21:21 +01:00
Magnus Norddahl
c219969b68 Fix blinking wall light regression 2017-02-02 18:46:21 +01:00
Magnus Norddahl
7b4d9675c9 Fix compile errors 2017-02-02 15:24:21 +01:00
Magnus Norddahl
e90b73539e Move viewport drawing to its own folder 2017-02-02 15:10:06 +01:00
Magnus Norddahl
d8c6f9acfd Limit access to sprite drawer variables 2017-02-02 13:51:41 +01:00
Magnus Norddahl
f3d968cf41 Move wall drawer args into functions 2017-02-02 11:16:18 +01:00
Rachael Alexanderson
226e5238fc Merge https://github.com/coelckers/gzdoom 2017-02-01 21:57:37 -05:00
Magnus Norddahl
69b7312099 Add some transform helpers on RenderViewport 2017-02-01 23:23:10 +01:00
Magnus Norddahl
d91e6ccece Remove dc_destorg and ylookup 2017-02-01 22:24:34 +01:00
Magnus Norddahl
ca93d7456a Change redundant bRenderingToCanvas into a helper function 2017-02-01 21:59:48 +01:00
Magnus Norddahl
bb0a223b80 Remove unused dc_destheight 2017-02-01 21:55:55 +01:00
Magnus Norddahl
7b578bbb53 Remove redundant dc_pitch 2017-02-01 21:52:29 +01:00
Magnus Norddahl
93166fa150 Remove r_swtruecolor variable as it is redundant 2017-02-01 21:42:08 +01:00
Christoph Oelckers
becc00a8be - added a check to P_VerifyBlockmap to discard all blockmap with blocks whose first entry is not 0.
Seems someone has written a node builder which violates this long-standing assumption (https://www.doomworld.com/vb/source-ports/92468-introducing-zokumbsp/)
However, rather than second-guessing the format's correctness it's more advisable to just discard such blockmaps to avoid some less obvious issues that may creep up.
2017-02-01 21:40:47 +01:00
Christoph Oelckers
d663f31e77 - removed the annoying assert in the dynamic light code.
I don't think that any of the remaining situations are a genuine problem, so let's just set the radius to the larger value.
2017-02-01 19:24:05 +01:00
Christoph Oelckers
a59a9e7420 - missed one. 2017-02-01 19:17:56 +01:00
Christoph Oelckers
6bfbff2a69 - renamed RF_INTERPOLATE to RF_INTERPOLATEANGLES to avoid confusion about its meaning. 2017-02-01 19:11:14 +01:00
Major Cooke
d55f1d3f6f - Adopted Nash's code for handling models with INTERPOLATE. 2017-02-01 19:09:18 +01:00
Major Cooke
39fcea9176 Added INTERPOLATE actor flag, allowing the previously reverted interpolation code to be toggleable. 2017-02-01 19:09:18 +01:00
Christoph Oelckers
04988a331b - fixed warning. 2017-02-01 19:07:41 +01:00
Magnus Norddahl
e78e76a593 Move r_viewport variables into a class 2017-02-01 16:02:21 +01:00
Christoph Oelckers
b77a0eb7cf - let D_PageDrawer always clear the background.
The math in DCanvas::FillBorder does not always work out so better clean the entire screen before drawing a fullscreen image to ensure that the menu blend is always drawn over something valid.
2017-02-01 11:44:13 +01:00
Christoph Oelckers
bc29f61bfd - set the default for menu mouse input to 'touchscreen-like' because there's too much hardware out there which doesn't play nice with mouse input events. 2017-02-01 11:25:28 +01:00
Christoph Oelckers
6d28aa3541 - do not use strtol for parsing critical values that can get large.
This function will truncate everything that is larger than LONG_MAX or smaller than LONG_MIN to fit into a long variable, but longs are 32 bit on Windows and 64 bit elsewhere, so to ensure consistency and the ability to parse larger values better use strtoll which does not truncate 32 bit values.
2017-02-01 11:19:55 +01:00
Rachael Alexanderson
4e45ea2300 Merge https://github.com/coelckers/gzdoom 2017-01-31 23:04:56 -05:00
Christoph Oelckers
90ee22b760 - don't let monsters without a See state disappear if they try to enter it. 2017-02-01 01:13:26 +01:00
alexey.lysiuk
3d147a032c Proper RDTSC implementation for x86_64 targets
Higher 32 bits of Time Stamp Counter were ignored in non-MSVC Windows and macOS builds
2017-01-31 17:51:12 +02:00
alexey.lysiuk
47faaa87fc Fixed deprecation warning reported by Clang
warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
2017-01-31 17:41:44 +02:00
alexey.lysiuk
b12c8a8f79 RDTSC-based glcycle_t for macOS
Time profiler implementation is now closer to Windows version
2017-01-31 16:00:14 +02:00
alexey.lysiuk
1cdfcb4935 RDTSC-based cycle_t for macOS
Windows and macOS now share most of related code
Old implementation using mach_absolute_time() was more precise (at least in theory) but too costly
2017-01-31 15:57:47 +02:00
alexey.lysiuk
6225f60eb2 Added cheat flag for console variables
CVAR with this flag can be set in console or from command line when sv_cheats is enabled
There is no such restriction for changing its value from ACS, via SetCVar() and related functions
'cheat' modifier can be used in CVARINFO lump to create variable of this kind
2017-01-31 14:08:09 +01:00
Christoph Oelckers
94d5d6848e - moved all code that deletes some data from P_SetupLevel to P_FreeLevelData so that P_Shutdown can also call it.
This is particularly important for camera textures which otherwise would not be taken down before a restart.
2017-01-31 13:46:35 +01:00
Christoph Oelckers
3131c08640 - fixed: the restart CCMD must clear out all statically stored pointers to VM functions because they do not survive the shutdown that is needed before loading new data. 2017-01-31 13:41:23 +01:00
Magnus Norddahl
4fdacfe96e Fix crash in palette mode 2017-01-31 13:26:06 +01:00
Christoph Oelckers
f0a325a904 - fixed: The restart CCMD needs to clear the global FraggleScript before taking down the class system.
This is a soft root and would never be deleted otherwise.
2017-01-31 13:22:05 +01:00
Rachael Alexanderson
e715e53c1d Merge https://github.com/coelckers/gzdoom 2017-01-30 17:16:01 -05:00
Christoph Oelckers
0e5aee48aa - clamp MAPINFO provided fog density values to a valid range because negative values can trigger undefined shader behavior. 2017-01-30 22:23:36 +01:00
Magnus Norddahl
eadeccd709 Fix typo 2017-01-30 20:23:50 +01:00
Magnus Norddahl
0c61b56655 Clean up SkyDrawerArgs interface 2017-01-30 20:21:18 +01:00
Christoph Oelckers
7c5e3fb677 - disabled angular interpolation again.
This can only be used if the entirety of the game code is aware and dealing with this properly. However, that isn't the case so the amount of glitches this causes far exceeds the number of desired interpolations.
2017-01-30 14:19:50 +01:00
Magnus Norddahl
98fa2976fa Clean up the SpanDrawerArgs interface a bit 2017-01-30 12:46:17 +01:00
Magnus Norddahl
c574b0ad3f Remove R_InitColumnDrawers and only allow DrawerArgs classes to call drawers 2017-01-30 11:53:11 +01:00
Magnus Norddahl
c486892c4a Make colfunc, wallfunc, spanfunc private and remove the rest 2017-01-30 11:43:15 +01:00