mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Phrase error messages as "Failed to", not "Could not" or "Couldn't" (#1298)
This commit is contained in:
@@ -468,7 +468,7 @@ static void parseACOFile(std::filebuf &file) {
|
||||
char buf[10];
|
||||
|
||||
if (file.sgetn(buf, 2) != 2) {
|
||||
error("Couldn't read ACO file version");
|
||||
error("Failed to read ACO file version");
|
||||
return;
|
||||
}
|
||||
if (readBE<uint16_t>(buf) != 1) {
|
||||
@@ -477,7 +477,7 @@ static void parseACOFile(std::filebuf &file) {
|
||||
}
|
||||
|
||||
if (file.sgetn(buf, 2) != 2) {
|
||||
error("Couldn't read number of colors in palette file");
|
||||
error("Failed to read number of colors in palette file");
|
||||
return;
|
||||
}
|
||||
uint16_t nbColors = readBE<uint16_t>(buf);
|
||||
|
||||
@@ -606,7 +606,7 @@ static std::tuple<DefaultInitVec<size_t>, std::vector<Palette>>
|
||||
|
||||
if (iter == palettes.end()) {
|
||||
assert(!protoPal.empty());
|
||||
error("Could not fit tile colors [%s] in specified palettes", listColors(protoPal));
|
||||
error("Failed to fit tile colors [%s] in specified palettes", listColors(protoPal));
|
||||
bad = true;
|
||||
}
|
||||
mappings[i] = iter - palettes.begin(); // Bogus value, but whatever
|
||||
|
||||
@@ -246,11 +246,11 @@ void reverse() {
|
||||
const_cast<png_voidp>(static_cast<void const *>(pngFile.c_str(options.input))), pngError,
|
||||
pngWarning);
|
||||
if (!png) {
|
||||
fatal("Couldn't create PNG write struct: %s", strerror(errno));
|
||||
fatal("Failed to create PNG write struct: %s", strerror(errno));
|
||||
}
|
||||
png_infop pngInfo = png_create_info_struct(png);
|
||||
if (!pngInfo) {
|
||||
fatal("Couldn't create PNG info struct: %s", strerror(errno));
|
||||
fatal("Failed to create PNG info struct: %s", strerror(errno));
|
||||
}
|
||||
png_set_write_fn(png, &pngFile, writePng, flushPng);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user