shithub: rgbds

Download patch

ref: bf9f99ebf54fe79d4130c464a9524c62acc5de06
parent: f0eca86c52406f091f8ac5627cfe804c7f22a246
author: ISSOtm <eldredhabert0@gmail.com>
date: Sat Mar 5 16:28:45 EST 2022

Reorder `Options` members by usage order

--- a/include/gfx/main.hpp
+++ b/include/gfx/main.hpp
@@ -20,16 +20,15 @@
 #include "gfx/rgba.hpp"
 
 struct Options {
-	bool beVerbose = false; // -v
+	bool useColorCurve = false; // -C
 	bool fixInput = false; // -f
-	bool columnMajor = false; // -Z, previously -h
 	bool allowMirroring = false; // -m
 	bool allowDedup = false; // -u
-	bool useColorCurve = false; // -C
-	uint8_t bitDepth = 2; // -d
-	uint64_t trim = 0; // -x
-	uint8_t nbPalettes = 8; // -n
-	uint8_t nbColorsPerPal = 0; // -s; 0 means "auto" = 1 << bitDepth;
+	bool beVerbose = false; // -v
+	bool columnMajor = false; // -Z, previously -h
+
+	std::filesystem::path attrmap{}; // -a, -A
+	std::array<uint8_t, 2> baseTileIDs{0, 0}; // -b
 	enum {
 		NO_SPEC,
 		EXPLICIT,
@@ -36,14 +35,17 @@
 		EMBEDDED,
 	} palSpecType = NO_SPEC; // -c
 	std::vector<std::array<Rgba, 4>> palSpec{};
-	std::array<uint16_t, 2> unitSize{1, 1}; // -u (in tiles)
+	uint8_t bitDepth = 2; // -d
 	std::array<uint32_t, 4> inputSlice{0, 0, 0, 0}; // -L
-	std::array<uint8_t, 2> baseTileIDs{0, 0}; // -b
 	std::array<uint16_t, 2> maxNbTiles{UINT16_MAX, 0}; // -N
-	std::filesystem::path tilemap{}; // -t, -T
-	std::filesystem::path attrmap{}; // -a, -A
-	std::filesystem::path palettes{}; // -p, -P
+	uint8_t nbPalettes = 8; // -n
 	std::filesystem::path output{}; // -o
+	std::filesystem::path palettes{}; // -p, -P
+	uint8_t nbColorsPerPal = 0; // -s; 0 means "auto" = 1 << bitDepth;
+	std::filesystem::path tilemap{}; // -t, -T
+	std::array<uint16_t, 2> unitSize{1, 1}; // -U (in tiles)
+	uint64_t trim = 0; // -x
+
 	std::filesystem::path input{}; // positional arg
 
 	format_(printf, 2, 3) void verbosePrint(char const *fmt, ...) const;