aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-10-20 20:58:14 +0000
committerFilippos Karapetis2010-10-20 20:58:14 +0000
commitae2d2e78e13b75f556cc532b34cf6db13d53ffca (patch)
tree88df5b580f9edb32c2dfe41ece80a30887d1de15
parentaee1e1574429fceaecd8258ff4ce0b0db0f427c5 (diff)
downloadscummvm-rg350-ae2d2e78e13b75f556cc532b34cf6db13d53ffca.tar.gz
scummvm-rg350-ae2d2e78e13b75f556cc532b34cf6db13d53ffca.tar.bz2
scummvm-rg350-ae2d2e78e13b75f556cc532b34cf6db13d53ffca.zip
SCI tools: Removing the now obsolete classes, scriptdump and vocabdump tools, after discussing with lskovlun. We got better functionality than these in ScummVM now
svn-id: r53653
-rw-r--r--tools/sci/classes.cpp76
-rw-r--r--tools/sci/scriptdump.cpp45
-rw-r--r--tools/sci/vocabdump.cpp70
3 files changed, 0 insertions, 191 deletions
diff --git a/tools/sci/classes.cpp b/tools/sci/classes.cpp
deleted file mode 100644
index d7699bfe4c..0000000000
--- a/tools/sci/classes.cpp
+++ /dev/null
@@ -1,76 +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$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <engine.h>
-#include <vocabulary.h>
-
-int main(int argc, char** argv) {
- int res;
- int sizes[1000];
- int altsizes[1000];
- int count, *classes;
- loadResources(SCI_VERSION_AUTODETECT, 1);
-
- for (res = 0; res < 1000; res++) {
- resource_t* r;
- int i = 0;
-
- sizes[res] = -1;
-
- if ((r = findResource(sci_script, res)) == 0) continue;
- sizes[res] = 0;
- altsizes[res] = 0;
- i += 2;
- i = getInt16(r->data + i);
-
- while (i < r->length - 2) {
- switch (getInt16(r->data + i)) {
- case 1:
- case 6:
- sizes[res]++;
- break;
- default:
- altsizes[res]++;
- }
- i += getInt16(r->data + i + 2);
- }
- fflush(stdout);
- }
-
- for (res = 0; res < 1000; res++) if (sizes[res] != -1) printf("%03d %d\n", res, sizes[res]);
- printf("\n");
-
- classes = vocabulary_get_classes(&count);
- for (res = 0; res < count; res++) {
- printf("%03d %d (%d)\n", classes[res],
- sizes[classes[res]]--, altsizes[classes[res]]);
- }
-
- freeResources();
- return 0;
-}
diff --git a/tools/sci/scriptdump.cpp b/tools/sci/scriptdump.cpp
deleted file mode 100644
index 9a5ef00035..0000000000
--- a/tools/sci/scriptdump.cpp
+++ /dev/null
@@ -1,45 +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$
- *
- */
-
-#include <console.h>
-#include <script.h>
-#include <vocabulary.h>
-#include <old_objects.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <engine.h>
-#include "sciunpack.h"
-
-int script_dump() {
- con_passthrough = 1;
-
- if (loadObjects(resmgr)) {
- fprintf(stderr, "Unable to load object hierarchy\n");
- return 1;
- }
-
- printObject(object_root, SCRIPT_PRINT_METHODS | SCRIPT_PRINT_CHILDREN);
- return 0;
-}
diff --git a/tools/sci/vocabdump.cpp b/tools/sci/vocabdump.cpp
deleted file mode 100644
index 26bac4dcf0..0000000000
--- a/tools/sci/vocabdump.cpp
+++ /dev/null
@@ -1,70 +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$
- *
- */
-
-#include <engine.h>
-#include "sciunpack.h"
-
-int
-vocab_dump() {
- char **names;
- opcode *opcodes;
- int i = 0, count;
- int *classes;
-
- printf("Selectors:\n");
- names = vocabulary_get_snames(resmgr, NULL, 0);
- while (names[i]) {
- printf("0x%02X: %s\n", i, names[i]);
- i++;
- }
- vocabulary_free_snames(names);
-
- i = 0;
- printf("\nOpcodes:\n");
- opcodes = vocabulary_get_opcodes(resmgr);
- while ((i < 256) && (opcodes[i].name)) {
- printf("%s: Type %i, Number %i\n", opcodes[i].name,
- opcodes[i].type, opcodes[i].number);
- i++;
- }
-
- names = vocabulary_get_knames(resmgr, &count);
- printf("\nKernel names:\n");
- if (names == 0) printf("Error loading kernel names\n");
- else {
- for (i = 0; i < count; i++) printf("0x%02X: %s\n", i, names[i]);
- vocabulary_free_knames(names);
- }
-
- classes = vocabulary_get_classes(resmgr, &count);
- printf("\nClasses:\n");
- if (classes == 0) printf("Error loading classes\n");
- else {
- for (i = 0; i < count; i++) printf("0x%02X: script %i\n", i, classes [i]);
- free(classes);
- }
-
- return 0;
-}