Order correctly and include z_zone.h

This commit is contained in:
James R 2019-06-26 00:31:20 -07:00
parent a2739b8032
commit 8063cc6c2f

View file

@ -13,6 +13,7 @@
#include "doomdef.h" #include "doomdef.h"
#include "hu_stuff.h" #include "hu_stuff.h"
#include "font.h" #include "font.h"
#include "z_zone.h"
font_t fontv[MAX_FONTS]; font_t fontv[MAX_FONTS];
int fontc; int fontc;
@ -28,8 +29,8 @@ FontCache (font_t *fnt)
{ {
fnt->font[i] = HU_CachePatch( fnt->font[i] = HU_CachePatch(
"%s%.*d", "%s%.*d",
fnt->digits,
fnt->prefix, fnt->prefix,
fnt->digits,
c); c);
} }
} }
@ -54,11 +55,11 @@ Font_DumbRegister (const font_t *sfnt)
fnt = &fontv[fontc]; fnt = &fontv[fontc];
memcpy(fnt, sfnt, sizeof (font_t));
if (!( fnt->font = ZZ_Alloc(sfnt->size * sizeof (patch_t *)) )) if (!( fnt->font = ZZ_Alloc(sfnt->size * sizeof (patch_t *)) ))
return -1; return -1;
memcpy(fnt, sfnt, sizeof (font_t));
return fontc++; return fontc++;
} }