mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Warn about rgbgfx -O without -o or any of -A -T -P -Q
This commit is contained in:
@@ -44,6 +44,8 @@ static struct LocalOptions {
|
|||||||
bool autoPalmap;
|
bool autoPalmap;
|
||||||
bool groupOutputs;
|
bool groupOutputs;
|
||||||
bool reverse;
|
bool reverse;
|
||||||
|
|
||||||
|
bool autoAny() const { return autoAttrmap || autoTilemap || autoPalettes || autoPalmap; }
|
||||||
} localOptions;
|
} localOptions;
|
||||||
|
|
||||||
// Short options
|
// Short options
|
||||||
@@ -846,6 +848,16 @@ int main(int argc, char *argv[]) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (localOptions.groupOutputs) {
|
||||||
|
if (!localOptions.autoAny()) {
|
||||||
|
warnx("Grouping outputs ('-O') is enabled, but without any automatic output paths "
|
||||||
|
"('-A', '-P', '-Q', or '-T')");
|
||||||
|
}
|
||||||
|
if (options.output.empty()) {
|
||||||
|
warnx("Grouping outputs ('-O') is enabled, but without an output tile data file ('-o')"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
auto autoOutPath = [](bool autoOptEnabled, std::string &path, char const *extension) {
|
auto autoOutPath = [](bool autoOptEnabled, std::string &path, char const *extension) {
|
||||||
if (!autoOptEnabled) {
|
if (!autoOptEnabled) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
2
test/gfx/warn_group_output.err
Normal file
2
test/gfx/warn_group_output.err
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
warning: Grouping outputs ('-O') is enabled, but without any automatic output paths ('-A', '-P', '-Q', or '-T')
|
||||||
|
warning: Grouping outputs ('-O') is enabled, but without an output tile data file ('-o')
|
||||||
1
test/gfx/warn_group_output.flags
Normal file
1
test/gfx/warn_group_output.flags
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-O
|
||||||
Reference in New Issue
Block a user