From 69b1485a22dc2b8a2cfe0bd10edcbaad0da0cf6e Mon Sep 17 00:00:00 2001 From: strangerke Date: Thu, 12 May 2011 01:13:57 +0200 Subject: GIT: Clean up: Suppress SVN tags, now useless --- engines/scumm/script_v6.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'engines/scumm/script_v6.cpp') diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index b2df1d0baa..c5fa245d43 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -18,9 +18,6 @@ * 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 "common/config-manager.h" -- cgit v1.2.3 From 45e65d7ea04b10cf7bb5282bd66b8df609700a63 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 11 May 2011 16:23:26 +0200 Subject: SCUMM: Refactor how resource (types) are srepresented Previously, we had a couple of arrays of size N (where N = number of resource types), one for each attribute of a resource type (such as as the number of resources of that type. Now, we have one array of size N, whose elements are a record aggregating all the attributes of each resource type. --- engines/scumm/script_v6.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/scumm/script_v6.cpp') diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index c5fa245d43..afc1eb6909 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -357,7 +357,7 @@ void ScummEngine_v6::nukeArray(int a) { } int ScummEngine_v6::findFreeArrayId() { - byte **addr = _res->address[rtString]; + byte **addr = _res->_types[rtString].address; int i; for (i = 1; i < _numArray; i++) { -- cgit v1.2.3 From 75b9deb1856bae8355403faa5f55857f3929adb6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 11 May 2011 18:06:30 +0200 Subject: SCUMM: Get rid of the MemBlkHeader hack This uncovered at least one potentially serious bug in the inventory code, which still needs to be investigated and fixed. --- engines/scumm/script_v6.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/scumm/script_v6.cpp') diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index afc1eb6909..138da3f921 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -357,7 +357,7 @@ void ScummEngine_v6::nukeArray(int a) { } int ScummEngine_v6::findFreeArrayId() { - byte **addr = _res->_types[rtString].address; + byte **addr = _res->_types[rtString]._address; int i; for (i = 1; i < _numArray; i++) { -- cgit v1.2.3 From c02420df43bec4ec523c18d8e6fdb381af29c1b5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 13 May 2011 11:45:42 +0200 Subject: SCUMM: Add a Resource class, refactor res code around it --- engines/scumm/script_v6.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/scumm/script_v6.cpp') diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index 138da3f921..341f6ecf5c 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -357,11 +357,11 @@ void ScummEngine_v6::nukeArray(int a) { } int ScummEngine_v6::findFreeArrayId() { - byte **addr = _res->_types[rtString]._address; + const ResourceManager::ResTypeData &rtd = _res->_types[rtString]; int i; for (i = 1; i < _numArray; i++) { - if (!addr[i]) + if (!rtd._resources[i]._address) return i; } error("Out of array pointers, %d max", _numArray); -- cgit v1.2.3 From 9ec64a66fe2f20eb1be0811b5f733332efff1b93 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 13 May 2011 14:48:01 +0200 Subject: SCUMM: Turned ResTypeData into a Common::Array, subsuming its _resource member --- engines/scumm/script_v6.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/scumm/script_v6.cpp') diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index 341f6ecf5c..decd34222d 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -361,7 +361,7 @@ int ScummEngine_v6::findFreeArrayId() { int i; for (i = 1; i < _numArray; i++) { - if (!rtd._resources[i]._address) + if (!rtd[i]._address) return i; } error("Out of array pointers, %d max", _numArray); -- cgit v1.2.3