aboutsummaryrefslogtreecommitdiff
path: root/render/render_text.h
blob: e7474fffc96792a62015f137cfdb0c5a1b192fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#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);
    
#endif