This reverts commit 2b51e8d5dd.
# Conflicts:
# src/g_hub.cpp
# src/g_level.cpp
# src/p_setup.cpp
# src/wi_stuff.cpp
# src/wi_stuff.h
# wadsrc/static/zscript/ui/statscreen/types.zs
Revert "- fixed: The wbstartstruct that gets passed to the level summary screen needs to be static"
This reverts commit 4a563f449d.
# Conflicts:
# src/g_level.cpp
Revert "- Fixed compilation."
This reverts commit 149a294a49.
# Conflicts:
# src/g_level.cpp
Revert "- Fixed game finales not being shown after the intermission."
This reverts commit 55af0b11c6.
All this didn't make sense without localization and caused problems with intermissions and endings, it was incompatible with the old code without the level refactor.
For now only with font-printed map names. Allowing this with titlepatches will require more work and an option to disable.
# Conflicts:
# src/g_level.cpp
# src/gamedata/g_mapinfo.h
# src/gi.cpp
# wadsrc/static/zscript/ui/statscreen/statscreen.zs
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.
# Conflicts:
# src/g_hub.cpp
# src/g_level.cpp
# src/gamedata/g_mapinfo.h
# src/gi.h
# src/p_setup.cpp
# src/stringtable.cpp
# src/stringtable.h
# wadsrc/static/zscript/ui/statscreen/statscreen.zs
# wadsrc_extra/static/iwadinfo.txt
# Conflicts:
# src/gi.h
# wadsrc_extra/static/iwadinfo.txt
This deprecated CharAt and CharCodeAt for being unsuitable for text processing and in the case of CharCodeAt also for being buggy.
A new replacement, ByteAt has been added that reads a string byte by byte, as well as CodePointCount, which counts the amount of Unicode code points in a string and GetNextCodePoint which reads the string code point by code point.
Note that while this woll work as intended with the currently supported languages as a means to read single characters, there is no guarantee that this will remain so if Unicode support gets extended to things which break the "one code point == one character" assumption.