-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMap.h
More file actions
38 lines (36 loc) · 1.42 KB
/
Map.h
File metadata and controls
38 lines (36 loc) · 1.42 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
#pragma once
#include <SFML/Graphics.hpp>
#include "Header.h"
#include "AnimatedTield.h"
class Map
{
private:
sf::Image image; sf::Texture texture; sf::Sprite sprite;
int heightMap, widthMap;
int tieldWidth, tieldHeight;
sf::String* tieldMaps{ nullptr };
std::vector<AnimatedTield*> animatedTields;
std::vector<std::pair<UtilitiesGame::TextureData, UtilitiesGame::SizeXY>> movementTexturesAndSizeXY;
public:
Map(const sf::String& ImageFolder, int heightMap, int widthMap, int amountTiledsMap);
~Map();
bool setPosBG(int w, int h);
void loadLevel(const sf::String& mapTiledsPosition, const sf::String& tileds);
void updateMap(sf::RenderWindow* window);
void setSizeMap(int heightMap, int widthMap);
const int getHeightMap();
const int getWidthMap();
void setMap(sf::String* tieldMaps, int sizeWidht, int sizeHeight);
sf::Sprite getSprite();
std::vector<std::pair<sf::Sprite, int>> magicTieldsVector;//std::pair<sf::Sprite, std::pair<int, int>> action
//std::vector<sf::Sprite> TieldsVector;
const int getTieldWidth(); const int getTieldHeight();
private:
void tieldsSettings(int amountTieldsMap);
void loadMap();
void animationTields(sf::RenderWindow* window);
void addWallObject(sf::Sprite& sprite, int jTields, int iTields);
void addAnimationObject(sf::Sprite& sprite, int jTields, int iTields, int number);
void loadObjectAnimations();
void addAnimatedTexture(const sf::String& fileFolder, int maxFrameX, int maxFrameY);
};