This is again a bandaid solution to this map with -1 problem, but it'll work for the normies
This commit is contained in:
10
src/anm2.cpp
10
src/anm2.cpp
@@ -54,6 +54,8 @@ bool anm2_serialize(Anm2* self, const std::string& path)
|
|||||||
|
|
||||||
for (auto& [id, spritesheet] : self->spritesheets)
|
for (auto& [id, spritesheet] : self->spritesheets)
|
||||||
{
|
{
|
||||||
|
if (id == ID_NONE) continue;
|
||||||
|
|
||||||
XMLElement* spritesheetElement;
|
XMLElement* spritesheetElement;
|
||||||
|
|
||||||
// Spritesheet
|
// Spritesheet
|
||||||
@@ -70,6 +72,8 @@ bool anm2_serialize(Anm2* self, const std::string& path)
|
|||||||
|
|
||||||
for (auto& [id, layer] : self->layers)
|
for (auto& [id, layer] : self->layers)
|
||||||
{
|
{
|
||||||
|
if (id == ID_NONE) continue;
|
||||||
|
|
||||||
XMLElement* layerElement;
|
XMLElement* layerElement;
|
||||||
|
|
||||||
// Layer
|
// Layer
|
||||||
@@ -88,6 +92,8 @@ bool anm2_serialize(Anm2* self, const std::string& path)
|
|||||||
|
|
||||||
for (auto& [id, null] : self->nulls)
|
for (auto& [id, null] : self->nulls)
|
||||||
{
|
{
|
||||||
|
if (id == ID_NONE) continue;
|
||||||
|
|
||||||
XMLElement* nullElement;
|
XMLElement* nullElement;
|
||||||
|
|
||||||
// Null
|
// Null
|
||||||
@@ -108,6 +114,8 @@ bool anm2_serialize(Anm2* self, const std::string& path)
|
|||||||
|
|
||||||
for (auto& [id, event] : self->events)
|
for (auto& [id, event] : self->events)
|
||||||
{
|
{
|
||||||
|
if (id == ID_NONE) continue;
|
||||||
|
|
||||||
XMLElement* eventElement;
|
XMLElement* eventElement;
|
||||||
|
|
||||||
// Event
|
// Event
|
||||||
@@ -129,6 +137,8 @@ bool anm2_serialize(Anm2* self, const std::string& path)
|
|||||||
|
|
||||||
for (auto& [id, animation] : self->animations)
|
for (auto& [id, animation] : self->animations)
|
||||||
{
|
{
|
||||||
|
if (id == ID_NONE) continue;
|
||||||
|
|
||||||
XMLElement* animationElement;
|
XMLElement* animationElement;
|
||||||
XMLElement* rootAnimationElement;
|
XMLElement* rootAnimationElement;
|
||||||
XMLElement* layerAnimationsElement;
|
XMLElement* layerAnimationsElement;
|
||||||
|
Reference in New Issue
Block a user