mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- fixed reading of exit text replacements and display of intermission text screens for Unicode.
This commit is contained in:
parent
74f5211046
commit
d2ac77e721
3 changed files with 7 additions and 6 deletions
|
@ -830,7 +830,7 @@ void FMapInfoParser::ParseCluster()
|
|||
// Remap Hexen's CLUS?MSG lumps to the string table, if applicable. The code here only checks what can actually be in an IWAD.
|
||||
if (clusterinfo->flags & CLUSTER_EXITTEXTINLUMP)
|
||||
{
|
||||
int lump = Wads.CheckNumForFullName(clusterinfo->ExitText, false);
|
||||
int lump = Wads.CheckNumForFullName(clusterinfo->ExitText, true);
|
||||
if (lump > 0)
|
||||
{
|
||||
// Check if this comes from either Hexen.wad or Hexdd.wad and if so, map to the string table.
|
||||
|
@ -838,7 +838,7 @@ void FMapInfoParser::ParseCluster()
|
|||
auto fn = Wads.GetWadName(fileno);
|
||||
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
|
||||
{
|
||||
FStringf key("TXT_%.5s_%s", fn, sc.String);
|
||||
FStringf key("TXT_%.5s_%s", fn, clusterinfo->ExitText);
|
||||
if (GStrings.exists(key))
|
||||
{
|
||||
clusterinfo->ExitText = key;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "menu/menu.h"
|
||||
#include "d_net.h"
|
||||
#include "g_levellocals.h"
|
||||
#include "utf8.h"
|
||||
|
||||
FIntermissionDescriptorList IntermissionDescriptors;
|
||||
|
||||
|
@ -255,7 +256,7 @@ void DIntermissionScreenText::Init(FIntermissionAction *desc, bool first)
|
|||
if (mTextX < 0) mTextX =gameinfo.TextScreenX;
|
||||
mTextY = static_cast<FIntermissionActionTextscreen*>(desc)->mTextY;
|
||||
if (mTextY < 0) mTextY =gameinfo.TextScreenY;
|
||||
mTextLen = (int)strlen(mText);
|
||||
mTextLen = mText.CharacterCount();
|
||||
mTextDelay = static_cast<FIntermissionActionTextscreen*>(desc)->mTextDelay;
|
||||
mTextColor = static_cast<FIntermissionActionTextscreen*>(desc)->mTextColor;
|
||||
// For text screens, the duration only counts when the text is complete.
|
||||
|
@ -285,7 +286,7 @@ void DIntermissionScreenText::Drawer ()
|
|||
size_t count;
|
||||
int c;
|
||||
const FRemapTable *range;
|
||||
const char *ch = mText;
|
||||
const uint8_t *ch = (const uint8_t*)mText.GetChars();
|
||||
const int kerning = SmallFont->GetDefaultKerning();
|
||||
|
||||
// Count number of rows in this text. Since it does not word-wrap, we just count
|
||||
|
@ -327,7 +328,7 @@ void DIntermissionScreenText::Drawer ()
|
|||
|
||||
for ( ; count > 0 ; count-- )
|
||||
{
|
||||
c = *ch++;
|
||||
c = GetCharFromString(ch);
|
||||
if (!c)
|
||||
break;
|
||||
if (c == '\n')
|
||||
|
|
|
@ -207,7 +207,7 @@ class DIntermissionScreenText : public DIntermissionScreen
|
|||
{
|
||||
DECLARE_CLASS (DIntermissionScreenText, DIntermissionScreen)
|
||||
|
||||
const char *mText;
|
||||
FString mText;
|
||||
int mTextSpeed;
|
||||
int mTextX, mTextY;
|
||||
int mTextCounter;
|
||||
|
|
Loading…
Reference in a new issue