mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
* feat: add grass texture and update grass_block texture * feat: add block data * feat: add blocks_tool * feat: add sync info and change function in blocks_tools * feat: add check and new function * refactor: make block texture loading data-driven * feat: add rendering for grass * feat: passable grass * feat: random grass place * fix: memory leak in TextureManager::load_cross_plane_texture
26 lines
695 B
C++
26 lines
695 B
C++
#pragma once
|
|
// #include <string>
|
|
// #include <unordered_map>
|
|
// #include <vector>
|
|
namespace Cubed {
|
|
|
|
class MapTable {
|
|
private:
|
|
/*
|
|
static inline std::unordered_map<unsigned, std::string> id_to_name_map;
|
|
static inline std::unordered_map<size_t, unsigned> name_to_id_map;
|
|
static inline std::vector<std::string> item_id_to_name;
|
|
*/
|
|
public:
|
|
// please using reference
|
|
/*
|
|
static std::string_view get_name_from_id(unsigned id);
|
|
static unsigned get_id_from_name(const std::string& name);
|
|
|
|
static std::string_view item_name(unsigned id);
|
|
static const std::vector<std::string>& item_map();
|
|
*/
|
|
static void init_map();
|
|
};
|
|
|
|
} // namespace Cubed
|