aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2009-02-18 10:10:24 +0000
committerFilippos Karapetis2009-02-18 10:10:24 +0000
commitce885af5caf60423fcab5a01ce8c5799740c3ff2 (patch)
treea6c3315b5968e9ce9825104e1c1b8639981625f3 /engines/sci
parent526ad1d1d00d721f9ecead2438d98106a504a665 (diff)
downloadscummvm-rg350-ce885af5caf60423fcab5a01ce8c5799740c3ff2.tar.gz
scummvm-rg350-ce885af5caf60423fcab5a01ce8c5799740c3ff2.tar.bz2
scummvm-rg350-ce885af5caf60423fcab5a01ce8c5799740c3ff2.zip
Remove the huffmake Perl tool, and the unused hufftree.* files
svn-id: r38461
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/scicore/huffmake.pl181
-rw-r--r--engines/sci/scicore/hufftree.117
-rw-r--r--engines/sci/scicore/hufftree.269
-rw-r--r--engines/sci/scicore/hufftree.3257
4 files changed, 0 insertions, 524 deletions
diff --git a/engines/sci/scicore/huffmake.pl b/engines/sci/scicore/huffmake.pl
deleted file mode 100644
index eb3ed0b653..0000000000
--- a/engines/sci/scicore/huffmake.pl
+++ /dev/null
@@ -1,181 +0,0 @@
-# ScummVM - Graphic Adventure Engine
-#
-# ScummVM is the legal property of its developers, whose names
-# are too numerous to list here. Please refer to the COPYRIGHT
-# file distributed with this source distribution.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# $URL$
-# $Id$
-#
-
-#! /usr/bin/perl
-
-# Uncomment the following line to debug
-# $DEBUG=1;
-@codes;
-
-$leaf_value = 0;
-while (<>) {
- chop;
- @tokens = split //;
-
- if ($_ eq "-") {
- calc_values();
- print stderr "$leaf_value tokens processed; result is a huffman tree.\n";
- exit(0);
- }
-
- $codes_len[$leaf_value] = scalar @tokens;
-
- for ($i = 0; $i < scalar @tokens; $i++) {
- $codes[$leaf_value][$i] = $tokens[$i];
- }
-
- $leaf_value++;
-}
-
-$nodes_counter = 0;
-@unlinked;
-
-sub branch_node {
- $left = shift;
- $right = shift;
- print ("\tBRANCH_NODE(", $nodes_counter || "0" , ", $left, $right)\n");
- $nodes_counter++;
-}
-
-sub leaf_node {
- $value = shift;
- print ("\tLEAF_NODE (", $nodes_counter || "0" ,", ", $value || "0" , ")\n");
- $nodes_counter++;
-}
-
-sub intval {
- my $nr = shift;
- my $retval = sub_intval(0, $codes_len[$nr], $nr);
- return $retval >> 1;
-}
-
-sub sub_intval {
- my $lv = shift;
- my $maxlv = shift;
- my $nr = shift;
-
- if ($maxlv >= 0) {
- my $v = $codes[$nr][$maxlv];
- my $retval = sub_intval($lv + 1, $maxlv-1, $nr) << 1;
-
- if ($v == "1") {
- $retval |= 1;
- }
- return $retval || 0;
- } else {
- return 0;
- }
-}
-
-sub calc_values() {
-
- $depth = 1;
- my $startdepth = 100000;
-
- for ($i; $i < scalar @codes; $i++) {
- if ($codes_len[$i] > $depth) {
- $depth = $codes_len[$i];
- }
-
- if ($codes_len[$i] < $startdepth) {
- $startdepth = $codes_len[$i];
- }
- }
-
- branch_node(1, 2);
-
- $level = 1;
- $unlinked[0] = 1;
- $unlinked[1] = 2;
- $linkctr = 3;
-
- for (; $level <= $depth; $level++) {
- my $entries = 1 << $level;
-
- for ($j = 0; $j < ($entries << 1); $j++) {
- $new_unlinked[$j] = -1;
- }
-
- for ($i = 0; $i < $entries; $i++) {
- if ($unlinked[$i] > -1) {
- $match = -1;
-
- if ($DEBUG) {
- print " Finding len=$level val=$i: ";
- }
- for ($j = 0; ($match == -1) && $j < $leaf_value; $j++) {
- if (($codes_len[$j] == $level)
- && (intval($j) == $i)) {
- $match = $j;
- } else {
- if ($DEBUG) {
- print "($j:$codes_len[$j],",intval($j),") ";
- }
- }
- }
- if ($DEBUG) {
- print "\n";
- }
-
- if ($match == -1) {
- die "Expected $unlinked[$i], but counted $nodes_counter in $i at level $level" unless ($unlinked[$i] == $nodes_counter);
- my $lnr = $linkctr++;
- my $rnr = $linkctr++;
- $new_unlinked[$i << 1] = $lnr;
- $new_unlinked[1+($i << 1)] = $rnr;
- branch_node($lnr, $rnr);
- } else {
- leaf_node($match);
- $new_unlinked[$i << 1] = -1;
- $new_unlinked[1+($i << 1)] = -1;
- }
-
- }
- }
-
- if ($DEBUG) {
- print "level $level: Copying ", ($entries << 1), "\n";
- }
- for ($j = 0; $j < ($entries << 1); $j++) {
- $unlinked[$j] = $new_unlinked[$j];
- if ($DEBUG) {
- print $unlinked[$j], " ";
- }
- }
- if ($DEBUG) {
- print "\n";
- }
- }
-
- my $ok = 1;
- for ($j = 0; $j < ($entries << 1); $j++) {
- if ($unlinked[$j] != -1) {
- $ok = 0;
- }
- }
-
- print "#warning \"Tree is not a huffman tree!\"\n" unless $ok;
-}
-
-
diff --git a/engines/sci/scicore/hufftree.1 b/engines/sci/scicore/hufftree.1
deleted file mode 100644
index d51462d304..0000000000
--- a/engines/sci/scicore/hufftree.1
+++ /dev/null
@@ -1,17 +0,0 @@
-101
-11
-100
-011
-0101
-0100
-0011
-00101
-00100
-00011
-00010
-000011
-000010
-000001
-0000001
-0000000
--
diff --git a/engines/sci/scicore/hufftree.2 b/engines/sci/scicore/hufftree.2
deleted file mode 100644
index d13cd2fa66..0000000000
--- a/engines/sci/scicore/hufftree.2
+++ /dev/null
@@ -1,69 +0,0 @@
-11
-1011
-1010
-10011
-10010
-10001
-10000
-011111
-011110
-011101
-011100
-011011
-011010
-011001
-011000
-010111
-010110
-010101
-010100
-010011
-010010
-010001
-0100001
-0100000
-0011111
-0011110
-0011101
-0011100
-0011011
-0011010
-0011001
-0011000
-0010111
-0010110
-0010101
-0010100
-0010011
-0010010
-0010001
-0010000
-0001111
-0001110
-0001101
-0001100
-0001011
-0001010
-0001001
-0001000
-00001111
-00001110
-00001101
-00001100
-00001011
-00001010
-00001001
-00001000
-00000111
-00000110
-00000101
-00000100
-00000011
-00000010
-00000001
-00000000
--
-
-
-
-
diff --git a/engines/sci/scicore/hufftree.3 b/engines/sci/scicore/hufftree.3
deleted file mode 100644
index 116b195383..0000000000
--- a/engines/sci/scicore/hufftree.3
+++ /dev/null
@@ -1,257 +0,0 @@
-00001001001
-000001111111
-000001111110
-000001111101
-000001111100
-000001111011
-000001111010
-000001111001
-000001111000
-00011101
-0100011
-000001110111
-000001110110
-0100010
-000001110101
-000001110100
-000001110011
-000001110010
-000001110001
-000001110000
-000001101111
-000001101110
-000001101101
-000001101100
-000001101011
-000001101010
-0000001001001
-000001101001
-000001101000
-000001100111
-000001100110
-000001100101
-1111
-0000101001
-00011100
-000001100100
-0000101000
-000001100011
-0000100111
-00011011
-0100001
-0100000
-00011010
-000011011
-0011111
-100101
-0011110
-00011001
-0011101
-100100
-0011100
-0011011
-0011010
-0011001
-00011000
-0011000
-0010111
-00010111
-00010110
-000001100010
-00001001000
-0010110
-000011010
-00001000111
-000001100001
-100011
-0010101
-100010
-100001
-11101
-0010100
-00010101
-00010100
-100000
-00001000110
-000011001
-011111
-0010011
-011110
-011101
-0010010
-00001000101
-011100
-011011
-011010
-0010001
-000011000
-00010011
-000010111
-000010110
-00001000100
-00010010
-00001000011
-000010101
-000001100000
-00010001
-000001011111
-11100
-011001
-011000
-010111
-11011
-010110
-010101
-010100
-11010
-00001000010
-0010000
-11001
-010011
-11000
-10111
-010010
-0000100110
-10110
-10101
-10100
-10011
-00010000
-0001111
-00001111
-00001110
-0000100101
-00001000001
-00001000000
-000001011110
-000001011101
-000001011100
-0000001001000
-0000001000111
-0000001000110
-0000001000101
-0000001000100
-0000001000011
-0000001000010
-0000001000001
-0000001000000
-0000000111111
-0000000111110
-0000000111101
-0000000111100
-0000000111011
-0000000111010
-0000000111001
-0000000111000
-0000000110111
-0000000110110
-0000000110101
-0000000110100
-0000000110011
-0000000110010
-0000000110001
-0000000110000
-0000000101111
-0000000101110
-0000000101101
-0000000101100
-0000000101011
-0000000101010
-0000000101001
-0000000101000
-0000000100111
-0000000100110
-0000000100101
-0000000100100
-0000000100011
-0000000100010
-0000000100001
-0000000100000
-0000000011111
-0000000011110
-0000000011101
-0000000011100
-0000000011011
-0000000011010
-0000000011001
-000001011011
-000001011010
-000001011001
-000001011000
-000001010111
-000001010110
-000001010101
-000001010100
-000001010011
-000001010010
-000001010001
-000001010000
-000001001111
-000001001110
-000001001101
-000001001100
-000001001011
-000001001010
-000001001001
-000001001000
-000001000111
-000001000110
-000001000101
-000001000100
-000001000011
-000001000010
-000001000001
-000001000000
-000000111111
-000000111110
-000000111101
-000000111100
-000000111011
-000000111010
-000000111001
-000000111000
-000000110111
-000000110110
-000000110101
-000000110100
-000000110011
-000000110010
-000000110001
-000000110000
-000000101111
-000000101110
-000000101101
-000000101100
-0000000011000
-000000101011
-0000000010111
-0000000010110
-0000000010101
-000000101010
-0000000010100
-0000000010011
-0000000010010
-000000101001
-0000000010001
-0000000010000
-0000000001111
-0000000001110
-000000101000
-0000000001101
-0000000001100
-0000000001011
-000000100111
-000000100110
-000000100101
-0000000001010
-0000000001001
-0000000001000
-0000000000111
-0000000000110
-0000000000101
-0000000000100
-0000000000011
-0000000000010
-0000000000001
-0000000000000
--