-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw.h
17 lines (13 loc) · 733 Bytes
/
draw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef _DRAW_H_
#define _DRAW_H_
#include <vector>
#include <cstdint>
#include <string>
#include "render.h"
void draw_rectangle(std::vector<uint32_t> &image, const uint32_t &color, const uint16_t &x1, const uint16_t &y1, const uint16_t &x2, const uint16_t &y2, const size_t win_w);
void drop_ppm_image(const std::string filename, const std::vector<uint32_t> &image, const size_t w, const size_t h);
void unpack_color(const uint32_t &color, uint8_t &r, uint8_t &g, uint8_t &b, uint8_t &a);
uint32_t pack_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t a=255);
void print_progress(uint8_t frame, uint8_t frames);
void animation(SDL_Renderer* SDLrender, Render* renderer, Movement m, uint32_t frames);
#endif