chunks,blocks/nodes/...
parent
c5118895dc
commit
5624a72b9a
|
@ -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
|
||||
|
||||
}
|
|
@ -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 "protocol.hpp"
|
||||
#include "chunk.hpp"
|
||||
#include <string>
|
||||
#include <irrlicht.h>
|
||||
#include <map>
|
||||
|
@ -34,7 +35,8 @@ namespace bvclient {
|
|||
using namespace io;
|
||||
using namespace gui;
|
||||
|
||||
class Chunk;
|
||||
typedef bvmap::Chunk Chunk;
|
||||
typedef bvmap::Node Node;
|
||||
typedef std::shared_ptr<Chunk> chunkPtr;
|
||||
typedef std::map<std::string,chunkPtr> chunkMap;
|
||||
typedef std::map<std::string,int> userMap;
|
||||
|
|
Loading…
Reference in New Issue