]> git.lizzy.rs Git - nothing.git/blob - src/camera.h
Merge pull request #124 from tsoding/117
[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_fill_rect(const camera_t *camera,
15                      SDL_Renderer *render,
16                      rect_t rect,
17                      color_t color);
18
19 int camera_draw_rect(const camera_t * camera,
20                      SDL_Renderer *render,
21                      rect_t rect,
22                      color_t color);
23
24 int camera_draw_triangle(const camera_t *camera,
25                          SDL_Renderer *render,
26                          triangle_t t,
27                          color_t color);
28
29 int camera_fill_triangle(const camera_t *camera,
30                          SDL_Renderer *render,
31                          triangle_t t,
32                          color_t color);
33
34 void camera_center_at(camera_t *camera, point_t position);
35
36 void camera_toggle_debug_mode(camera_t *camera);
37
38 void camera_toggle_blackwhite_mode(camera_t *camera);
39
40 #endif  // CAMERA_H_