From bc9fc25799efe5e094c7a984d8da74bc611035af Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sun, 26 May 2024 14:41:10 -0700 Subject: [PATCH] add number as well as name for when --- src/Episode3/DataIndexes.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Episode3/DataIndexes.cc b/src/Episode3/DataIndexes.cc index 340a0262..d8620a40 100644 --- a/src/Episode3/DataIndexes.cc +++ b/src/Episode3/DataIndexes.cc @@ -109,8 +109,8 @@ bool Location::operator!=(const Location& other) const { } std::string Location::str() const { - return string_printf("Location[x=%hhu, y=%hhu, dir=%s, u=%hhu]", - this->x, this->y, name_for_enum(this->direction), this->unused); + return string_printf("Location[x=%hhu, y=%hhu, dir=%hhu:%s, u=%hhu]", + this->x, this->y, static_cast(this->direction), name_for_enum(this->direction), this->unused); } void Location::clear() { @@ -603,7 +603,7 @@ string CardDefinition::Effect::str(const char* separator, const TextSet* text_ar if (!this->expr.empty()) { tokens.emplace_back("expr=" + this->expr.decode()); } - tokens.emplace_back(string_printf("when=%s", name_for_enum(this->when))); + tokens.emplace_back(string_printf("when=%02hhX:%s", static_cast(this->when), name_for_enum(this->when))); tokens.emplace_back("arg1=" + this->str_for_arg(this->arg1.decode())); tokens.emplace_back("arg2=" + this->str_for_arg(this->arg2.decode())); tokens.emplace_back("arg3=" + this->str_for_arg(this->arg3.decode()));