-
Notifications
You must be signed in to change notification settings - Fork 1
/
textout.h
executable file
·39 lines (29 loc) · 913 Bytes
/
textout.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _TEXTOUT_H_
#define _TEXTOUT_H_
#include "texture.h"
class textout_t
{
private:
texture_t font_map;
//float tx; // changes as the DrawChar goes
//float ty; // >>
void SetGL(); // set gl state machine
void RestoreGL(); // restor only the matrices
void DrawChar( char c );
public:
float font_w;
float font_h;
float color[3];
bool italic;
float x;
float y;
void Init(); // exec after init SDL
void SetAll( float x_, float y_, float font_w_, float font_h_, float red, float green, float blue, bool italic_ );
void SetColor( float red, float green, float blue ) { color[0]=red; color[1]=green; color[2]=blue; }
void SetPos( float x_, float y_ ){ x=x_; y=y_; };
void SetFontW( float w_ );
void Printf( const char* format, ... );
void Print( const char* str );
};
extern textout_t tout;
#endif