mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- fixed reading of exit text replacements and display of intermission text screens for Unicode.
This commit is contained in:
parent
cf818fbe10
commit
3127a28e35
3 changed files with 7 additions and 6 deletions
|
@ -824,7 +824,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.
|
// 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)
|
if (clusterinfo->flags & CLUSTER_EXITTEXTINLUMP)
|
||||||
{
|
{
|
||||||
int lump = Wads.CheckNumForFullName(clusterinfo->ExitText, false);
|
int lump = Wads.CheckNumForFullName(clusterinfo->ExitText, true);
|
||||||
if (lump > 0)
|
if (lump > 0)
|
||||||
{
|
{
|
||||||
// Check if this comes from either Hexen.wad or Hexdd.wad and if so, map to the string table.
|
// Check if this comes from either Hexen.wad or Hexdd.wad and if so, map to the string table.
|
||||||
|
@ -832,7 +832,7 @@ void FMapInfoParser::ParseCluster()
|
||||||
auto fn = Wads.GetWadName(fileno);
|
auto fn = Wads.GetWadName(fileno);
|
||||||
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
|
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))
|
if (GStrings.exists(key))
|
||||||
{
|
{
|
||||||
clusterinfo->ExitText = key;
|
clusterinfo->ExitText = key;
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
#include "menu/menu.h"
|
#include "menu/menu.h"
|
||||||
#include "d_net.h"
|
#include "d_net.h"
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
|
#include "utf8.h"
|
||||||
|
|
||||||
FIntermissionDescriptorList IntermissionDescriptors;
|
FIntermissionDescriptorList IntermissionDescriptors;
|
||||||
|
|
||||||
|
@ -303,7 +304,7 @@ void DIntermissionScreenText::Init(FIntermissionAction *desc, bool first)
|
||||||
if (mTextX < 0) mTextX =gameinfo.TextScreenX;
|
if (mTextX < 0) mTextX =gameinfo.TextScreenX;
|
||||||
mTextY = static_cast<FIntermissionActionTextscreen*>(desc)->mTextY;
|
mTextY = static_cast<FIntermissionActionTextscreen*>(desc)->mTextY;
|
||||||
if (mTextY < 0) mTextY =gameinfo.TextScreenY;
|
if (mTextY < 0) mTextY =gameinfo.TextScreenY;
|
||||||
mTextLen = (int)strlen(mText);
|
mTextLen = mText.CharacterCount();
|
||||||
mTextDelay = static_cast<FIntermissionActionTextscreen*>(desc)->mTextDelay;
|
mTextDelay = static_cast<FIntermissionActionTextscreen*>(desc)->mTextDelay;
|
||||||
mTextColor = static_cast<FIntermissionActionTextscreen*>(desc)->mTextColor;
|
mTextColor = static_cast<FIntermissionActionTextscreen*>(desc)->mTextColor;
|
||||||
// For text screens, the duration only counts when the text is complete.
|
// For text screens, the duration only counts when the text is complete.
|
||||||
|
@ -333,7 +334,7 @@ void DIntermissionScreenText::Drawer ()
|
||||||
size_t count;
|
size_t count;
|
||||||
int c;
|
int c;
|
||||||
const FRemapTable *range;
|
const FRemapTable *range;
|
||||||
const char *ch = mText;
|
const uint8_t *ch = (const uint8_t*)mText.GetChars();
|
||||||
const int kerning = SmallFont->GetDefaultKerning();
|
const int kerning = SmallFont->GetDefaultKerning();
|
||||||
|
|
||||||
// Count number of rows in this text. Since it does not word-wrap, we just count
|
// Count number of rows in this text. Since it does not word-wrap, we just count
|
||||||
|
@ -375,7 +376,7 @@ void DIntermissionScreenText::Drawer ()
|
||||||
|
|
||||||
for ( ; count > 0 ; count-- )
|
for ( ; count > 0 ; count-- )
|
||||||
{
|
{
|
||||||
c = *ch++;
|
c = GetCharFromString(ch);
|
||||||
if (!c)
|
if (!c)
|
||||||
break;
|
break;
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
|
|
|
@ -208,7 +208,7 @@ class DIntermissionScreenText : public DIntermissionScreen
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DIntermissionScreenText, DIntermissionScreen)
|
DECLARE_CLASS (DIntermissionScreenText, DIntermissionScreen)
|
||||||
|
|
||||||
const char *mText;
|
FString mText;
|
||||||
int mTextSpeed;
|
int mTextSpeed;
|
||||||
int mTextX, mTextY;
|
int mTextX, mTextY;
|
||||||
int mTextCounter;
|
int mTextCounter;
|
||||||
|
|
Loading…
Reference in a new issue