if (pic->flags & CACHEPICFLAG_NEWPIC && pic->skinframe && pic->skinframe->base && pic->width == width && pic->height == height)
{
Con_DPrintf("Draw_NewPic(\"%s\"): frame %i: updating texture\n", picname, draw_frame);
- R_UpdateTexture(pic->skinframe->base, pixels_bgra, 0, 0, 0, width, height, 1);
+ R_UpdateTexture(pic->skinframe->base, pixels_bgra, 0, 0, 0, width, height, 1, 0);
R_SkinFrame_MarkUsed(pic->skinframe);
pic->lastusedframe = draw_frame;
return pic;
}
}
+qbool Draw_PicExists(const char *name) {
+ char vabuf[1024] = { 0 };
+ const char *checkfmt[] = { "%s.tga", "%s.png", "%s.jpg", "%s.pcx" };
+ long unsigned int i;
+ // TODO: actually use the gfx format list for this
+ for (i = 0; i < sizeof(checkfmt) / sizeof(checkfmt[0]); ++i)
+ if (FS_FileExists(va(vabuf, sizeof(vabuf), checkfmt[i], name)))
+ return true;
+ return false;
+}
+
static float snap_to_pixel_x(float x, float roundUpAt);
extern int con_linewidth; // to force rewrapping
void LoadFont(qbool override, const char *name, dp_font_t *fnt, float scale, float voffset)