aboutsummaryrefslogtreecommitdiff
path: root/render/render_text.h
blob: a9e952e1e9db06b91b5c034119b54466c55804ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef RENDER_TEXT_H
#define RENDER_TEXT_H

#include <SDL.h>

typedef struct {
    SDL_Texture *tex;
    int cw[128];
} txtd;

void char_width_init (int *char_width);
int get_text_width (char str[], txtd *t);
    
void render_text (SDL_Renderer* gRenderer, char str[], float off[], txtd *t);
void render_text_scaled (SDL_Renderer* gRenderer, char str[], 
    float off[], txtd *t, float scale);
    
void render_text_small (SDL_Renderer* rend, char str[], float off[], 
    SDL_Texture *texsmall);
    
#endif