mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- Added BOOM/MBF BEX-style narrative background text substitution. There are two changes because
of this: * A cluster's flat definition can now be preceded by a $ to do a string table lookup. * Since the standard flat names are now in the LANGUAGE lump, the normal Dehacked substitution for these is no longer handled specially and so will not be automatically disabled merely by providing your own MAPINFO. SVN r2195 (trunk)
This commit is contained in:
parent
38c9bb1900
commit
d19878efcb
8 changed files with 43 additions and 32 deletions
|
@ -2138,20 +2138,7 @@ static int PatchText (int oldSize)
|
|||
|
||||
if (!good)
|
||||
{
|
||||
// search cluster text background flats (only if no user-defined MAPINFO is used!)
|
||||
if (strlen(newStr) <= 8 && Wads.CheckNumForName("MAPINFO") >= 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < wadclusterinfos.Size(); i++)
|
||||
{
|
||||
if (!strcmp(wadclusterinfos[i].finaleflat, oldStr))
|
||||
{
|
||||
strcpy(wadclusterinfos[i].finaleflat, newStr);
|
||||
good = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!good) DPrintf (" (Unmatched)\n");
|
||||
DPrintf (" (Unmatched)\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,6 +117,10 @@ void F_StartFinale (const char *music, int musicorder, int cdtrack, unsigned int
|
|||
}
|
||||
|
||||
FinaleFlat = (flat != NULL && *flat != 0) ? flat : gameinfo.finaleFlat;
|
||||
if (FinaleFlat != NULL && FinaleFlat[0] == '$')
|
||||
{
|
||||
FinaleFlat = GStrings(FinaleFlat + 1);
|
||||
}
|
||||
|
||||
if (textInLump)
|
||||
{
|
||||
|
@ -758,7 +762,7 @@ void F_CastDrawer (void)
|
|||
FTexture* pic;
|
||||
|
||||
// erase the entire screen to a background
|
||||
screen->DrawTexture (TexMan["BOSSBACK"], 0, 0,
|
||||
screen->DrawTexture (TexMan[GStrings("BOSSBACK")], 0, 0,
|
||||
DTA_DestWidth, screen->GetWidth(),
|
||||
DTA_DestHeight, screen->GetHeight(),
|
||||
TAG_DONE);
|
||||
|
|
|
@ -1039,7 +1039,7 @@ void G_WorldDone (void)
|
|||
{
|
||||
F_StartFinale (thiscluster->MessageMusic, thiscluster->musicorder,
|
||||
thiscluster->cdtrack, thiscluster->cdid,
|
||||
thiscluster->finaleflat, thiscluster->ExitText,
|
||||
thiscluster->FinaleFlat, thiscluster->ExitText,
|
||||
thiscluster->flags & CLUSTER_EXITTEXTINLUMP,
|
||||
thiscluster->flags & CLUSTER_FINALEPIC,
|
||||
thiscluster->flags & CLUSTER_LOOKUPEXITTEXT,
|
||||
|
@ -1057,7 +1057,7 @@ void G_WorldDone (void)
|
|||
{
|
||||
F_StartFinale (nextcluster->MessageMusic, nextcluster->musicorder,
|
||||
nextcluster->cdtrack, nextcluster->cdid,
|
||||
nextcluster->finaleflat, nextcluster->EnterText,
|
||||
nextcluster->FinaleFlat, nextcluster->EnterText,
|
||||
nextcluster->flags & CLUSTER_ENTERTEXTINLUMP,
|
||||
nextcluster->flags & CLUSTER_FINALEPIC,
|
||||
nextcluster->flags & CLUSTER_LOOKUPENTERTEXT,
|
||||
|
@ -1067,7 +1067,7 @@ void G_WorldDone (void)
|
|||
{
|
||||
F_StartFinale (thiscluster->MessageMusic, thiscluster->musicorder,
|
||||
thiscluster->cdtrack, nextcluster->cdid,
|
||||
thiscluster->finaleflat, thiscluster->ExitText,
|
||||
thiscluster->FinaleFlat, thiscluster->ExitText,
|
||||
thiscluster->flags & CLUSTER_EXITTEXTINLUMP,
|
||||
thiscluster->flags & CLUSTER_FINALEPIC,
|
||||
thiscluster->flags & CLUSTER_LOOKUPEXITTEXT,
|
||||
|
|
|
@ -77,6 +77,7 @@ struct FMapInfoParser
|
|||
bool ParseLookupName(FString &dest);
|
||||
void ParseMusic(FString &name, int &order);
|
||||
void ParseLumpOrTextureName(char *name);
|
||||
void ParseLumpOrTextureName(FString &name);
|
||||
|
||||
void ParseCluster();
|
||||
void ParseNextMap(char *mapname);
|
||||
|
@ -439,7 +440,7 @@ extern TArray<EndSequence> EndSequences;
|
|||
struct cluster_info_t
|
||||
{
|
||||
int cluster;
|
||||
char finaleflat[9];
|
||||
FString FinaleFlat;
|
||||
FString ExitText;
|
||||
FString EnterText;
|
||||
FString MessageMusic;
|
||||
|
|
|
@ -389,7 +389,7 @@ bool level_info_t::isValid()
|
|||
void cluster_info_t::Reset()
|
||||
{
|
||||
cluster = 0;
|
||||
finaleflat[0] = 0;
|
||||
FinaleFlat = "";
|
||||
ExitText = "";
|
||||
EnterText = "";
|
||||
MessageMusic = "";
|
||||
|
@ -615,6 +615,12 @@ void FMapInfoParser::ParseLumpOrTextureName(char *name)
|
|||
name[8]=0;
|
||||
}
|
||||
|
||||
void FMapInfoParser::ParseLumpOrTextureName(FString &name)
|
||||
{
|
||||
sc.MustGetString();
|
||||
name = sc.String;
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -691,12 +697,12 @@ void FMapInfoParser::ParseCluster()
|
|||
else if (sc.Compare("flat"))
|
||||
{
|
||||
ParseAssign();
|
||||
ParseLumpOrTextureName(clusterinfo->finaleflat);
|
||||
ParseLumpOrTextureName(clusterinfo->FinaleFlat);
|
||||
}
|
||||
else if (sc.Compare("pic"))
|
||||
{
|
||||
ParseAssign();
|
||||
ParseLumpOrTextureName(clusterinfo->finaleflat);
|
||||
ParseLumpOrTextureName(clusterinfo->FinaleFlat);
|
||||
clusterinfo->flags |= CLUSTER_FINALEPIC;
|
||||
}
|
||||
else if (sc.Compare("hub"))
|
||||
|
|
|
@ -570,6 +570,19 @@ PD_ALL6 = "You need all six keys to open this door";
|
|||
PD_ALL6O = "You need all six keys to activate this object";
|
||||
PD_ALLKEYS = "You need all the keys";
|
||||
|
||||
// MBF (BOOM?) narration backgrounds
|
||||
bgflatE1 = "FLOOR4_8";
|
||||
bgflatE2 = "SFLR6_1";
|
||||
bgflatE3 = "MFLR8_4";
|
||||
bgflatE4 = "MFLR8_3";
|
||||
bgflat06 = "SLIME16";
|
||||
bgflat11 = "RROCK14";
|
||||
bgflat20 = "RROCK07";
|
||||
bgflat30 = "RROCK17";
|
||||
bgflat15 = "RROCK13";
|
||||
bgflat31 = "RROCK19";
|
||||
bgcastcall = "BOSSBACK";
|
||||
|
||||
// Gameflow messages
|
||||
TXT_FRAGLIMIT = "Fraglimit hit.";
|
||||
TXT_TIMELIMIT = "Timelimit hit.";
|
||||
|
|
|
@ -501,28 +501,28 @@ map E4M9 lookup "HUSTR_E4M9"
|
|||
|
||||
cluster 1
|
||||
{
|
||||
flat = "FLOOR4_8"
|
||||
flat = "$bgflatE1"
|
||||
music = "$MUSIC_VICTOR"
|
||||
exittext = lookup, "E1TEXT"
|
||||
}
|
||||
|
||||
cluster 2
|
||||
{
|
||||
flat = "SFLR6_1"
|
||||
flat = "$bgflatE2"
|
||||
music = "$MUSIC_VICTOR"
|
||||
exittext = lookup, "E2TEXT"
|
||||
}
|
||||
|
||||
cluster 3
|
||||
{
|
||||
flat = "MFLR8_4"
|
||||
flat = "$bgflatE3"
|
||||
music = "$MUSIC_VICTOR"
|
||||
exittext = lookup, "E3TEXT"
|
||||
}
|
||||
|
||||
cluster 4
|
||||
{
|
||||
flat = "MFLR8_3"
|
||||
flat = "$bgflatE4"
|
||||
music = "$MUSIC_VICTOR"
|
||||
exittext = lookup, "E4TEXT"
|
||||
}
|
||||
|
|
|
@ -372,7 +372,7 @@ map MAP32 lookup "HUSTR_32"
|
|||
|
||||
cluster 5
|
||||
{
|
||||
flat = "SLIME16"
|
||||
flat = "$BGFLAT06"
|
||||
music = "$MUSIC_READ_M"
|
||||
exittext = lookup, "C1TEXT"
|
||||
|
||||
|
@ -382,7 +382,7 @@ cluster 5
|
|||
|
||||
cluster 6
|
||||
{
|
||||
flat = "RROCK14"
|
||||
flat = "$BGFLAT11"
|
||||
music = "$MUSIC_READ_M"
|
||||
exittext = lookup, "C2TEXT"
|
||||
|
||||
|
@ -392,7 +392,7 @@ cluster 6
|
|||
|
||||
cluster 7
|
||||
{
|
||||
flat = "RROCK07"
|
||||
flat = "$BGFLAT20"
|
||||
music = "$MUSIC_READ_M"
|
||||
exittext = lookup, "C3TEXT"
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ cluster 7
|
|||
|
||||
cluster 8
|
||||
{
|
||||
flat = "RROCK17"
|
||||
flat = "$BGFLAT30"
|
||||
music = "$MUSIC_READ_M"
|
||||
exittext = lookup, "C4TEXT"
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ cluster 8
|
|||
|
||||
cluster 9
|
||||
{
|
||||
flat = "RROCK13"
|
||||
flat = "$BGFLAT15"
|
||||
music = "$MUSIC_READ_M"
|
||||
entertext = lookup, "C5TEXT"
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ cluster 9
|
|||
|
||||
cluster 10
|
||||
{
|
||||
flat = "RROCK19"
|
||||
flat = "$BGFLAT31"
|
||||
music = "$MUSIC_READ_M"
|
||||
entertext = lookup, "C6TEXT"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue