Commit graph

13147 commits

Author SHA1 Message Date
alexey.lysiuk
08dfdd2687 - added warning for constant conditional expression
ZScript code like `if (x = 0) // ...` no longer causes assertion failure in Debug but produces a warning regadless of configuration

https://forum.zdoom.org/viewtopic.php?t=62422
2018-11-02 13:31:43 +01:00
alexey.lysiuk
bde980d5e8 - fixed potential crash when drawing status bar log
src/g_statusbar/shared_sbar.cpp:1133:34: warning: comparison of integers of different signs: 'unsigned int' and 'int'
[-Wsign-compare]
2018-11-02 13:31:41 +01:00
drfrag666
683aba3dd9 - bump ZScript version number to 3.7.0 2018-11-02 13:31:25 +01:00
Christoph Oelckers
6daece72c9 - versioned the return mismatch check to demote it to a warning for older versions than 3.7.
# Conflicts:
#	wadsrc/static/zscript.txt
2018-11-02 13:31:10 +01:00
alexey.lysiuk
7226f38375 - made 'return void' case a compilation error 2018-11-02 13:30:42 +01:00
Christoph Oelckers
16b3ccf930 - added far stronger restrictions for when the Boom-Texture-Y-offset compatibility flag may trigger.
This had absolutely no sanity checks and unconditionally picked the source texture if one existed.
It should only be done for wall textures, only for those defined in TEXTUREx and only for those where the scale is identical with the underlying texture.
2018-11-02 13:22:09 +01:00
Christoph Oelckers
da5fccb598 - fixed: Do not pass Sysex messages to Windows's GS Wavetable synth.
This will totally refuse to play a MIDI if that happens.
Duke Nukem's Alienz.mid, which did not play before works after this change.
2018-11-02 13:20:57 +01:00
Christoph Oelckers
9410e5ea98 - fixed: P_DamageMobj should clear reactiontime only for non-players.
For players this variable has an entirely different meaning which does not agree with being modified here.
2018-11-02 13:20:35 +01:00
Christoph Oelckers
3e4f1ea813 - fixed handling of wrapped midtextures to be actually useful when used in sky sectors.
# Conflicts:
#	src/hwrenderer/scene/hw_walls.cpp
2018-11-02 13:08:00 +01:00
Christoph Oelckers
be673459bd - made DBrokenLines serializable. 2018-11-02 13:07:28 +01:00
ZippeyKeys12
96fafa9c59 Export AllClasses 2018-11-02 13:07:12 +01:00
Cacodemon345
341105a15f Fix bounce state not entering when hit from top. 2018-11-02 13:06:48 +01:00
drfrag666
557380a769 - Added alpha parameter to DrawLine for the GL renderer, it's a fake parameter for the software renderer so mods don't crash. 2018-11-02 13:04:37 +01:00
Major Cooke
7eef13c859 Added VelIntercept.
- Uses the same code as Thing_ProjectileIntercept to aim and move the projectile.
  - targ: The actor the caller will aim at.
  - speed: Used for calculating the new angle/pitch and adjusts the speed accordingly. Default is -1 (current speed).
  - aimpitch: If true, aims the pitch in the travelling direction. Default is true.
  - oldvel: If true, does not replace the velocity with the specified speed. Default is false.

- Split the code from Thing_ProjectileIntercept and have that function call VelIntercept.
2018-11-01 21:25:56 +01:00
ZZYZX
a40d717006 Fixed sector floor/ceiling actions not triggering in P_XYMovement 2018-11-01 21:08:53 +01:00
ZZYZX
d2f6834da6 Implemented loading/saving of line/sector health and health groups in savegames 2018-11-01 21:08:51 +01:00
Christoph Oelckers
c17c6d97ad - missed one place where FBrokenLines was used. 2018-11-01 21:08:40 +01:00
Christoph Oelckers
cd3b0643a8 - fixed: An exception inside DestroyAllThinkers could send the engine into an endless loop of failed destructions. 2018-11-01 21:08:29 +01:00
Christoph Oelckers
0dba8e4f4a - use a saner data structure to store the BrokenLines.
Calling the old method with a pointer to an array of unspecified length 'dirty' would be an understatement.
Now it uses a TArray to store the single elements

# Conflicts:
#	src/g_shared/hudmessages.cpp
#	src/v_font.cpp
2018-11-01 21:08:17 +01:00
ZZYZX
82a2bf3ac5 Single commit - destructible geometry feature
# Conflicts:
#	src/p_setup.cpp
2018-11-01 21:02:25 +01:00
Player701
8e8d3719f7 - Introduced an enum named EventHandlerType and changed the bool argument in E_NewGame to this type. 2018-11-01 20:56:51 +01:00
player701
e04613811d - Static NewGame events now fire before loading a map, and normal NewGame events fire after registering per-map handlers and before all other events.
- Static event handlers now unregister after per-map handlers.
- All event handlers now unregister in reverse order.
2018-11-01 20:56:50 +01:00
Christoph Oelckers
1e84327c40 - added missing nullptr check.
# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp

# Conflicts:
#	src/gl/scene/gl_sprite.cpp
2018-11-01 20:55:53 +01:00
Christoph Oelckers
39d4db0a38 - added option to disable alpha testing for user shaders.
# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/hwrenderer/scene/hw_sprites.cpp

# Conflicts:
#	src/hwrenderer/textures/hw_material.cpp
#	src/r_data/gldefs.cpp
2018-11-01 20:51:08 +01:00
Christoph Oelckers
0623a92363 - use standard sprite lighting for voxels.
Per-pixel lighting requires normals which voxels do not have.

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

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp
2018-11-01 20:02:46 +01:00
Rachael Alexanderson
6aa51b08da - do a texture check when drawing fog borders in the software renderer. this does not fix the crash issue, but mitigates it enough with a check that likely should be in place, anyhow. 2018-11-01 19:10:55 +01:00
Marrub
0f6f23350d Add "neutral" gender option and better obit formatting 2018-10-31 11:24:01 +01:00
drfrag666
3d66b9af09 - Doubled initial size for the light buffer.
(patch by Graf)
2018-10-30 13:05:55 +01:00
drfrag666
eebd6c8319 Revert "- removed the 8x8 block drawing code from softpoly"
This reverts commit d086c3d4dc.

# Conflicts:
#	src/polyrenderer/drawers/poly_triangle.cpp
#	src/polyrenderer/drawers/poly_triangle.h

The softpoly renderer crashed at high resolutions without them.
2018-10-26 19:51:30 +02:00
drfrag666
2c8b5e700f Revert "- use the worker threads to clear the stencil buffer"
This reverts commit 0a265d028d.

# Conflicts:
#	src/polyrenderer/drawers/poly_triangle.cpp
#	src/polyrenderer/drawers/poly_triangle.h
2018-10-26 19:39:38 +02:00
Magnus Norddahl
9882cd9d6b - fix softpoly bug where sprites and translucent walls in front of models would disappear 2018-10-25 13:57:03 +02:00
Tommy Nguyen
0403fb5416 - use value initialization for secspecial_t 2018-10-23 21:31:26 +02:00
Magnus Norddahl
b011900f48 - fix null pointer crash 2018-10-23 13:39:01 +02:00
Magnus Norddahl
6ca14ac8c6 - portal check is overridden by a different inverted check in the software renderer 2018-10-23 13:38:58 +02:00
Magnus Norddahl
a8112d4815 - Cull two-sided lines using the same rules as the software renderer is using (as suspicious as they may be) 2018-10-23 13:38:51 +02:00
alexey.lysiuk
063efa1ccd - fixed default values for S_ChangeMusic
https://forum.zdoom.org/viewtopic.php?t=62323#p1076849
2018-10-22 10:28:22 +02:00
Rachael Alexanderson
35bf70456a - fixed: attaching a new status bar to a player now calls 'setsizeneeded' - fixes an issue where the screen geometry is out of sync with the characteristics of the new status bar. 2018-10-20 21:22:24 +02:00
Marisa Kirisame
100ad0ac6d Preserve line locknumber in savegames. 2018-10-16 20:50:52 +02:00
drfrag666
2183f71ec6 - Make 160x100 scaling actually work, not that it's really useful.
This partially reverts "- don't let the video scale let the screen end up with a client size less than 320x200, which may cause undefined behavior and trigger asserts in debug builds."
2018-10-15 11:58:09 +02:00
Rachael Alexanderson
d3bdeacd09 - fixed: use 'setsizeneeded' more often in the scaling code. recalculating screen geometry for 2D elements when it changes never really hurts. 2018-10-15 11:32:34 +02:00
Rachael Alexanderson
24d42b74a7 - fixed: use templates.h function for minimal value check
# Conflicts:
#	src/r_videoscale.cpp
2018-10-15 11:32:06 +02:00
Rachael Alexanderson
c42c4afeeb - enforce 160x100 minimum in actual scaling code
# Conflicts:
#	src/r_videoscale.cpp
2018-10-15 11:28:08 +02:00
Christoph Oelckers
53c87fd5eb - extended the register limit for 'param'.
The instruction one free instruction byte so it's now using that to extend its argument's register range to 65535.
For param this is needed because it passes strings by reference and creating an implicit temporary copy for string constants does not work here.
2018-10-14 10:31:48 +02:00
player701
dcc2006c76 - Exported PickNewWeapon function from PlayerPawn to ZScript. 2018-10-14 10:31:46 +02:00
Christoph Oelckers
979c3022c4 - fixed: MD3s with a skin-less surface left the renderer in an undefined state.
The frame interpolation factor wasn't reset and rendering prematurely aborted with no chance to recover.
2018-10-09 22:00:04 +02:00
Magnus Norddahl
770c676ac9 - add gl_dither for toggling dithered output on and off
# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/renderer/gl_stereo3d.cpp
#	src/hwrenderer/postprocessing/hw_presentshader.h
2018-10-09 21:57:14 +02:00
Rachael Alexanderson
960661df49 - fixed: smooth teleporters could fudge the player over an adjacent line, causing the player to appear on top of a cliff that is much higher than the original teleport. 2018-10-09 13:01:00 +02:00
Kevin Caccamo
434ffe542a Attempt to fix warnings from VS2017 Win64 compiler 2018-10-05 22:24:39 +02:00
Kevin Caccamo
a628cff085 Calculate normals for OBJ models with smooth groups
Add smoothGroup member to OBJFace struct, and assign the current smooth group number to it
Move face normal calculation code to CalculateNormalFlat
Add AddVertFaces method, which initializes and populates the vertFaces array of arrays, which holds references to triangle references per vertex
Only initialize and populate vertFaces if the model has missing normals and smooth groups
Assign smooth groups to triangle data
Add CalculateNormalSmooth method, which calculates the normals for each face the vertex is attached to, depending on whether or not the faces are part of the given smooth group, and averages them out
Add OBJTriRef struct, which holds references to triangles on OBJ surfaces

Make {agg,cur}SurfFaceCount unsigned ints
Change nvec to a value instead of a pointer
2018-10-05 22:24:26 +02:00
Christoph Oelckers
6df918341a - be more thorough with 'in menu' checks for certain protected functions.
They would also pass the test if a menu just was open but not the actual invoker.
Also error out if this happens so that modders can see that they are doing unsupported things. Silent failure is not a good idea here.
2018-10-05 22:24:25 +02:00