Commit graph

16584 commits

Author SHA1 Message Date
Christoph Oelckers
b29975503d - 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.
2019-02-19 00:08:23 +01:00
Christoph Oelckers
c5a6c72719 - fixed uninitialized variable and a few warnings. 2019-02-18 23:36:56 +01:00
Christoph Oelckers
b98c3b766c - added a function that creates a texture for a text in a given font.
Not tested yet, this is for synthesizing localized variant of Doom's textures with text content.
2019-02-18 20:53:56 +01:00
Christoph Oelckers
5970040672 - fixed: The wbstartstruct that gets passed to the level summary screen needs to be static
This variable is needed long after the function which sets it up will be exited. So this either needs to be dynamically allocated or static, and in this case using a static variable is simpler.  However, unlike before, it is only being accessed in the one function that needs to initialize it and pass to the summary screen and nowhere else.
2019-02-18 00:43:40 +01:00
Christoph Oelckers
aa550310f6 - allow the language table to supersede the title patches, if appropriate
For the Doom IWADs the provided font looks almost identical to the characters used on the title patches. So, for any level name that got replaced in some language, it will now check if the retrieved name comes from the default table, and if not, ignore the title patch and print the name with the specified font.

This also required removing the 'en' label from the default table,  because with this present, the text would always be picked from 'en' instead of 'default'. Since 'en' and 'default' had the same contents, in any English locale the 'default' table was never hit, so this won't make any difference for the texts being chosen.

Last but not least, wminfo has been made a local variable in G_DoCompleted. There were two places where this was accessed from outside the summary screen or its setup code, and both were incorrect.
2019-02-15 00:29:24 +01:00
Christoph Oelckers
44c8c2a79c - added German Umlauts for the BigFont and fixed the character substitution logic.
For pure uppercase fonts it makes no sense to try a lowercase substitution as a first step.
2019-02-17 23:18:28 +01:00
Christoph Oelckers
3dce45545f - added U-100-U-17f to the console font.
This was mostly just accent edits of existing characters, so this also contains the less important characters.
2019-02-17 21:01:29 +01:00
Christoph Oelckers
45d75745f0 - reworked console font loading to use the glyph sheets directly and allowing to load more than one per font. 2019-02-17 19:15:57 +01:00
Christoph Oelckers
95e62e91bb - split the FFont base class into its own file. 2019-02-17 13:50:57 +01:00
Christoph Oelckers
0963156c0a - 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.
2019-02-17 13:41:04 +01:00
Christoph Oelckers
9102fb86a5 - moved FSpecialFont to its own file. 2019-02-17 12:53:12 +01:00
Christoph Oelckers
1f0c01459a - split FSinglePicFont into its own file. 2019-02-17 12:29:08 +01:00
Christoph Oelckers
7f1f25d998 - split the FSingleLumpFont class into its own file. 2019-02-17 12:00:04 +01:00
Christoph Oelckers
9dfffb6697 - moved font code into a subdirectory. 2019-02-17 11:43:04 +01:00
Christoph Oelckers
d5977e1802 - set a kerning of -1 for both BigFonts. 2019-02-17 10:30:44 +01:00
Christoph Oelckers
78d0fa9269 - 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-02-17 10:10:41 +01:00
Christoph Oelckers
f512f29270 - 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-02-17 08:50:49 +01:00
Christoph Oelckers
d39a624942 - 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-02-16 22:57:02 +01:00
Christoph Oelckers
deb233677e - 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-02-16 21:29:46 +01:00
Christoph Oelckers
54cb16ad8e - 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.
2019-02-16 18:49:38 +01:00
Christoph Oelckers
d15e3391a0 Merge remote-tracking branch 'remotes/origin/master' into localization
# Conflicts:
#	src/v_font.cpp
2019-02-16 17:35:15 +01:00
Major Cooke
32e65ff11d Pass the target as the source for active damage modifiers (i.e. PowerDamage) instead of the actual source.
- Getting the victim would be impossible otherwise, and passing in the original source is redundant when there's already the owner.
2019-02-16 17:26:21 +01:00
alexey.lysiuk
3864ed78e0 - fixed: offsets got lost in font's translated textures
https://forum.zdoom.org/viewtopic.php?t=63667
2019-02-16 17:26:02 +01:00
Rachael Alexanderson
35e2d40641 Squashed commit of the following:
- Implement page string names for dialog lumps
    - Create special new GZDoom name space for ZSDF
    - add usdf_gzdoom spec document
    - fixed: restored original behavior with negative conversation id's for the original strife dialog lumps
    - reposition the binary strife fix in a more appropriate location
    - add compatibility fix for negative numbers in responses in USDF/ZSDF (don't know if it's actually necessary)
2019-02-16 17:25:23 +01:00
Rachael Alexanderson
c7103cbe4d - autoload nerve.wad with Doom 2 2019-02-16 17:23:43 +01:00
Robert Cochran
07e0323771 Add handling of left and right mousewheel events to the SDL2 input path 2019-02-16 17:23:14 +01:00
Alexander
cce270ba72 moved controls to submenus in "Customize Controls" menu
What is done:
D1. Controls are separated by existing sections, each section is now a submenu;
D2. The original sections are preserved;
D3. The original controls order is preserved;
D4. "Controls" section is renamed to "Game", because "Controls" submenu of "Customize Controls" would be too confusing;
D5. Map (automap) controls are added as a section, map controls submenu is unchanged;
D6. Missing controls are added to "Other" section;
D7. Sections are given a title following the scheme "Customize <section> Controls", except N4 (see below).
D8. Inside the sections, spaces are added to group the related controls.

Things that I'm not sure about:
N1. "Game" controls section name is too generic - I'll gladly change it to something more suitable;
N2. "Other" controls section name is too generic - I'll gladly change it to something more suitable;
N3. Map controls submenu could use some spacing, and internal title ("Map Controls") is redundant;
N4. "Strife Popup Screens" section name is too long to fit in scheme described in D7, therefore the title is "Strife Popup Screens Controls";
N5. "Game" section could be divided further, but this will break the original menu structure.
2019-02-16 17:21:55 +01:00
Nemrtvi
f472592ec4 Fix offsets of all small caps characters
These new lumps are shifted downwards by 3 pixels so that they line up with the bottom part of the capital letters.
2019-02-16 17:18:38 +01:00
Rachael Alexanderson
0fc4640cc9 - fix building in 32 bit windows 2019-02-16 11:12:10 -05:00
Rachael Alexanderson
9f62289507 Merge branch 'master' of https://github.com/coelckers/gzdoom into localization 2019-02-16 10:50:49 -05:00
Christoph Oelckers
64685705d0 - 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.
2019-02-16 13:05:19 +01:00
Christoph Oelckers
8018ebfab5 - use the Unicode version of Windows's clipboard functions. 2019-02-16 09:50:00 +01:00
Christoph Oelckers
b4d96aaef9 - made Windows backend parts of the console Unicode capable. 2019-02-15 22:05:26 +01:00
Christoph Oelckers
48f39f2fad - completed the BigUpper font. 2019-02-15 19:16:08 +01:00
Ne Mrtvi
0356c2fc67 New BIGFONT, uppercase and lowercase
Now that GZDoom supports uppercase and lowercase characters in the BIGFONT format, this commit actually adds those characters. It contains full support for both the English and Russian (minus the letter Ё) alphabets for both Doom and Strife. As for the existing punctuation graphic lumps in Strife, all extra space is removed, and the sprite offsets are adjusted instead.

This also adjusts the English language file so that all menu header texts utilize these new characters. As a tiny extra, it also adds the letter Ё to the Strife smallfont.

(Credits to Skulltag for the uppercase B, Amuscaria for the uppercase X and Z, and @jnechaevsky for all Russian characters, taken from Russian Doom!)
2019-02-15 19:00:19 +01:00
Major Cooke
823eb90af8 - Fixed monsters waking up even if all the damage was absorbed without pain causing flags
- Fixed FORCEPAIN not overriding PainThreshold property
2019-02-15 18:57:34 +01:00
alexey.lysiuk
769be00483 - fixed automap marks placement with custom fonts
Automap rotation wasn't taken into account when drawing marks

https://forum.zdoom.org/viewtopic.php?t=63693
2019-02-15 17:21:59 +02:00
Christoph Oelckers
9fba9eee18 Merge branch 'localization' of https://github.com/coelckers/gzdoom into localization 2019-02-15 10:20:14 +01:00
Christoph Oelckers
c49665684b - 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-02-15 08:52:56 +01:00
Christoph Oelckers
340d7bce8d - added some character counting utilities to FString. 2019-02-15 08:51:41 +01:00
Christoph Oelckers
6e9b62a43e Merge branch 'master' into localization 2019-02-14 22:24:12 +01:00
Christoph Oelckers
868ac5adf8 - 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.
2019-02-14 22:23:33 +01:00
Christoph Oelckers
5f574033b5 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-02-14 14:29:49 +01:00
Rachael Alexanderson
0d2a24876b - Remove "gitversion.h" from "version.h" - should result in faster compiles after a commit in Windows
- Fix zdoom.rc to show the actual git commit tag and id for the Product Version
- Made zdoom.rc "codepage 1252" compliant as dictated by the #pragma (if this needs changed the pragma should be updated, this was messing up the version strings in the final compile)
2019-02-13 21:34:44 -05:00
alexey.lysiuk
be6ce43045 - added ability to customize font of automap marks
Set am_markfont CVAR to a desired font name
Use am_markcolor to select a text color, has no effect with the default font, AMMNUMx
2019-02-13 21:47:53 +01:00
Christoph Oelckers
914818cb88 - fixed run health clamping.
This didn't scale the move factors properly.
2019-02-13 20:12:13 +01:00
Christoph Oelckers
6ff6a6af00 - made gameaction read only
The script side cannot do anything useful with this, because most actions require parameters in global variables, so this is a first grade candidate for rogue mods to make the engine misbehave.
2019-02-13 14:59:55 +01:00
Christoph Oelckers
8efc3188b9 - fixed map name setup
This was broken when localization for Hexen was added.
2019-02-13 00:47:03 +01:00
Christoph Oelckers
ef050d700c - 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"
2019-02-13 00:02:39 +01:00
Christoph Oelckers
32f0e650fa - added Doom and Strife BigFont characters.
This isn't tested!
2019-02-12 20:56:08 +01:00