conchars hack for csqc
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1211 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5a44d42688
commit
cbdd68fe96
1 changed files with 18 additions and 13 deletions
|
@ -229,17 +229,8 @@ mpic_t *SWDraw_SafeCachePic (char *extpath)
|
||||||
|
|
||||||
return dat;
|
return dat;
|
||||||
}
|
}
|
||||||
mpic_t *SWDraw_CachePic (char *path)
|
|
||||||
{
|
|
||||||
mpic_t *pic;
|
|
||||||
pic = SWDraw_SafeCachePic(path);
|
|
||||||
if (!pic)
|
|
||||||
Sys_Error ("Draw_CachePic: failed to load %s", path);
|
|
||||||
|
|
||||||
return pic;
|
|
||||||
}
|
|
||||||
|
|
||||||
mpic_t *SWDraw_ConcharsMalloc (char *name)
|
mpic_t *SWDraw_ConcharsMalloc (void)
|
||||||
{
|
{
|
||||||
// stupid hack for conchars...
|
// stupid hack for conchars...
|
||||||
qpic_t *dat;
|
qpic_t *dat;
|
||||||
|
@ -247,7 +238,7 @@ mpic_t *SWDraw_ConcharsMalloc (char *name)
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (pic=swmenu_cachepics, i=0 ; i<swmenu_numcachepics ; pic++, i++)
|
for (pic=swmenu_cachepics, i=0 ; i<swmenu_numcachepics ; pic++, i++)
|
||||||
if (!strcmp (name, pic->name))
|
if (!strcmp ("conchars", pic->name))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (i == swmenu_numcachepics)
|
if (i == swmenu_numcachepics)
|
||||||
|
@ -264,12 +255,26 @@ mpic_t *SWDraw_ConcharsMalloc (char *name)
|
||||||
// memcpy (dat->data, draw_chars, 128*128);
|
// memcpy (dat->data, draw_chars, 128*128);
|
||||||
((mpic_t*)dat)->width = ((mpic_t*)dat)->height = 128;
|
((mpic_t*)dat)->width = ((mpic_t*)dat)->height = 128;
|
||||||
((mpic_t*)dat)->flags = 1;
|
((mpic_t*)dat)->flags = 1;
|
||||||
strcpy (pic->name, name);
|
strcpy (pic->name, "conchars");
|
||||||
}
|
}
|
||||||
|
|
||||||
return pic->cache.data;
|
return pic->cache.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mpic_t *SWDraw_CachePic (char *path)
|
||||||
|
{
|
||||||
|
mpic_t *pic;
|
||||||
|
|
||||||
|
if (!strcmp(path, "conchars")) // conchars hack
|
||||||
|
return SWDraw_ConcharsMalloc();
|
||||||
|
|
||||||
|
pic = SWDraw_SafeCachePic(path);
|
||||||
|
if (!pic)
|
||||||
|
Sys_Error ("Draw_CachePic: failed to load %s", path);
|
||||||
|
|
||||||
|
return pic;
|
||||||
|
}
|
||||||
|
|
||||||
mpic_t *SWDraw_MallocPic (char *path)
|
mpic_t *SWDraw_MallocPic (char *path)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -357,7 +362,7 @@ mpic_t *SWDraw_PicFromWad (char *name)
|
||||||
mpic_t *mpic;
|
mpic_t *mpic;
|
||||||
|
|
||||||
if (!strcmp(name, "conchars")) // conchars hack
|
if (!strcmp(name, "conchars")) // conchars hack
|
||||||
return SWDraw_ConcharsMalloc("conchars");
|
return SWDraw_ConcharsMalloc();
|
||||||
|
|
||||||
sprintf(q2name, "pics/%s.pcx", name);
|
sprintf(q2name, "pics/%s.pcx", name);
|
||||||
mpic = SWDraw_MallocPic(q2name);
|
mpic = SWDraw_MallocPic(q2name);
|
||||||
|
|
Loading…
Reference in a new issue