mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@1157 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9b7c2b2c4e
commit
7e15a10908
2 changed files with 16 additions and 8 deletions
|
@ -5791,14 +5791,14 @@ void uninitengine(void)
|
|||
if (cachefilehandle > -1) Bclose(cachefilehandle);
|
||||
if (cacheindexptr != NULL) Bfclose(cacheindexptr);
|
||||
datextures = &firstcacheindex;
|
||||
do
|
||||
while (datextures->next)
|
||||
{
|
||||
index = datextures;
|
||||
datextures = datextures->next;
|
||||
Bfree(index);
|
||||
if (index != &firstcacheindex)
|
||||
Bfree(index);
|
||||
}
|
||||
while (datextures->next);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
uninitsystem();
|
||||
|
|
|
@ -740,20 +740,23 @@ void polymost_glreset()
|
|||
cachefilehandle = openfrompath(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
||||
|
||||
if (cachefilehandle < 0)
|
||||
{
|
||||
glusetexcache = 0;
|
||||
initprintf("Unable to open cache file!\n");
|
||||
}
|
||||
|
||||
#if 0
|
||||
i = 0;
|
||||
|
||||
datextures = &firstcacheindex;
|
||||
do
|
||||
while (datextures->next)
|
||||
{
|
||||
i += datextures->len;
|
||||
datextures = datextures->next;
|
||||
}
|
||||
while (datextures->next);
|
||||
datextures = &firstcacheindex;
|
||||
initprintf("Cache contains %d bytes of garbage data\n",Blseek(cachefilehandle, 0, BSEEK_END)-i);
|
||||
Blseek(cachefilehandle, 0, BSEEK_SET);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -940,19 +943,24 @@ void polymost_glinit()
|
|||
cachefilehandle = Bopen(TEXCACHEDIR,BO_BINARY|BO_APPEND|BO_CREAT|BO_RDWR,BS_IREAD|BS_IWRITE);
|
||||
|
||||
if (cachefilehandle < 0)
|
||||
{
|
||||
initprintf("Unable to open cache file!\n");
|
||||
glusetexcache = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
||||
datextures = &firstcacheindex;
|
||||
do
|
||||
while (datextures->next)
|
||||
{
|
||||
i += datextures->len;
|
||||
datextures = datextures->next;
|
||||
}
|
||||
while (datextures->next);
|
||||
|
||||
datextures = &firstcacheindex;
|
||||
initprintf("Cache contains %d bytes of garbage data\n",Blseek(cachefilehandle, 0, BSEEK_END)-i);
|
||||
Blseek(cachefilehandle, 0, BSEEK_SET);
|
||||
}
|
||||
|
||||
void invalidatecache(void)
|
||||
|
|
Loading…
Reference in a new issue