Shuffling the map stuff around to make more sense structurally. Also shrunk the scope of the demos wayyyy down to facilitate easier debugging in my next planned steps
This commit is contained in:
35
include/map/ArrayMap.h
Normal file
35
include/map/ArrayMap.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
#include<SFML/Graphics.hpp>
|
||||
#include <algorithm>
|
||||
#include "util.hpp"
|
||||
#include <random>
|
||||
#include <functional>
|
||||
|
||||
class ArrayMap {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ArrayMap(sf::Vector3i dimensions);
|
||||
~ArrayMap();
|
||||
|
||||
char getVoxel(sf::Vector3i position);
|
||||
void setVoxel(sf::Vector3i position, char value);
|
||||
sf::Vector3i getDimensions();
|
||||
|
||||
// =========== DEBUG =========== //
|
||||
char* getDataPtr();
|
||||
|
||||
std::vector<std::tuple<sf::Vector3i, char>> ArrayMap::CastRayCharArray(
|
||||
char* map,
|
||||
sf::Vector3i* map_dim,
|
||||
sf::Vector2f* cam_dir,
|
||||
sf::Vector3f* cam_pos
|
||||
);
|
||||
|
||||
private:
|
||||
|
||||
char *voxel_data;
|
||||
sf::Vector3i dimensions;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user