From f215d88305b914b6f8afdf4b360b116054589211 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Mon, 10 Feb 2025 18:54:06 +0100 Subject: Implemented support for item replacements Specifying an unknown sprite or direction is reported as error and will not cause any replacements. Specific item replacements are supported also when not specifying the sprite. Replacements do not affect particle effects. Part of https://git.themanaworld.org/mana/mana/-/issues/92 --- src/utils/stringutils.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/utils') diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h index 8781a9c4..ca54803d 100644 --- a/src/utils/stringutils.h +++ b/src/utils/stringutils.h @@ -149,6 +149,11 @@ inline void fromString(const char *str, std::string &value) value = str; } +inline void fromString(const char *str, std::string_view &value) +{ + value = str; +} + inline void fromString(const char *str, int &value) { value = atoi(str); -- cgit v1.2.3-70-g09d2