Size.hpp
Namespaces
Classes
Name
struct
ecs::component::Size Size component.
Source code
#pragma once
namespace ecs::component
{
struct Size {
int height;
int width;
std::array<char, 4> serialize()
{
std::array<char, 4> pos;
size_t tmp = 0;
tmp = width >> 8;
pos[0] = tmp;
pos[1] = width & 0xff;
tmp = height >> 8;
pos[2] = tmp;
pos[3] = height & 0xff;
return pos;
}
};
} // namespace ecs::component
Updated on 2022-11-13 at 17:21:37 +0100
Last updated