Пример #1
0
void serialize(JsonBox::Value & o, const List_T & v)
{
	JsonBox::Array a;
	a.resize(v.size());
	u32 i = 0;
	for(auto it = v.cbegin(); it != v.cend(); ++it)
	{
		a[i] = *it;
		++it;
		++i;
	}
	o = a;
}
Пример #2
0
inline void serialize(JsonBox::Value & o, const sf::Transform & t)
{
	const float * v = t.getMatrix();

	JsonBox::Array a;
	a.resize(16);

	for(u32 i = 0; i < 16; ++i)
	{
		a[i] = v[i];
	}

	o = a;
}