Commit graph

16163 commits

Author SHA1 Message Date
Major Cooke
7acf43741a Fixed: IsFakePain received the modified damage instead of the raw, preventing ALLOWPAIN from working as intended. 2018-12-28 17:23:55 +01:00
Christoph Oelckers
0e904286e8 - moved renderinfo.cpp entriely into the map loader. 2018-12-28 15:51:32 +01:00
Christoph Oelckers
e66e594dd0 - moved the sidetemp array into the map loader. 2018-12-28 15:30:23 +01:00
Christoph Oelckers
11e9cdae33 - split polyobject init into its own file and cleaned things up a bit. 2018-12-28 15:05:05 +01:00
Christoph Oelckers
9de2f5c1e7 - made polyobject init code part of MapLoader. 2018-12-28 14:48:10 +01:00
Christoph Oelckers
326e4d8559 - store the master pointer for the subsector lists in sector_t and the seg lists in side_t in FLevelLocals as a TArray instead of relying on the first element's pointer for this.
This simply way bad style.
2018-12-28 14:24:22 +01:00
Magnus Norddahl
c499c563a0 - remove WallSampler 2018-12-28 13:04:54 +01:00
Christoph Oelckers
64595abe60 - moved main polyobject array into FLevelLocals and simplified the setup process to not depend on P_SpawnMapThing.
Since the SpawnedThings array is still available when polyobjects are spawned it makes no sense to create an expensive linked list in P_SpawnMapThing.
This can be done far better by scanning through the array again and collect all matching items in a second array.
2018-12-28 10:08:39 +01:00
Christoph Oelckers
84a28454dc - split maploader.cpp so that the parts that are not setting up the actual map data go back to p_setup.cpp. 2018-12-28 09:17:10 +01:00
Rachael Alexanderson
c980f1c27f - g3.8pre 2018-12-27 23:46:21 -05:00
Magnus Norddahl
45d3df9df1 - remove pointless duplication of FWallCoords member variables 2018-12-28 01:13:58 +01:00
Magnus Norddahl
4d3d4ea746 - simplify colormap selection to a single function 2018-12-28 00:55:44 +01:00
Christoph Oelckers
467c73b2d7 - split P_SetupLevel so that the main part of it can be made part of the MapLoader class.
- allocate BlockNodes from the same memory arena as SecNodes.
2018-12-27 23:34:07 +01:00
Magnus Norddahl
c0a4ba5e82 - Simplify ProjectedWallLight light step setup and positioning 2018-12-27 22:52:33 +01:00
Magnus Norddahl
ed094d0b2f - create a ProjectedWallLight class for the variables used to calculate light for columns 2018-12-27 22:03:02 +01:00
Erick Tenorio
0a6ec054d2 - TNT.WAD fixes 2018-12-27 20:52:08 +01:00
Christoph Oelckers
a47287f1e4 - use TArrays for all local allocations in the map loader. 2018-12-27 20:22:51 +01:00
Erick Tenorio
9ee0271320 - Have Plutonia MAP16 pit kill player 2018-12-27 18:59:29 +01:00
Christoph Oelckers
6ae417725f - removed the optional MAPINFO data handler and moved the 3 items still using it to the main parser file.
This thing made sense when GZDoom and ZDoom were separate projects to avoid having to change some core files for the added options.
Now, with only 3 ones remaining, one for FraggleScript and two for Extradata the overhead here is just too high. The 3 variables can just be moved to level_info_t without carrying along this much baggage.
2018-12-27 17:38:11 +01:00
Christoph Oelckers
2edf02d731 - moved map loader files to a subdirectory. 2018-12-27 17:11:10 +01:00
Christoph Oelckers
017b3f9dc7 - fixed OpenGL texture objects weren't deleted when a texture was destroyed. 2018-12-27 14:25:13 +01:00
Christoph Oelckers
f351df5c22 - moved Extradata parser into MapLoader class. 2018-12-27 12:33:18 +01:00
Christoph Oelckers
733cd5260a - moved slope creation functions and most initialize-time variables into MapLoader class. 2018-12-27 12:33:18 +01:00
Christoph Oelckers
89ba723609 - moved the content from p_glnodes into the MapLoader class. 2018-12-27 12:33:17 +01:00
Christoph Oelckers
2e22c01d45 - moved most content of p_setup.cpp into a MapLoader class. 2018-12-27 12:33:17 +01:00
Ijon
071347d7fb NOFRICTION now applies to Z friction when flying or swimming 2018-12-27 12:26:33 +01:00
alexey.lysiuk
23f2a3a7fc - fixed crash in Actor.Warp() with null destination
https://forum.zdoom.org/viewtopic.php?t=63031
2018-12-27 13:01:42 +02:00
Christoph Oelckers
f3ae61a2d3 - remove some obsolete bit of cruft from the class type system.
This was a remnant of putting the meta data directly into the class descriptor which turned out to be an unworkable approach
2018-12-27 08:49:34 +01:00
Christoph Oelckers
b31f284e28 - fixed 3D floor initialization for actor spawning.
Since actors are being spawned before the renderer gets set up this needs to fully initialize the list before spawning the actors, then take it down again for creating the vertex buffer and then recreate it.
2018-12-27 08:28:09 +01:00
Kevin Caccamo
e04fc026ff Expand UDMF and ZScript API for side's own additive colors
Add 'useowncoloradd_{top,mid,bottom}' sidedef properties to the UDMF 
spec
Only use side's additive colors if 'useowncoloradd_(top|mid|bottom)' is 
set.
Rename UseOwnColors flag to UseOwnSpecialColors
Add UseOwnAdditiveColor flag to side_t::part
Add EnableAdditiveColor to side_t
Add Side.EnableAdditiveColor to ZScript API
2018-12-26 16:58:27 +01:00
Kevin Caccamo
286886e161 Minor fixes for additive colour ZScript API
Sector.SetAdditiveColor actually called Sector.SetSpecialColor
Add use boolean property, used to determine whether or not to override the sector's additive wall colour with the side's additive colour.
2018-12-26 16:58:27 +01:00
Kevin Caccamo
9622ca7517 Add additive color before applying object colors
Based on what I saw in this video (https://youtu.be/Yx1tflavea8), the 
additive colors are applied before the object colors
2018-12-26 16:58:27 +01:00
Kevin Caccamo
0773e6a98e Rework implementation as per the new specification
The new specification is more flexible, and allows assigning additive 
colors to individual parts of a sector (walls, sprites, flats) and even 
individual parts of a side (top, middle, bottom)

Add AdditiveColors arrays to sector_t and side_t::part
Initialize AdditiveColors arrays to 0
Export AdditiveColors to ZScript
Save AdditiveColors in saved game files
Use colors from AdditiveColors arrays when setting the additive color 
for the render state
Add code to parse the new UDMF additive color properties
Remove additive color slot from sector color/part enum
Add SetAdditiveColor to sector_t and side_t
Add GetAdditiveColor to side_t
Export new methods and additive color arrays to ZScript
2018-12-26 16:58:27 +01:00
Kevin Caccamo
60696c91a2 Change some of the names of the additive color properties 2018-12-26 16:58:27 +01:00
Kevin Caccamo
141a60b93d Update additive colour info in GZDoom UDMF specs 2018-12-26 16:58:27 +01:00
Kevin Caccamo
c165d0dc03 Add info about additive material colors to udmf_zdoom.txt 2018-12-26 16:58:27 +01:00
Kevin Caccamo
6485570c93 Implement additive colours on HUD sprites
Also, make sure the alpha for the additive colour is 255.
2018-12-26 16:58:27 +01:00
Kevin Caccamo
33723e8904 Implement additive colour on walls and sprites
Also, don't modify the alpha channel when adding the additive colour.
2018-12-26 16:58:27 +01:00
Kevin Caccamo
80bcac48ef Forcibly assign 0 to the additive special color 2018-12-26 16:58:27 +01:00
Kevin Caccamo
758cd77e55 Rename ColorAdd to AddColor, and use it ingame
Rename ColorAdd to AddColor
Add AddColor to FRenderState
Tweak SpecialColors array in ZScript to include the additive color
Add uAddColor to the shader compiler
Add uAddColor to the texel
2018-12-26 16:58:27 +01:00
Kevin Caccamo
e5d43a734a Initial work on Doom64-style fade/glow 2018-12-26 16:58:27 +01:00
Magnus Norddahl
094ef39d5f - dynamically update polyobj lines 2018-12-26 14:26:57 +01:00
Major Cooke
1e741446d7 Reduced redundancy by putting all function aftermath handling in a subfunction. 2018-12-26 11:55:42 +01:00
Major Cooke
6372cdaa41 Split off pain chance triggering from ReactToDamage into its own function and gave ZScript access to it.
- TriggerPainChance(Name mod, bool forcedPain)
- One exception: PainThrehold is only checked in ReactToDamage, since this function does not require checking damage amount.
2018-12-26 11:55:42 +01:00
Major Cooke
2f7fae2fb0 DamageMobj Refactor
- Split off all reactive functionality (pain, infighting, etc) into its own function, ReactToDamage.
- Refactored all DamageMobj's damage <= 0 values.
 - Any unconditional cancellations now return -1. ReactToDamage will not be called if values < 0.
 - All pain/wound/target changing allowances return 0.
2018-12-26 11:55:42 +01:00
Ijon
d2d684a35a Add NOFRICTION and NOFRICTIONBOUNCE flags
NOFRICTION disables all friction effects on the thing it's set on
(including the speed cap from water/crouching), and NOFRICTIONBOUNCE
disables the "bounce off walls on an icy floor" effect on the thing
it's set on.
2018-12-26 11:49:17 +01:00
Magnus Norddahl
1bb2bb31d4 - fix first softpoly frame being empty 2018-12-25 16:50:11 +01:00
alexey.lysiuk
0584ecf65e - declared Actor's Morph() and UnMorph() functions virtual
They are expected to be virtual on C++ side
2018-12-25 16:27:33 +02:00
Rachael Alexanderson
dc05220abc - set vid_scalefactor to 1 when using vid_setscale 2018-12-25 00:18:44 -05:00
Christoph Oelckers
a40c617478 - initialize the index field for particles.
This won't contribute to sort order so it should be the same for all particles, which it wasn't because it was never set.
2018-12-24 13:44:08 +01:00