mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-04 22:59:07 +02:00
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:
parent
12b5cb4f4e
commit
de04cce993
3 changed files with 11 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue