Move tile implementation to tile.cpp
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#include "tile.hpp"
|
||||
|
||||
const std::map<std::string_view, Tile> tile_types = {
|
||||
{"Grass", {1.0, 0, 200, 0, 255}},
|
||||
{"Mud", {2.0, 100, 100, 100, 255}},
|
||||
{"Road", {0.5, 200, 200, 200, 255}},
|
||||
{"Water", {10.0, 0, 50, 200, 255}},
|
||||
};
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <string_view>
|
||||
#include <cstdint>
|
||||
|
||||
struct Tile {
|
||||
float cost;
|
||||
uint8_t R, G, B, A;
|
||||
};
|
||||
|
||||
static const std::map<std::string_view, Tile> tile_types = {
|
||||
{"Grass", {1.0, 0, 200, 0, 255}},
|
||||
{"Mud", {2.0, 100, 100, 100, 255}},
|
||||
{"Road", {0.5, 200, 200, 200, 255}},
|
||||
{"Water", {10.0, 0, 50, 200, 255}},
|
||||
};
|
||||
|
||||
extern const std::map<std::string_view, Tile> tile_types;
|
||||
|
||||
Reference in New Issue
Block a user