From 385cfc56985dc1db1c4eb8f44444d08ee3998352 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 21 Sep 2010 16:50:09 +0000 Subject: [PATCH] - fixed some texture priorititing problems with Hexen's player displays for the menu. The patches for these should not be placed in the TEX_WallPatch namespace because it's not what modders might expect from them. SVN r2841 (trunk) --- src/textures/multipatchtexture.cpp | 20 ++++++++---- wadsrc/static/textures.txt | 49 +++++++++++++++--------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 4debfa24a..0c0a54499 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -189,7 +189,7 @@ protected: private: void CheckForHacks (); - void ParsePatch(FScanner &sc, TexPart & part, bool silent); + void ParsePatch(FScanner &sc, TexPart & part, bool silent, int usetype); }; //========================================================================== @@ -970,12 +970,12 @@ void FTextureManager::AddTexturesLumps (int lump1, int lump2, int patcheslump) // //========================================================================== -void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, bool silent) +void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, bool silent, int usetype) { FString patchname; sc.MustGetString(); - FTextureID texno = TexMan.CheckForTexture(sc.String, TEX_WallPatch); + FTextureID texno = TexMan.CheckForTexture(sc.String, usetype); int Mirror = 0; if (!texno.isValid()) @@ -996,10 +996,10 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part, bool silent) } else if (strlen(sc.String) <= 8 && !strpbrk(sc.String, "./")) { - int lumpnum = Wads.CheckNumForName(sc.String, ns_patches); + int lumpnum = Wads.CheckNumForName(sc.String, usetype == TEX_MiscPatch? ns_graphics : ns_patches); if (lumpnum >= 0) { - part.Texture = FTexture::CreateTexture(lumpnum, TEX_WallPatch); + part.Texture = FTexture::CreateTexture(lumpnum, usetype); TexMan.AddTexture(part.Texture); } } @@ -1252,7 +1252,15 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype) else if (sc.Compare("Patch")) { TexPart part; - ParsePatch(sc, part, bSilent); + ParsePatch(sc, part, bSilent, TEX_WallPatch); + if (part.Texture != NULL) parts.Push(part); + part.Texture = NULL; + part.Translation = NULL; + } + else if (sc.Compare("Graphic")) + { + TexPart part; + ParsePatch(sc, part, bSilent, TEX_MiscPatch); if (part.Texture != NULL) parts.Push(part); part.Texture = NULL; part.Translation = NULL; diff --git a/wadsrc/static/textures.txt b/wadsrc/static/textures.txt index 19f27e84e..7ae26ce2f 100644 --- a/wadsrc/static/textures.txt +++ b/wadsrc/static/textures.txt @@ -1,72 +1,73 @@ +// Note: These textures use 'graphic' instead of patch because the patches must not be placed in the TEX_WallPatch namespace. Graphic optional P_FWALK1, 112, 136 { - Patch "M_FBOX", 0, 0 - Patch "M_FWALK1", 24, 12 { useoffsets } + Graphic "M_FBOX", 0, 0 + Graphic "M_FWALK1", 24, 12 { useoffsets } } Graphic optional P_FWALK2, 112, 136 { - Patch "M_FBOX", 0, 0 - Patch "M_FWALK2", 24, 12 { useoffsets } + Graphic "M_FBOX", 0, 0 + Graphic "M_FWALK2", 24, 12 { useoffsets } } Graphic optional P_FWALK3, 112, 136 { - Patch "M_FBOX", 0, 0 - Patch "M_FWALK3", 24, 12 { useoffsets } + Graphic "M_FBOX", 0, 0 + Graphic "M_FWALK3", 24, 12 { useoffsets } } Graphic optional P_FWALK4, 112, 136 { - Patch "M_FBOX", 0, 0 - Patch "M_FWALK4", 24, 12 { useoffsets } + Graphic "M_FBOX", 0, 0 + Graphic "M_FWALK4", 24, 12 { useoffsets } } Graphic optional P_CWALK1, 112, 136 { - Patch "M_CBOX", 0, 0 - Patch "M_CWALK1", 24, 12 { useoffsets } + Graphic "M_CBOX", 0, 0 + Graphic "M_CWALK1", 24, 12 { useoffsets } } Graphic optional P_CWALK2, 112, 136 { - Patch "M_CBOX", 0, 0 - Patch "M_CWALK2", 24, 12 { useoffsets } + Graphic "M_CBOX", 0, 0 + Graphic "M_CWALK2", 24, 12 { useoffsets } } Graphic optional P_CWALK3, 112, 136 { - Patch "M_CBOX", 0, 0 - Patch "M_CWALK3", 24, 12 { useoffsets } + Graphic "M_CBOX", 0, 0 + Graphic "M_CWALK3", 24, 12 { useoffsets } } Graphic optional P_CWALK4, 112, 136 { - Patch "M_CBOX", 0, 0 - Patch "M_CWALK4", 24, 12 { useoffsets } + Graphic "M_CBOX", 0, 0 + Graphic "M_CWALK4", 24, 12 { useoffsets } } Graphic optional P_MWALK1, 112, 136 { - Patch "M_MBOX", 0, 0 - Patch "M_MWALK1", 24, 12 { useoffsets } + Graphic "M_MBOX", 0, 0 + Graphic "M_MWALK1", 24, 12 { useoffsets } } Graphic optional P_MWALK2, 112, 136 { - Patch "M_MBOX", 0, 0 - Patch "M_MWALK2", 24, 12 { useoffsets } + Graphic "M_MBOX", 0, 0 + Graphic "M_MWALK2", 24, 12 { useoffsets } } Graphic optional P_MWALK3, 112, 136 { - Patch "M_MBOX", 0, 0 - Patch "M_MWALK3", 24, 12 { useoffsets } + Graphic "M_MBOX", 0, 0 + Graphic "M_MWALK3", 24, 12 { useoffsets } } Graphic optional P_MWALK4, 112, 136 { - Patch "M_MBOX", 0, 0 - Patch "M_MWALK4", 24, 12 { useoffsets } + Graphic "M_MBOX", 0, 0 + Graphic "M_MWALK4", 24, 12 { useoffsets } }