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.
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.
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.
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.)
• Ä: 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!
* 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.
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.
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.
* 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.
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.
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.