Move ressource files to a separate directory

This commit is contained in:
Matthias Schiffer 2015-02-02 00:31:52 +01:00
parent 843b3abde6
commit 22b9cfcb8b
8 changed files with 12 additions and 13 deletions

View file

@ -4,9 +4,9 @@ link_directories(${ZLIB_LIBRARY_DIRS} ${LIBPNG_LIBRARY_DIRS})
add_executable(MinedMap
MinedMap.cpp
NBT/Tag.cpp
World/Biome.cpp
Resource/Biome.cpp
Resource/BlockType.cpp
World/Block.cpp
World/BlockType.cpp
World/Chunk.cpp
World/Region.cpp
)

View file

@ -24,7 +24,6 @@
*/
#include "World/BlockType.hpp"
#include "World/Region.hpp"
#include "NBT/ListTag.hpp"

View file

@ -28,7 +28,7 @@
namespace MinedMap {
namespace World {
namespace Resource {
const Biome BIOMES[256] = {
/* 0 */ {0.25, 1, 0.25},

View file

@ -27,7 +27,7 @@
#pragma once
namespace MinedMap {
namespace World {
namespace Resource {
struct Biome {
float r, g, b;

View file

@ -28,7 +28,7 @@
namespace MinedMap {
namespace World {
namespace Resource {
const BlockType BLOCK_TYPES[256] = {
{false, false, {0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,}}, /* 0 */

View file

@ -29,7 +29,7 @@
#include <cstdint>
namespace MinedMap {
namespace World {
namespace Resource {
struct BlockType {
bool opaque;

View file

@ -25,15 +25,15 @@
#include "Block.hpp"
#include "BlockType.hpp"
#include "Biome.hpp"
#include "../Resource/BlockType.hpp"
#include "../Resource/Biome.hpp"
namespace MinedMap {
namespace World {
uint32_t Block::getColor() const {
const World::BlockType &t = World::BLOCK_TYPES[id];
const Resource::BlockType &t = Resource::BLOCK_TYPES[id];
if (!t.opaque)
return 0;
@ -54,7 +54,7 @@ uint32_t Block::getColor() const {
b *= lightCoef * heightCoef;
if (t.green) {
const Biome &biomeDef = BIOMES[biome];
const Resource::Biome &biomeDef = Resource::BIOMES[biome];
r *= biomeDef.r;
g *= biomeDef.g;

View file

@ -25,7 +25,7 @@
#include "Chunk.hpp"
#include "BlockType.hpp"
#include "../Resource/BlockType.hpp"
#include <iostream>
#include <stdexcept>
@ -152,7 +152,7 @@ Chunk::Blocks Chunk::getTopLayer() const {
continue;
uint8_t id = getBlockAt(x, y, z);
if (!BLOCK_TYPES[id].opaque)
if (!Resource::BLOCK_TYPES[id].opaque)
continue;
Block &b = ret.blocks[x][z];