mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Generate all necessary files for RGBGFX tests
This commit is contained in:
7
test/gfx/.gitignore
vendored
7
test/gfx/.gitignore
vendored
@@ -1,5 +1,10 @@
|
|||||||
|
# Test binaries
|
||||||
/randtilegen
|
/randtilegen
|
||||||
/rgbgfx_test
|
/rgbgfx_test
|
||||||
|
# Generated by randtilegen
|
||||||
/*.png
|
/*.png
|
||||||
/result*.2bpp
|
|
||||||
/*.rng
|
/*.rng
|
||||||
|
# Generated by the test program (some PNGs are already covered by the above)
|
||||||
|
/result.2bpp
|
||||||
|
/result.pal
|
||||||
|
/result.attrmap
|
||||||
|
|||||||
@@ -312,8 +312,10 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
char path[] = "../../rgbgfx", out_opt[] = "-o", out_file[] = "result.2bpp",
|
char path[] = "../../rgbgfx", out_opt[] = "-o", out_file[] = "result.2bpp",
|
||||||
in_file[] = "out0.png";
|
pal_opt[] = "-p", pal_file[] = "result.pal", attr_opt[] = "-a",
|
||||||
std::vector<char *> args({path, out_opt, out_file, in_file});
|
attr_file[] = "result.attrmap", in_file[] = "out0.png";
|
||||||
|
std::vector<char *> args(
|
||||||
|
{path, out_opt, out_file, pal_opt, pal_file, attr_opt, attr_file, in_file});
|
||||||
// Also copy the trailing `nullptr`
|
// Also copy the trailing `nullptr`
|
||||||
std::copy_n(&argv[2], argc - 1, std::back_inserter(args));
|
std::copy_n(&argv[2], argc - 1, std::back_inserter(args));
|
||||||
|
|
||||||
@@ -327,10 +329,12 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
char path[] = "../../rgbgfx", reverse_opt[] = "-r", out_opt[] = "-o",
|
char path[] = "../../rgbgfx", reverse_opt[] = "-r", out_opt[] = "-o",
|
||||||
out_file[] = "result.2bpp", in_file[] = "result.png";
|
out_file[] = "result.2bpp", pal_opt[] = "-p", pal_file[] = "result.pal",
|
||||||
|
attr_opt[] = "-a", attr_file[] = "result.attrmap", in_file[] = "result.png";
|
||||||
auto width_string = std::to_string(image0.getWidth());
|
auto width_string = std::to_string(image0.getWidth());
|
||||||
std::vector<char *> args = {path, reverse_opt, width_string.data(),
|
std::vector<char *> args = {
|
||||||
out_opt, out_file, in_file};
|
path, reverse_opt, width_string.data(), out_opt, out_file, pal_opt,
|
||||||
|
pal_file, attr_opt, attr_file, in_file};
|
||||||
// Also copy the trailing `nullptr`
|
// Also copy the trailing `nullptr`
|
||||||
std::copy_n(&argv[2], argc - 1, std::back_inserter(args));
|
std::copy_n(&argv[2], argc - 1, std::back_inserter(args));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user