-int getFontWidth(int font_size, int font_type)
-{
- return (font_size == FS_BIG ? FONT1_XSIZE :
- font_size == FS_MEDIUM ? FONT6_XSIZE :
- font_type == FC_SPECIAL1 ? FONT3_XSIZE :
- font_type == FC_SPECIAL2 ? FONT4_XSIZE :
- font_type == FC_SPECIAL3 ? FONT5_XSIZE :
- FONT2_XSIZE);
-}
-
-int getFontHeight(int font_size, int font_type)
-{
- return (font_size == FS_BIG ? FONT1_YSIZE :
- font_size == FS_MEDIUM ? FONT6_YSIZE :
- font_type == FC_SPECIAL1 ? FONT3_YSIZE :
- font_type == FC_SPECIAL2 ? FONT4_YSIZE :
- font_type == FC_SPECIAL3 ? FONT5_YSIZE :
- FONT2_YSIZE);
-}
-
-void DrawInitText(char *text, int ypos, int color)
-{
- if (window && pix[PIX_SMALLFONT])
- {
- ClearRectangle(window, 0, ypos, WIN_XSIZE, FONT2_YSIZE);
- DrawTextExt(window, gc, (WIN_XSIZE - strlen(text) * FONT2_XSIZE)/2,
- ypos, text, FS_SMALL, color);
- FlushDisplay();
- }
-}
-
-void DrawTextFCentered(int y, int font_type, char *format, ...)
-{
- char buffer[FULL_SXSIZE / FONT5_XSIZE + 10];
- int font_width = getFontWidth(FS_SMALL, font_type);
- va_list ap;
-
- va_start(ap, format);
- vsprintf(buffer, format, ap);
- va_end(ap);
-
- DrawText(SX + (SXSIZE - strlen(buffer) * font_width) / 2, SY + y,
- buffer, FS_SMALL, font_type);
-}
-
-void DrawTextF(int x, int y, int font_type, char *format, ...)