Commit graph

16629 commits

Author SHA1 Message Date
Rachael Alexanderson
7098748e9e - fix building on case sensitive systems 2019-02-23 13:51:24 -05:00
Christoph Oelckers
bae0094039 - fixed the status bar string drawers which weren't UTF-8 capable yet. 2019-02-23 19:44:00 +01:00
Christoph Oelckers
c5156d4598 - moved around a few more files. 2019-02-23 18:57:49 +01:00
Christoph Oelckers
c3890342e6 - moved the 2D drawing code to its own directory under 'rendering'. 2019-02-23 18:08:57 +01:00
Christoph Oelckers
ef3e5ef01e - moved a few parts from g_level.cpp to better fitting places. 2019-02-23 15:21:54 +01:00
Christoph Oelckers
6be073f528 - removed the XP warning from the CMake project.
This now got even triggered in 64 bit and overall is mostly pointless, considering the extremely low user share of XP.
2019-02-23 13:07:43 +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
Christoph Oelckers
add10029b9 - fixed chat input. 2019-02-23 09:54:18 +01:00
Christoph Oelckers
a50a0c5b0d - fixed: empty strings cannot be substituted. 2019-02-23 09:20:30 +01:00
Christoph Oelckers
e091369a38 - removed FCriticalSection and replaced all of its uses with std::mutex.
There's really no need for a non-standard solution here anymore with C++11.
This also fixes an unreleased lock in the WildMidi code.
2019-02-22 20:24:24 +01:00
Christoph Oelckers
3d9dce0156 - fixed DHUDMessageTypeOnFadeOut with empty messages. 2019-02-22 19:58:52 +01:00
Christoph Oelckers
f907bb0484 - moved a few more things and deleted the unused v_pfx implementation.
These were pixel format conversion routines used in the D3D backend. Nothing in here is needed anymore - the FBitmap class offers much of the functionality covered here in a far more concise and approachable manner.
2019-02-22 19:48:18 +01:00
Christoph Oelckers
b386603044 - deleted the unused lumpconfigfile.
The chance that this will ever see some use is precisely zero so there's no need keeping this code around.
2019-02-22 19:13:40 +01:00
Christoph Oelckers
8c06a00ee6 - moved all dialogue loading code into the map loader. 2019-02-22 19:07:58 +01:00
Christoph Oelckers
e06aa28620 - fixed the usedcolor array's base type.
The usedcolors array which counts the number of pixels in a given color in a font used bytes as storage, so any color that just happened to have a count that is a multiple of 256 the color was considered not present.
2019-02-22 18:19:26 +01:00
Christoph Oelckers
3d4b5ae8a3 - small font update. 2019-02-21 18:59:32 +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
Nemrtvi
e49a5fdb61 Improved BIGFONT
• Ä: fix shading at the top
• Å: reduce height
• Æ: improve blending between the two glyphs
• Ç: shorten cedilla
• Ê: fix outline color
• Ð: thicken lines and conjoin them with the letter
• Ø: recolor the center of the slash in the lowercase glyph
• Þ: improve shading, condense lowercase glyph
• Ђ: round edges slightly
• Љ: improve blending between the two glyphs
• Њ: improve blending between the two glyphs
• Ћ: improve shading
• Ќ: heighten accent position
• Џ: widen tail

Also overhauls the punctuation, which now completely fits both the Bigfont and the BigUpper font! Big thanks to Jimmy for a huge amount of support!
2019-02-21 17:53:30 +01:00
Christoph Oelckers
2eb312e041 - added a kerning option to FONTDEFS 2019-02-21 01:02:42 +01:00
Christoph Oelckers
2907ba69a0 - implemented OkForLocalization 2019-02-21 00:56:03 +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
15eb57e00d - finalized graphics substitution feature. 2019-02-20 19:40:17 +01:00
Christoph Oelckers
ecb1c2ee4a - initialize the language right after reading the strings. 2019-02-20 19:30:39 +01:00
Christoph Oelckers
0e449405a4 - fixed string checks in dialogue loader. 2019-02-20 19:12:32 +01:00
Christoph Oelckers
d2ac77e721 - fixed reading of exit text replacements and display of intermission text screens for Unicode. 2019-02-20 19:04:34 +01:00
Christoph Oelckers
74f5211046 - fixed accidental commit of incomplete test code. 2019-02-20 18:54:29 +01:00
Christoph Oelckers
64dc582fbe - reworked texture lookup for localized textures 2019-02-20 00:52:31 +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
8587f253a8 - fixed a typo 2019-02-20 00:43:06 +01:00
Christoph Oelckers
4eb8b53d95 - enforce that localized graphics need to be the same size as the one they replace.
This is one of those things where the work needed to make it robust stands in no relation to the gain.
This simply isn't worth the hassle of going through the entire code and fixing every single use of the 2D texture drawing functions.

Unfortunately this means that the graphics items for the menu cannot be replaced this way because their size will most likely differ, but considering that the only candidates for this are the contents of Doom's main menu, the episode menu, the skill menu and the single player summary screen, it's simply not worth it.

In all these cases the IWAD contents can just as easily be replaced with text and user mods which want to offer localized menus will have to work within the confines of the system, e.g. making sure that all menu items are designed to have proper size for substitution to work or by requesting text based menus, which will be added as a modding feature later.
2019-02-20 00:42:02 +01:00
Christoph Oelckers
5f25fbb2e3 - added support for localized texture replacements
This reads the textures and builds the data tables, but doesn´t use the textures yet.
A bit more work is needed first.
2019-02-20 00:22:00 +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
10a017e104 - fixed: The language ID was set before reading the config.
This essentially rendered saving the language CVAR useless.
2019-02-19 00:29:22 +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
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