From 25bd1abb24dc2f888d9a2b2ef1da068dc8014db9 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 21 Jul 2024 18:53:01 -0400 Subject: [PATCH] update zsprite load --- src/app/editor/sprite/zsprite.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/editor/sprite/zsprite.h b/src/app/editor/sprite/zsprite.h index e32276ff..0fbd081f 100644 --- a/src/app/editor/sprite/zsprite.h +++ b/src/app/editor/sprite/zsprite.h @@ -83,10 +83,10 @@ struct ZSprite { std::vector buffer(std::istreambuf_iterator(fs), {}); - int aCount = *reinterpret_cast(&buffer[0]); + int animation_count = *reinterpret_cast(&buffer[0]); int offset = sizeof(int); - for (int i = 0; i < aCount; i++) { + for (int i = 0; i < animation_count; i++) { std::string aname = std::string(&buffer[offset]); offset += aname.size() + 1; uint8_t afs = *reinterpret_cast(&buffer[offset]); @@ -100,9 +100,9 @@ struct ZSprite { } // RefreshAnimations(); - int fCount = *reinterpret_cast(&buffer[offset]); + int frame_count = *reinterpret_cast(&buffer[offset]); offset += sizeof(int); - for (int i = 0; i < fCount; i++) { + for (int i = 0; i < frame_count; i++) { // editor.Frames[i] = new Frame(); editor.Frames.emplace_back(); // editor.AddUndo(i); @@ -204,7 +204,7 @@ struct ZSprite { property_sprname.Text = std::string(&buffer[offset]); offset += property_sprname.Text.size() + 1; - int actionL = *reinterpret_cast(&buffer[offset]); + int actionL = buffer[offset]; offset += sizeof(int); for (int i = 0; i < actionL; i++) { std::string a = std::string(&buffer[offset]);