From 82af1640fdd98734288bf1f167e3046e36bc28d4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 21 Apr 2010 17:39:52 +0000 Subject: [PATCH] - fixed: HI_START/HI_END must be checked after parsing the TEXTURES lump, not before it. SVN r2297 (trunk) --- src/textures/texture.cpp | 4 ++-- src/textures/texturemanager.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 97f393cb2..234d447c4 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -549,8 +549,8 @@ FTexture *FTexture::GetRedirect(bool wantwarped) void FTexture::SetScaledSize(int fitwidth, int fitheight) { - xScale = DivScale16(Width, fitwidth); - yScale = DivScale16(Height,fitheight); + xScale = FLOAT2FIXED(float(Width) / fitwidth); + yScale = FLOAT2FIXED(float(Height) / fitheight); // compensate for roundoff errors if (MulScale16(xScale, fitwidth) != Width) xScale++; if (MulScale16(yScale, fitheight) != Height) yScale++; diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index 34e2f4ae6..e562923db 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -822,10 +822,13 @@ void FTextureManager::AddTexturesForWad(int wadnum) } } - // Seventh step: Check for hires replacements. - AddHiresTextures(wadnum); + // Check for text based texture definitions LoadTextureDefs(wadnum, "TEXTURES"); LoadTextureDefs(wadnum, "HIRESTEX"); + + // Seventh step: Check for hires replacements. + AddHiresTextures(wadnum); + SortTexturesByType(firsttexture, Textures.Size()); }