[Scummvm-cvs-logs] SF.net SVN: scummvm:[40977] scummvm/trunk/engines/sci/engine/game.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri May 29 10:46:20 CEST 2009
Revision: 40977
http://scummvm.svn.sourceforge.net/scummvm/?rev=40977&view=rev
Author: thebluegr
Date: 2009-05-29 08:46:20 +0000 (Fri, 29 May 2009)
Log Message:
-----------
Cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/game.cpp
Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp 2009-05-29 08:25:42 UTC (rev 40976)
+++ scummvm/trunk/engines/sci/engine/game.cpp 2009-05-29 08:46:20 UTC (rev 40977)
@@ -219,34 +219,6 @@
return 0;
}
-
-/* Maps a class ID to the script the corresponding class is contained in
- Returns the script number suggested by vocab.996, or -1 if there's none */
-static int suggested_script(Resource *res, unsigned int classId) {
- int offset;
-
- if (!res || classId >= res->size >> 2)
- return -1;
-
- offset = 2 + (classId << 2);
-
- return (int16)READ_LE_UINT16(res->data + offset);
-}
-
-#if 0
-// Unreferenced - removed
-int test_cursor_style(EngineState *s) {
- int resource_nr = 0;
- int ok = 0;
-
- do {
- ok |= s->resmgr->testResource(kResourceTypeCursor, resource_nr++) != NULL;
- } while (resource_nr < 1000 && !ok);
-
- return ok;
-}
-#endif
-
int create_class_table_sci11(EngineState *s) {
int scriptnr;
unsigned int seeker_offset;
@@ -349,7 +321,12 @@
s->_classtable.resize(classnr + 1); // Adjust maximum number of entries
}
- sugg_script = suggested_script(vocab996, classnr);
+ // Map the class ID to the script the corresponding class is contained in
+ // The script number is found in vocab.996, if it exists
+ if (!vocab996 || classnr >= vocab996->size >> 2)
+ sugg_script = -1;
+ else
+ sugg_script = (int16)READ_LE_UINT16(vocab996->data + 2 + (classnr << 2));
// First, test whether the script hasn't been claimed, or if it's been claimed by the wrong script
@@ -455,15 +432,6 @@
void internal_stringfrag_strncpy(EngineState *s, reg_t *dest, reg_t *src, int len);
-#if 0
-// Unreferenced - removed
-void script_set_gamestate_save_dir(EngineState *s, reg_t path) {
- SystemString *str = &s->sys_strings->strings[SYS_STRING_SAVEDIR];
- reg_t *srcbuf = kernel_dereference_reg_pointer(s, path, 1);
- internal_stringfrag_strncpy(s, str->value, srcbuf, MAX_SAVE_DIR_SIZE);
-}
-#endif
-
void script_free_vm_memory(EngineState *s) {
debug(2, "Freeing VM memory");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list