36 lines
635 B
C++
36 lines
635 B
C++
// nooncraft.block: Block data in world map and general block information
|
|
|
|
#pragma once
|
|
#include "item.h"
|
|
#include "render.h"
|
|
#include <cstdint>
|
|
|
|
using Block = uint16_t;
|
|
|
|
enum class Breakability: uint8_t {
|
|
Fluid,
|
|
ByAnything,
|
|
ByTool,
|
|
Unbreakable,
|
|
};
|
|
|
|
/* General information on blocks */
|
|
struct BlockInfo
|
|
{
|
|
char const *name;
|
|
|
|
// TODO: Upgrade to random and/or dimension-specific sprites
|
|
GlyphCluster cluster;
|
|
|
|
Breakability breakability;
|
|
ToolKind toolKind;
|
|
int16_t baseBreakDurationTicks;
|
|
bool walkable;
|
|
};
|
|
|
|
namespace Nooncraft {
|
|
|
|
BlockInfo *getBlockInfo(Block b);
|
|
|
|
} /* namespace Nooncraft */
|