From c9881651318304e30b207afe57b65573417b242d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 16 Oct 2019 22:02:27 +0200 Subject: [PATCH] - added a temporary workaround for image-based tile replacements. The texture management is not ready yet to seamlessly handle these textures so for now they always need to be installed as hightile replacements. --- source/common/textures/buildtiles.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/common/textures/buildtiles.cpp b/source/common/textures/buildtiles.cpp index fd05f50fe..736dcb6ec 100644 --- a/source/common/textures/buildtiles.cpp +++ b/source/common/textures/buildtiles.cpp @@ -425,11 +425,13 @@ int tileImportFromTexture(const char* fn, int tilenum, int alphacut, int istextu if (xsiz <= 0 || ysiz <= 0) return -2; -#if 0 + TileFiles.tiles[tilenum] = tex; +#pragma message("tileImportFromTexture needs rework!") // Reminder so that this place isn't forgotten. +//#if 0 // Does this make any difference when the texture gets *properly* inserted into the tile array? - if (istexture) - hicsetsubsttex(tile, 0, fn, (float)(255 - alphacut) * (1.f / 255.f), 1.0f, 1.0f, 1.0, 1.0, 0); -#endif + //if (istexture) + hicsetsubsttex(tilenum, 0, fn, (float)(255 - alphacut) * (1.f / 255.f), 1.0f, 1.0f, 1.0, 1.0, 0); // At the moment this is the only way to load the texture. The texture creation code is not ready yet for downconverting an image. +//#endif return 0; } @@ -573,7 +575,7 @@ bool tileLoad(int tileNum) tex->Create8BitPixels((uint8_t*)tex->CacheHandle); } return true; -} + } //==========================================================================