]> git.lizzy.rs Git - nothing.git/blob - src/game/camera.h
Clean up create_sprite_font_from_file
[nothing.git] / src / game / camera.h
1 #ifndef CAMERA_H_
2 #define CAMERA_H_
3
4 #include "color.h"
5 #include "game/sprite_font.h"
6 #include "math/point.h"
7 #include "math/rect.h"
8 #include "math/triangle.h"
9
10 typedef struct camera_t camera_t;
11
12 camera_t *create_camera(SDL_Renderer *renderer,
13                         sprite_font_t *font);
14 void destroy_camera(camera_t *camera);
15
16 int camera_clear_background(camera_t *camera,
17                             color_t color);
18
19 int camera_fill_rect(camera_t *camera,
20                      rect_t rect,
21                      color_t color);
22
23 int camera_draw_rect(camera_t * camera,
24                      rect_t rect,
25                      color_t color);
26
27 int camera_draw_triangle(camera_t *camera,
28                          triangle_t t,
29                          color_t color);
30
31 int camera_fill_triangle(camera_t *camera,
32                          triangle_t t,
33                          color_t color);
34
35 int camera_render_text(camera_t *camera,
36                        const char *text,
37                        int size,
38                        color_t color,
39                        vec_t position);
40
41 void camera_center_at(camera_t *camera, point_t position);
42
43 void camera_toggle_debug_mode(camera_t *camera);
44 void camera_disable_debug_mode(camera_t *camera);
45
46 void camera_toggle_blackwhite_mode(camera_t *camera);
47
48 int camera_is_point_visible(const camera_t *camera, point_t p);
49
50 rect_t camera_view_port(const camera_t *camera);
51
52 #endif  // CAMERA_H_