summary refs log tree commit diff stats
path: root/tools/util
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-08-09 11:51:20 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-08-09 11:51:20 -0400
commit9ca8681ca5f134d65eaa4b5ae68d57ba67fe98d6 (patch)
tree6d58ffe2e9a60eac681b22b0cb0bd03baf74990c /tools/util
parent3fcc676cd3b9b3b24a8755612a459d498879b1df (diff)
downloadlingo2-archipelago-9ca8681ca5f134d65eaa4b5ae68d57ba67fe98d6.tar.gz
lingo2-archipelago-9ca8681ca5f134d65eaa4b5ae68d57ba67fe98d6.tar.bz2
lingo2-archipelago-9ca8681ca5f134d65eaa4b5ae68d57ba67fe98d6.zip
Added support for masteries
Also assigned IDs for the_butterfly, as well as already configured
letters.
Diffstat (limited to 'tools/util')
-rw-r--r--tools/util/CMakeLists.txt5
-rw-r--r--tools/util/naming.cpp11
-rw-r--r--tools/util/naming.h8
3 files changed, 24 insertions, 0 deletions
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 @@
1add_library(util
2 naming.cpp
3)
4set_property(TARGET util PROPERTY CXX_STANDARD 20)
5set_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 @@
1#include "naming.h"
2
3#include <sstream>
4
5std::string GetLetterName(std::string key, bool double_) {
6 std::ostringstream lettername_s;
7 lettername_s << key;
8 lettername_s << (double_ ? "2" : "1");
9
10 return lettername_s.str();
11}
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 @@
1#ifndef TOOLS_UTIL_NAMING_H_
2#define TOOLS_UTIL_NAMING_H_
3
4#include <string>
5
6std::string GetLetterName(std::string key, bool double_);
7
8#endif /* TOOLS_UTIL_NAMING_H_ */