Commit graph

14166 commits

Author SHA1 Message Date
drfrag
19df6559a8 - Print a warning instead of error out on unsupported ZScript version. 2019-07-11 18:20:57 +02:00
drfrag
1d77f880a4 - Fixed hack: CanPrint must return 0 or it'd signal to the mods that NO FONT can print the text (what Graf said). 2019-07-11 14:07:47 +02:00
drfrag
e5f7bf068c - Some ugly hackery to try to make it more compatible. 2019-07-11 14:07:20 +02:00
Christoph Oelckers
da5c1c90dc - let IWAD and PWAD BigFonts override BigUpper for consistency.
# Conflicts:
#	src/gamedata/fonts/font.cpp
#	src/gamedata/fonts/singlelumpfont.cpp
#	src/gamedata/fonts/v_font.cpp
2019-07-11 13:41:45 +02:00
Christoph Oelckers
8ff421104d - fixed: The lump renaming was not performed for Doom, even for those pieces where needed. 2019-07-11 13:26:37 +02:00
Christoph Oelckers
d14a48f8f4 - use BigUpper font for option menu captions.
# Conflicts:
#	src/gamedata/fonts/v_font.cpp

There's actually no BigUpper font here. (drfrag)
2019-07-11 13:24:40 +02:00
alexey.lysiuk
660d930cf6 - do not set crouch player sprites on voodoo dolls
https://forum.zdoom.org/viewtopic.php?t=65257
2019-07-10 22:04:20 +02:00
alexey.lysiuk
c4780495e1 - fixed linking without DYN_FLUIDSYNTH defined
Undefined symbols for architecture x86_64:
  "CreateFluidSynthMIDIDevice(char const*, int)", referenced from:
      MIDIStreamer::CreateMIDIDevice(EMidiDevice, int) in music_midistream.o
2019-07-09 22:58:11 +02:00
Christoph Oelckers
d018b430f7 - made the class definitions of the MIDI devices private to the implementations. 2019-07-09 22:58:08 +02:00
alexey.lysiuk
a646b9cfa2 - fixed crash on starting ACS script without level
https://forum.zdoom.org/viewtopic.php?t=65287
2019-07-08 13:56:45 +02:00
alexey.lysiuk
0dbf2e3df7 - fixed LevelLocals.isFrozen() return value with JIT disabled
No more 'Number of parameters returned differs from what was expected by the caller' assertion failures
2019-07-08 13:56:35 +02:00
drfrag
ca9967d13b - Made automatic level compatibility optional.
As Enjay requested and Rachael suggested.
 I don't think i'm opening Pandora's box, what could go wrong?
2019-07-05 14:45:01 +02:00
alexey.lysiuk
9d8b4f6c05 - fixed missing dive and surface player sounds
https://forum.zdoom.org/viewtopic.php?t=65233
2019-07-05 13:33:55 +02:00
Major Cooke
e332d405f6 Re-ordered drawing a little.
# Conflicts:
#	src/g_statusbar/shared_sbar.cpp
2019-07-03 21:48:04 +02:00
Major Cooke
dfe8f19dd5 Added RenderUnderlay.
- Works exactly like RenderOverlay, but is drawn behind the status bar/huds instead.

# Conflicts:
#	src/events.cpp
#	src/events.h
2019-07-03 21:48:01 +02:00
drfrag
c3482b75fc - Make joystick input in the background CVAR controlled. 2019-07-03 20:52:03 +02:00
alexey.lysiuk
f340d411c3 - added validation of LevelCompatibility.Apply() signature
# Conflicts:
#	src/compatibility.cpp
2019-07-03 13:49:36 +02:00
drfrag
29264b764b - Allow background gamepad input on linux as well. 2019-07-02 13:54:05 +02:00
drfrag
3f9643e1ca - Clarify ZScript version error message. 2019-07-01 11:35:54 +02:00
Magnus Norddahl
fc38b6bbf9 - fix querying for the wrong interface when the UNICODE define is set 2019-06-30 21:41:28 +02:00
Magnus Norddahl
36b7a7d189 - remove dead code 2019-06-30 21:41:25 +02:00
alexey.lysiuk
d90d590484 - added detection of macOS Catalina 2019-06-29 13:09:27 +02:00
drfrag
ed0890c7b6 - Allow acquiring DirectInput joysticks in the background for fake splitscreen. 2019-06-28 02:47:42 +02:00
Christoph Oelckers
f1126bf70e - removed unnecessary variable clear.
It actually broke multiplayer since "replaced the assignment operator in player_t with a named function." (drfrag)
2019-06-28 00:03:37 +02:00
Christoph Oelckers
7d168c0146 - removed UTF-8 marker. 2019-06-26 14:28:03 +02:00
Rachael Alexanderson
1215653941 - add missing newline to PrintMiscActorInfo 2019-06-26 14:27:51 +02:00
drfrag
82d7419d34 - Hopefully fixed dithering in the present shader so it works on older hardware. 2019-06-26 11:46:11 +02:00
alexey.lysiuk
102cd3855c - fixed: endgame menu no longer resets player's userinfo
User CVARs can be stored in member variables for quicker access
Unconditional call to G_CheckDemoStatus() destructs and recreates such CVARs
Dangling pointers could be accessed during the last game tick, e.g. from event handlers

https://forum.zdoom.org/viewtopic.php?t=65150
2019-06-23 18:52:45 +02:00
Kevin Caccamo
3923a92f11 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
2019-06-23 14:11:08 +02:00
Kevin Caccamo
2c08a77f2c 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.
2019-06-23 14:11:06 +02:00
Kevin Caccamo
6ae47bad88 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

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

# Conflicts:
#	src/gl/scene/gl_walls_draw.cpp
#	src/gl/scene/gl_weapon.cpp
#	src/hwrenderer/scene/hw_flats.cpp
#	src/r_defs.h
2019-06-23 14:10:41 +02:00
Kevin Caccamo
1a29fb9616 Change some of the names of the additive color properties 2019-06-23 13:40:19 +02:00
drfrag
e7ecdc9f9e - Fixed compilation but i don't think this will work. 2019-06-23 13:39:24 +02:00
Kevin Caccamo
866c6e13a6 Implement additive colours on HUD sprites
Also, make sure the alpha for the additive colour is 255.

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

# Conflicts:
#	src/gl/scene/gl_weapon.cpp
2019-06-23 12:50:19 +02:00
Kevin Caccamo
16a52cd8c8 Implement additive colour on walls and sprites
Also, don't modify the alpha channel when adding the additive colour.

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

# Conflicts:
#	src/gl/scene/gl_weapon.cpp
2019-06-23 12:46:54 +02:00
Kevin Caccamo
edb3f8a448 Forcibly assign 0 to the additive special color 2019-06-23 11:46:59 +02:00
Kevin Caccamo
575b660b20 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

# Conflicts:
#	src/gl/shaders/gl_shader.cpp
#	src/hwrenderer/scene/hw_flats.cpp
#	src/hwrenderer/scene/hw_renderstate.h
#	src/hwrenderer/utility/hw_draw2d.cpp

# Conflicts:
#	src/gl/scene/gl_flats.cpp
#	src/hwrenderer/scene/hw_flats.cpp
2019-06-23 11:45:03 +02:00
Kevin Caccamo
8dd306a081 Initial work on Doom64-style fade/glow
# Conflicts:
#	src/hwrenderer/scene/hw_renderstate.h

# Conflicts:
#	src/r_defs.h
2019-06-23 11:30:29 +02:00
Christoph Oelckers
5f231473fd - defaulted a few empty constructors.
# Conflicts:
#	src/gamedata/g_mapinfo.h
2019-06-21 17:51:39 +02:00
drfrag
9585ae9c6e - Code cleanup. 2019-06-21 14:26:18 +02:00
Magnus Norddahl
98607f594e - use the exact sRGB->linear transfer function in HDR mode as the 2.2 gamma approximation is visibly inaccurate in this case
# Conflicts:
#	src/rendering/gl/renderer/gl_postprocess.cpp
#	src/rendering/gl/renderer/gl_stereo3d.cpp
#	src/rendering/hwrenderer/postprocessing/hw_postprocess.h
#	src/rendering/vulkan/renderer/vk_postprocess.cpp
#	wadsrc/static/shaders/glsl/present.fp

# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/stereo3d/gl_interleaved3d.cpp
#	src/hwrenderer/postprocessing/hw_presentshader.h
2019-06-21 14:21:03 +02:00
Magnus Norddahl
011176668a - Add missing screenshot sRGB gamma when vid_hdr is active
# Conflicts:
#	src/gl/system/gl_framebuffer.cpp

# Conflicts:
#	src/gl/system/gl_framebuffer.cpp
2019-06-21 13:02:18 +02:00
alexey.lysiuk
a6038dc773 - creation of dither texture no longer affects active unit
Red checkerboard was rendered upon startup instead of
* the first saved game's thumbnail
* the first game frame
2019-06-20 22:13:16 +02:00
Rachael Alexanderson
1a26946e5b - Allow specifying monitor bits-per-channel for dithering output. Not all displays are created equal, so this option is actually important for specifying the exact amount for your display.
# Conflicts:
#	src/gl/renderer/gl_stereo3d.cpp
#	wadsrc/static/menudef.txt

# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/stereo3d/gl_interleaved3d.cpp
2019-06-20 22:12:48 +02:00
Magnus Norddahl
7021e612b0 - add gl_dither for toggling dithered output on and off
# Conflicts:
#	src/gl/renderer/gl_stereo3d.cpp
#	wadsrc/static/menudef.txt

# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/stereo3d/gl_interleaved3d.cpp
#	src/hwrenderer/postprocessing/hw_presentshader.h
2019-06-20 21:27:17 +02:00
Magnus Norddahl
4cd535b3b6 - add vid_hdr cvar that enables higher than 8bpc output for monitors that support it
# Conflicts:
#	src/v_video.cpp
#	src/win32/win32glvideo.cpp

# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
2019-06-20 20:48:42 +02:00
Christoph Oelckers
73ed375b6f Make dither texture data constant 2019-06-20 19:29:14 +02:00
Rachael Alexanderson
fd83903841 - replace dither texture with a hand pre-calculated table) 2019-06-20 19:29:12 +02:00
drfrag
0b76305e8e - Fixed compilation. 2019-06-20 19:28:24 +02:00
Magnus Norddahl
888fba12ea - use a texture for the dither matrix
# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/renderer/gl_renderbuffers.h

# Conflicts:
#	wadsrc/static/shaders/glsl/present.fp
2019-06-20 18:20:33 +02:00
drfrag
7fdf558ad6 Revert "- add gl_dither for toggling dithered output on and off"
This reverts commit 770c676ac9.

# Conflicts:
#	wadsrc/static/menudef.txt
2019-06-20 18:04:30 +02:00
drfrag
8b7c5242cb Revert "Revert "- add dithering to present shader""
This reverts commit c2a3895bfe.

# Conflicts:
#	wadsrc/static/menudef.txt
2019-06-20 18:03:24 +02:00
Christoph Oelckers
300f4adea8 - fixed incorrect implementation of "episode = clear" in UMAPINFO. 2019-06-19 21:59:56 +02:00
alexey.lysiuk
a334d08a7b - fixed incomplete parsing of UMAPINFO when map already exists
https://forum.zdoom.org/viewtopic.php?t=65100
2019-06-19 21:59:53 +02:00
alexey.lysiuk
8ec249077d - fixed missing skill menu for episodes defined by UMAPINFO
https://forum.zdoom.org/viewtopic.php?t=65096
2019-06-19 21:59:51 +02:00
alexey.lysiuk
633900ef15 - fixed: all UMAPINFO definitions were applied to default map slot
https://forum.zdoom.org/viewtopic.php?t=65102
2019-06-19 21:59:48 +02:00
Christoph Oelckers
bf767dd560 - give UMAPINFO the ability to disable cluster-based exit texts.
# Conflicts:
#	src/g_level.cpp
#	src/gamedata/g_mapinfo.h
2019-06-19 21:59:46 +02:00
alexey.lysiuk
8735dd18ad - exported unconditional level exit to ZScript
Exit_Normal and Exit_Secret specials imply addition conditions to make a decision about proceeding to the next map
A few scriptified actors require a bypass of these conditions in order to work properly
2019-06-17 22:03:28 +02:00
drfrag
336a9f9015 - More helpful unsupported version error message. 2019-06-16 14:44:28 +02:00
Chronos Ouroboros
65a3322166 Fixed "if (!(lhs ~== rhs))" breaking with vectors. 2019-06-14 13:34:06 +02:00
drfrag
a7bcd8ff52 - Take vanilla light mode into account for MAPINFO but they never worked. 2019-06-14 13:33:28 +02:00
Rachael Alexanderson
fb326b2780 - add nullptr checks for double-frame model interpolation 2019-06-13 15:54:17 +02:00
Christoph Oelckers
06c0dbe71e - on second thought, better call M_ClearMenus instead of calling Destroy directly. 2019-06-10 20:58:38 +02:00
Christoph Oelckers
96d857cd78 - fixed: DeinitMenus must explicitly destroy the active menu before taking down the descriptors.
Otherwise the menu will only be collected by the garbage collector and no longer find all relevant data.
2019-06-10 20:58:34 +02:00
drfrag
36020225eb - Added DEG2RAD function. 2019-06-10 20:54:47 +02:00
alexey.lysiuk
1e496d2d6f - fixed compilation of Cocoa backend
src/posix/cocoa/i_main.mm:225:12: error: Objective-C declarations may only appear in global scope
src/posix/cocoa/i_main.mm:247:17: error: Objective-C declarations may only appear in global scope
src/posix/cocoa/i_main.mm:545:2: error: expected '}'
2019-06-10 20:52:50 +02:00
Christoph Oelckers
b473fc936c - consolidated the 3 atterm implementations.
Each platform had its own copy. Why?

# Conflicts:
#	src/CMakeLists.txt
#	src/dobjtype.cpp
#	src/g_mapinfo.cpp
#	src/g_statusbar/sbarinfo.cpp
#	src/i_net.cpp
#	src/menu/menudef.cpp
#	src/p_setup.cpp
#	src/posix/cocoa/i_video.mm
#	src/posix/i_system.h
#	src/posix/sdl/i_main.cpp
#	src/r_utility.cpp
#	src/s_advsound.cpp
#	src/s_sound.cpp
#	src/v_video.cpp
#	src/win32/i_input.cpp
#	src/win32/i_system.h

# Conflicts:
#	src/CMakeLists.txt
#	src/doomtype.h
#	src/i_net.cpp
#	src/posix/sdl/i_system.cpp
#	src/win32/i_system.cpp
#	src/win32/win32video.cpp
2019-06-10 20:52:02 +02:00
alexey.lysiuk
d76c7306ca - removed explicit self null tests from dynarray native wrappers
They are useless since d3e6ed3c9b in which generation of implicit self null pointer check was added to JIT
2019-06-10 20:12:03 +02:00
drfrag
4e3f294453 - Extended fake Shape2D. 2019-06-10 20:07:47 +02:00
Gutawer
9df4683056 - cleaned up SDL mouse event handling
* Right/middle clicking no longer cancels out the mouse motion events
* The events for the side mouse buttons (EV_GUI_BackButtonDown/Up, EV_GUI_FwdButtonDown/Up) were never fired
* The EV_GUI_WheelRight/Left events were never fired
* The key bindings for mouse buttons above 3 (from 4-8) were broken - pressing MOUSE4 would bind to MOUSE6, for example
2019-06-08 13:11:00 +02:00
alexey.lysiuk
b3f18e5e47 - report implicitly initialized variable in code generator once
Vectors are no longer reported several times
Previously, warnings were issued per every register
2019-06-08 13:10:58 +02:00
alexey.lysiuk
279bac7fe9 - fixed access to wrong event data in SDL backend
Wrong button state event data were read on mouse motion

https://forum.zdoom.org/viewtopic.php?t=64950
2019-06-08 13:10:55 +02:00
alexey.lysiuk
f0b156c5e1 - added implicit initialization of reused register variables in ZScript 2019-06-07 20:23:31 +02:00
alexey.lysiuk
0103f9976e - added null check for self pointer before calling a native function
With JIT enabled, an implicit test for null self pointer is added to generated code
This has no effect without JIT as VM verifies a pointer before calling a native method

https://forum.zdoom.org/viewtopic.php?t=64961
2019-06-07 20:23:28 +02:00
alexey.lysiuk
977eac8672 - fixed hires texture lookup in Doomsday style .pk3
IWAD wasn't detected properly, and wrong texture can be picked as a hires replacement (e.g., SLADRIP1 from Ultimate Doom instead of TNT)

https://forum.zdoom.org/viewtopic.php?t=64915
2019-06-06 18:43:27 +02:00
Christoph Oelckers
4b598d4976 - fixed the write barriers for the HUD message linked list.
To ensure that no broken relations occur, any change in the list must be handled by a write barrier, not just the single message that gets added.

# Conflicts:
#	src/g_statusbar/shared_sbar.cpp
2019-06-06 18:43:26 +02:00
drfrag
b0d98425a6 - Fixed Strife dialogues. 2019-06-06 18:43:24 +02:00
Chronos Ouroboros
e4f0c366c4 Really fixed arrays of dynarrays this time. 2019-06-05 12:47:01 +02:00
William Breathitt Gray
666bf57d5f Cephes code is released under BSD license
The Cephes Mathematical Library author Steve Moshier has released the
Cephes Mathematical Library under the BSD license. This patch patch
replaces the cephes license with the BSD license for all Cephes
Mathematical Library code.

See also: https://bugs.gentoo.org/687276
See also: https://lists.debian.org/debian-legal/2004/12/msg00295.html
See also: https://github.com/deepmind/torch-cephes/blob/master/LICENSE.txt
See also: https://github.com/nearform/node-cephes/blob/master/LICENSE

# Conflicts:
#	src/math/readme.txt
2019-06-05 12:46:59 +02:00
Rachael Alexanderson
c6c8f514fb - added a third state for cl_blockcheats. ==2 now blocks them silently. 2019-06-05 12:46:57 +02:00
Alexander
3e3097fe71 added native double round(double) function 2019-06-05 12:46:56 +02:00
alexey.lysiuk
ff92b4b5d7 - reset internal console state on clear CCMD
'last line needs update' flag cannot be set when console is empty as there are no lines at all in this case

https://forum.zdoom.org/viewtopic.php?t=64909

# Conflicts:
#	src/c_consolebuffer.cpp
2019-06-03 12:47:29 +02:00
drfrag
6dd1d5eb38 - Fixed uninitialized variable in case GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS does not exist.
Old graphics, like mine (Intel Sandybridge Mobile, GL 3.0 Mesa) do not support this, therefore most of the time RFL_SHADER_STORAGE_BUFFER wasn't unset (I found no consequence of this on my machine, but better safe than sorry).

Found out by Valgrind. (patch by edward-san)
2019-06-02 22:01:18 +02:00
Edoardo Prezioso
768dc56ac0 - Fixed a buffer overflow with Timidity++ when playing Sigil e5m5 music.
See https://forum.zdoom.org/viewtopic.php?f=2&t=64910 .
2019-06-02 22:01:01 +02:00
Kevin Caccamo
9e9bc7fb7f Fix OBJ face normal direction
https://forum.zdoom.org/viewtopic.php?f=2&t=64740
2019-06-02 22:00:59 +02:00
drfrag
5153d19af0 - Fixed compilation with gcc and clang. 2019-05-30 12:23:38 +02:00
alexey.lysiuk
a45c2ed9b6 - adjusted condition for ZScript global variable deprecation warning
The message is always printed for any use of deprecated global variable
If such variable is accessed inside a deprecated function from a core script lump, the message is printed only when verbosity level is set to highest

https://forum.zdoom.org/viewtopic.php?t=64830

# Conflicts:
#	src/scripting/backend/codegen.cpp
2019-05-30 11:37:30 +02:00
drfrag
dd4807a6ee - Added new great icons by Tormentor667. 2019-05-30 00:05:02 +02:00
alexey.lysiuk
6f2102ae1d - fixed: version wasn't set for ZScript global variables
https://forum.zdoom.org/viewtopic.php?t=64830
2019-05-29 22:14:48 +02:00
alexey.lysiuk
6fbb1596e7 - fixed code generation for ternary operator with vector result types
https://forum.zdoom.org/viewtopic.php?t=64831
2019-05-29 22:14:46 +02:00
alexey.lysiuk
f44a9c8453 - fixed crash on message output during decorate parsing
Script position is now initialized at the very beginning of decorate parsing process
Script position no longer contains uninitialized file name

https://forum.zdoom.org/viewtopic.php?t=64836
2019-05-29 22:14:43 +02:00
alexey.lysiuk
b8e483166b - fixed conversation links with pages referenced by name
https://forum.zdoom.org/viewtopic.php?t=64177

# Conflicts:
#	src/p_usdf.cpp
2019-05-27 11:58:19 +02:00
alexey.lysiuk
1b0d8391c4 - fixed 'Pause by <playername>' message in multiplayer
https://forum.zdoom.org/viewtopic.php?t=64765

# Conflicts:
#	src/d_main.cpp
2019-05-27 11:58:06 +02:00
alexey.lysiuk
dc18200339 - fixed wrong native call for Actor.Vec2Offset()
https://forum.zdoom.org/viewtopic.php?t=64810
2019-05-27 11:58:03 +02:00
drfrag
1c593d0f67 - fixed character position assignment for multi-lump fonts
https://forum.zdoom.org/viewtopic.php?t=64741#p1104427
(patch by _mental_)
2019-05-27 11:57:44 +02:00
David Carlier
5add93d60a Fixing crash when loaded module, using proper function liberate them. 2019-05-27 11:57:32 +02:00
Christoph Oelckers
d8c13bed5e - Fixed loading of folder based fonts and added a config lump per font.
This is done by putting a font.inf file into the folder.
Current options are "Kerning", "Scale", "FontHeight" and "SpaceWidth"

# Conflicts:
#	src/textures/textures.h
#	src/v_font.cpp

# Conflicts:
#	src/v_font.cpp
2019-05-26 21:38:08 +02:00
Christoph Oelckers
1252042e33 - cleanup of font init to have less special cases
To make things easier, DBIGFONT, SBIGFONT and HBIGFONT will now be renamed in the lump directory to make things a bit easier to handle.

Another change is to make font folders atomic units to prevent cross-pollution between incompatible fonts. The only exception to this are the def* folders because they need to piece together their fonts from both zd_extra.pk3 and the IWADs.
2019-05-26 21:31:46 +02:00
Christoph Oelckers
1edf0a001b - changed font loader to detect fonts in folders and to find all default fonts in folders.
# Conflicts:
#	src/v_font.cpp
2019-05-26 21:17:44 +02:00
Christoph Oelckers
32c24038b0 - reworked font loader to make adding multi-lump fonts easier.
A multi-lump font can be created by putting all characters into a subdirectory of fonts/ with the intended name. Each character needs to be named by its character index as hex number.
So far this is only active for the predefined small fonts

# Conflicts:
#	src/v_font.cpp
2019-05-26 21:17:16 +02:00
drfrag
b62973d190 - Fixed compilation with old gcc and clang. 2019-05-23 00:05:16 +02:00
Rachael Alexanderson
d54c1a7af1 - add some debugging information for GZSDF pagenames feature
# Conflicts:
#	src/p_usdf.cpp
2019-05-22 19:57:26 +02:00
alexey.lysiuk
d1298e2a71 - do not pass TObjPtr<> instances as ScriptUtil::Exec() arguments
There was no read barrier inserted for AActor object while it's a subject of garbage collection
Pointer stored in TObjPtr<> was reinterpreted as void* because of vararg function

https://forum.zdoom.org/viewtopic.php?t=64771

# Conflicts:
#	src/dobjgc.h
#	src/p_acs.cpp
2019-05-22 19:57:24 +02:00
Christoph Oelckers
75f5318b00 - fixed text color setup for added console message. 2019-05-22 19:57:22 +02:00
drfrag
14981adb6a - Greek Sigma character fallback
The lowercase Sigma letter in Greek has two different forms (σ and ς), which changes depending on its placement in a word, but in uppercase and smallcaps contexts, it only has one look regardless of word positioning. If the character ς is missing, it should fall back to σ.
(patch by Graf & Nemrtvi)
2019-05-22 19:57:19 +02:00
Alexander
9191a33d82 made "netevent cannot be used outside of a map" message a warning 2019-05-18 14:09:01 +02:00
Alexander
fa42357891 added a crosshair on/off toggle
# Conflicts:
#	wadsrc/static/menudef.txt
2019-05-18 14:08:59 +02:00
drfrag
fcdc296ec7 - Missing casting, even when that function is deprecated. 2019-05-15 19:13:01 +02:00
drfrag
1186bccca0 - Fixed crash with dummy texture inside FTexture::FillBuffer in software mode.
Caused by The following GameInfo line in Doom Tournament:
 Border = 0,0,"","","","","","","",""
2019-05-15 18:41:11 +02:00
alexey.lysiuk
b0398273e2 - fixed compilation with GCC and Clang
src/g_mapinfo.cpp:840:58: error: cannot pass objects of non-trivially-copyable type ‘class FString’ through ‘...’
2019-05-14 20:13:16 +02:00
drfrag
369233c2cf - fixed 'I' to 'i' upper-to-lower mapping
https://forum.zdoom.org/viewtopic.php?t=64526
(patch by _mental_)
2019-05-14 20:13:13 +02:00
Player701
f55ad14663 Added support for monospacing alignment modes to HUDFont / BaseStatusBar.DrawString (#810)
* - Added support for monospacing alignment modes to HUDFont / BaseStatusBar.DrawString

* - added underlying type declaration for EMonospacing

* - replaced "#include v_video.h" with a declaration of EMonospacing
2019-05-14 19:50:43 +02:00
Christoph Oelckers
a6491c71b5 - added monospacing support to Screen.DrawText and its native counterparts.
# Conflicts:
#	src/g_statusbar/shared_sbar.cpp
#	src/v_draw.cpp
#	src/v_video.h

Without the HUD modifications. (drfrag)

# Conflicts:
#	src/v_draw.cpp
#	wadsrc/static/zscript/base.zs
2019-05-14 19:50:25 +02:00
Christoph Oelckers
2887bc6afc - do proper checks for chat string length.
The counter variable was not only used incorrectly, it was completely redundant.
This still has a byte limit due to how the network code works so for non-Latin languages may result in shorter strings.
2019-05-14 19:47:12 +02:00
Player701
405ece578a - Added "const" qualifiers to the new UTF-8-aware string methods 2019-05-14 19:39:09 +02:00
Christoph Oelckers
0c36ab0651 - added CharUpper and CharLower functions to ZScript.
These, like MakeUpper and MakeLower, use the internal Unicode case conversion tables.

# Conflicts:
#	src/scripting/vmthunks.cpp
2019-05-14 19:37:49 +02:00
Christoph Oelckers
1e0228c13a - added Unicode aware MakeUpper/MakeLower functions to FString and ZScript's String and deprecated ToUpper/ToLower because their semantics did not allow fixing them. 2019-05-14 19:37:47 +02:00
drfrag
f2a43353c4 - Exported some types to fontinternals.h. 2019-05-14 19:37:44 +02:00
Christoph Oelckers
6caf1f60c6 - added some UTF-8 utilities to FString.
This deprecated CharAt and CharCodeAt for being unsuitable for text processing and in the case of CharCodeAt also for being buggy.
A new replacement, ByteAt has been added that reads a string byte by byte, as well as CodePointCount, which counts the amount of Unicode code points in a string and GetNextCodePoint which reads the string code point by code point.
Note that while this woll work as intended with the currently supported languages as a means to read single characters, there is no guarantee that this will remain so if Unicode support gets extended to things which break the "one code point == one character" assumption.
2019-05-14 19:35:21 +02:00
drfrag
77f2497ecf - added a few more character fallbacks and fixed the StringWidth function
This checked character size without substituting missing characters, resulting in bad return values.
(patch by Graf)
2019-05-14 19:34:12 +02:00
Christoph Oelckers
344c6a380b - fixed: The WideString conversion function was missing a null check. 2019-05-14 19:10:27 +02:00
Christoph Oelckers
52b8c02fdf - use the Unicode version of GetCommandLine for the crash log. 2019-05-14 19:09:24 +02:00
alexey.lysiuk
d85fb785eb - fixed missing command line in crash reports
https://forum.zdoom.org/viewtopic.php?t=64149
2019-05-14 19:09:22 +02:00
Alexander
dc666203b7 added option search menu
# Conflicts:
#	src/g_cvars.cpp
#	wadsrc/static/menudef.txt

# Conflicts:
#	src/menu/menu.cpp
2019-05-14 18:59:10 +02:00
Christoph Oelckers
f026198a8d - set a Unicode capable font for the Windows console.
The default raster font only contains the OEM 437 code page which is quite useless.
2019-05-14 18:42:33 +02:00
drfrag
a31c9273dd - do not use iswspace to check raw UTF-8.
At least under MSVC this function reports 0x85 as whitespace, but it is a continuation byte for UTF-8 sequences and may not be treated as whitespace.
(patch by Graf)
2019-05-14 18:41:40 +02:00
drfrag
8a9ffb3031 - added a fallback mapping for the typographic upper quotation mark to the generic form.
- added lowercase->uppercase mapping for ß.
(patch by Graf)
2019-05-14 18:39:00 +02:00
Christoph Oelckers
d47d1f248b - fixed: The command line parser of the console was incapable of handling non-ASCII characters. 2019-05-14 18:31:02 +02:00
Christoph Oelckers
182846c9a0 - fixed character counting in TypeOn HUD message.
# Conflicts:
#	src/g_shared/hudmessages.cpp
2019-05-14 18:29:11 +02:00
Christoph Oelckers
c7101b6b32 - reformat the intermission screen if the text is very long.
This will ensure better visibility on widescreen displays, at least.

# Conflicts:
#	src/intermission/intermission.cpp
2019-05-14 18:04:22 +02:00
Christoph Oelckers
5bd6b6758c - fixed utf8_decode.
This function was written for already validated UTF-8 but not for text that can be mixed with ISO-8859-1.
To handle that properly it needs to do a bit more validation to avoid mangling its output and instead reject invalid input.
2019-05-14 18:01:46 +02:00
Christoph Oelckers
2ea80429a7 - fixed the status bar string drawers which weren't UTF-8 capable yet.
# Conflicts:
#	src/g_statusbar/sbarinfo.cpp
#	src/g_statusbar/shared_sbar.cpp
2019-05-14 18:00:54 +02:00
Christoph Oelckers
d2959760dc - fixed chat input.
# Conflicts:
#	src/ct_chat.cpp
2019-05-14 17:49:05 +02:00
Christoph Oelckers
4561eaf093 - Fixed the character substitution logic.
For pure uppercase fonts it makes no sense to try a lowercase substitution as a first step.

# Conflicts:
#	src/gamedata/fonts/font.cpp
#	src/v_font.h
2019-05-14 17:46:42 +02:00
Christoph Oelckers
3127a28e35 - fixed reading of exit text replacements and display of intermission text screens for Unicode. 2019-05-14 17:40:12 +02:00
Christoph Oelckers
cf818fbe10 - changed zstrformat to allow %c to emit non-ASCII characters as UTF-8. 2019-05-14 17:38:45 +02:00
drfrag
4c7eb79d72 - Fixed MinGW compilation. 2019-05-14 17:30:58 +02:00
Christoph Oelckers
d51728c7c3 - did a bit of fine tuning to the character replacement mappings:
* prefer accent-less lower case over uppercase letters if an accented lower case letter cannot be found.
* added accent-less mappings for Latin Extended 1 (0x100-0x17f) and some easy to handle characters between 0x200 and 0x220. This should allow to display all Eastern European text without empty gaps for missing letters.

# Conflicts:
#	src/v_font.cpp
2019-05-14 17:28:16 +02:00
Christoph Oelckers
b14a48d2dc - fixed Windows startup.
* the window class name was still ASCII, thanks to some totally pointless and ultimately dangerous type cast to LPCTSTR which rendered all type checks ineffective.
* use wWinMain instead of WinMain so that a Unicode argv gets created. For whatever reason, the ANSI startup leaves this variable empty.
* added a 'disablecrashlog' CCMD for Windows. It is a lot more useful with a debugger present to get the standard crash notification from the system which allows opening a debugger than the crash log and no option to open a debugger.
2019-05-14 17:20:30 +02:00
Christoph Oelckers
163d3395b8 - fixed crash log display.
This still contained pieces where a multibyte string was passed through SendMessage and WM_SETTEXT. All these have been replaced with SetWindowTextW.
This commit also removes the never used crash log upload code and all associated assets because it is extremely unlikely that such a feature will ever be implemented.
2019-05-14 17:20:17 +02:00
Christoph Oelckers
1e9a65e673 - fixed the player name display.
This was broken by several small unicode-incompatible code fragments.
This commit also removes the input limit for the player name and the savegame description. With multibyte encoding, limiting them to a fixed length did not work right.
Currently these will just overflow the fields if the text becomes too long, this needs some additional work.
2019-05-14 17:19:34 +02:00
Christoph Oelckers
f790d48041 - made the menu's text input handler Unicode capable.
Also make sure that the savegame description remains readable. Unlike in-game text this can be done without double-encoding existing UTF-8.
2019-05-14 17:19:19 +02:00
Christoph Oelckers
d067c55cff - made the chat input Unicode-capable.
Also changed this to use the console font because it is far better equipped with special characters than the small font.

# Conflicts:
#	src/ct_chat.cpp

# Conflicts:
#	src/ct_chat.cpp
2019-05-14 17:17:41 +02:00
Rachael Alexanderson
9b8ec98f78 - fix building in 32 bit windows 2019-05-14 17:16:15 +02:00
Christoph Oelckers
c7877388a9 - made the console Unicode-capable.
This also necessitated some character remapping in the console font to move the Windows-1252 extra characters to their proper Unicode code points.

# Conflicts:
#	src/CMakeLists.txt
#	src/posix/sdl/i_input.cpp
#	src/scripting/backend/codegen.cpp
#	src/v_font.cpp

# Conflicts:
#	src/c_console.cpp
2019-05-14 17:12:18 +02:00
Christoph Oelckers
9030289e1e - use the Unicode version of Windows's clipboard functions. 2019-05-14 17:10:00 +02:00
Christoph Oelckers
4c9e6853b1 - made Windows backend parts of the console Unicode capable.
# Conflicts:
#	src/c_console.cpp
#	src/v_font.cpp
#	src/win32/i_system.cpp
2019-05-14 17:05:40 +02:00
drfrag
77498e2740 Revert "- Applied some Blzut3 patches to compile with MinGW."
This reverts commit ad5959b827.

Compilation with vanilla MinGW is broken since the changes to the HQ resize modes anyway.
2019-05-14 16:32:39 +02:00
Christoph Oelckers
8d157f3ced - switched the Windows backend to use the Windows Unicode API.
With localization for non-Latin languages on the support list the multibyte API doesn't cut it anymore. It neither can handle system text output outside the local code page nor can an ANSI window receive text input outside its own code page.
Similar problems exist for file names. With the multibyte API it is impossible to handle any file containing characters outside the active local code page.

So as of now, everything that may pass along some Unicode text will use the Unicode API with some text conversion functions. The only places where calls to the multibyte API were left are those where known string literals are passed or where the information is not used for anything but comparing it to other return values from the same API.

# Conflicts:
#	src/rendering/hwrenderer/postprocessing/hw_postprocess.h
#	src/win32/base_sysfb.cpp
#	src/win32/i_main.cpp
#	src/win32/win32basevideo.cpp
#	src/win32/win32glvideo.cpp

# Conflicts:
#	src/version.h
#	src/win32/i_main.cpp
#	src/win32/i_system.cpp
#	src/win32/optwin32.h
#	src/win32/win32gliface.cpp
#	wadsrc/static/language.enu
2019-05-14 16:17:05 +02:00
Christoph Oelckers
e27efa5a2e - fixed DHudMessageTypeOnFadeOut's character counter to be UTF-8 compatible.
This was reading the string by byte and not by character and could end up printing incomplete UTF-8 data.
2019-05-14 13:31:23 +02:00