From 4d3b7501f0a51ca65b849cfe47288ce55d47565f Mon Sep 17 00:00:00 2001 From: plagman Date: Thu, 3 Dec 2009 03:07:04 +0000 Subject: [PATCH] Fixes a compressed texture cache bug where the background menu tile would sometime get replaced with another tile. git-svn-id: https://svn.eduke32.com/eduke32@1546 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymost.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 30c8e73b9..5ac8ceb4f 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -756,7 +756,6 @@ void polymost_glinit() curcacheindex = curcacheindex->next; } - curcacheindex = firstcacheindex; i = Blseek(cachefilehandle, 0, BSEEK_END)-i; if (i) initprintf("Cache contains %d bytes of garbage data\n",i); @@ -1284,6 +1283,14 @@ int32_t trytexcache(char *fn, int32_t len, int32_t dameth, char effect, texcache /*initprintf("%s %d got a match for %s offset %d\n",__FILE__, __LINE__, cachefn,offset);*/ } else return -1; // didn't find it + if (!strcmp(fn, "highres/screen/menu/3281.jpg")) { + static int menuoffset = -1; + if (offset != menuoffset) { + menuoffset = offset; + } + OSD_Printf("menu tile offset %i\n", offset); + } + if (Blseek(cachefilehandle, offset, BSEEK_SET) == -1) {