From f59ed06f7810c68c854b2513b3125cf0e5586204 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 31 Jan 2021 08:36:12 -0500 Subject: Added datafile format --- tools/sprite_dumper/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') diff --git a/tools/sprite_dumper/main.cpp b/tools/sprite_dumper/main.cpp index 4183e43..c87f544 100644 --- a/tools/sprite_dumper/main.cpp +++ b/tools/sprite_dumper/main.cpp @@ -277,6 +277,7 @@ struct SpriteSheet { for (int i=0; i maxWidth) maxWidth = f.width; if (f.height > maxHeight) maxHeight = f.height; frames.push_back(std::move(f)); @@ -286,6 +287,12 @@ struct SpriteSheet { int sheetWidth; int sheetHeight; + std::ofstream datafile("out.txt"); + datafile << maxWidth << "," << maxHeight << " cell size" << std::endl; + datafile << FRAMES_PER_ROW << " frames per row" << std::endl; + datafile << frames.size() << " frames" << std::endl; + datafile << std::endl; + if (frames.size() < FRAMES_PER_ROW) { sheetWidth = frames.size() * maxWidth; sheetHeight = maxHeight; @@ -298,6 +305,7 @@ struct SpriteSheet { for (int i=0; i