#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include "u_mem.h"#include "gr.h"#include "grdef.h"#include "error.h"#include "cfile.h"#include "mono.h"#include "byteswap.h"#include "bitmap.h"Defines | |
| #define | FONT grd_curcanv->cv_font |
| #define | FG_COLOR grd_curcanv->cv_font_fg_color |
| #define | BG_COLOR grd_curcanv->cv_font_bg_color |
| #define | FWIDTH FONT->ft_w |
| #define | FHEIGHT FONT->ft_h |
| #define | FBASELINE FONT->ft_baseline |
| #define | FFLAGS FONT->ft_flags |
| #define | FMINCHAR FONT->ft_minchar |
| #define | FMAXCHAR FONT->ft_maxchar |
| #define | FDATA FONT->ft_data |
| #define | FCHARS FONT->ft_chars |
| #define | FWIDTHS FONT->ft_widths |
| #define | BITS_TO_BYTES(x) (((x)+7)>>3) |
| #define | INFONT(_c) ((_c >= 0) && (_c <= FMAXCHAR-FMINCHAR)) |
| #define | CHECK_EMBEDDED_COLORS() |
Functions | |
| int | gr_internal_string_clipped (int x, int y, char *s) |
| int | gr_internal_string_clipped_m (int x, int y, char *s) |
| ubyte * | find_kern_entry (grs_font *font, ubyte first, ubyte second) |
| void | get_char_width (ubyte c, ubyte c2, int *width, int *spacing) |
| int | get_centered_x (char *s) |
| int | gr_internal_string0 (int x, int y, char *s) |
| int | gr_internal_string0m (int x, int y, char *s) |
| int | gr_internal_color_string (int x, int y, char *s) |
| int | gr_string (int x, int y, char *s) |
| int | gr_ustring (int x, int y, char *s) |
| void | gr_get_string_size (char *s, int *string_width, int *string_height, int *average_width) |
| int | gr_uprintf (int x, int y, char *format,...) |
| int | gr_printf (int x, int y, char *format,...) |
| void | gr_close_font (grs_font *font) |
| void | build_colormap_good (ubyte *palette, ubyte *colormap, int *freq) |
| grs_font * | gr_init_font (char *fontname) |
| void | gr_set_fontcolor (int fg, int bg) |
| void | gr_set_curfont (grs_font *new) |
Variables | |
| int | gr_message_color_level = 1 |
| grs_bitmap | char_bm |
|
|
|
|
|
|
|
|
Value: if ((*text_ptr >= 0x01) && (*text_ptr <= 0x03)) { \ text_ptr++; \ if (*text_ptr){ \ if (gr_message_color_level >= *(text_ptr-1)) \ FG_COLOR = *text_ptr - 1; \ text_ptr++; \ } \ } \ else if ((*text_ptr >= 0x04) && (*text_ptr <= 0x06)){ \ if (gr_message_color_level >= *text_ptr - 3) \ FG_COLOR=orig_color; \ text_ptr++; \ } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
Initial value: {
0,0,0,0,
BM_LINEAR,
BM_FLAG_TRANSPARENT,
0,
NULL,
0,
0
}
|
|
|
|
1.4.6