//=============================================================================
/* Support Routines */
+#define FONT_FILESIZE 13468
#define MAX_CACHED_PICS 256
#define CACHEPICHASHSIZE 256
static cachepic_t *cachepichash[CACHEPICHASHSIZE];
static rtexturepool_t *drawtexturepool;
-static qbyte concharimage[13396] =
+static qbyte concharimage[FONT_FILESIZE] =
{
#include "lhfont.h"
};
qbyte buffer[65536][4], *data = NULL;
double random;
- fs_filesize = 13396;
+ fs_filesize = FONT_FILESIZE;
data = LoadTGA (concharimage, 256, 256);
fs_filesize = -1;
// Gold numbers
return pic;
if (numcachepics == MAX_CACHED_PICS)
- Sys_Error ("numcachepics == MAX_CACHED_PICS");
+ {
+ Con_Printf ("Draw_CachePic: numcachepics == MAX_CACHED_PICS");
+ // FIXME: support NULL in callers?
+ return cachepics; // return the first one
+ }
pic = cachepics + (numcachepics++);
strlcpy (pic->name, path, sizeof(pic->name));
// link into list
if (pic == NULL)
{
if (numcachepics == MAX_CACHED_PICS)
- Sys_Error ("numcachepics == MAX_CACHED_PICS");
+ {
+ Con_Printf ("Draw_NewPic: numcachepics == MAX_CACHED_PICS");
+ // FIXME: support NULL in callers?
+ return cachepics; // return the first one
+ }
pic = cachepics + (numcachepics++);
strcpy (pic->name, picname);
// link into list