Modularise drawing code a little

This commit is contained in:
2022-11-15 05:10:26 +11:00
parent 2fa6be7780
commit 160defe951
4 changed files with 157 additions and 111 deletions

17
draw.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef DRAW_H
#define DRAW_H
#include <stdint.h>
typedef struct SDL_Renderer SDL_Renderer;
extern SDL_Renderer* rend;
void SetDrawColour(uint32_t c);
void DrawClear(void);
void DrawPoint(int x, int y);
void DrawRect(int x, int y, int w, int h);
void DrawLine(int x1, int y1, int x2, int y2);
void DrawCircle(int x, int y, int r);
void DrawCircleSteps(int x, int y, int r, int steps);
#endif//DRAW_H