aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorJames Brown2002-04-20 04:09:02 +0000
committerJames Brown2002-04-20 04:09:02 +0000
commiteb773b477a669427ff84e422bbdb1c3d6b63e8ef (patch)
treefdcef5572f381d4760e150fe5558b6de703f5922 /simon
parented65e89a897f66eadc53ce27eb5fe6b39d16a0eb (diff)
downloadscummvm-rg350-eb773b477a669427ff84e422bbdb1c3d6b63e8ef.tar.gz
scummvm-rg350-eb773b477a669427ff84e422bbdb1c3d6b63e8ef.tar.bz2
scummvm-rg350-eb773b477a669427ff84e422bbdb1c3d6b63e8ef.zip
Remove \M's, add IRIX support.
svn-id: r4019
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp4
-rw-r--r--simon/simon.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index f0890e600f..0d9e8db987 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -302,7 +302,7 @@ void SimonState::readItemChildren(FILE *in, Item *item, uint tmp) {
uint j, k;
Child1 *child;
- size = sizeof(Child1);
+ size = CHILD1_SIZE;
for(i=0,j=fr2; i!=6; i++, j>>=2)
if (j&3)
size += sizeof(child->array[0]);
@@ -319,7 +319,7 @@ void SimonState::readItemChildren(FILE *in, Item *item, uint tmp) {
uint i,k,size;
Child2 *child;
- size = sizeof(Child2);
+ size = CHILD2_SIZE;
for(i=0; i!=16; i++)
if (fr & (1<<i))
size += sizeof(child->array[0]);
diff --git a/simon/simon.h b/simon/simon.h
index 1581007fbe..d44271dcfb 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -47,10 +47,10 @@ void fileWriteBE16(FILE *in, uint16 value);
#define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
#define CHECK_BOUNDS(x,y) assert((uint)(x)<ARRAYSIZE(y))
-#ifdef WIN32
-/* don't complain about zero sized arrays */
-#pragma warning (disable: 4200)
-#endif
+enum {
+ CHILD1_SIZE = 12,
+ CHILD2_SIZE = 16
+};
struct Child {
Child *next;
@@ -62,7 +62,7 @@ struct Child2 {
uint16 string_id;
uint32 avail_props;
- int16 array[0];
+ int16 array[1];
};
struct Child1 {
@@ -70,7 +70,7 @@ struct Child1 {
uint16 subroutine_id;
uint16 fr2;
- uint16 array[0];
+ uint16 array[1];
};
struct Child9 {