diff options
Diffstat (limited to 'tools/mzmap.c')
| -rw-r--r-- | tools/mzmap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/mzmap.c b/tools/mzmap.c index fae8221..18dd623 100644 --- a/tools/mzmap.c +++ b/tools/mzmap.c @@ -257,7 +257,7 @@ static int writeMap(const char *folder, const char *outFolder, const char *name, snprintf(path, sizeof path, "%s/%s_map%03d.inc", outFolder, name, id); f = fopen(path, "wb"); if (!f) { - fprintf(stderr, "cannot write %s\n", path); + fprintf(stderr, "cannot write %s (does the output folder exist?)\n", path); kon_jsonFree(json); return -1; } @@ -341,7 +341,7 @@ static int writeMap(const char *folder, const char *outFolder, const char *name, else fputs("NULL, 0\n};\n", f); if (ferror(f) || fclose(f) != 0) { - fprintf(stderr, "cannot write %s\n", path); + fprintf(stderr, "cannot write %s (does the output folder exist?)\n", path); kon_jsonFree(json); return -1; } @@ -435,7 +435,7 @@ int main(int argc, char **argv) snprintf(path, sizeof path, "%s/%s_maps.c", outFolder, name); f = fopen(path, "wb"); if (!f) { - fprintf(stderr, "cannot write %s\n", path); + fprintf(stderr, "cannot write %s (does the output folder exist?)\n", path); return 1; } fprintf(f, "/* written by mzmap, the maps, tilesets and start settings of the game */\n\n#include \"%s_maps.h\"\n\n#include <stddef.h>\n\n", name); @@ -488,7 +488,7 @@ int main(int argc, char **argv) fprintf(f, "const kon_rmSystem_t %s_system = {\"\", 0, 0, 0, NULL, 0, 0, 0, 0, 0, {0, 0, 0}};\n", name); } if (ferror(f) || fclose(f) != 0) { - fprintf(stderr, "cannot write %s\n", path); + fprintf(stderr, "cannot write %s (does the output folder exist?)\n", path); return 1; } @@ -497,7 +497,7 @@ int main(int argc, char **argv) snprintf(path, sizeof path, "%s/%s_maps.h", outFolder, name); f = fopen(path, "wb"); if (!f) { - fprintf(stderr, "cannot write %s\n", path); + fprintf(stderr, "cannot write %s (does the output folder exist?)\n", path); return 1; } fprintf(f, "/* written by mzmap */\n\n#ifndef %s_MAPS_H\n#define %s_MAPS_H\n\n#include \"konrmmap.h\"\n\n", upper, upper); @@ -506,7 +506,7 @@ int main(int argc, char **argv) fprintf(f, "/* index by the id the game uses, NULL when there is none */\nextern const kon_rmMap_t *const %s_maps[%d];\nextern const kon_rmTileset_t *const %s_tilesets[%d];\nextern const kon_rmSystem_t %s_system;\n\n", name, highestMap + 1, name, highestSet + 1, name); fprintf(f, "#ifdef __cplusplus\n}\n#endif\n#endif\n"); if (ferror(f) || fclose(f) != 0) { - fprintf(stderr, "cannot write %s\n", path); + fprintf(stderr, "cannot write %s (does the output folder exist?)\n", path); return 1; } |
