-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.hpp
83 lines (64 loc) · 1.92 KB
/
map.hpp
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#pragma once
#include "DxLib.h"
#include <vector>
#include <string>
#include <map>
#include <cmath>
#include "ExternalHeaderFiles/json.hpp"
#include "ExternalHeaderFiles/strconv.h"
#include "sprite.hpp"
// monsters
#include "monsters/flower_plant.hpp"
#include "monsters/slime.hpp"
#include "monsters/golem.hpp"
#include "monsters/bat.hpp"
#include "monsters/tree.hpp"
#include "monsters/virus.hpp"
class ball;
class flower_plant;
class slime;
class golem;
class bat;
class tree;
class virus;
using json = nlohmann::json;
class map {
private:
json Config;
std::vector<ball> *Ball;
player *Player;
json Maps;
std::vector<std::vector<int>> Map{13};
std::string Text;
std::vector<flower_plant> *FlowerPlant;
std::vector<slime> *Slime;
std::vector<golem> *Golem;
std::vector<bat> *Bat;
std::vector<tree> *Tree;
std::vector<virus> *Virus;
enum monsters {
FLOWER_PLANT, SLIME, GOLEM, BAT, TREE, VIRUS,
MONSTERS_NUM };
int Stage = 0;
std::map<std::string, std::map<std::string, int>> Graph;
std::map<std::string, int> Font;
int ClearCount = 0;
public:
enum block {
AIR, WALL, STONE, POND
};
enum direction {
UP, DOWN, LEFT, RIGHT
};
std::vector<bool> Collision(sprite *Sprite, std::vector<bool> Block);
std::vector<int> GetSidePos();
bool GetInMap(sprite Sprite);
void Draw(int Scroll);
int GetStage();
void Clear();
void ClearCancel();
bool GetClear();
void NextStage();
map();
map(json Maps, std::map<std::string, std::map<std::string, int>> Graph, std::map<std::string, int> Font, std::vector<flower_plant> *FlowerPlant, std::vector<slime> *Slime, std::vector<golem> *Golem, std::vector<bat> *Bat, std::vector<tree> *Tree, std::vector<virus> *Virus, std::vector<ball> *Ball, player *Player, json Config);
};