The variables nFrame and iItem can also have negative values

svn-id: r29769
This commit is contained in:
Filippos Karapetis 2007-12-08 18:16:30 +00:00
parent 621f798241
commit b24f10dde0
2 changed files with 6 additions and 6 deletions

View File

@ -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();

View File

@ -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 {