My Project
Loading...
Searching...
No Matches
font.h
1/*
2 * OpenTyrian: A modern cross-platform port of Tyrian
3 * Copyright (C) 2007-2009 The OpenTyrian Development Team
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef FONT_H
20#define FONT_H
21
22#include "SDL.h"
23
24#include <stdbool.h>
25
26typedef enum
27{
28 large_font = 0,
29 normal_font = 1,
30 small_font = 2
31}
32Font;
33
34typedef enum
35{
36 left_aligned,
37 centered,
38 right_aligned
39}
40FontAlignment;
41
42void draw_font_hv_shadow(SDL_Surface *, int x, int y, const char *text, Font, FontAlignment, Uint8 hue, Sint8 value, bool black, int shadow_dist);
43void draw_font_hv_full_shadow(SDL_Surface *, int x, int y, const char *text, Font, FontAlignment, Uint8 hue, Sint8 value, bool black, int shadow_dist);
44
45void draw_font_hv(SDL_Surface *, int x, int y, const char *text, Font, FontAlignment, Uint8 hue, Sint8 value);
46void draw_font_hv_blend(SDL_Surface *, int x, int y, const char *text, Font, FontAlignment, Uint8 hue, Sint8 value);
47void draw_font_dark(SDL_Surface *, int x, int y, const char *text, Font, FontAlignment, bool black);
48
49#endif // FONT_H
void draw_font_hv_blend(SDL_Surface *surface, int x, int y, const char *text, Font font, FontAlignment alignment, Uint8 hue, Sint8 value)
Draws blended text in a color specified by hue and value.
Definition font.c:182
void draw_font_hv_full_shadow(SDL_Surface *surface, int x, int y, const char *text, Font font, FontAlignment alignment, Uint8 hue, Sint8 value, bool black, int shadow_dist)
Draws text in a color specified by hue and value and with a surrounding shadow.
Definition font.c:90
void draw_font_hv_shadow(SDL_Surface *surface, int x, int y, const char *text, Font font, FontAlignment alignment, Uint8 hue, Sint8 value, bool black, int shadow_dist)
Draws text in a color specified by hue and value and with a drop shadow.
Definition font.c:57
void draw_font_dark(SDL_Surface *surface, int x, int y, const char *text, Font font, FontAlignment alignment, bool black)
Draws darkened text.
Definition font.c:238
void draw_font_hv(SDL_Surface *surface, int x, int y, const char *text, Font font, FontAlignment alignment, Uint8 hue, Sint8 value)
Draws text in a color specified by hue and value.
Definition font.c:119