From ee3956e4f2d045d5e0be17f55dad9256a01accb2 Mon Sep 17 00:00:00 2001 From: elsid Date: Wed, 17 May 2023 18:44:27 +0200 Subject: [PATCH] Print FormId as hex by esmtool dump --- apps/esmtool/tes4.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/esmtool/tes4.cpp b/apps/esmtool/tes4.cpp index ecc80eded6..904040428d 100644 --- a/apps/esmtool/tes4.cpp +++ b/apps/esmtool/tes4.cpp @@ -116,13 +116,18 @@ namespace EsmTool std::cout << "\n Record: " << ESM::NAME(reader.hdr().record.typeId).toStringView(); if constexpr (ESM4::hasFormId) - std::cout << "\n FormId: " << value.mFormId; + std::cout << "\n FormId: 0x" << ESM4::formIdToString(value.mFormId); if constexpr (ESM::hasId) - std::cout << "\n Id: " << value.mId; + { + if constexpr (std::is_same_v) + std::cout << "\n FormId: 0x" << ESM4::formIdToString(value.mId); + else + std::cout << "\n Id: " << value.mId; + } if constexpr (ESM4::hasFlags) std::cout << "\n Record flags: " << recordFlags(value.mFlags); if constexpr (ESM4::hasParentFormId) - std::cout << "\n ParentFormId: " << value.mParentFormId; + std::cout << "\n ParentFormId: 0x" << ESM4::formIdToString(value.mParentFormId); if constexpr (ESM4::hasParent) std::cout << "\n Parent: " << value.mParent; if constexpr (ESM4::hasEditorId)