aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2006-02-05 00:50:03 +0000
committerTravis Howell2006-02-05 00:50:03 +0000
commit937a5f8af5289fb05911e76d31620368e745851f (patch)
treefa4662fcae081a4367c0f1934ef5839118f89062 /scumm
parentdf3d553e321aa01df6357134e7d42c655379dbea (diff)
downloadscummvm-rg350-937a5f8af5289fb05911e76d31620368e745851f.tar.gz
scummvm-rg350-937a5f8af5289fb05911e76d31620368e745851f.tar.bz2
scummvm-rg350-937a5f8af5289fb05911e76d31620368e745851f.zip
Change to int32 for safety.
svn-id: r20383
Diffstat (limited to 'scumm')
-rw-r--r--scumm/intern_he.h2
-rw-r--r--scumm/script_v100he.cpp4
-rw-r--r--scumm/script_v72he.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/scumm/intern_he.h b/scumm/intern_he.h
index 043c336746..1bd8e5afa2 100644
--- a/scumm/intern_he.h
+++ b/scumm/intern_he.h
@@ -262,7 +262,7 @@ protected:
void copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int len1, byte **data, int *size, int *num);
virtual int setupStringArray(int size);
int readFileToArray(int slot, int32 size);
- void writeFileFromArray(int slot, int resID);
+ void writeFileFromArray(int slot, int32 resID);
virtual void decodeParseString(int a, int b);
void decodeScriptString(byte *dst, bool scriptString = false);
diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp
index f71bad3864..091f2d55cc 100644
--- a/scumm/script_v100he.cpp
+++ b/scumm/script_v100he.cpp
@@ -765,7 +765,7 @@ void ScummEngine_v100he::o100_dim2dimArray() {
void ScummEngine_v100he::o100_dimArray() {
int data;
- int subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
switch (subOp) {
case 41: // SO_BIT_ARRAY
@@ -2853,7 +2853,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
void ScummEngine_v100he::o100_getVideoData() {
// Uses Bink video
- int subOp = fetchScriptByte();
+ byte subOp = fetchScriptByte();
subOp -= 26;
switch (subOp) {
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 9a5f2c09ac..8b335bf425 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1851,7 +1851,7 @@ void ScummEngine_v72he::o72_readFile() {
debug(1, "o72_readFile: slot %d, subOp %d val %d", slot, subOp, val);
}
-void ScummEngine_v72he::writeFileFromArray(int slot, int resID) {
+void ScummEngine_v72he::writeFileFromArray(int slot, int32 resID) {
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, resID);
int32 size = (FROM_LE_32(ah->dim1end) - FROM_LE_32(ah->dim1start) + 1) *
(FROM_LE_32(ah->dim2end) - FROM_LE_32(ah->dim2start) + 1);
@@ -1860,7 +1860,7 @@ void ScummEngine_v72he::writeFileFromArray(int slot, int resID) {
}
void ScummEngine_v72he::o72_writeFile() {
- int resID = pop();
+ int32 resID = pop();
int slot = pop();
byte subOp = fetchScriptByte();