text.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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