2024-09-16 06:50:47 -05:00

45 lines
798 B
C++

// Copyright (c) 2024 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "dawnlibs.hpp"
#define CHUNK_WIDTH 32
#define CHUNK_HEIGHT 32
#define CHUNK_DEPTH 8
namespace Dawn {
struct ChunkPosition {
int32_t x;
int32_t y;
int32_t z;
ChunkPosition operator-(const ChunkPosition &other) const {
return {
this->x - other.x,
this->y - other.y,
this->z - other.z
};
}
};
enum class TileID : uint16_t {
Null = 0,
Test = 1
};
struct Tile {
enum TileID id;
};
class Chunk {
public:
struct ChunkPosition position;
struct Tile tiles[CHUNK_WIDTH][CHUNK_HEIGHT][CHUNK_DEPTH];
Chunk();
~Chunk();
};
}