gba-trycatch

annotate src/sdlsys/font.h @ 11:c47e54796b82

added a simple README
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Jun 2014 07:54:29 +0300
parents
children
rev   line source
nuclear@5 1 /*
nuclear@5 2 Copyright 2004 John Tsiombikas <nuclear@siggraph.org>
nuclear@5 3
nuclear@5 4 This file is part of gbasys, a library for GameBoy Advance development.
nuclear@5 5
nuclear@5 6 This program is free software; you can redistribute it and/or modify
nuclear@5 7 it under the terms of the GNU General Public License as published by
nuclear@5 8 the Free Software Foundation; either version 2 of the License, or
nuclear@5 9 (at your option) any later version.
nuclear@5 10
nuclear@5 11 This program is distributed in the hope that it will be useful,
nuclear@5 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
nuclear@5 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
nuclear@5 14 GNU General Public License for more details.
nuclear@5 15
nuclear@5 16 You should have received a copy of the GNU General Public License
nuclear@5 17 along with this program; if not, write to the Free Software
nuclear@5 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
nuclear@5 19 */
nuclear@5 20 #ifndef _FONT_H_
nuclear@5 21 #define _FONT_H_
nuclear@5 22
nuclear@5 23 struct pixel_buffer;
nuclear@5 24
nuclear@5 25 struct font {
nuclear@5 26 int x, y;
nuclear@5 27 void *bitmap;
nuclear@5 28 };
nuclear@5 29
nuclear@5 30
nuclear@5 31 extern struct font font_8x8;
nuclear@5 32 extern struct font font_8x16;
nuclear@5 33
nuclear@5 34 void set_font(struct font *fnt);
nuclear@5 35 struct font *get_font(void);
nuclear@5 36 void set_text_color(unsigned short fg, unsigned short bg);
nuclear@5 37 void set_text_writebg(int enable);
nuclear@5 38
nuclear@5 39 struct pixel_buffer *get_glyph(unsigned char c, unsigned short fg, unsigned short bg, int bpp);
nuclear@5 40 int draw_glyph(unsigned char c, int x, int y, struct pixel_buffer *pbuf);
nuclear@5 41 int draw_string(const char *str, int x, int y, struct pixel_buffer *pbuf);
nuclear@5 42
nuclear@5 43 #endif /* _FONT_H_ */