fixes and optimizations

This commit is contained in:
Andrew Haynes Macbook
2026-01-09 14:56:59 -05:00
parent b5a79de6c0
commit 1fa3293df0
11 changed files with 163 additions and 296 deletions
+6 -12
View File
@@ -1,10 +1,11 @@
#ifndef MAPS_HPP
#define MAPS_HPP
#include "elements.hpp"
#include "globals.hpp"
#include <SFML/Graphics/RenderWindow.hpp>
#include <array>
#include "globals.hpp"
#include "elements.hpp"
struct Level {
char data[MAX_ROWS][MAX_COLS];
@@ -12,15 +13,8 @@ struct Level {
};
extern Level levels[];
extern const char map[MAX_ROWS][MAX_COLS];
void clear_map(std::array<std::array<Entity*, MAX_COLS>, MAX_ROWS> wall_list);
void load_map(std::array<std::array<Entity*, MAX_COLS>, MAX_ROWS> wall_list, const std::array<std::array<char, MAX_COLS>, MAX_ROWS> map_data);
std::array<std::array<char, MAX_COLS>, MAX_ROWS> create_map(sf::RenderWindow &window,
sf::Vector2i &local_position,
sf::Vector2i &start_mouse_pos,
sf::Vector2i &end_mouse_pos,
bool &dragging,
bool &prev_dragging,
std::array<std::array<Entity*, MAX_COLS>, MAX_ROWS> wall_list);
void clear_map(std::array<std::array<Entity*, MAX_COLS>, MAX_ROWS>& wall_list);
void load_map(std::array<std::array<Entity*, MAX_COLS>, MAX_ROWS>& wall_list, const char map_data[MAX_ROWS][MAX_COLS]);
#endif