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