| 1 | #include "BlockDatabase.h" |
| 2 | |
| 3 | BlockDatabase::BlockDatabase() |
| 4 | : textureAtlas("DefaultPack") |
| 5 | { |
| 6 | m_blocks[(int)BlockId::Air] = std::make_unique<DefaultBlock>("Air"); |
| 7 | m_blocks[(int)BlockId::Grass] = std::make_unique<DefaultBlock>("Grass"); |
| 8 | m_blocks[(int)BlockId::Dirt] = std::make_unique<DefaultBlock>("Dirt"); |
| 9 | m_blocks[(int)BlockId::Stone] = std::make_unique<DefaultBlock>("Stone"); |
| 10 | m_blocks[(int)BlockId::OakBark] = std::make_unique<DefaultBlock>("OakBark"); |
| 11 | m_blocks[(int)BlockId::OakLeaf] = std::make_unique<DefaultBlock>("OakLeaf"); |
| 12 | m_blocks[(int)BlockId::Sand] = std::make_unique<DefaultBlock>("Sand"); |
| 13 | m_blocks[(int)BlockId::Water] = std::make_unique<DefaultBlock>("Water"); |
| 14 | m_blocks[(int)BlockId::Cactus] = std::make_unique<DefaultBlock>("Cactus"); |
| 15 | m_blocks[(int)BlockId::TallGrass] = |
| 16 | std::make_unique<DefaultBlock>("TallGrass"); |
| 17 | m_blocks[(int)BlockId::Rose] = std::make_unique<DefaultBlock>("Rose"); |
| 18 | m_blocks[(int)BlockId::DeadShrub] = |
| 19 | std::make_unique<DefaultBlock>("DeadShrub"); |
| 20 | } |
| 21 | |
| 22 | BlockDatabase &BlockDatabase::get() |
| 23 | { |
nothing calls this directly
no outgoing calls
no test coverage detected