Commit graph

366 commits

Author SHA1 Message Date
Christoph Oelckers
d338ca3ec1 - scriptified the sector actions. 2017-01-13 13:51:47 +01:00
Christoph Oelckers
76870beb2e - fixed the final bit of sector actions.
The IsActivatedByUse implementation was essentially useless because the value was not serialized so it got lost as soon as the game was reloaded from a savegame.
With the refactoring this is no longer an issue but the access function needed to be changed over to read the info from 'health'.
2017-01-13 01:44:17 +01:00
Christoph Oelckers
1400f401e7 - fixed use of multiple sector actions in the same sector.
The entire setup was quite broken with each item using its own activation result and the ones of the subsequent items in the list as the return value.
This rendered the STANDSTILL check in the main function totally unpredictable because the value it depended on could come from any item in the list.
Changed it so that the main dispatcher function is part of sector_t and does the stepping through the list iteratively instead of letting each item recursively call its successor and let this function decide for each item alone whether it should be removed.
The broken setup also had the effect that any MusicChanger would trigger all following SecActEnter specials right on msp start.
2017-01-13 01:34:43 +01:00
Christoph Oelckers
cf39af0642 - consolidated the sector action classes.
This can be done with a lot less overhead by using one of the object's properties to store the activation flag, so that all the nearly redundant trigger methods can be folded into one.
2017-01-13 01:06:37 +01:00
Christoph Oelckers
7b7623d2c4 - split DObject::Destroy into the main method, a native OnDestroy and a scripted OnDestroy method and made the main method non-virtual
This was done to ensure it can be properly overridden in scripts without causing problems when called during engine shutdown for the type and symbol objects the VM needs to work and to have the scripted version always run first.
Since the scripted OnDestroy method never calls the native version - the native one is run after the scripted one - this can be simply skipped over during shutdown.
2017-01-12 22:49:18 +01:00
Christoph Oelckers
7f3e18a6cc - fixed a few memory leaks. 2017-01-11 11:37:27 +01:00
Christoph Oelckers
b9ac44e8f2 - fixed: The sight checker's portalgroup variable was not initialized.
- got rid of glsegextras.

This was probably one of the most ill-conceived means to save some memory in ZDoom, but now, when a pure software rendered engine no longer needs to be considered it's just totally useless to keep this mess in.
2017-01-09 01:28:07 +01:00
Christoph Oelckers
12037fdc95 - made the vertexes array VM friendly. 2017-01-09 00:46:16 +01:00
Christoph Oelckers
f78927500e - exported all meaningful parts of side_t to the VM. 2017-01-08 21:42:26 +01:00
Christoph Oelckers
cd7986b1b1 - refactored global sides array to be more VM friendly.
- moved FLevelLocals to its own header to resolve some circular include conflicts.
2017-01-08 18:46:17 +01:00
Christoph Oelckers
71d1138376 - refactored the global lines array into a more VM friendly form, moved it to FLevelLocals and exported it to ZScript.
- disabled the Build map loader after finding out that it has been completely broken and nonfunctional for a long time. Since this has no real value it will probably removed entirely in an upcoming commit.
2017-01-08 14:39:16 +01:00
Christoph Oelckers
3beed216dd - exported all relevant functions from sector_t.
Please note that currently most of these have little use, they are for future feature support.
2017-01-08 00:50:40 +01:00
Christoph Oelckers
91981e25a8 - moved all 'sectorptr - &level.sectors[0]' constructs into a subfunction. 2017-01-07 20:02:25 +01:00
Christoph Oelckers
62ea83a35a - let the prediction code handle all 4 threaded lists an actor gets linked into.
This is mostly a straight refactoring of the existing code to work independently of specific member variables in the involved classes, using a bit of template magic to avoid redundancy and moving the work code into subfunctions.
It still needs some testing to see if it a) helps fix the crash issues and b) doesn't break anything-
2017-01-06 15:06:17 +01:00
Christoph Oelckers
b11c8fef57 - renamed a few variables for clarity. 2017-01-06 11:56:17 +01:00
Christoph Oelckers
1a16f664e4 - added a TStaticArray class that allows safe access to resizable static data (like the sectors, linedefs, etc.) for the VM.
- used this to replace the line list in Sector because that gets already used and implemented proper bounds checks for this type of array.
2017-01-02 21:40:52 +01:00
Christoph Oelckers
02c3b3613f - added UDMF properties to set glows per sector.
- for explicitly defined glows, use the one for the current animation frame, if an animated texture is active. For default glows it will still use the base texture's to avoid inconsistencies.
2016-12-28 21:35:42 +01:00
Christoph Oelckers
721b2fb21d - fixed: Instant floor movers should disable z-interpolation for all affected actors. 2016-12-27 21:16:42 +01:00
Christoph Oelckers
9cb2a8f931 Merge remote-tracking branch 'remotes/zdoom/master' 2016-12-26 12:04:13 +01:00
Christoph Oelckers
7f72de6b71 - use msecnode_t's for the touching_renderlists instead of std::forward_list.
- preparations for checking the proper sector to get a sprite's lighting info.
2016-12-26 11:58:08 +01:00
Christoph Oelckers
19856d6ccb Merge branch 'master' of https://github.com/rheit/zdoom 2016-12-25 22:56:35 +01:00
ZZYZX
87b23d160b Ported RenderRadius and related code from gzdoom branch 2016-12-25 13:09:32 +02:00
Christoph Oelckers
f547daccc8 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/CMakeLists.txt
2016-12-07 22:51:05 +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
c927aca2a0 Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
# Conflicts:
#	wadsrc/static/zscript.txt
2016-11-30 18:46:23 +01:00
Christoph Oelckers
55b549c0c6 - converted the rest of a_strifestuff.cpp.
- changed some very old A_Explode calls which passed all values as integer literals.
2016-11-29 00:16:30 +01:00
Christoph Oelckers
de6969997a - scriptified Hexen's flies.
A few notes:

 * this accesses the lines array in sector_t which effectively is a pointer to an array of pointers - a type the parser can not represent. The compiler has no problems with it, so for now it is defined internally.
 * array sizes were limited to 65536 entries because the 'bound' instruction only existed as an immediate version with no provisions for larger values. For the static map arrays 65536 is not sufficient so now there are alternative instructions for these cases.
 * despite the above, at the moment there is no proper bounds checking for arrays that have no fixed size. To do this, a lot more work is needed. The type system as-is is not prepared for such a scenario.
2016-11-27 18:52:24 +01:00
Christoph Oelckers
4e802652c7 - scriptified ArtiBlastRadius. 2016-11-26 09:51:14 +01:00
Christoph Oelckers
66d28a24b8 - disabled the scripted virtual function module after finding out that it only works if each single class that may serve as a parent for scripting is explicitly declared.
Needless to say, this is simply too volatile and would require constant active maintenance, not to mention a huge amount of work up front to get going.
It also hid a nasty problem with the Destroy method. Due to the way the garbage collector works, Destroy cannot be exposed to scripts as-is. It may be called from scripts but it may not be overridden from scripts because the garbage collector can call this function after all data needed for calling a scripted override has already been destroyed because if that data is also being collected there is no guarantee that proper order of destruction is observed. So for now Destroy is just a normal native method to scripted classes
2016-11-25 00:25:26 +01:00
Christoph Oelckers
6bfbe30b99 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/CMakeLists.txt
#	src/g_level.cpp
#	src/p_saveg.cpp
#	src/r_defs.h
#	src/version.h

(note that this commit will not compile!)
2016-09-24 00:40:15 +02:00
Christoph Oelckers
810ef8f775 - save global savegame data to JSON as well.
This is incomplete and untested, just a safety commit before going on.
2016-09-21 12:19:13 +02:00
Christoph Oelckers
3a1191281f - some preparations for converting the player serialization code.
- converted sound and canvas texture serialization.
- refactored file_zip, so that it can be used to load loose zip files and extract their compressed data directly.
- added handling to FSerializer to generate and consume compressed Zip file entries.

If all goes well this will allow saving savegames as Zips when the rework is done, which will make analyzing them a lot easier.
2016-09-20 23:13:12 +02:00
Christoph Oelckers
e89d072abc - most thinkers are done. Some stuff about polyobject pointers is temporarily disabled right now because some of the required functions have already been pulled out. 2016-09-19 19:14:30 +02:00
Christoph Oelckers
65c6388d44 Merge branch 'master' into json 2016-09-19 03:54:36 +02:00
Christoph Oelckers
9313a99e12 - started implementing a JSON based serializer. Unfortunately it is far too slow to be of any real use. 2016-09-18 13:26:34 +02:00
Christoph Oelckers
3778799f92 Merge branch 'master' of https://github.com/rheit/zdoom 2016-09-12 21:33:49 +02:00
Christoph Oelckers
823f75e592 - fixed: UDMF user value lists need to be sorted for binary search to work but weren't. 2016-09-12 21:32:17 +02:00
Christoph Oelckers
737646b45d Merge branch 'master' of https://github.com/rheit/zdoom 2016-05-01 10:50:56 +02:00
Randy Heit
7d03ed4dc7 Use floating point node bounding boxes 2016-04-30 22:37:02 -05:00
Christoph Oelckers
f77c4642cb - made the adjustments. 2016-04-24 13:35:43 +02:00
Christoph Oelckers
2914cdc939 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/r_defs.h
2016-04-24 12:19:07 +02:00
Christoph Oelckers
0f99d7d73f - floatified the few remaining linedef and sector properties that still were fixed_t. The only fixed point things left in r_defs.h are the nodes and a fixed point setter function for vertex_t, which is still needed by the node builder. 2016-04-24 12:15:09 +02:00
Christoph Oelckers
bf36900299 Merge branch 'master' of c:\programming\doom-dev\zdoom 2016-04-23 13:40:19 +02:00
Christoph Oelckers
2447f7bc38 - renamed FTransform access functions. 2016-04-23 13:40:02 +02:00
Christoph Oelckers
e56d643924 Merge branch 'master' of c:\programming\doom-dev\zdoom 2016-04-23 12:42:21 +02:00
Christoph Oelckers
04e614daec - removed some fixed point functions that are no longer needed.
- fixed: Visplane checks should only compare the plane flags that are relevant for rendering and mask out the rest.
- floatified FTransform and made the visplane checks a bit less verbose by moving the comparison as an operator into FTransform.

Note that this operator needs forceinline on Visual Studio so that it won't get called as a function.
2016-04-23 12:42:07 +02:00
Christoph Oelckers
47834907da Merge branch 'master' of c:\programming\doom-dev\zdoom 2016-04-23 11:29:27 +02:00
Christoph Oelckers
35a6994d0a - remove the 'F' prefix from the floating point access function to the sidedef texture info, now that the fixed point versions are gone. 2016-04-23 10:55:55 +02:00
Christoph Oelckers
be8d1b46a7 - remove the deleted functions, now that they are no longer needed. 2016-04-23 10:51:58 +02:00
Christoph Oelckers
ba37854e44 Merge branch 'master' of c:\programming\doom-dev\zdoom
# Conflicts:
#	src/r_defs.h
2016-04-23 09:43:21 +02:00