diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index c90eabe90..62c5090e2 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -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"); } } diff --git a/src/f_finale.cpp b/src/f_finale.cpp index e08f249eb..2b220fddb 100644 --- a/src/f_finale.cpp +++ b/src/f_finale.cpp @@ -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); diff --git a/src/g_level.cpp b/src/g_level.cpp index 1b0bd1130..cc3042941 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -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, diff --git a/src/g_level.h b/src/g_level.h index 3b0851636..7ea2e3147 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -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 EndSequences; struct cluster_info_t { int cluster; - char finaleflat[9]; + FString FinaleFlat; FString ExitText; FString EnterText; FString MessageMusic; diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index f85b08960..f9fe5e829 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -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")) diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 4cb444d0f..53d74a483 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -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."; diff --git a/wadsrc/static/mapinfo/doom1.txt b/wadsrc/static/mapinfo/doom1.txt index 5c8fc1dc9..b3e631650 100644 --- a/wadsrc/static/mapinfo/doom1.txt +++ b/wadsrc/static/mapinfo/doom1.txt @@ -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" } diff --git a/wadsrc/static/mapinfo/doom2.txt b/wadsrc/static/mapinfo/doom2.txt index 50bae7d9d..6dc9815b1 100644 --- a/wadsrc/static/mapinfo/doom2.txt +++ b/wadsrc/static/mapinfo/doom2.txt @@ -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" }