aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--messages.pl6
-rw-r--r--textcomp.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/messages.pl b/messages.pl
index fe94a35..0d68f4d 100644
--- a/messages.pl
+++ b/messages.pl
@@ -35,10 +35,10 @@ while(<DATA>) {
s/^\w+\s+//;
my $orig = $_;
+ #warn "msg: $_\n";
s/"//g;
s/\\r//g;
s/\\n/\n/g;
- #warn "msg: $_\n";
$total_in += (1 + length);
@@ -49,7 +49,9 @@ while(<DATA>) {
}
}
- #warn "'$_'\n" if $label eq 'do_you_want';
+ my $w = $_;
+ $w =~ s/\n/\\n/g;
+ #warn "got: \"$w\"\n";
open my $out, ">msg.out" or die $!;
print $out $_;
close $out;
diff --git a/textcomp.c b/textcomp.c
index 2412f15..7139225 100644
--- a/textcomp.c
+++ b/textcomp.c
@@ -66,11 +66,10 @@
start of the next line, so no \r's are needed. Any \r sequences listed
in messages.pl are discarded before encoding is done.
- Actually, no prompts ever use capital X or Z. These should be used for
- dictionary lookups. Maybe X is followed by a 3-bit dict ID, for the 8
- most commonly repeated phrases (one of which will of course be "Taipan"),
- and Z is a 5- or 6-bit ID for 32 or 64 less common phrases. So far this
- isn't implemented because the decompressor isn't reentrant (yet).
+ Since no prompts ever use capital Z, it's used as an escape character
+ for dictionary lookups (e.g. Za = "Li Yuen", Zb = "Elder Brother").
+ This program doesn't do that, it's done by messages.pl, and textdecomp.s
+ does the dictionary extraction.
*/
#include <stdio.h>