- Got rid of most TexMan.AddPatch calls because they are no longer needed.
- Got rid of R_InitPatches because the new texture init code needs to preload everything to work correctly. - Rewrote texture manager initialization to order textures primarily by WAD rather than by type. This way later textures will always override earlier ones. The only exception is that TEX_MiscPatch are only used as a fallback if nothing else can be found. - Optimized the tryany case of FTextureManager::CheckForTexture. It is not necessary to scan the hash chain twice. The required information can be retrieved during the first pass as easily and even offers a little more control. - Made FFont destructor virtual. - Added 'Ice' translation to DECORATE. (Caution: Not fully tested yet!) SVN r715 (trunk)
This commit is contained in:
parent
58816f5d09
commit
1b28557341
20 changed files with 1430 additions and 1364 deletions
|
|
@ -391,9 +391,7 @@ void WI_LoadBackground(bool isenterpic)
|
|||
// a name with a starting '$' indicates an intermission script
|
||||
if (*lumpname!='$')
|
||||
{
|
||||
// The background picture can also be a flat so just using AddPatch doesn't work
|
||||
texture = TexMan.CheckForTexture(lumpname, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
||||
if (texture == -1) texture = TexMan.AddPatch(lumpname);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -410,19 +408,17 @@ void WI_LoadBackground(bool isenterpic)
|
|||
case 0: // Background
|
||||
sc.MustGetString();
|
||||
texture=TexMan.CheckForTexture(sc.String, FTexture::TEX_MiscPatch,FTextureManager::TEXMAN_TryAny);
|
||||
if (texture == -1) texture = TexMan.AddPatch(sc.String);
|
||||
break;
|
||||
|
||||
case 1: // Splat
|
||||
sc.MustGetString();
|
||||
splat=TexMan[TexMan.AddPatch(sc.String)];
|
||||
splat=TexMan[sc.String];
|
||||
break;
|
||||
|
||||
case 2: // Pointers
|
||||
while (sc.GetString() && !sc.Crossed)
|
||||
{
|
||||
int v = TexMan.AddPatch(sc.String);
|
||||
yah.Push(TexMan[v]);
|
||||
yah.Push(TexMan[sc.String]);
|
||||
}
|
||||
if (sc.Crossed) sc.UnGet();
|
||||
break;
|
||||
|
|
@ -517,7 +513,7 @@ void WI_LoadBackground(bool isenterpic)
|
|||
if (!sc.CheckString("{"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
an.p[an.nanims++] = TexMan[TexMan.AddPatch(sc.String)];
|
||||
an.p[an.nanims++] = TexMan[sc.String];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -525,7 +521,7 @@ void WI_LoadBackground(bool isenterpic)
|
|||
{
|
||||
sc.MustGetString();
|
||||
if (an.nanims<MAX_ANIMATION_FRAMES)
|
||||
an.p[an.nanims++] = TexMan[TexMan.AddPatch(sc.String)];
|
||||
an.p[an.nanims++] = TexMan[sc.String];
|
||||
}
|
||||
}
|
||||
an.ctr = -1;
|
||||
|
|
@ -539,7 +535,7 @@ void WI_LoadBackground(bool isenterpic)
|
|||
sc.MustGetNumber();
|
||||
an.loc.y = sc.Number;
|
||||
sc.MustGetString();
|
||||
an.p[0] = TexMan[TexMan.AddPatch(sc.String)];
|
||||
an.p[0] = TexMan[sc.String];
|
||||
anims.Push(an);
|
||||
break;
|
||||
|
||||
|
|
@ -765,7 +761,7 @@ void WI_drawLF ()
|
|||
{
|
||||
int y = WI_TITLEY;
|
||||
|
||||
FTexture * tex = wbs->lname0[0]? TexMan[TexMan.AddPatch(wbs->lname0)] : NULL;
|
||||
FTexture * tex = wbs->lname0[0]? TexMan[wbs->lname0] : NULL;
|
||||
|
||||
// draw <LevelName>
|
||||
if (tex)
|
||||
|
|
@ -827,7 +823,7 @@ void WI_drawEL ()
|
|||
}
|
||||
|
||||
// draw <LevelName>
|
||||
FTexture * tex = wbs->lname1[0]? TexMan[TexMan.AddPatch(wbs->lname1)] : NULL;
|
||||
FTexture * tex = wbs->lname1[0]? TexMan[wbs->lname1] : NULL;
|
||||
if (tex)
|
||||
{
|
||||
screen->DrawTexture(tex, (SCREENWIDTH - tex->GetWidth() * CleanXfac) / 2, y * CleanYfac, DTA_CleanNoMove, true, TAG_DONE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue