Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Release notes:
The problem isn't really fixed, but it will no longer corrupt
your game text.

Compiler: better messages when adding resource files to an
.aastory file, on both success and failure

Backend: styles are now properly reset after printing a progress
bar inside a div on Z-machine. (Previously it would reset to
unstyled text, even if the div was bold or italic.)
Expand Down
12 changes: 11 additions & 1 deletion src/backend_aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static uint8_t resolve_aachar(uint32_t uchar) {
}

if(i >= 128) {
report(LVL_ERR, 0, "Too many distinct unicode characters in the text.");
report(LVL_ERR, 0, "Too many distinct Unicode characters in the text.");
exit(1);
}

Expand Down Expand Up @@ -3547,6 +3547,14 @@ static void chunks_file(FILE *f, struct program *prg, char *resdir) {
exit(1);
}
size = (uint32_t) st.st_size;
if(size == 0) {
report(
LVL_ERR,
prg->resources[i].line,
"Resource file \"%s\" is empty",
path);
exit(1);
}
buf = malloc(size);
if(1 != fread(buf, size, 1, datafile)) {
report(
Expand All @@ -3565,6 +3573,8 @@ static void chunks_file(FILE *f, struct program *prg, char *resdir) {
if(pad) fputc(0, f);
free(buf);
free(pathbuf);

report(LVL_DEBUG, 0, "Added resource file %s (%d bytes)", prg->resources[i].stem, size);
}
}
}
Expand Down
Loading