-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_render.h
50 lines (41 loc) · 979 Bytes
/
p_render.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
40
41
42
43
44
45
46
47
48
49
50
#include <allegro5/allegro.h>
#include <allegro5/allegro_audio.h>
#include <allegro5/allegro_acodec.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_primitives.h>
#define SPRITE_BUFFER_SIZE 1024
#define ZBUFFER_SIZE 1920
typedef struct game_s game_t;
typedef struct render_s
{
ALLEGRO_FONT * font;
char captions[128];
long cap_timer;
long cap_height;
} render_t;
typedef struct sprite_s
{
long mx, my;
float x, y, z;
uint8_t txt;
} sprite_t;
/*
Objects that are renderable, must be
instanciated in viz(buffer) list in
game object
*/
typedef struct viz_s
{
struct viz_s * next;
float * x;
float * y;
uint8_t txt;
} viz_t;
void p_render_init (proc_t * self);
void p_render_update (proc_t * self);
void p_render_dtor (proc_t * self);
viz_t * viz_ctor (game_t * game);
void viz_dtor (game_t * game);
void render_use_captions (pm_t * pm, char * msg, long time);