mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-04-22 15:47:19 +00:00
Revert "- allow the language table to supersede the title patches, if appropriate"
This reverts commit2b51e8d5dd
. # Conflicts: # src/g_hub.cpp # src/g_level.cpp # src/p_setup.cpp # src/wi_stuff.cpp # src/wi_stuff.h # wadsrc/static/zscript/ui/statscreen/types.zs Revert "- fixed: The wbstartstruct that gets passed to the level summary screen needs to be static" This reverts commit4a563f449d
. # Conflicts: # src/g_level.cpp Revert "- Fixed compilation." This reverts commit149a294a49
. # Conflicts: # src/g_level.cpp Revert "- Fixed game finales not being shown after the intermission." This reverts commit55af0b11c6
. All this didn't make sense without localization and caused problems with intermissions and endings, it was incompatible with the old code without the level refactor.
This commit is contained in:
parent
d2fe30cd93
commit
0907972c2f
10 changed files with 25 additions and 48 deletions
|
@ -199,7 +199,9 @@ uint8_t* zdembodyend; // end of ZDEM BODY chunk
|
|||
bool singledemo; // quit after playing a demo from cmdline
|
||||
|
||||
bool precache = true; // if true, load all graphics at start
|
||||
|
||||
|
||||
wbstartstruct_t wminfo; // parms for world map / intermission
|
||||
|
||||
short consistancy[MAXPLAYERS][BACKUPTICS];
|
||||
|
||||
|
||||
|
|
|
@ -132,14 +132,13 @@ void G_LeavingHub(int mode, cluster_info_t * cluster, wbstartstruct_t * wbs)
|
|||
{
|
||||
if (cluster->flags & CLUSTER_LOOKUPNAME)
|
||||
{
|
||||
wbs->thisname = GStrings(cluster->ClusterName);
|
||||
level.LevelName = GStrings(cluster->ClusterName);
|
||||
}
|
||||
else
|
||||
{
|
||||
wbs->thisname = cluster->ClusterName;
|
||||
level.LevelName = cluster->ClusterName;
|
||||
wbs->thisauthor = "";
|
||||
}
|
||||
wbs->LName0.SetInvalid(); // The level's own name was just invalidated, and so was its name patch.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
#include "dobjgc.h"
|
||||
#include "i_music.h"
|
||||
#include "a_dynlight.h"
|
||||
#include "stringtable.h"
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
@ -738,7 +737,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, SecretExitLevel, G_SecretExitLevel)
|
|||
//
|
||||
//
|
||||
//==========================================================================
|
||||
static wbstartstruct_t wminfo;
|
||||
|
||||
void G_DoCompleted (void)
|
||||
{
|
||||
|
@ -769,11 +767,8 @@ void G_DoCompleted (void)
|
|||
if (automapactive)
|
||||
AM_Stop ();
|
||||
|
||||
|
||||
uint32_t langtable[2] = {};
|
||||
wminfo.finished_ep = level.cluster - 1;
|
||||
wminfo.LName0 = TexMan.CheckForTexture(level.info->PName, ETextureType::MiscPatch);
|
||||
wminfo.thisname = level.info->LookupLevelName(&langtable[0]); // re-get the name so we have more info about its origin.
|
||||
if (!(level.info->flags3 & LEVEL3_HIDEAUTHORNAME)) wminfo.thisauthor = level.info->AuthorName;
|
||||
wminfo.current = level.MapName;
|
||||
|
||||
|
@ -783,7 +778,6 @@ void G_DoCompleted (void)
|
|||
{
|
||||
wminfo.next = level.MapName;
|
||||
wminfo.LName1 = wminfo.LName0;
|
||||
wminfo.nextname = wminfo.thisname;
|
||||
wminfo.nextauthor = wminfo.thisauthor;
|
||||
}
|
||||
else
|
||||
|
@ -793,40 +787,16 @@ void G_DoCompleted (void)
|
|||
{
|
||||
wminfo.next = nextlevel;
|
||||
wminfo.LName1.SetInvalid();
|
||||
wminfo.nextname = "";
|
||||
wminfo.nextauthor = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
wminfo.next = nextinfo->MapName;
|
||||
wminfo.LName1 = TexMan.CheckForTexture(nextinfo->PName, ETextureType::MiscPatch);
|
||||
wminfo.nextname = nextinfo->LookupLevelName(&langtable[1]);
|
||||
if (!(nextinfo->flags3 & LEVEL3_HIDEAUTHORNAME)) wminfo.nextauthor = nextinfo->AuthorName;
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore the (C)WILVxx lumps from the original Doom IWADs so that the name can be localized properly, if the retrieved text does not come from the default table.
|
||||
// This is only active for those IWADS where the style of these graphics matches the provided BIGFONT for the respective game.
|
||||
if (gameinfo.flags & GI_IGNORETITLEPATCHES)
|
||||
{
|
||||
FTextureID *texids[] = { &wminfo.LName0, &wminfo.LName1 };
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if (texids[i]->isValid() && langtable[i] != FStringTable::default_table)
|
||||
{
|
||||
FTexture *tex = TexMan[*texids[i]];
|
||||
if (tex != nullptr)
|
||||
{
|
||||
int filenum = Wads.GetLumpFile(tex->GetSourceLump());
|
||||
if (filenum >= 0 && filenum <= Wads.GetIwadNum())
|
||||
{
|
||||
texids[i]->SetInvalid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckWarpTransMap (wminfo.next, true);
|
||||
nextlevel = wminfo.next;
|
||||
|
||||
|
@ -1301,7 +1271,7 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, WorldDone)
|
|||
void G_DoWorldDone (void)
|
||||
{
|
||||
gamestate = GS_LEVEL;
|
||||
if (nextlevel.IsEmpty())
|
||||
if (wminfo.next[0] == 0)
|
||||
{
|
||||
// Don't crash if no next map is given. Just repeat the current one.
|
||||
Printf ("No next map specified.\n");
|
||||
|
|
|
@ -408,7 +408,7 @@ struct level_info_t
|
|||
}
|
||||
void Reset();
|
||||
bool isValid();
|
||||
FString LookupLevelName (uint32_t *langtable = nullptr);
|
||||
FString LookupLevelName ();
|
||||
void ClearDefered()
|
||||
{
|
||||
deferred.Clear();
|
||||
|
|
|
@ -297,14 +297,14 @@ void level_info_t::Reset()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FString level_info_t::LookupLevelName(uint32_t *langtable)
|
||||
FString level_info_t::LookupLevelName()
|
||||
{
|
||||
// All IWAD names that may be substituted by a graphics patch are declared as language strings.
|
||||
if (langtable) *langtable = 0;
|
||||
if (flags & LEVEL_LOOKUPLEVELNAME)
|
||||
{
|
||||
const char *thename;
|
||||
const char *lookedup = GStrings.GetString(LevelName, langtable);
|
||||
const char *lookedup;
|
||||
|
||||
lookedup = GStrings[LevelName];
|
||||
if (lookedup == NULL)
|
||||
{
|
||||
thename = LevelName;
|
||||
|
|
|
@ -3145,7 +3145,8 @@ void P_FreeLevelData ()
|
|||
P_ClearPortals();
|
||||
tagManager.Clear();
|
||||
level.total_monsters = level.total_items = level.total_secrets =
|
||||
level.killed_monsters = level.found_items = level.found_secrets = 0;
|
||||
level.killed_monsters = level.found_items = level.found_secrets =
|
||||
wminfo.maxfrags = 0;
|
||||
|
||||
level.max_velocity = level.avg_velocity = 0;
|
||||
|
||||
|
@ -3237,6 +3238,7 @@ void P_SetupLevel(const char *lumpname, int position, bool newGame)
|
|||
}
|
||||
|
||||
level.maptype = MAPTYPE_UNKNOWN;
|
||||
wminfo.partime = 180;
|
||||
|
||||
if (!savegamerestore)
|
||||
{
|
||||
|
|
|
@ -766,7 +766,13 @@ void WI_Start(wbstartstruct_t *wbstartstruct)
|
|||
I_FatalError("Cannot create status screen");
|
||||
}
|
||||
}
|
||||
|
||||
// Set up some global stuff that is always needed.
|
||||
auto info = FindLevelInfo(wbstartstruct->next, false);
|
||||
if (info == nullptr)
|
||||
{
|
||||
wbstartstruct->next = "";
|
||||
}
|
||||
else wbstartstruct->nextname = info->LookupLevelName();
|
||||
V_SetBlend(0, 0, 0, 0);
|
||||
S_StopAllChannels();
|
||||
SN_StopAllSequences();
|
||||
|
@ -860,7 +866,6 @@ DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, next_ep);
|
|||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, current);
|
||||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, next);
|
||||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, nextname);
|
||||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, thisname);
|
||||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, nextauthor);
|
||||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, thisauthor);
|
||||
DEFINE_FIELD_X(WBStartStruct, wbstartstruct_t, LName0);
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "doomdef.h"
|
||||
|
||||
class FTexture;
|
||||
struct FLevelLocals;
|
||||
|
||||
//
|
||||
// INTERMISSION
|
||||
|
@ -55,7 +54,6 @@ struct wbstartstruct_t
|
|||
FString current; // [RH] Name of map just finished
|
||||
FString next; // next level, [RH] actual map name
|
||||
FString nextname; // printable name for next level.
|
||||
FString thisname; // printable name for next level.
|
||||
FString nextauthor; // printable name for next level.
|
||||
FString thisauthor; // printable name for next level.
|
||||
|
||||
|
@ -78,11 +76,12 @@ struct wbstartstruct_t
|
|||
int pnum;
|
||||
|
||||
wbplayerstruct_t plyr[MAXPLAYERS];
|
||||
|
||||
};
|
||||
|
||||
// Intermission stats.
|
||||
// Parameters for world map / intermission.
|
||||
extern wbstartstruct_t wminfo;
|
||||
|
||||
|
||||
// Called by main loop, animate the intermission.
|
||||
void WI_Ticker ();
|
||||
|
|
|
@ -777,7 +777,8 @@ class StatusScreen abstract play version("2.5")
|
|||
Sucks = TexMan.CheckForTexture("WISUCKS", TexMan.Type_MiscPatch); // "sucks"
|
||||
Par = TexMan.CheckForTexture("WIPAR", TexMan.Type_MiscPatch); // "par"
|
||||
|
||||
lnametexts[0] = wbstartstruct.thisname;
|
||||
// Use the local level structure which can be overridden by hubs
|
||||
lnametexts[0] = level.LevelName;
|
||||
lnametexts[1] = wbstartstruct.nextname;
|
||||
authortexts[0] = wbstartstruct.thisauthor;
|
||||
authortexts[1] = wbstartstruct.nextauthor;
|
||||
|
|
|
@ -23,7 +23,6 @@ struct WBStartStruct native version("2.4")
|
|||
native String current; // [RH] Name of map just finished
|
||||
native String next; // next level, [RH] actual map name
|
||||
native String nextname; // next level, printable name
|
||||
native String thisname; // this level, printable name
|
||||
native String nextauthor; // next level, printable name
|
||||
native String thisauthor; // this level, printable name
|
||||
|
||||
|
|
Loading…
Reference in a new issue