- fixed precacher.

This commit is contained in:
Christoph Oelckers 2020-06-22 01:07:19 +02:00
parent e113851a39
commit 1993642ce8
2 changed files with 3 additions and 2 deletions

View file

@ -40,6 +40,7 @@ BEGIN_DUKE_NS
inline void tloadtile(int tilenum, int palnum = 0)
{
assert(tilenum < MAXTILES);
markTileForPrecache(tilenum, palnum);
}

View file

@ -482,7 +482,7 @@ void markTileForPrecache(int tilenum, int palnum)
for (; i <= j; i++)
{
int64_t val = i + (int64_t(palnum) << 16);
int64_t val = i + (int64_t(palnum) << 32);
cachemap.Insert(val, true);
}
}
@ -495,7 +495,7 @@ void precacheMarkedTiles()
decltype(cachemap)::Pair* pair;
while (it.NextPair(pair))
{
int dapicnum = pair->Key;
int dapicnum = pair->Key & 0x7fffffff;
int dapalnum = pair->Key >> 32;
polymost_precache(dapicnum, dapalnum, 0);
}