World/Block: return colors as struct instead of uint32_t

Gets rid of a useless byte switch, and removes the arpa/inet.h include,
which is not available on Windows.
This commit is contained in:
Matthias Schiffer 2018-07-26 23:14:03 +02:00
parent 12b5cb4f4e
commit de04cce993
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 11 additions and 8 deletions

View file

@ -34,13 +34,17 @@ namespace MinedMap {
namespace World {
struct Block {
struct Color {
uint8_t r, g, b, a;
};
const Resource::BlockType *type;
unsigned height;
uint8_t blockLight;
uint8_t biome;
uint32_t getColor() const;
Color getColor() const;
operator bool() const {
return type;