- moved the code from r_data.cpp to some better fitting places and deleted this file and r_data.h because the remaining parts of it were just a random collection of unrelated functions.

SVN r3248 (trunk)
This commit is contained in:
Christoph Oelckers 2011-07-05 10:02:38 +00:00
commit 17ed7aaabd
59 changed files with 268 additions and 52 deletions

View file

@ -35,8 +35,8 @@
*/
#include "doomtype.h"
#include "doomstat.h"
#include "w_wad.h"
#include "r_data.h"
#include "templates.h"
#include "i_system.h"
#include "r_translate.h"
@ -47,6 +47,10 @@
#include "st_start.h"
#include "cmdlib.h"
#include "g_level.h"
#include "m_fixed.h"
#include "farchive.h"
#include "v_video.h"
#include "textures/textures.h"
FTextureManager TexMan;
@ -1143,6 +1147,36 @@ int FTextureManager::CountLumpTextures (int lumpnum)
return 0;
}
//===========================================================================
//
// R_PrecacheLevel
//
// Preloads all relevant graphics for the level.
//
//===========================================================================
void FTextureManager::PrecacheLevel (void)
{
BYTE *hitlist;
int cnt = NumTextures();
if (demoplayback)
return;
hitlist = new BYTE[cnt];
memset (hitlist, 0, cnt);
screen->GetHitlist(hitlist);
for (int i = cnt - 1; i >= 0; i--)
{
screen->PrecacheTexture(ByIndex(i), hitlist[i]);
}
delete[] hitlist;
}
//==========================================================================
//