2025-10-28 14:00:01 +01:00

33 lines
613 B
C++

#ifndef MAP_HPP
#define MAP_HPP
#include <vector>
#include "Tile.hpp"
#include "Sprite.hpp"
#include "GameRenderer.hpp"
class Map
{
private:
GameRenderer *renderer;
std::vector<std::vector<Tile>> tiles;
Sprite grass_sprite;
Sprite path_sprite;
[[nodiscard]] std::vector<Tile> generate_tiles(const std::vector<Tile> &prev_tiles) const;
public:
double tile_offset_x;
double tile_offset_y;
int tile_size;
Map(GameRenderer *renderer, int tile_size);
void draw(double player_x, double player_y) const;
void check_bounds(double player_x, double player_y);
};
#endif