From d925279befed7d9d3c514ec9cf55c4900c3370e2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 Jun 2014 00:04:28 +0200 Subject: [PATCH] - fixed texture name handling in GL related texture classes for recent changes in ZDoom to eliminate the 8 character name limit. --- src/gl/textures/gl_skyboxtexture.cpp | 8 ++++---- src/gl/textures/gl_texture.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gl/textures/gl_skyboxtexture.cpp b/src/gl/textures/gl_skyboxtexture.cpp index 2db39c7a0..c004a4489 100644 --- a/src/gl/textures/gl_skyboxtexture.cpp +++ b/src/gl/textures/gl_skyboxtexture.cpp @@ -150,8 +150,8 @@ void gl_ParseSkybox(FScanner &sc) sc.MustGetString(); FSkyBox * sb = new FSkyBox; - uppercopy(sb->Name, sc.String); - sb->Name[8]=0; + sb->Name = sc.String; + sb->Name.ToUpper(); if (sc.CheckString("fliptop")) { sb->fliptop = true; @@ -192,8 +192,8 @@ void gl_ParseVavoomSkybox() int facecount=0; int maplump = -1; FSkyBox * sb = new FSkyBox; - uppercopy(sb->Name, sc.String); - sb->Name[8]=0; + sb->Name = sc.String; + sb->Name.ToUpper(); sb->fliptop = true; sc.MustGetStringName("{"); while (!sc.CheckString("}")) diff --git a/src/gl/textures/gl_texture.cpp b/src/gl/textures/gl_texture.cpp index 29cafe27b..c4ead8b87 100644 --- a/src/gl/textures/gl_texture.cpp +++ b/src/gl/textures/gl_texture.cpp @@ -603,7 +603,7 @@ bool FTexture::ProcessData(unsigned char * buffer, int w, int h, bool ispatch) FBrightmapTexture::FBrightmapTexture (FTexture *source) { - memset(Name, 0, sizeof(Name)); + Name = ""; SourcePic = source; CopySize(source); bNoDecals = source->bNoDecals; @@ -650,7 +650,7 @@ int FBrightmapTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotat FCloneTexture::FCloneTexture (FTexture *source, int usetype) { - memset(Name, 0, sizeof(Name)); + Name = ""; SourcePic = source; CopySize(source); bNoDecals = source->bNoDecals;