1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 00:15:06 +00:00
OpenMW/components/esm/common.cpp
2022-10-09 10:39:43 +00:00

17 lines
377 B
C++

#include <cstdint>
#include <string>
namespace ESM
{
std::string printName(const std::uint32_t typeId)
{
unsigned char typeName[4];
typeName[0] = typeId & 0xff;
typeName[1] = (typeId >> 8) & 0xff;
typeName[2] = (typeId >> 16) & 0xff;
typeName[3] = (typeId >> 24) & 0xff;
return std::string((char*)typeName, 4);
}
}