From 9ca8681ca5f134d65eaa4b5ae68d57ba67fe98d6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 9 Aug 2025 11:51:20 -0400 Subject: Added support for masteries Also assigned IDs for the_butterfly, as well as already configured letters. --- tools/util/CMakeLists.txt | 5 +++++ tools/util/naming.cpp | 11 +++++++++++ tools/util/naming.h | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 tools/util/CMakeLists.txt create mode 100644 tools/util/naming.cpp create mode 100644 tools/util/naming.h (limited to 'tools/util') diff --git a/tools/util/CMakeLists.txt b/tools/util/CMakeLists.txt new file mode 100644 index 0000000..8eb8d3b --- /dev/null +++ b/tools/util/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(util + naming.cpp +) +set_property(TARGET util PROPERTY CXX_STANDARD 20) +set_property(TARGET util PROPERTY CXX_STANDARD_REQUIRED ON) diff --git a/tools/util/naming.cpp b/tools/util/naming.cpp new file mode 100644 index 0000000..12594c5 --- /dev/null +++ b/tools/util/naming.cpp @@ -0,0 +1,11 @@ +#include "naming.h" + +#include + +std::string GetLetterName(std::string key, bool double_) { + std::ostringstream lettername_s; + lettername_s << key; + lettername_s << (double_ ? "2" : "1"); + + return lettername_s.str(); +} diff --git a/tools/util/naming.h b/tools/util/naming.h new file mode 100644 index 0000000..7d61309 --- /dev/null +++ b/tools/util/naming.h @@ -0,0 +1,8 @@ +#ifndef TOOLS_UTIL_NAMING_H_ +#define TOOLS_UTIL_NAMING_H_ + +#include + +std::string GetLetterName(std::string key, bool double_); + +#endif /* TOOLS_UTIL_NAMING_H_ */ -- cgit 1.4.1