+static qbyte concharimage[13468] =
+{
+#include "lhfont.h"
+};
+
+extern qbyte *LoadTGA (qbyte *f, int matchwidth, int matchheight);
+
+static rtexture_t *draw_generateconchars(void)
+{
+ int i;
+ qbyte buffer[65536][4], *data = NULL;
+ double random;
+
+ fs_filesize = 13396;
+ data = LoadTGA (concharimage, 256, 256);
+ fs_filesize = -1;
+// Gold numbers
+ for (i = 0;i < 8192;i++)
+ {
+ random = lhrandom (0.0,1.0);
+ buffer[i][0] = 83 + (qbyte)(random * 64);
+ buffer[i][1] = 71 + (qbyte)(random * 32);
+ buffer[i][2] = 23 + (qbyte)(random * 16);
+ buffer[i][3] = data[i*4+0];
+ }
+// White chars
+ for (i = 8192;i < 32768;i++)
+ {
+ random = lhrandom (0.0,1.0);
+ buffer[i][0] = 95 + (qbyte)(random * 64);
+ buffer[i][1] = 95 + (qbyte)(random * 64);
+ buffer[i][2] = 95 + (qbyte)(random * 64);
+ buffer[i][3] = data[i*4+0];
+ }
+// Gold numbers
+ for (i = 32768;i < 40960;i++)
+ {
+ random = lhrandom (0.0,1.0);
+ buffer[i][0] = 83 + (qbyte)(random * 64);
+ buffer[i][1] = 71 + (qbyte)(random * 32);
+ buffer[i][2] = 23 + (qbyte)(random * 16);
+ buffer[i][3] = data[i*4+0];
+ }
+// Red chars
+ for (i = 40960;i < 65536;i++)
+ {
+ random = lhrandom (0.0,1.0);
+ buffer[i][0] = 96 + (qbyte)(random * 64);
+ buffer[i][1] = 43 + (qbyte)(random * 32);
+ buffer[i][2] = 27 + (qbyte)(random * 32);
+ buffer[i][3] = data[i*4+0];
+ }
+
+#if 0
+ Image_WriteTGARGBA ("gfx/generated_conchars.tga", 256, 256, &buffer[0][0]);
+#endif
+
+ Mem_Free(data);
+ return R_LoadTexture2D(drawtexturepool, "conchars", 256, 256, &buffer[0][0], TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE, NULL);
+}
+