-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNormalMap.h
More file actions
59 lines (43 loc) · 1.14 KB
/
NormalMap.h
File metadata and controls
59 lines (43 loc) · 1.14 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include "Map.h"
class NormalMap : public virtual Map
{
public:
NormalMap(int rows, int colls, Difficulty difficulty, Surface& screen);
void AddRow(bool empty = false) override;
void Move(float deltaTime) override;
void Draw() override;
bool IsWin() override;
/// <summary>
/// Get the total time in mm:ss:ms format
/// </summary>
char* GetTotalTime();
// Get total time in milliseconds
float GetTotalTimeMs() const { return total_time; }
private:
// Distance between flags
int DISTANCE;
// Flags count * distance between flags
int flags_counter;
// Max flags shown per frame
int max_flags_shown_per_frame;
// Is finish line drawn
bool finish_drawn = false;
// Is a flag missed
bool missed_flag = false;
// Total time since game start
float total_time = 0.0f;
// Check if player hits object
bool CheckPos(int x, int y);
/// <summary>
/// Check if flag is missed
/// </summary>
/// <param name="x">Player X</param>
/// <param name="y">Player Y</param>
/// <returns>False if flag is missed else true</returns>
bool CheckFlag(int x, int y);
// Draw player
void DrawPlayer();
// PrintTime
void PrintTime();
};