X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Ftext.h;h=c1915d47859a77fb4f0685981f4919db359918b3;hb=6ed4958820f8f97174ca47594dcc6f00ee31b2cb;hp=18dd2ba4d5195453d5bfbc6b5ffcfec16a39d4a6;hpb=f4b305df0ae775ef48daee86020904abb79ebef8;p=rocksndiamonds.git diff --git a/src/libgame/text.h b/src/libgame/text.h index 18dd2ba4..c1915d47 100644 --- a/src/libgame/text.h +++ b/src/libgame/text.h @@ -17,39 +17,17 @@ #include "system.h" -/* font types */ -#define FS_INITIAL 0 -#define FS_BIG 1 -#define FS_MEDIUM 2 -#define FS_SMALL 3 +/* default fonts */ +#define FONT_INITIAL_1 0 +#define FONT_INITIAL_2 1 +#define FONT_INITIAL_3 2 +#define FONT_INITIAL_4 3 /* font colors */ -#define FC_RED 0 -#define FC_BLUE 1 -#define FC_GREEN 2 -#define FC_YELLOW 3 - -/* special fonts */ -#define FC_SPECIAL_TAPE 4 -#define FC_SPECIAL_GAME 5 -#define FC_SPECIAL_NARROW 6 - -#define FONT(fs, fc) (( (fs) == FS_INITIAL ? \ - IMG_FONT_INITIAL_1 + (fc) : \ - (fs) == FS_BIG ? \ - IMG_FONT_BIG_1 + (fc) : \ - (fs) == FS_MEDIUM ? \ - IMG_FONT_MEDIUM_1 + (fc) : \ - (fs) == FS_SMALL ? \ - IMG_FONT_SMALL_1 + (fc) : \ - IMG_FONT_SMALL_1 \ - ) - FIRST_IMG_FONT) - -#define FONT_DEFAULT_BIG FONT(FS_BIG, FC_YELLOW) -#define FONT_DEFAULT_SMALL FONT(FS_SMALL, FC_YELLOW) -#define FONT_SPECIAL_TAPE FONT(FS_SMALL, FC_SPECIAL_TAPE) -#define FONT_SPECIAL_GAME FONT(FS_SMALL, FC_SPECIAL_GAME) -#define FONT_SPECIAL_NARROW FONT(FS_SMALL, FC_SPECIAL_NARROW) +#define FC_RED FONT_INITIAL_1 +#define FC_BLUE FONT_INITIAL_2 +#define FC_GREEN FONT_INITIAL_3 +#define FC_YELLOW FONT_INITIAL_4 #define FONT_CHARS_PER_LINE 16 #define FONT_LINES_PER_FONT 4 @@ -62,9 +40,12 @@ /* font structure definitions */ -void InitFontInfo(struct FontBitmapInfo *, int); +void InitFontInfo(struct FontBitmapInfo *, int, + int (*select_font_function)(int)); int getFontWidth(int); int getFontHeight(int); +boolean getFontChar(int, char, int *, int *); + void DrawInitText(char *, int, int); void DrawTextF(int, int, int, char *, ...); void DrawTextFCentered(int, int, char *, ...);