text.h

00001 /*
00002 Copyright Remco Bras 2007,2008
00003 This file is part of RPGE
00004 
00005 RPGE is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 3 of the License, or
00008 (at your option) any later version.
00009 
00010 RPGE is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program.  If not, see <http://www.gnu.org/licenses/>
00017 */
00018 
00019 #ifndef TEXT_H
00020 #define TEXT_H
00021 
00022 #include "stdio.h"
00023 #include "sequence.h"
00024 #include "path.h"
00025 #include <SDL/SDL_ttf.h>
00026 #include <SDL/SDL.h>
00027 
00028 typedef struct
00029 {
00030   unsigned int x, y;
00031   sequence buffers; 
00032   int fontindex;
00033   SDL_Color color;
00034 } text;
00035 
00036 typedef struct
00037 {
00038   TTF_Font* font;
00039   char* filename;
00040   unsigned int size;
00041 } font;
00042 
00043 extern sequence fonts;
00044 extern sequence texts;
00045 
00046 int open_font(char* filename, int size);
00047 void close_font(int index);
00048 text make_text(unsigned int x, unsigned int y, char* string, int fontindex, SDL_Color color);
00049 void print_text(text t);
00050 int add_text(text t);
00051 void remove_text(int index);
00052 void move_text(int index, unsigned int x, unsigned int y);
00053 void text_rendering_init();
00054 
00055 #endif
 All Classes

Generated on Tue Feb 15 21:31:40 2011 by  doxygen 1.6.1