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