Add more RGBGFX test coverage (#1553)
@@ -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'},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
5721d9
|
||||
|
||||
a9d4fe
|
||||
A9D4FE
|
||||
|
||||
|
||||
ffffff
|
||||
ffFFfF
|
||||
|
||||
BIN
test/gfx/full_aco.aco
Normal file
1
test/gfx/full_aco.flags
Normal file
@@ -0,0 +1 @@
|
||||
-c aco:full_aco.aco
|
||||
BIN
test/gfx/full_aco.out.2bpp
Normal file
BIN
test/gfx/full_aco.out.attrmap
Normal file
BIN
test/gfx/full_aco.out.pal
Normal file
BIN
test/gfx/full_aco.out.tilemap
Normal file
BIN
test/gfx/full_aco.png
Normal file
|
After Width: | Height: | Size: 927 B |
BIN
test/gfx/full_act.act
Normal file
1
test/gfx/full_act.flags
Normal file
@@ -0,0 +1 @@
|
||||
-c act:full_act.act
|
||||
BIN
test/gfx/full_act.out.2bpp
Normal file
BIN
test/gfx/full_act.out.attrmap
Normal file
BIN
test/gfx/full_act.out.pal
Normal file
BIN
test/gfx/full_act.out.tilemap
Normal file
BIN
test/gfx/full_act.png
Normal file
|
After Width: | Height: | Size: 927 B |
1
test/gfx/full_gbc.flags
Normal file
@@ -0,0 +1 @@
|
||||
-c gbc:full_gbc.pal
|
||||
BIN
test/gfx/full_gbc.out.2bpp
Normal file
BIN
test/gfx/full_gbc.out.attrmap
Normal file
BIN
test/gfx/full_gbc.out.pal
Normal file
BIN
test/gfx/full_gbc.out.tilemap
Normal file
BIN
test/gfx/full_gbc.pal
Normal file
BIN
test/gfx/full_gbc.png
Normal file
|
After Width: | Height: | Size: 927 B |
1
test/gfx/full_psp.flags
Normal file
@@ -0,0 +1 @@
|
||||
-c psp:full_psp.pal
|
||||
BIN
test/gfx/full_psp.out.2bpp
Normal file
BIN
test/gfx/full_psp.out.attrmap
Normal file
BIN
test/gfx/full_psp.out.pal
Normal file
BIN
test/gfx/full_psp.out.tilemap
Normal file
35
test/gfx/full_psp.pal
Normal file
@@ -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
|
||||
BIN
test/gfx/full_psp.png
Normal file
|
After Width: | Height: | Size: 927 B |
1
test/gfx/mirror_x.flags
Normal file
@@ -0,0 +1 @@
|
||||
-X
|
||||
1
test/gfx/mirror_x.out.2bpp
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>耨耨耨耨耨耨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>耨耨耨亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖弿弿弿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>耨耨耨弿弿弿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
BIN
test/gfx/mirror_x.out.attrmap
Normal file
BIN
test/gfx/mirror_x.out.tilemap
Normal file
BIN
test/gfx/mirror_x.png
Normal file
|
After Width: | Height: | Size: 103 B |
1
test/gfx/mirror_xy.flags
Normal file
@@ -0,0 +1 @@
|
||||
-XY
|
||||
1
test/gfx/mirror_xy.out.2bpp
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>耨耨耨耨耨耨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>耨耨耨亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>耨耨耨弿弿弿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
BIN
test/gfx/mirror_xy.out.attrmap
Normal file
BIN
test/gfx/mirror_xy.out.tilemap
Normal file
BIN
test/gfx/mirror_xy.png
Normal file
|
After Width: | Height: | Size: 103 B |
1
test/gfx/mirror_y.flags
Normal file
@@ -0,0 +1 @@
|
||||
-Y
|
||||
1
test/gfx/mirror_y.out.2bpp
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD><EFBFBD>耨耨耨耨耨耨<EFBFBD><EFBFBD><EFBFBD><EFBFBD>弿弿弿弿弿弿<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>耨耨耨亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>弿弿弿亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD>耨耨耨弿弿弿<EFBFBD><EFBFBD><EFBFBD><EFBFBD>亖亖亖亖亖亖<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
BIN
test/gfx/mirror_y.out.attrmap
Normal file
BIN
test/gfx/mirror_y.out.tilemap
Normal file
BIN
test/gfx/mirror_y.png
Normal file
|
After Width: | Height: | Size: 103 B |
1
test/gfx/reverse_curve.2bpp
Normal file
@@ -0,0 +1 @@
|
||||
? @L<7F><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>円G|C<#
|
||||
BIN
test/gfx/reverse_curve.attrmap
Normal file
4
test/gfx/reverse_curve.flags
Normal file
@@ -0,0 +1,4 @@
|
||||
-m
|
||||
-t reverse_curve.tilemap
|
||||
-a reverse_curve.attrmap
|
||||
-p reverse_curve.pal
|
||||
BIN
test/gfx/reverse_curve.pal
Normal file
BIN
test/gfx/reverse_curve.tilemap
Normal file
@@ -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
|
||||
|
||||