Properly cache animations at level start. Switches still need some caching code. Added a debug cache flag for use in the sim to w_wad.c. Should be taken out when switches are handled.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9706 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2006-04-17 19:42:08 +00:00
parent 239564c80e
commit 08b417f149
3 changed files with 51 additions and 4 deletions

View file

@ -494,7 +494,7 @@ int W_LumpLength (int lump)
// Loads the lump into the given buffer,
// which must be >= W_LumpLength().
//
#undef DEBUGCACHE
void W_ReadLump(int lump, void *dest)
{
lumpinfo_t *l = lumpinfo + lump;
@ -512,6 +512,11 @@ void W_ReadLump(int lump, void *dest)
{
int c;
#if DEBUGCACHE
if(gamestate==GS_LEVEL)
printf("Loading %s\n", lumpinfo[lump].name);
#endif
// killough 1/31/98: Reload hack (-wart) removed
lseek(l->handle, l->position, SEEK_SET);