Commit graph

14900 commits

Author SHA1 Message Date
Magnus Norddahl
ff761c9864 - fix compile error 2018-11-21 20:19:14 +01:00
Christoph Oelckers
34e003f7cd - regenerated gl_load with full OpenGL 4.5 declarations, mostly to get the direct state access functions. 2018-11-21 20:18:45 +01:00
Magnus Norddahl
e4dc685202 - implement a shader cache
# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/gl/shaders/gl_shaderprogram.cpp

# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/gl/shaders/gl_shaderprogram.h
2018-11-21 14:26:37 +01:00
Christoph Oelckers
b8ca67f426 - fixed the type checks for object arrays.
Null pointers must be allowed and non-object pointers which are not null must be explicitly checked for because the code could crash on them when performing a static_cast on an incorrect type.
2018-11-18 21:57:12 +01:00
Major Cooke
eb1c356d41 P_Thing_Raise fixes & cleanup
- Transfer flags directly into the function and process inside instead of the action functions
- Pass in raiser for all function calls
2018-11-18 21:57:11 +01:00
Christoph Oelckers
ebf46b8d04 - fixed: FTexture::SmoothEdges must forward its result to the base texture in case a redirection is in effect.
Both need the bMasked flag, or some code will think that the texture is not fully opaque if no holes were found.

# Conflicts:
#	src/gl/textures/gl_material.h
#	src/textures/texture.cpp
2018-11-17 21:12:22 +01:00
Christoph Oelckers
6c76566bb1 - use the same formula for calculating 3DMidTex offsets as the renderer when per-sidedef scaling is used.
This reuses the FTexCoordInfo class the hardware renderer had been using to calculate wall texture offsetting.
The software renderers still need this sorted out to bring them in line with the rest of the code, though, but they do not have this code sufficiently well organized to make this a straightforward task.

# Conflicts:
#	src/hwrenderer/textures/hw_material.cpp
#	src/textures/textures.h
2018-11-17 20:43:52 +01:00
Christoph Oelckers
40bd248da2 - fixed parameter mixup with P_CanResurrect. 2018-11-17 20:20:03 +01:00
Christoph Oelckers
17a33b609a - fixed: CVar.ResetToDefault was missing a check for use outside of menus. 2018-11-17 20:19:21 +01:00
Christoph Oelckers
a9cc7e6fb9 - changed PhosphorousFire.DoSpecialDamage to match SVE's handling:
* Everything with a damage factor for fire only uses that.
* Everything that bleeds takes half damage
* Robots take quarter damage.
2018-11-16 21:47:21 +01:00
Christoph Oelckers
692d6e9045 - Restricted argument count check to the void return case.
There were some issues here:

* a check for mismatching count is too strict because it is legal to omit return values
* it failed to detect returning multiple values in a single expression.
2018-11-16 21:33:22 +01:00
Christoph Oelckers
c1edaa317d fixed right shift operator for unsigned values
This is version protected to avoid breaking old code.
2018-11-16 21:33:20 +01:00
Christoph Oelckers
38fe0b2fe1 - fixed: FxUnaryNotBitwise modified the source operand instead of allocating a new one. 2018-11-16 21:33:19 +01:00
Christoph Oelckers
c9f389770d - fixed: AActor' friction field was not saved 2018-11-16 21:33:18 +01:00
Player701
3bd16afc0f - Readonly pointer casting now works in ZScript. 2018-11-16 21:33:17 +01:00
Christoph Oelckers
af3635dfd9 - corrected A_DropFire for real, using the SVE source as reference. 2018-11-16 21:33:16 +01:00
Christoph Oelckers
91b4024bf2 - fixed: A_DropFire accidentally cleared the XF_HURTSOURCE flag by setting only XF_NOSPLASH. 2018-11-16 21:33:14 +01:00
Christoph Oelckers
834a96662b Make BounceFlags 32 bit wide. 2018-11-16 21:33:13 +01:00
Cacodemon345
0f2a4abe8f BOUNCEONUNRIPPABLES flag; makes actors bounce on actors with DONTRIP flag 2018-11-16 21:33:12 +01:00
alexey.lysiuk
6e922761a8 - fixed compilation of targets with optimization 2018-11-16 21:33:11 +01:00
Christoph Oelckers
645c7fb192 - extended state caller check to work on CustomInventory items as well
Since CallStateChain is a public member in CustomInventory we cannot really be sure that the given state is valid so it needs checking as well.

# Conflicts:
#	.gitignore
2018-11-16 21:31:53 +01:00
Christoph Oelckers
67bde8090a Added a run time check for calling a state action from the wrong actor type.
This can happen if a state that's retrieved with FindState gets used with a different actor type and can lead to hard to trace problems if not checked.
2018-11-16 21:28:10 +01:00
Magnus Norddahl
7567462328 - fix missing type check when using Push or Insert for typed arrays 2018-11-16 21:26:33 +01:00
drfrag666
f9fff8bbce - fixed incompletely initialized secplanes in sprite splitting code.
(patch by Graf)

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp

LZDoom was not affected tough.

# Conflicts:
#	src/gl/scene/gl_sprite.cpp
2018-11-16 21:26:15 +01:00
Major Cooke
57efd617fa Changed A_RaiseActor to just RaiseActor. 2018-11-16 21:17:53 +01:00
Major Cooke
bddf94d780 Fixed inconsistency.
- P_Thing_Raise returned true while P_Thing_CanRaise returned false for the condition of having no raise state. P_Thing_Raise now returns false.
2018-11-16 21:17:52 +01:00
Major Cooke
a083eb6421 Added A_RaiseActor(Actor other, int flags = 0) 2018-11-16 21:17:51 +01:00
Major Cooke
24fdaf751c Added CanResurrect(Actor other, bool passive)
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-16 21:17:49 +01:00
Kevin Caccamo
89b1ba9e5e Fix swapped horizontal/vertical scale
The UDMF specs for things had the descriptions for horizontal and vertical scale swapped.
2018-11-16 21:17:47 +01:00
Christoph Oelckers
1dad5101f1 - fixed: ZScript's finalization code used the last parsed lump for of one translation unit as reference, not the base lump.
This resulted in incorrect messages but also could produce some more subtle errors.
2018-11-16 21:17:46 +01:00
Christoph Oelckers
4183615495 - added ZScript export for side_t::SetSpecialColor. 2018-11-16 21:17:45 +01:00
Christoph Oelckers
79b2a7e043 - removed test code that was accidentally left in. 2018-11-16 21:17:11 +01:00
Christoph Oelckers
8368331481 - more options for Doom 64 style gradients on walls:
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.

The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.

# Conflicts:
#	src/hwrenderer/scene/hw_renderstate.h
#	src/hwrenderer/scene/hw_walls.cpp

# Conflicts:
#	src/gl/scene/gl_walls_draw.cpp
2018-11-16 21:16:15 +01:00
Player701
e00db66432 - Fixed: Decal generator should be taken from the current weapon instance instead of the default instance. 2018-11-16 20:40:05 +01:00
drfrag666
f232ebb5b6 - Fixed TArray::Reset().
(patch by Graf)
2018-11-16 20:39:52 +01:00
Christoph Oelckers
07d5efcacb - instead of copying the sector planes to GLWall, just store pointers to the front and back sector for later use.
Until now this wasn't doable because these could have come from hw_FakeFlat which only were local copies on the stack.
With the recent change these faked sectors live long enough so that they can be passed around here.

# Conflicts:
#	src/hwrenderer/scene/hw_decal.cpp
#	src/hwrenderer/scene/hw_walls.cpp

# Conflicts:
#	src/gl/scene/gl_wall.h
#	src/gl/scene/gl_walls.cpp
#	src/gl/scene/gl_walls_draw.cpp
#	src/hwrenderer/scene/hw_decal.cpp
2018-11-16 20:39:22 +01:00
Christoph Oelckers
103f3f4cf9 - cache the results of hw_FakeFlat for the remainder of the current scene instead of storing this in local variables.
An exception is made for the sprite drawer which needs to call this in the worker thread on some occasions for as-yet unprocessed sectors.
This case may not alter the cache to avoid having to add thread synchronization to it.

The main reason for this change is that pointers to such manipulated sectors can now be considered static in the renderer.
Due to them being short lived local buffers it was not possible to carry them along with the render data for information retrieval.

# Conflicts:
#	src/gl/renderer/gl_renderer.cpp
#	src/hwrenderer/scene/hw_bsp.cpp
#	src/hwrenderer/scene/hw_drawinfo.h
#	src/hwrenderer/scene/hw_drawlist.cpp
#	src/hwrenderer/scene/hw_fakeflat.cpp
#	src/hwrenderer/scene/hw_renderhacks.cpp

# Conflicts:
#	src/gl/renderer/gl_renderer.cpp
#	src/gl/renderer/gl_renderer.h
#	src/gl/scene/gl_bsp.cpp
#	src/gl/scene/gl_drawinfo.cpp
#	src/gl/scene/gl_fakeflat.cpp
#	src/gl/scene/gl_renderhacks.cpp
#	src/gl/scene/gl_scene.cpp
#	src/hwrenderer/scene/hw_drawinfo.h
#	src/hwrenderer/scene/hw_drawlist.cpp
#	src/hwrenderer/scene/hw_fakeflat.h
#	src/hwrenderer/scene/hw_sprites.cpp
#	src/hwrenderer/scene/hw_weapon.cpp
2018-11-16 15:10:50 +01:00
drfrag666
7f5bf11f12 - Forgot to update the version number after the beta 2 release. 2018-11-14 11:46:22 +01:00
Major Cooke
be2d5ba9ec Added DMG_NO_ENHANCE for DamageMobj.
- Disables PowerDamage's effect, similar to DMG_NO_PROTECT disabling PowerProtect.
2018-11-12 22:04:17 +01:00
alexey.lysiuk
e820880d46 - fixed compilation on POSIX-like platforms
src/p_udmf.cpp:2052:6: error: no matching member function for call to 'OpenMem'
src/sc_man.h:24:7: note: candidate function not viable: expects an l-value for 2nd argument
src/sc_man.h:23:7: note: candidate function not viable: requires 3 arguments, but 2 were provided
src/resourcefiles/file_directory.cpp:198:32: error: use of undeclared identifier 'Filename'; did you mean 'FileName'?
2018-11-12 21:53:14 +01:00
Christoph Oelckers
2fe54f4a53 - use TArray and FString in resource file management. 2018-11-12 21:53:13 +01:00
Christoph Oelckers
9a8e4a6285 - a few more buffers converted.
# Conflicts:
#	src/f_wipe.cpp
2018-11-12 21:53:12 +01:00
Christoph Oelckers
f744b9a0f8 - use TArray for most buffers in p_glnodes.cpp. 2018-11-12 21:53:11 +01:00
Christoph Oelckers
91663e1202 - replaced a few temporary allocations with TArray and added a few convenience loader functions for this.
Amazingly with today's optimizers this creates code which is just as good as doing it all manually with the added benefit of being safer.
2018-11-12 21:53:10 +01:00
Christoph Oelckers
3db6fc0900 - made some minor changes to TArray after finding out that "new int()" is not the same as "new int".
With parentheses this initializes to 0 which created needless initialization code in a few places.
2018-11-12 21:53:09 +01:00
drfrag666
ab66abfdc1 - Some TArray changes.
(patches by Graf)
2018-11-12 21:53:08 +01:00
drfrag666
5740421d54 - Even more TArray changes.
(patches by Graf)
2018-11-12 21:52:16 +01:00
drfrag666
63edabba16 - Changed default GL fuzz type to software. 2018-11-12 11:16:01 +01:00
drfrag666
c2a3895bfe Revert "- add dithering to present shader"
This reverts commit 60ae0915b9.

This was extremely slow on intel, the dither matrix was recreated on every frame even when not used.
2018-11-12 11:11:28 +01:00
Christoph Oelckers
709a573355 - clear spechit before leaving P_CheckPosition.
Otherwise this may contain residual data from the last call.
One can only hope that this doesn't cause other side effects - this entire code is one horrendous mess of bad ideas.
2018-11-10 11:19:25 +01:00