25 lines
643 B
C
25 lines
643 B
C
// blockTypes.h
|
|
#ifndef BLOCK_TYPES_H
|
|
#define BLOCKTYPES_H
|
|
|
|
// Definitions for Block IDs (notes are texture atlas indicies)
|
|
#define BLOCK_AIR 0 // No texture.
|
|
#define BLOCK_STONE 1 // 0
|
|
#define BLOCK_DIRT 2 // 1
|
|
#define BLOCK_GRASS 3 // top, 2, sides 3, bottom 1
|
|
#define BLOCK_SAND 4 // 4
|
|
#define BLOCK_GRAVEL 5 // 5
|
|
#define BLOCK_LOG 6 // top 6, sides 7, bottom 6
|
|
#define BLOCK_LEAF 7 // 8
|
|
#define BLOCK_PLANK 8 // 9
|
|
|
|
typedef struct {
|
|
int id;
|
|
const char *name;
|
|
int faceTiles[6]; // Index by face: 0=-X, 1=+X, 2=-Y, 3=+Y, 4=-Z, 5=+Z
|
|
} BlockType;
|
|
|
|
const BlockType *GetBlockType(int blockID);
|
|
|
|
#endif
|