chunks,blocks/nodes/...
This commit is contained in:
parent
c5118895dc
commit
5624a72b9a
26
blockiverse/chunk.cpp
Normal file
26
blockiverse/chunk.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
**
|
||||||
|
** Minetest-Blockiverse
|
||||||
|
**
|
||||||
|
** Incorporates portions of code from minetest 0.4.10-dev
|
||||||
|
**
|
||||||
|
** Blockiverse
|
||||||
|
** Copyright (C) 2014 Brian Jack <gau_veldt@hotmail.com>
|
||||||
|
** Distributed as free software using the copyleft
|
||||||
|
** LGPL Version 3 license:
|
||||||
|
** https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||||
|
** See file LICENSE in ../
|
||||||
|
**
|
||||||
|
** Implementation file chunk.cpp
|
||||||
|
**
|
||||||
|
** Blocks and chunks
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "chunk.hpp"
|
||||||
|
|
||||||
|
namespace bvmap {
|
||||||
|
|
||||||
|
// code here
|
||||||
|
|
||||||
|
}
|
40
blockiverse/chunk.hpp
Normal file
40
blockiverse/chunk.hpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
**
|
||||||
|
** Minetest-Blockiverse
|
||||||
|
**
|
||||||
|
** Incorporates portions of code from minetest 0.4.10-dev
|
||||||
|
**
|
||||||
|
** Blockiverse
|
||||||
|
** Copyright (C) 2014 Brian Jack <gau_veldt@hotmail.com>
|
||||||
|
** Distributed as free software using the copyleft
|
||||||
|
** LGPL Version 3 license:
|
||||||
|
** https://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||||
|
** See file LICENSE in ../
|
||||||
|
**
|
||||||
|
** Declaration (header) file chunk.hpp
|
||||||
|
**
|
||||||
|
** Declarations for chunks and blocks
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
#ifndef BV_CHUNK_HPP_INCLUDED
|
||||||
|
#define BV_CHUNK_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
namespace bvmap {
|
||||||
|
|
||||||
|
|
||||||
|
class Node {
|
||||||
|
public:
|
||||||
|
uint16_t blockId; // 0=air/space
|
||||||
|
uint8_t blkLight;
|
||||||
|
uint8_t flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Chunk {
|
||||||
|
Node cells[16*16*16];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // BV_CHUNK_HPP_INCLUDED
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "protocol.hpp"
|
#include "protocol.hpp"
|
||||||
|
#include "chunk.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <irrlicht.h>
|
#include <irrlicht.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -34,7 +35,8 @@ namespace bvclient {
|
|||||||
using namespace io;
|
using namespace io;
|
||||||
using namespace gui;
|
using namespace gui;
|
||||||
|
|
||||||
class Chunk;
|
typedef bvmap::Chunk Chunk;
|
||||||
|
typedef bvmap::Node Node;
|
||||||
typedef std::shared_ptr<Chunk> chunkPtr;
|
typedef std::shared_ptr<Chunk> chunkPtr;
|
||||||
typedef std::map<std::string,chunkPtr> chunkMap;
|
typedef std::map<std::string,chunkPtr> chunkMap;
|
||||||
typedef std::map<std::string,int> userMap;
|
typedef std::map<std::string,int> userMap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user