[Scummvm-cvs-logs] SF.net SVN: scummvm:[41800] tools/trunk
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Tue Jun 23 03:41:35 CEST 2009
Revision: 41800
http://scummvm.svn.sourceforge.net/scummvm/?rev=41800&view=rev
Author: drmccoy
Date: 2009-06-23 01:41:34 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
This should now find all functions in the scripts. I hope :P
Modified Paths:
--------------
tools/trunk/degob_script.cpp
tools/trunk/degob_script.h
Modified: tools/trunk/degob_script.cpp
===================================================================
--- tools/trunk/degob_script.cpp 2009-06-23 01:23:51 UTC (rev 41799)
+++ tools/trunk/degob_script.cpp 2009-06-23 01:41:34 UTC (rev 41800)
@@ -867,6 +867,14 @@
} while (params.counter != params.cmdCount);
}
+void Script::addStartingOffsets() {
+ for (int i = 100; i < 128; i += 2) {
+ uint16 offset = READ_LE_UINT16(_totData + i);
+ if ((offset >= 128) && (offset != ((uint16) -1)))
+ addFuncOffset(offset);
+ }
+}
+
void Script::addFuncOffset(uint32 offset) {
for (std::list<uint32>::iterator it = _funcOffsets.begin(); it != _funcOffsets.end(); ++it)
if (*it == offset)
@@ -876,10 +884,11 @@
}
void Script::deGob(int32 offset) {
+ _funcOffsets.clear();
+
if (offset < 0)
- offset = _start;
-
- _funcOffsets.clear();
+ addStartingOffsets();
+ else
_funcOffsets.push_back(offset);
for (std::list<uint32>::iterator it = _funcOffsets.begin(); it != _funcOffsets.end(); ++it) {
Modified: tools/trunk/degob_script.h
===================================================================
--- tools/trunk/degob_script.h 2009-06-23 01:23:51 UTC (rev 41799)
+++ tools/trunk/degob_script.h 2009-06-23 01:41:34 UTC (rev 41800)
@@ -156,6 +156,8 @@
void funcBlock(int16 retFlag);
+ void addStartingOffsets();
+
void addFuncOffset(uint32 offset);
void deGobFunction();
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