diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-04-03 20:52:24 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-04-03 20:52:24 +0000 |
commit | f9495cba65c108ac99759cf3a0b978c0a58c9233 (patch) | |
tree | 9350c3f0c791772a1f3cd1d2eda61dbda9a2a443 /tools | |
parent | 5248641b40d1a49545b61b61d269eb40c1ccf0ce (diff) | |
download | rockbox-f9495cba65c108ac99759cf3a0b978c0a58c9233.tar.gz rockbox-f9495cba65c108ac99759cf3a0b978c0a58c9233.zip |
Changed concept for voice IDs: the voice-only IDs now are in a separate range, don't generate an empty language string. This saves memory, but requires a new voice file format with 2 tables.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4463 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/genlang | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/tools/genlang b/tools/genlang index de9dd43920..fd0b498813 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -62,6 +62,7 @@ while(<LANG>) { | |||
62 | $set{$var} = $value; | 62 | $set{$var} = $value; |
63 | 63 | ||
64 | if( (($var eq "new") && $value && ($value !~ /^\"(.*)\"\W*$/)) || | 64 | if( (($var eq "new") && $value && ($value !~ /^\"(.*)\"\W*$/)) || |
65 | (($var eq "voice") && $value && ($value !~ /^\"(.*)\"\W*$/)) || | ||
65 | (($var eq "eng") && ($value !~ /^\"(.*)\"\W*$/)) ) { | 66 | (($var eq "eng") && ($value !~ /^\"(.*)\"\W*$/)) ) { |
66 | print "$input:$line:missing quotes for ".$set{'id'}."\n"; | 67 | print "$input:$line:missing quotes for ".$set{'id'}."\n"; |
67 | $errors++; | 68 | $errors++; |
@@ -75,9 +76,15 @@ while(<LANG>) { | |||
75 | # if not set, get the english version | 76 | # if not set, get the english version |
76 | $value = $set{'eng'}; | 77 | $value = $set{'eng'}; |
77 | } | 78 | } |
78 | 79 | # print "VOICE: ".$set{'voice'}." VALUE: $value\n"; | |
79 | print HFILE " ".$set{'id'}.",\n"; | 80 | if(($value eq "\"\"") && $set{'voice'}) { |
80 | print CFILE " $value,\n"; | 81 | # voice-only |
82 | push @vfile, $set{'id'}; | ||
83 | } | ||
84 | else { | ||
85 | push @hfile, $set{'id'}; | ||
86 | print CFILE " $value,\n"; | ||
87 | } | ||
81 | 88 | ||
82 | undef %set; | 89 | undef %set; |
83 | } | 90 | } |
@@ -87,6 +94,16 @@ while(<LANG>) { | |||
87 | } | 94 | } |
88 | close(LANG); | 95 | close(LANG); |
89 | 96 | ||
97 | for(@hfile) { | ||
98 | print HFILE " $_,\n"; | ||
99 | } | ||
100 | |||
101 | print HFILE " /* --- below this follows voice-only strings --- */\n", | ||
102 | " VOICEONLY_DELIMITER = 0x8000,\n"; | ||
103 | |||
104 | for(@vfile) { | ||
105 | print HFILE " $_,\n"; | ||
106 | } | ||
90 | 107 | ||
91 | print HFILE <<MOO | 108 | print HFILE <<MOO |
92 | LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */ | 109 | LANG_LAST_INDEX_IN_ARRAY /* this is not a string, this is a marker */ |