-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsdlwrapper.h
More file actions
41 lines (36 loc) · 1.09 KB
/
sdlwrapper.h
File metadata and controls
41 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include <iostream>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <assert.h>
namespace paint
{
void setColor(Uint8 r, Uint8 g, Uint8 b);
void drawPixel(int x, int y);
void drawLine(int x1, int y1, int x2, int y2);
void drawFillRect(int x, int y, int w, int h);
void drawFillCircle(int x, int y, int radius);
void drawFile(int x, int y, int w, int h, const char* file);
void drawText(int x, int y, int size, const char* text);
void updateGraphics();
void waitKeypress(int key = 27);
namespace turtle
{
struct Pen
{
double x;
double y;
bool down;
double angle; /*dgrees*/
};
void down();
void up();
void forward(double distance);
void backward(double distance);
void left(double a);
void right(double a);
void turnto(double a);
void jump(double x, double y);
}
}