38 lines
695 B
Plaintext
38 lines
695 B
Plaintext
////////////////////////////////////////////////////////////
|
|
//~ Tile types
|
|
|
|
#define S_WorldSize 96
|
|
|
|
#define S_TilesXMacro(X) \
|
|
X(Empty) \
|
|
X(Floor) \
|
|
X(Wall) \
|
|
/* -------------------- */
|
|
|
|
// Tiles enum
|
|
#define X(name, ...) S_TileKind_##name,
|
|
Enum(S_TileKind)
|
|
{
|
|
S_TilesXMacro(X)
|
|
S_TileKind_Count
|
|
};
|
|
#undef X
|
|
|
|
Enum(S_TilePlacementKind)
|
|
{
|
|
S_TilePlacementKind_Range
|
|
};
|
|
|
|
Struct(S_TilePlacement)
|
|
{
|
|
S_TilePlacementKind placement_kind;
|
|
S_TileKind tile_kind;
|
|
Rng2I32 range;
|
|
};
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//~ Tile helpers
|
|
|
|
Vec2I32 S_TilePosFromWorldPos(Vec2 p);
|
|
i32 S_TileIdxFromTilePos(Vec2I32 p);
|