aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/preagi_mickey.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2007-09-22 10:10:01 +0000
committerFilippos Karapetis2007-09-22 10:10:01 +0000
commit366b65486f84840be52b5a6f04be64f3a51f57d9 (patch)
tree7d9d97ac9fec73f0cc5d52a9e4eb85da7dad8a0b /engines/agi/preagi_mickey.cpp
parentdc43ca779fb59fbae5c52d81f6d3fa2bca1c4c4d (diff)
downloadscummvm-rg350-366b65486f84840be52b5a6f04be64f3a51f57d9.tar.gz
scummvm-rg350-366b65486f84840be52b5a6f04be64f3a51f57d9.tar.bz2
scummvm-rg350-366b65486f84840be52b5a6f04be64f3a51f57d9.zip
Code simplification. Removed IDI_MSA_MAX_STR and fRmTxt - oRmTxt is used instead, as the two arrays contained non-null values for the same rooms. Also, room object indices are no longer read from the original executable
svn-id: r29016
Diffstat (limited to 'engines/agi/preagi_mickey.cpp')
-rw-r--r--engines/agi/preagi_mickey.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index c4d8906982..4a6386944b 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -949,7 +949,7 @@ void Mickey::printRoomDesc() {
waitAnyKeyAnim();
// print extended room description
- if (game.fRmTxt[game.iRoom]) {
+ if (game.oRmTxt[game.iRoom]) {
printExeMsg(game.oRmTxt[game.iRoom] + IDI_MSA_OFS_EXE);
}
}
@@ -1340,13 +1340,13 @@ void Mickey::intro() {
void Mickey::getItem(ENUM_MSA_ITEM iItem) {
game.fItem[iItem] = true;
game.iItem[game.nItems++] = iItem;
- game.fRmTxt[game.iRoom] = 0;
+ game.oRmTxt[game.iRoom] = 0;
playSound(IDI_MSA_SND_TAKE);
drawRoom();
}
void Mickey::getXtal(int iStr) {
- game.fRmTxt[game.iRoom] = 0;
+ game.oRmTxt[game.iRoom] = 0;
game.fHasXtal = true;
game.nXtals++;
playSound(IDI_MSA_SND_CRYSTAL);
@@ -2149,8 +2149,8 @@ void Mickey::initVars() {
memset(&game, 0, sizeof(game));
memset(&game.iItem, IDI_MSA_OBJECT_NONE, sizeof(game.iItem));
// read room extended desc flags
- readExe(IDO_MSA_ROOM_TEXT, buffer, sizeof(buffer));
- memcpy(game.fRmTxt, buffer, sizeof(game.fRmTxt));
+ //readExe(IDO_MSA_ROOM_TEXT, buffer, sizeof(buffer));
+ //memcpy(game.fRmTxt, buffer, sizeof(game.fRmTxt));
// read room extended desc offsets
readExe(IDO_MSA_ROOM_TEXT_OFFSETS, buffer, sizeof(buffer));
@@ -2159,8 +2159,8 @@ void Mickey::initVars() {
game.oRmTxt[i] = buffer[i*2] + 256 * buffer[i*2+1];
// read room object indices
- readExe(IDO_MSA_ROOM_OBJECT, buffer, sizeof(buffer));
- memcpy(game.iRmObj, buffer, sizeof(game.iRmObj));
+ //readExe(IDO_MSA_ROOM_OBJECT, buffer, sizeof(buffer));
+ //memcpy(game.iRmObj, buffer, sizeof(game.iRmObj));
// read room picture indices
//readExe(IDO_MSA_ROOM_PICTURE, buffer, sizeof(buffer));
@@ -2170,11 +2170,17 @@ void Mickey::initVars() {
readExe(IDO_MSA_ROOM_MENU_FIX, buffer, sizeof(buffer));
memcpy(game.nRmMenu, buffer, sizeof(game.nRmMenu));
- // set room picture indices
+ // set room picture and room object indices
for (int i = 0; i < IDI_MSA_MAX_ROOM; i++) {
game.iRmPic[i] = i;
+ game.iRmObj[i] = -1;
}
game.iRmPic[IDI_MSA_PIC_SHIP_AIRLOCK] = IDI_MSA_PIC_SHIP_AIRLOCK_0;
+ game.iRmObj[23] = 11;
+ game.iRmObj[110] = 21;
+ game.iRmObj[112] = 20;
+ game.iRmObj[119] = 19;
+ game.iRmObj[154] = 1;
#if 0
// DEBUG