-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEngine.h
54 lines (47 loc) · 1008 Bytes
/
Engine.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef Engine_H
#define Engine_H
#include <ncurses.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <chrono>
#include <math.h>
#include <iostream>
using namespace std;
//wymiary ekranu
const int nScreenWidth = 140;
const int nScreenHeight = 45;
class Engine{
char buffer[nScreenHeight][nScreenWidth];
//wchar_t buffer[nScreenHeight][nScreenWidth];
char colorMap[nScreenHeight][nScreenWidth];
wstring map;
vector <string> wallTexture;
//Gracz
struct player {
float X;
float Y;
float Angle;
float FOV;
float Speed;
};
player Player;
float MaxRenderDistance;
int wallRodzaj;
//wymiary mapy
int MapWidth;
int MapHeight;
public:
void Init();
void InitMap();
void MainLoop();
private:
void FillEmpty();
void DrawInfo(float);
void DrawMap();
void DrawBoard();
char PlayerMove(float);
void RayCasting(float &,float &,bool &,bool &,float &,float &, int&,int&);
void Shading(float, int, int, bool, int, float);
};
#endif