blob: 413f924fd8f713e3cf6f0783375f2a310c013bcf (
plain)
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
|
#ifndef _SDL_CARTESIAN_H_
#define _SDL_CARTESIAN_H_
#include "./Math.h"
#include "./destructive_reasoning.h"
#include "SDL2/SDL.h"
class SDL_Cartesian
{
public:
SDL_Cartesian(int width, int height, std::vector<std::string> functions);
SDL_Cartesian(int width, int height, std::string infix);
~SDL_Cartesian();
virtual void update();
virtual void render();
virtual void run();
int scrollSpeed;
protected:
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Event mainEvent;
SDL_Texture *texture;
Uint32 *pixels;
std::vector<std::string> functions;
std::vector<std::string> rpn;
int width;
int height;
double xScale;
double yScale;
int xOffset;
int yOffset;
bool running;
Coordinate last;
Coordinate next;
const Uint8 *keys;
};
#endif
|