From a7fdb2c3d3c0eed88130b412185835b8d4678d14 Mon Sep 17 00:00:00 2001 From: Sylvie <35663410+Rangi42@users.noreply.github.com> Date: Sun, 27 Oct 2024 11:32:21 -0400 Subject: [PATCH] Add more RGBGFX test coverage (#1553) --- src/gfx/main.cpp | 3 ++- test/gfx/empty_lines.hex | 4 ++-- test/gfx/full_aco.aco | Bin 0 -> 325 bytes test/gfx/full_aco.flags | 1 + test/gfx/full_aco.out.2bpp | Bin 0 -> 384 bytes test/gfx/full_aco.out.attrmap | Bin 0 -> 24 bytes test/gfx/full_aco.out.pal | Bin 0 -> 64 bytes test/gfx/full_aco.out.tilemap | Bin 0 -> 24 bytes test/gfx/full_aco.png | Bin 0 -> 927 bytes test/gfx/full_act.act | Bin 0 -> 772 bytes test/gfx/full_act.flags | 1 + test/gfx/full_act.out.2bpp | Bin 0 -> 384 bytes test/gfx/full_act.out.attrmap | Bin 0 -> 24 bytes test/gfx/full_act.out.pal | Bin 0 -> 64 bytes test/gfx/full_act.out.tilemap | Bin 0 -> 24 bytes test/gfx/full_act.png | Bin 0 -> 927 bytes test/gfx/full_gbc.flags | 1 + test/gfx/full_gbc.out.2bpp | Bin 0 -> 384 bytes test/gfx/full_gbc.out.attrmap | Bin 0 -> 24 bytes test/gfx/full_gbc.out.pal | Bin 0 -> 64 bytes test/gfx/full_gbc.out.tilemap | Bin 0 -> 24 bytes test/gfx/full_gbc.pal | Bin 0 -> 64 bytes test/gfx/full_gbc.png | Bin 0 -> 927 bytes test/gfx/full_psp.flags | 1 + test/gfx/full_psp.out.2bpp | Bin 0 -> 384 bytes test/gfx/full_psp.out.attrmap | Bin 0 -> 24 bytes test/gfx/full_psp.out.pal | Bin 0 -> 64 bytes test/gfx/full_psp.out.tilemap | Bin 0 -> 24 bytes test/gfx/full_psp.pal | 35 +++++++++++++++++++++++++++++++++ test/gfx/full_psp.png | Bin 0 -> 927 bytes test/gfx/mirror_x.flags | 1 + test/gfx/mirror_x.out.2bpp | 1 + test/gfx/mirror_x.out.attrmap | Bin 0 -> 12 bytes test/gfx/mirror_x.out.tilemap | Bin 0 -> 12 bytes test/gfx/mirror_x.png | Bin 0 -> 103 bytes test/gfx/mirror_xy.flags | 1 + test/gfx/mirror_xy.out.2bpp | 1 + test/gfx/mirror_xy.out.attrmap | Bin 0 -> 12 bytes test/gfx/mirror_xy.out.tilemap | Bin 0 -> 12 bytes test/gfx/mirror_xy.png | Bin 0 -> 103 bytes test/gfx/mirror_y.flags | 1 + test/gfx/mirror_y.out.2bpp | 1 + test/gfx/mirror_y.out.attrmap | Bin 0 -> 12 bytes test/gfx/mirror_y.out.tilemap | Bin 0 -> 12 bytes test/gfx/mirror_y.png | Bin 0 -> 103 bytes test/gfx/reverse_curve.2bpp | 1 + test/gfx/reverse_curve.attrmap | Bin 0 -> 4 bytes test/gfx/reverse_curve.flags | 4 ++++ test/gfx/reverse_curve.pal | Bin 0 -> 16 bytes test/gfx/reverse_curve.tilemap | Bin 0 -> 4 bytes test/gfx/test.sh | 14 ++++++++++--- 51 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 test/gfx/full_aco.aco create mode 100644 test/gfx/full_aco.flags create mode 100644 test/gfx/full_aco.out.2bpp create mode 100644 test/gfx/full_aco.out.attrmap create mode 100644 test/gfx/full_aco.out.pal create mode 100644 test/gfx/full_aco.out.tilemap create mode 100644 test/gfx/full_aco.png create mode 100644 test/gfx/full_act.act create mode 100644 test/gfx/full_act.flags create mode 100644 test/gfx/full_act.out.2bpp create mode 100644 test/gfx/full_act.out.attrmap create mode 100644 test/gfx/full_act.out.pal create mode 100644 test/gfx/full_act.out.tilemap create mode 100644 test/gfx/full_act.png create mode 100644 test/gfx/full_gbc.flags create mode 100644 test/gfx/full_gbc.out.2bpp create mode 100644 test/gfx/full_gbc.out.attrmap create mode 100644 test/gfx/full_gbc.out.pal create mode 100644 test/gfx/full_gbc.out.tilemap create mode 100644 test/gfx/full_gbc.pal create mode 100644 test/gfx/full_gbc.png create mode 100644 test/gfx/full_psp.flags create mode 100644 test/gfx/full_psp.out.2bpp create mode 100644 test/gfx/full_psp.out.attrmap create mode 100644 test/gfx/full_psp.out.pal create mode 100644 test/gfx/full_psp.out.tilemap create mode 100644 test/gfx/full_psp.pal create mode 100644 test/gfx/full_psp.png create mode 100644 test/gfx/mirror_x.flags create mode 100644 test/gfx/mirror_x.out.2bpp create mode 100644 test/gfx/mirror_x.out.attrmap create mode 100644 test/gfx/mirror_x.out.tilemap create mode 100644 test/gfx/mirror_x.png create mode 100644 test/gfx/mirror_xy.flags create mode 100644 test/gfx/mirror_xy.out.2bpp create mode 100644 test/gfx/mirror_xy.out.attrmap create mode 100644 test/gfx/mirror_xy.out.tilemap create mode 100644 test/gfx/mirror_xy.png create mode 100644 test/gfx/mirror_y.flags create mode 100644 test/gfx/mirror_y.out.2bpp create mode 100644 test/gfx/mirror_y.out.attrmap create mode 100644 test/gfx/mirror_y.out.tilemap create mode 100644 test/gfx/mirror_y.png create mode 100644 test/gfx/reverse_curve.2bpp create mode 100644 test/gfx/reverse_curve.attrmap create mode 100644 test/gfx/reverse_curve.flags create mode 100644 test/gfx/reverse_curve.pal create mode 100644 test/gfx/reverse_curve.tilemap diff --git a/src/gfx/main.cpp b/src/gfx/main.cpp index 96c2405a..438ad8ef 100644 --- a/src/gfx/main.cpp +++ b/src/gfx/main.cpp @@ -108,7 +108,7 @@ void Options::verbosePrint(uint8_t level, char const *fmt, ...) const { } // Short options -static char const *optstring = "-Aa:b:Cc:Dd:Ffhi:L:mN:n:Oo:Pp:Qq:r:s:Tt:U:uVvx:Z"; +static char const *optstring = "-Aa:b:Cc:d:i:L:mN:n:Oo:Pp:Qq:r:s:Tt:U:uVvXx:YZ"; /* * Equivalent long options @@ -139,6 +139,7 @@ static option const longopts[] = { {"auto-palette-map", no_argument, nullptr, 'Q'}, {"palette-map", required_argument, nullptr, 'q'}, {"reverse", required_argument, nullptr, 'r'}, + {"palette-size", required_argument, nullptr, 's'}, {"auto-tilemap", no_argument, nullptr, 'T'}, {"tilemap", required_argument, nullptr, 't'}, {"unit-size", required_argument, nullptr, 'U'}, diff --git a/test/gfx/empty_lines.hex b/test/gfx/empty_lines.hex index 29d4022e..946ab11c 100644 --- a/test/gfx/empty_lines.hex +++ b/test/gfx/empty_lines.hex @@ -1,7 +1,7 @@ 5721d9 -a9d4fe +A9D4FE -ffffff +ffFFfF diff --git a/test/gfx/full_aco.aco b/test/gfx/full_aco.aco new file mode 100644 index 0000000000000000000000000000000000000000..c01be6f3c2b647b3831eb0315f44a9d1030e2514 GIT binary patch literal 325 zcmYk%F-t;G7{>9xpQ8j<9dgjE)x}L5ECpR8si`?c5v3X$bh?9!n?XW^eTylXYz literal 0 HcmV?d00001 diff --git a/test/gfx/full_aco.flags b/test/gfx/full_aco.flags new file mode 100644 index 00000000..a9f5c93e --- /dev/null +++ b/test/gfx/full_aco.flags @@ -0,0 +1 @@ +-c aco:full_aco.aco diff --git a/test/gfx/full_aco.out.2bpp b/test/gfx/full_aco.out.2bpp new file mode 100644 index 0000000000000000000000000000000000000000..f961019183351b5194d7018ff9f050855413e6a4 GIT binary patch literal 384 zcmZ9IF$zQ>5JLr9!K)0UUGVCHZNRGtwt_qP{Mlk-5gdl(sTC^+2idYME{5AX9~i*G z;^A4gEIj5&NQsHr)k`lG6>YW|e(7iXd0o2=4V;|5S|eL|$`2Oxizl+xqx>fa7e7Du zNO#^T1;28X5k2ZumUfVlJ3F`Q|DHbSQ$`s^C+W-In literal 0 HcmV?d00001 diff --git a/test/gfx/full_aco.out.tilemap b/test/gfx/full_aco.out.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6cf04740a9306bb0d3548bd0d741c6f1f2ee9ba8 GIT binary patch literal 24 fcmZQzWMXDvWn<^yMC+6cQE@6%z*l2^0Yp literal 0 HcmV?d00001 diff --git a/test/gfx/full_aco.png b/test/gfx/full_aco.png new file mode 100644 index 0000000000000000000000000000000000000000..de5a5849a134e1a9f529236f19e0b8df6d26d8ea GIT binary patch literal 927 zcmV;Q17Q4#P)J3AOkK}W2aOewh`B+;b8RYA_c8Tf$hh1I$#ysd0DOXo3i0qQ z0&qgyWkSdcSxMM0T6#480&qfJGH%rXoRD|*=Q8(ok(XqjfuPDSj-EmQXEtsoY*zED z8wh#XxNJX{%K-q=G_{^fG_OCMTI2m0nQoN>4uoVlkPp<$0B*s%iY6SwaJrSKU5FqCZ_Xmf>xUpiV4k!{h~u+bY` zJN~Y(e+V86ejK6t~0?O8S!JIeq4CG#$PwDwU!SV9A%}iOD zGcK)4%(S%~ZM$ePuP@WKXS8i!Ca=zHpOGA+P$jX>*=$3A`GeQZaiFO%t44V&@Wg8OHlfji%WdbJ7wDAve;uOCFZg9bpkk^|U&q#HG7l&-BdGJ& z=t5e^&*wzE*{oRa5%RM|WOVi?ZNB!1{N5mcdp;nWcSRkWuU|+^rbL%aY(A*xjV=)r zLSA|vwDA)Yp`|ZJWW+^&SYqv!c?OQvs4`rjFdb6gME3xI*>-ce8bG6C;<(AY>cAcz zxK6#XY9qI5od>LyYwbTD+da)Q*2HZqst?A QGK_-J5E#rMpuoTY0RKxh-T(jq literal 0 HcmV?d00001 diff --git a/test/gfx/full_act.flags b/test/gfx/full_act.flags new file mode 100644 index 00000000..bf8db89e --- /dev/null +++ b/test/gfx/full_act.flags @@ -0,0 +1 @@ +-c act:full_act.act diff --git a/test/gfx/full_act.out.2bpp b/test/gfx/full_act.out.2bpp new file mode 100644 index 0000000000000000000000000000000000000000..f961019183351b5194d7018ff9f050855413e6a4 GIT binary patch literal 384 zcmZ9IF$zQ>5JLr9!K)0UUGVCHZNRGtwt_qP{Mlk-5gdl(sTC^+2idYME{5AX9~i*G z;^A4gEIj5&NQsHr)k`lG6>YW|e(7iXd0o2=4V;|5S|eL|$`2Oxizl+xqx>fa7e7Du zNO#^T1;28X5k2ZumUfVlJ3F`Q|DHbSQ$`s^C+W-In literal 0 HcmV?d00001 diff --git a/test/gfx/full_act.out.tilemap b/test/gfx/full_act.out.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6cf04740a9306bb0d3548bd0d741c6f1f2ee9ba8 GIT binary patch literal 24 fcmZQzWMXDvWn<^yMC+6cQE@6%z*l2^0Yp literal 0 HcmV?d00001 diff --git a/test/gfx/full_act.png b/test/gfx/full_act.png new file mode 100644 index 0000000000000000000000000000000000000000..de5a5849a134e1a9f529236f19e0b8df6d26d8ea GIT binary patch literal 927 zcmV;Q17Q4#P)J3AOkK}W2aOewh`B+;b8RYA_c8Tf$hh1I$#ysd0DOXo3i0qQ z0&qgyWkSdcSxMM0T6#480&qfJGH%rXoRD|*=Q8(ok(XqjfuPDSj-EmQXEtsoY*zED z8wh#XxNJX{%K-q=G_{^fG_OCMTI2m0nQoN>4uoVlkPp<$0B*s%iY6SwaJrSKU5FqCZ_Xmf>xUpiV4k!{h~u+bY` zJN~Y(e+V86ejK6t~0?O8S!JIeq4CG#$PwDwU!SV9A%}iOD zGcK)4%(S%~ZM$ePuP@WKXS8i!Ca=zHpOGA+P$jX>*=$3A`GeQZaiFO%t44V&@Wg8OHlfji%WdbJ7wDAve;uOCFZg9bpkk^|U&q#HG7l&-BdGJ& z=t5e^&*wzE*{oRa5%RM|WOVi?ZNB!1{N5mcdp;nWcSRkWuU|+^rbL%aY(A*xjV=)r zLSA|vwDA)Yp`|ZJWW+^&SYqv!c?OQvs4`rjFdb6gME3xI*>-ce8bG6C;<(AY>cAcz zxK6#XY9qI5od>Ly5JLr9!K)0UUGVCHZNRGtwt_qP{Mlk-5gdl(sTC^+2idYME{5AX9~i*G z;^A4gEIj5&NQsHr)k`lG6>YW|e(7iXd0o2=4V;|5S|eL|$`2Oxizl+xqx>fa7e7Du zNO#^T1;28X5k2ZumUfVlJ3F`Q|DHbSQ$`s^C+W-In literal 0 HcmV?d00001 diff --git a/test/gfx/full_gbc.out.tilemap b/test/gfx/full_gbc.out.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6cf04740a9306bb0d3548bd0d741c6f1f2ee9ba8 GIT binary patch literal 24 fcmZQzWMXDvWn<^yMC+6cQE@6%z*l2^0Yp literal 0 HcmV?d00001 diff --git a/test/gfx/full_gbc.pal b/test/gfx/full_gbc.pal new file mode 100644 index 0000000000000000000000000000000000000000..820ff240b205aca691f9695ec6f9e47fe58a6006 GIT binary patch literal 64 zcmZQz_+KwkZd{b(xzr$8Vt)9~FcG&(S0mH=PSSSUOy%@rw01~_*{{(%6~=1ktlM9m UUAL-`H8ddewa5P=nWU0f0O?>C+W-In literal 0 HcmV?d00001 diff --git a/test/gfx/full_gbc.png b/test/gfx/full_gbc.png new file mode 100644 index 0000000000000000000000000000000000000000..de5a5849a134e1a9f529236f19e0b8df6d26d8ea GIT binary patch literal 927 zcmV;Q17Q4#P)J3AOkK}W2aOewh`B+;b8RYA_c8Tf$hh1I$#ysd0DOXo3i0qQ z0&qgyWkSdcSxMM0T6#480&qfJGH%rXoRD|*=Q8(ok(XqjfuPDSj-EmQXEtsoY*zED z8wh#XxNJX{%K-q=G_{^fG_OCMTI2m0nQoN>4uoVlkPp<$0B*s%iY6SwaJrSKU5FqCZ_Xmf>xUpiV4k!{h~u+bY` zJN~Y(e+V86ejK6t~0?O8S!JIeq4CG#$PwDwU!SV9A%}iOD zGcK)4%(S%~ZM$ePuP@WKXS8i!Ca=zHpOGA+P$jX>*=$3A`GeQZaiFO%t44V&@Wg8OHlfji%WdbJ7wDAve;uOCFZg9bpkk^|U&q#HG7l&-BdGJ& z=t5e^&*wzE*{oRa5%RM|WOVi?ZNB!1{N5mcdp;nWcSRkWuU|+^rbL%aY(A*xjV=)r zLSA|vwDA)Yp`|ZJWW+^&SYqv!c?OQvs4`rjFdb6gME3xI*>-ce8bG6C;<(AY>cAcz zxK6#XY9qI5od>Ly5JLr9!K)0UUGVCHZNRGtwt_qP{Mlk-5gdl(sTC^+2idYME{5AX9~i*G z;^A4gEIj5&NQsHr)k`lG6>YW|e(7iXd0o2=4V;|5S|eL|$`2Oxizl+xqx>fa7e7Du zNO#^T1;28X5k2ZumUfVlJ3F`Q|DHbSQ$`s^C+W-In literal 0 HcmV?d00001 diff --git a/test/gfx/full_psp.out.tilemap b/test/gfx/full_psp.out.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6cf04740a9306bb0d3548bd0d741c6f1f2ee9ba8 GIT binary patch literal 24 fcmZQzWMXDvWn<^yMC+6cQE@6%z*l2^0Yp literal 0 HcmV?d00001 diff --git a/test/gfx/full_psp.pal b/test/gfx/full_psp.pal new file mode 100644 index 00000000..e38186f0 --- /dev/null +++ b/test/gfx/full_psp.pal @@ -0,0 +1,35 @@ +JASC-PAL +0100 +32 +0 0 0 +252 252 252 +196 199 238 +154 143 224 +99 93 150 +41 47 101 +27 29 52 +255 227 174 +205 187 171 +166 133 143 +207 93 139 +150 73 104 +255 180 130 +221 134 125 +178 105 111 +246 198 94 +228 144 87 +196 104 51 +176 208 126 +102 170 93 +82 181 171 +42 131 121 +28 86 89 +123 225 246 +88 159 252 +80 105 228 +46 68 174 +128 86 212 +90 59 150 +255 186 225 +230 135 197 +167 89 185 diff --git a/test/gfx/full_psp.png b/test/gfx/full_psp.png new file mode 100644 index 0000000000000000000000000000000000000000..de5a5849a134e1a9f529236f19e0b8df6d26d8ea GIT binary patch literal 927 zcmV;Q17Q4#P)J3AOkK}W2aOewh`B+;b8RYA_c8Tf$hh1I$#ysd0DOXo3i0qQ z0&qgyWkSdcSxMM0T6#480&qfJGH%rXoRD|*=Q8(ok(XqjfuPDSj-EmQXEtsoY*zED z8wh#XxNJX{%K-q=G_{^fG_OCMTI2m0nQoN>4uoVlkPp<$0B*s%iY6SwaJrSKU5FqCZ_Xmf>xUpiV4k!{h~u+bY` zJN~Y(e+V86ejK6t~0?O8S!JIeq4CG#$PwDwU!SV9A%}iOD zGcK)4%(S%~ZM$ePuP@WKXS8i!Ca=zHpOGA+P$jX>*=$3A`GeQZaiFO%t44V&@Wg8OHlfji%WdbJ7wDAve;uOCFZg9bpkk^|U&q#HG7l&-BdGJ& z=t5e^&*wzE*{oRa5%RM|WOVi?ZNB!1{N5mcdp;nWcSRkWuU|+^rbL%aY(A*xjV=)r zLSA|vwDA)Yp`|ZJWW+^&SYqv!c?OQvs4`rjFdb6gME3xI*>-ce8bG6C;<(AY>cAcz zxK6#XY9qI5od>LyK9eOEj9Sl;Py^W`3*6>W=li`tIU^sosc)d*{=P{58p00i_>zopr08VEe AtpET3 literal 0 HcmV?d00001 diff --git a/test/gfx/mirror_xy.flags b/test/gfx/mirror_xy.flags new file mode 100644 index 00000000..1012adfe --- /dev/null +++ b/test/gfx/mirror_xy.flags @@ -0,0 +1 @@ +-XY diff --git a/test/gfx/mirror_xy.out.2bpp b/test/gfx/mirror_xy.out.2bpp new file mode 100644 index 00000000..4248f211 --- /dev/null +++ b/test/gfx/mirror_xy.out.2bpp @@ -0,0 +1 @@ +˙˙ńńńńńńńńńńńń˙˙˙˙˙˙˙˙˙˙˙˙˙˙ńńńńńń˙˙˙˙ńńńńńń˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ \ No newline at end of file diff --git a/test/gfx/mirror_xy.out.attrmap b/test/gfx/mirror_xy.out.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..c1fcbd64feb5a7f0c853eb2a2df8d03116586c5a GIT binary patch literal 12 RcmZQjU~phiNC0961^@_b0YLx& literal 0 HcmV?d00001 diff --git a/test/gfx/mirror_xy.out.tilemap b/test/gfx/mirror_xy.out.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..16b4b4bf9c8d6947376f878824dc2bccb5b8394a GIT binary patch literal 12 RcmZQzU}R(h0%m3wRsaBX02%-Q literal 0 HcmV?d00001 diff --git a/test/gfx/mirror_xy.png b/test/gfx/mirror_xy.png new file mode 100644 index 0000000000000000000000000000000000000000..36ffd603483750a4937d08f401acd8fef5395549 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Eu1SA-~bnNg1QhJ^)jv*Ddk`o%5?Y}u3`p3`5 z)^X_A0hR>K9eOEj9Sl;Py^W`3*6>W=li`tIU^sosc)d*{=P{58p00i_>zopr08VEe AtpET3 literal 0 HcmV?d00001 diff --git a/test/gfx/mirror_y.flags b/test/gfx/mirror_y.flags new file mode 100644 index 00000000..b18b986b --- /dev/null +++ b/test/gfx/mirror_y.flags @@ -0,0 +1 @@ +-Y diff --git a/test/gfx/mirror_y.out.2bpp b/test/gfx/mirror_y.out.2bpp new file mode 100644 index 00000000..8993ce19 --- /dev/null +++ b/test/gfx/mirror_y.out.2bpp @@ -0,0 +1 @@ +˙˙ńńńńńńńńńńńń˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ńńńńńń˙˙˙˙˙˙˙˙ńńńńńń˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ \ No newline at end of file diff --git a/test/gfx/mirror_y.out.attrmap b/test/gfx/mirror_y.out.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..4802e0533867f5a56fca83f6286854e048fbecc4 GIT binary patch literal 12 PcmZQzU~m8;2M`GW1K9eOEj9Sl;Py^W`3*6>W=li`tIU^sosc)d*{=P{58p00i_>zopr08VEe AtpET3 literal 0 HcmV?d00001 diff --git a/test/gfx/reverse_curve.2bpp b/test/gfx/reverse_curve.2bpp new file mode 100644 index 00000000..d8eb117d --- /dev/null +++ b/test/gfx/reverse_curve.2bpp @@ -0,0 +1 @@ +? @Lóˆóˆ˙€˙€˙€˙‰~G|C<# \ No newline at end of file diff --git a/test/gfx/reverse_curve.attrmap b/test/gfx/reverse_curve.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..61516adee3ed082269ab6875ccab2dfe5c67a6ca GIT binary patch literal 4 LcmZQjU{nME0EYlW literal 0 HcmV?d00001 diff --git a/test/gfx/reverse_curve.flags b/test/gfx/reverse_curve.flags new file mode 100644 index 00000000..6f3e38c1 --- /dev/null +++ b/test/gfx/reverse_curve.flags @@ -0,0 +1,4 @@ +-m +-t reverse_curve.tilemap +-a reverse_curve.attrmap +-p reverse_curve.pal diff --git a/test/gfx/reverse_curve.pal b/test/gfx/reverse_curve.pal new file mode 100644 index 0000000000000000000000000000000000000000..9f2400f84681d87f46e44ebf79e20bba8e4a19cf GIT binary patch literal 16 Wcmexg|DTzmhJoQfkd{wjU;qF<00sa6 literal 0 HcmV?d00001 diff --git a/test/gfx/reverse_curve.tilemap b/test/gfx/reverse_curve.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..dee9c4c8adafc2e6af2ee0379ef082b7b43cd95f GIT binary patch literal 4 LcmZQzU}OXU00#gA literal 0 HcmV?d00001 diff --git a/test/gfx/test.sh b/test/gfx/test.sh index 8de74318..3b54f034 100755 --- a/test/gfx/test.sh +++ b/test/gfx/test.sh @@ -37,11 +37,19 @@ failTest () { echo "${bold}${red}Test ${cmdline} failed!${1:+ (RC=$1)}${rescolors}${resbold}" } +tryCmp () { + if ! cmp "$1" "$2"; then + ../../contrib/gbdiff.bash "$1" "$2" + echo "${bold}${red}$1 mismatch!${rescolors}${resbold}" + false + fi +} + checkOutput () { out_rc=0 for ext in 1bpp 2bpp pal tilemap attrmap palmap; do if [[ -e "$1.out.$ext" ]]; then - cmp "$1.out.$ext" "result.$ext" + tryCmp "$1.out.$ext" "result.$ext" (( out_rc = out_rc || $? )) fi done @@ -95,10 +103,10 @@ for f in *.[12]bpp; do continue fi - flags="$([[ -e "${f%.[12]bpp}.flags" ]] && echo "@${f%.[12]bpp}.flags")" + flags="$([[ -e "${f%.[12]bpp}.flags" ]] && echo "@${f%.[12]bpp}.flags") $([[ -e "${f%.1bpp}.flags" ]] && echo "-d 1")" newTest "$RGBGFX $flags -o $f -r 1 result.png && $RGBGFX $flags -o result.2bpp result.png" - runTest && cmp "$f" result.2bpp || failTest $? + runTest && tryCmp "$f" result.2bpp || failTest $? done if [[ "$failed" -eq 0 ]]; then