aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-11-27 13:13:41 +0000
committerMax Horn2004-11-27 13:13:41 +0000
commit90e3fa96a33b9ba78130c5a319611e12827f088b (patch)
tree86a7465af9767dff1dbb42d28aae98d83b3b8bac /scumm
parentdce059eebf0d329de2d8a142782c366cfb11eaed (diff)
downloadscummvm-rg350-90e3fa96a33b9ba78130c5a319611e12827f088b.tar.gz
scummvm-rg350-90e3fa96a33b9ba78130c5a319611e12827f088b.tar.bz2
scummvm-rg350-90e3fa96a33b9ba78130c5a319611e12827f088b.zip
Make Array stuff part of the V6 engine class (note: it's a bit confusing to have two different ArrayHeader structs, maybe we should rename them?)
svn-id: r15909
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern.h24
-rw-r--r--scumm/resource.h24
-rw-r--r--scumm/script_v6.cpp4
3 files changed, 26 insertions, 26 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 77839542dd..f013558d3b 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -342,6 +342,30 @@ protected:
const char *desc;
};
+ enum ArrayType {
+ kBitArray = 1,
+ kNibbleArray = 2,
+ kByteArray = 3,
+ kStringArray = 4,
+ kIntArray = 5,
+ kDwordArray = 6
+ };
+
+ #if !defined(__GNUC__)
+ #pragma START_PACK_STRUCTS
+ #endif
+
+ struct ArrayHeader {
+ int16 dim1;
+ int16 type;
+ int16 dim2;
+ byte data[1];
+ } GCC_PACK;
+
+ #if !defined(__GNUC__)
+ #pragma END_PACK_STRUCTS
+ #endif
+
const OpcodeEntryV6 *_opcodesV6;
int _smushFrameRate;
diff --git a/scumm/resource.h b/scumm/resource.h
index 968f700f97..6f8e708086 100644
--- a/scumm/resource.h
+++ b/scumm/resource.h
@@ -23,30 +23,6 @@
namespace Scumm {
-enum ArrayType {
- kBitArray = 1,
- kNibbleArray = 2,
- kByteArray = 3,
- kStringArray = 4,
- kIntArray = 5,
- kDwordArray = 6
-};
-
-#if !defined(__GNUC__)
- #pragma START_PACK_STRUCTS
-#endif
-
-struct ArrayHeader {
- int16 dim1;
- int16 type;
- int16 dim2;
- byte data[1];
-} GCC_PACK;
-
-#if !defined(__GNUC__)
- #pragma END_PACK_STRUCTS
-#endif
-
enum {
OF_OWNER_MASK = 0x0F,
OF_STATE_MASK = 0xF0,
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index ce178fb8a4..dc99117e24 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -397,7 +397,7 @@ int ScummEngine_v6::popRoomAndObj(int *room) {
return obj;
}
-ArrayHeader *ScummEngine_v6::defineArray(int array, int type, int dim2, int dim1) {
+ScummEngine_v6::ArrayHeader *ScummEngine_v6::defineArray(int array, int type, int dim2, int dim1) {
if (_heversion >= 72)
error("Call to old defineArray");
@@ -487,7 +487,7 @@ int ScummEngine_v6::findFreeArrayId() {
#define SWAP16(x) x = SWAP_BYTES_16(x)
-ArrayHeader *ScummEngine_v6::getArray(int array) {
+ScummEngine_v6::ArrayHeader *ScummEngine_v6::getArray(int array) {
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
if (!ah)
return 0;