From c298eb988874bc2cf3adb39c2532419ec76a24bc Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Thu, 2 Sep 2021 10:13:25 +0200 Subject: all imp sprites + train problems solved --- game/entity.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'game/entity.cpp') diff --git a/game/entity.cpp b/game/entity.cpp index 8362c40..f127150 100644 --- a/game/entity.cpp +++ b/game/entity.cpp @@ -1,3 +1,11 @@ #include "entity.h" #include -; \ No newline at end of file + + +int EntityClass::from_string (std::string str) { + if (str == "inf") return EntityInfo::Class::inf; + if (str == "cav") return EntityInfo::Class::cav; + if (str == "ran") return EntityInfo::Class::ran; + if (str == "sie") return EntityInfo::Class::sie; + if (str == "bld") return EntityInfo::Class::bld; +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf