3 # ScummVM - Scumm Interpreter
4 # Copyright (C) 2006 The ScummVM project
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 # This script extracts AGI words.tok file
26 # It produces one word per line. Multiword verbs get splitted
30 # for i in agigames/*/words.tok
32 # tools/extract-words-tok.pl "$i"
33 # done | tools/construct-pred-dict.pl
39 #$off = ord(substr($file, $i * 2, 1)) * 256 + ord(substr($file, $i * 2 + 1, 1));
40 #$offn = ord(substr($file, ($i + 1) * 2, 1)) * 256 + ord(substr($file, ($i + 1) * 2 + 1, 1));
47 while ($off < length $file) {
48 $c = (ord(substr($file, $off, 1)));
50 $word = substr $word, 0, $c;
56 $r = ($c & 0x7f) ^ 0x7f;
60 for $w (split ' ', $word) {
71 for $w (split ' ', $word) {