- exported all Hexen map names and intermission texts to the language table.

As IWAD content this is in zd_extra.pk3.
This commit is contained in:
Christoph Oelckers 2019-02-11 01:33:09 +01:00
commit e4690b4cd8
4 changed files with 320 additions and 15 deletions

View file

@ -37,6 +37,7 @@
#include "intermission/intermission.h"
#include "g_level.h"
#include "w_wad.h"
#include "gstrings.h"
static void ReplaceIntermission(FName intname,FIntermissionDescriptor *desc)
@ -291,9 +292,23 @@ bool FIntermissionActionTextscreen::ParseKey(FScanner &sc)
sc.MustGetToken('=');
sc.MustGetToken(TK_StringConst);
int lump = Wads.CheckNumForFullName(sc.String, true);
bool done = false;
if (lump > 0)
{
mText = Wads.ReadLump(lump).GetString();
// Check if this comes from either Hexen.wad or Hexdd.wad and if so, map to the string table.
int fileno = Wads.GetLumpFile(lump);
auto fn = Wads.GetWadName(fileno);
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
{
FStringf key("TXT_%.5s_%s", fn, sc.String);
if (GStrings.exists(key))
{
mText = "$" + key;
done = true;
}
}
if (!done)
mText = Wads.ReadLump(lump).GetString();
}
else
{