Commit graph

3434 commits

Author SHA1 Message Date
Rachael Alexanderson
baf5ebd1ce - fixed: menu language selection would not save on exit (this was due to CVAR protections from the menu)
- moved language entry up a bit in the menu
- converted the language entry into a proper CVAR string list selection, instead of a separate menu with said list.
2019-02-27 14:07:49 -05:00
Rachael Alexanderson
e719b9cf00 - merge the options menu properly - the language entry was separated in its own section 2019-02-26 13:39:42 -05:00
Christoph Oelckers
e8f690116b - removed unused gl_spritebrightfog CVAR. 2019-02-26 00:07:30 +01:00
Christoph Oelckers
b542d1371d - reorganized the ZScript content in gzdoom.pk3 and changed the files' extensions to something unique for easier syntax highlighting. 2019-02-23 12:08:27 +01:00
Christoph Oelckers
2874a36fbe - added the final missing piece of localization support, i.e. forcing text based menus.
Now a localization mod can disable the graphics patches containing text entirely so that it can properly localize the text based menu variant.
If this flag gets set in MAPINFO, it will override all user settings.
2019-02-23 10:40:07 +01:00
Nemrtvi
7060f9cc05 Add language menu to Options
In this menu, all languages supported by GZDoom are selectable with one simple click! Credits to @PROPHESSOR for making it!

(This only edits the English and French languages because they are the only languages currently up to date with GZDoom’s development. A Russian translation will follow suit at a later date.)
2019-02-21 17:54:13 +01:00
Christoph Oelckers
48fcdacf06 - more work on graphics substitutiion
* added a CVAR that sets how localizable graphics need to be dealt with.
* pass the substitution string to OkForLocalization so that proper checks can be performed.
* increased item spacing on Doom's list menus to 18 from 16 pixels, because otherwise the diacritic letters would not fit. 20 would have been more ideal but 18 was the limit without compromising its visual style
* added a second text-only main menu because here the spacing cannot be changed. Doing so would render any single-patch main menu non-functional. So here the rules are that if substitution takes place, it will swap out the entire menu class.
* fixed some issues with the summary screen's "entering" and "finished" graphics.
2019-02-21 00:35:27 +01:00
Christoph Oelckers
a0c10df387 - made some adjustments so that the BigFont works as intended.
The auto-calculated height of 24 is too tall, this requires a manual setting here. Also fix the space calculations for the "finished" graphic.
2019-02-21 01:13:42 +01:00
Christoph Oelckers
22781e3cb9 - BigFont update. 2019-02-21 00:43:58 +01:00
Christoph Oelckers
f580d85da6 - fixed typo in menu texts. 2019-02-21 00:24:09 +01:00
Christoph Oelckers
7ea2f135df - did not save the latest changes. 2019-02-21 00:23:49 +01:00
Christoph Oelckers
8bdbd2e915 - fixed layout of summary screen. 2019-02-21 00:16:48 +01:00
Christoph Oelckers
6a742f8d34 - changed all places which used a localized string as a format template for printf, String.Format et.al.
Passing something non-constant at compile time here is extremely dangerous, especially when users can replace those strings if they like.
It now uses FString::Substitute in all cases where something needs to be inserted into a template string.
2019-02-20 20:20:06 +01:00
Christoph Oelckers
74f5211046 - fixed accidental commit of incomplete test code. 2019-02-20 18:54:29 +01:00
Christoph Oelckers
a6a091c83a - reworked summary screen to use consistent contents, either all patches or all text but not mixed 2019-02-20 00:44:17 +01:00
Christoph Oelckers
9f59a84a37 - allow text substitution for StaticPatch items in ListMenus 2019-02-20 00:43:31 +01:00
Christoph Oelckers
5e288ef2d4 - fixed: Doom used Chex Quest's default settings for menu fonts. 2019-02-20 00:01:20 +01:00
Christoph Oelckers
c13e496107 - a bit of text cleanuo. Removed some unused strings and moved a few not-to-be-translated ones to language.def. 2019-02-19 23:18:46 +01:00
Christoph Oelckers
6b8303ed05 - moved the lump/resource names in the string table to their own file and removed them from other language files.
These are neither supposed to be translated nor overridden by other language tables.
Doing so may break later Dehacked refactorings.
2019-02-19 21:47:54 +01:00
Christoph Oelckers
5e7fb16d05 - preparation work for substituting the menu and intermission screen text graphics for localization 2019-02-19 01:22:12 +01:00
Christoph Oelckers
91206f12be - changed zstrformat to allow %c to emit non-ASCII characters as UTF-8. 2019-02-19 00:27:47 +01:00
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
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
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
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
d15e3391a0 Merge remote-tracking branch 'remotes/origin/master' into localization
# Conflicts:
#	src/v_font.cpp
2019-02-16 17:35:15 +01:00
Rachael Alexanderson
c7103cbe4d - autoload nerve.wad with Doom 2 2019-02-16 17:23:43 +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
Rachael Alexanderson
9f62289507 Merge branch 'master' of https://github.com/coelckers/gzdoom into localization 2019-02-16 10:50:49 -05: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
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
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
e526cebc8e Merge remote-tracking branch 'origin/master' into localization 2019-02-12 00:20:00 +01:00
Christoph Oelckers
0b8fb3ac1a - 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-02-12 00:19:44 +01:00
alexey.lysiuk
eaf0ac1f7b - added compatibility entries for maps affected by buggy CheckSwitchRange behavior 2019-02-11 17:57:03 +01:00
alexey.lysiuk
d4d010ac32 - added compatibility flag for buggy CheckSwitchRange behavior
https://forum.zdoom.org/viewtopic.php?t=63008
https://forum.zdoom.org/viewtopic.php?t=63650
2019-02-11 17:57:03 +01:00
Christoph Oelckers
3a440a5fa7 - moved the displayed text in strfhelp.o to the string table. 2019-02-11 00:43:57 +01:00
Christoph Oelckers
4bacde36c0 - moved Strife's map names to the string table. 2019-02-11 00:27:08 +01:00
Christoph Oelckers
88e227f1f3 Merge branch 'new_level_refactor' into localization 2019-02-09 12:22:15 +01:00
Christoph Oelckers
3c0c076226 - removed extraneous parameter in SpawnPlayerMissile call in A_FireProjectile.
The native variant has a MissileActor out parameter in this place, but in ZScript that's a secondary return value.
2019-02-09 09:25:29 +01:00
Christoph Oelckers
3d3f260137 - exported LevelLocals's compatibility flags to scripting and fixed all places where access to combined compatibility flags is needed. 2019-02-09 09:17:57 +01:00
Major Cooke
acc510dfb3 Added inflictor, source and flag parameters to GetModifiedDamage on actors and ModifyDamage on inventory.
- The flags are used by DamageMobj so modders can determine radius damage, for example, by checking for DMG_EXPLOSION.
2019-02-08 20:07:49 +01:00
Christoph Oelckers
c0bbb4fd0d - fixed lowercase handling of non-basic-latin characters and added Undead's Russian translation.
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.
2019-02-07 13:49:54 +01:00
Christoph Oelckers
5af5717cf1 - added a compatibility fix for KDiZD Z1M3 and fixed some tagging issues in the compatibility handler.
One sector in an underwater area of KDIZD Z1M3 got tagged with an incorrect Transfer_Heights effect which caused render glitches in that area.
There were also a few AddSectorTag calls without first clearing the sector's tags leading to potentially undefined behavior.
2019-02-07 09:42:51 +01:00
Christoph Oelckers
495298079b - rewrote the language table so that it doesn't have to reload everything on a language change.
It now reads everything into a two-dimensional TMap and creates a list of mappings that apply to the current setting.
The constant need for reloading was the main blocker in redesigning how Dehacked strings get inserted. Currently they override everything, but IWAD-based Dehacked text shouldn't block PWAD overrides from PWADs' LANGUAGE lumps and instead be treated as coming from an [en default] block.

This also renames the main block from [enu default] to [en default], because it should be treated as the English default for all English locales and not just make it fall through to the base default as it did before.
2019-02-06 13:59:41 +01:00