Commit graph

15614 commits

Author SHA1 Message Date
Christoph Oelckers
0153a42240 - fixed issues with text entering
* entering a savegame description did not work anymore
* the length check was too restrictive and always underestimated the available space
* use the console font for entering a savegame description. This has more characters and better contrast for this content.
* the interface to the text enterer used bad measurements.

# Conflicts:
#	wadsrc/static/zscript/ui/menu/optionmenuitems.zs
2019-05-14 17:38:21 +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
Christoph Oelckers
18253b5203 - added some character counting utilities to FString. 2019-05-14 13:31:07 +02:00
Christoph Oelckers
8626dd665c pass full Unicode characters to EV_GUI_Char for Linux and macOS.
The Linux backend looked like it didn't handle anything non-ASCII at all, but this all needs to be tested.
Windows will be a bit more work because it requires using the Unicode API for creating the main window.
2019-05-14 13:30:52 +02:00
drfrag
b041e629ac - fixed lowercase handling of non-basic-latin characters.
The added table may be overkill but this way the font engine is prepared for things to come.
Currently the text placement in the menu seems a bit broken, that's a task for later.
(patch by Graf)

# Conflicts:
#	src/v_font.cpp
2019-05-14 13:11:10 +02:00
drfrag
eb0b3f3d53 - Changed ToLong and ToULong prototypes. 2019-05-14 13:02:04 +02:00
alexey.lysiuk
1db88bba94 - updated Travis CI configuration to use Xcode 10.2 2019-05-13 19:07:53 +02:00
alexey.lysiuk
5e2a4345ba - removed useless assertions
https://forum.zdoom.org/viewtopic.php?t=64616#p1103673

# Conflicts:
#	src/p_sight.cpp
2019-05-13 14:34:35 +02:00
XxMiltenXx
c8398d5cf3 Fixes for Door_AnimatedClose (#838)
* Fixes for Door_AnimatedClose

- Fixing that Door_AnimatedClose would be activated on an already closed door (playing the sound and the 1st frame of the animation)
- There was no check if the Door is already Animated when a tag was used with Door_AnimatedClose

* Removed doubled "door->StartClosing();".
2019-05-12 20:23:06 +02:00
alexey.lysiuk
7ab5131361 - made DUMB library always static
DUMB uses dumb_decode_vorbis() function from the main executable, so it failed to link as a dynamic library
2019-05-12 20:23:04 +02:00
drfrag
41023881cd - Do not use the internal graphic for the new Doom skill level even when the generated title looks worse, this way it can use custom fonts. 2019-05-10 23:43:41 +02:00
alexey.lysiuk
2fb48f30ff - made setting actor TID more explicit
Now it's no longer possible to manipulate TID hash from arbitrary location
For example, this prevents linking of destroyed object into the hash
TID member is still public but writing to it is limited to a few very specific cases like serialization and player traveling between levels

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

# Conflicts:
#	src/actor.h
#	src/maploader/maploader.cpp
2019-05-10 12:41:29 +02:00
drfrag
ab24128049 - Missed some things regarding software threads.
(with help from dpJudas)
2019-05-10 11:27:12 +02:00
alexey.lysiuk
8c81888471 - removed obsolete snd_flipstereo CVAR
https://forum.zdoom.org/viewtopic.php?t=64630
2019-05-09 16:27:40 +02:00
alexey.lysiuk
93b7f16e8d - added missing compat flag CVAR for Strife railing
https://forum.zdoom.org/viewtopic.php?t=64627
2019-05-09 16:27:37 +02:00
drfrag
88e8034db1 - Fall back to two threads for software and add a warning if the number of cores cannot be determined. 2019-05-09 15:06:22 +02:00
alexey.lysiuk
6efd03bbcd - fixed compilation of Cocoa backend
src/posix/cocoa/i_input.mm:487:30: error: no member named 'GetTrueHeight' in 'DFrameBuffer'
2019-05-09 11:01:51 +03:00
drfrag
1ab2af0ad7 - Updated README.md. 2019-05-08 21:40:40 +02:00
drfrag
7763698166 Revert "- Add stack protection for MinGW."
This reverts commit 9d3326d847.

Forgot to revert this, made it crash on 64 bit windows.
2019-05-06 14:25:10 +02:00
player701
cb57c712cb - Fixed random generation of friendly obituaries 2019-05-05 23:44:01 +02:00
alexey.lysiuk
60748c16e4 - improved handling of HUDMSG_TYPEON
This includes the following changes
* Validation of serialized values
* Proper fix for message cut off after an empty line, part of https://forum.zdoom.org/viewtopic.php?t=63935, which appeared to be broken again with dbf06fc
* No crash with an empty HUD message, https://forum.zdoom.org/viewtopic.php?t=63761 and https://forum.zdoom.org/viewtopic.php?t=64569

# Conflicts:
#	src/g_shared/hudmessages.cpp
2019-05-05 23:42:51 +02:00
drfrag
819b9f972d - Added "-zsvoverride" command line switch to override mod ZScript version requirement. 2019-05-03 19:09:17 +02:00
drfrag
f7268fadd8 - This didn't work with only one light. 2019-05-03 15:26:08 +02:00
alexey.lysiuk
2e0185373f - fixed missing null checks in JIT generated code
https://forum.zdoom.org/viewtopic.php?t=64307
2019-05-02 19:59:13 +02:00
alexey.lysiuk
2b65cbf687 - fixed crash on JIT allocations over 1 MB
https://forum.zdoom.org/viewtopic.php?t=64383
2019-05-02 19:59:10 +02:00
Christoph Oelckers
aafb781d76 - removed the leftovers of the removed savedamount variable. 2019-05-02 19:56:24 +02:00
Christoph Oelckers
d599e2738d - removed the MaxAmount fudging from MaxHealth. 2019-05-02 19:55:35 +02:00
Christoph Oelckers
c258e60340 - use Obituary for both Demon and Spectre. 2019-05-02 19:54:19 +02:00
Alexander
c147990452 added MakeScreenShot and MakeAutoSave functions to FLevelLocals
# Conflicts:
#	src/g_game.h
#	wadsrc/static/zscript/base.zs
2019-05-02 19:53:42 +02:00
Christoph Oelckers
9ef338282d - fixed allocation mismatch in WildMidi. 2019-05-02 19:52:06 +02:00
Christoph Oelckers
8bb4457a62 - re-added the menu option for wipetype which got lost in a recent menu reorganization. 2019-05-02 19:51:16 +02:00
Christoph Oelckers
a36aa185db - reinstated the old clean scaling factor calculation just for the status bar.
Some mods took the lack of validation in this code for granted.
2019-05-02 19:29:38 +02:00
drfrag
d697d4dc2a - Bumped ZScript version. 2019-05-02 19:27:12 +02:00
drfrag
47c9fce26a - More castings. 2019-05-02 19:26:47 +02:00
Christoph Oelckers
18bf8d65ba - fixed radius use in dynamic light traversal for models.
# Conflicts:
#	src/hwrenderer/scene/hw_spritelight.cpp

# Conflicts:
#	src/gl/scene/gl_spritelight.cpp
2019-05-02 18:00:43 +02:00
drfrag
411169bc46 - fixed: GetDisplayDeviceName must always pick a valid monitor.
There is no default here, so if vid_adapter is invalid for whatever reason the engine would crash without a defined setting.
(patch by Graf)
2019-05-02 17:28:25 +02:00
Magnus Norddahl
5d469a532b - add r_ticstability for a smoother experience playing mods with high think times 2019-05-02 17:27:53 +02:00