aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2007-12-08 18:16:30 +0000
committerFilippos Karapetis2007-12-08 18:16:30 +0000
commitb24f10dde0951702bc02a0ea749a9ac5a03e1f93 (patch)
treece628bdb91efe3f3afbc05595782a944294d361d
parent621f798241e8818b68a2b0353377fb3bd1328abc (diff)
downloadscummvm-rg350-b24f10dde0951702bc02a0ea749a9ac5a03e1f93.tar.gz
scummvm-rg350-b24f10dde0951702bc02a0ea749a9ac5a03e1f93.tar.bz2
scummvm-rg350-b24f10dde0951702bc02a0ea749a9ac5a03e1f93.zip
The variables nFrame and iItem can also have negative values
svn-id: r29769
-rw-r--r--engines/agi/preagi_mickey.cpp8
-rw-r--r--engines/agi/preagi_mickey.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index ede65d1b23..4c9b93ba96 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -972,7 +972,7 @@ bool Mickey::loadGame() {
_game.fItemUsed[i] = infile->readByte() == 1;
for(i = 0; i < IDI_MSA_MAX_ITEM; i++)
- _game.iItem[i] = infile->readByte();
+ _game.iItem[i] = infile->readSByte();
_game.nItems = infile->readByte();
@@ -991,7 +991,7 @@ bool Mickey::loadGame() {
for(i = 0; i < IDI_MSA_MAX_ROOM; i++)
_game.nRmMenu[i] = infile->readByte();
- _game.nFrame = infile->readByte();
+ _game.nFrame = infile->readSByte();
diskerror = false;
delete infile;
@@ -1077,7 +1077,7 @@ void Mickey::saveGame() {
outfile->writeByte(_game.fItemUsed[i] ? 1 : 0);
for(i = 0; i < IDI_MSA_MAX_ITEM; i++)
- outfile->writeByte(_game.iItem[i]);
+ outfile->writeSByte(_game.iItem[i]);
outfile->writeByte(_game.nItems);
@@ -1096,7 +1096,7 @@ void Mickey::saveGame() {
for(i = 0; i < IDI_MSA_MAX_ROOM; i++)
outfile->writeByte(_game.nRmMenu[i]);
- outfile->writeByte(_game.nFrame);
+ outfile->writeSByte(_game.nFrame);
outfile->finalize();
diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h
index f7ec808b4a..548bd3c009 100644
--- a/engines/agi/preagi_mickey.h
+++ b/engines/agi/preagi_mickey.h
@@ -715,7 +715,7 @@ struct MSA_GAME {
bool fItem[IDI_MSA_MAX_ITEM];
bool fItemUsed[IDI_MSA_MAX_ITEM];
- uint8 iItem[IDI_MSA_MAX_ITEM];
+ int8 iItem[IDI_MSA_MAX_ITEM];
uint8 nItems;
//uint8 fRmTxt[IDI_MSA_MAX_ROOM];
@@ -726,7 +726,7 @@ struct MSA_GAME {
uint8 iRmMenu[IDI_MSA_MAX_ROOM];
uint8 nRmMenu[IDI_MSA_MAX_ROOM];
- uint8 nFrame;
+ int8 nFrame;
};
class Mickey {