aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2017-02-10 10:07:51 +0200
committerFilippos Karapetis2017-02-10 10:07:51 +0200
commit3e4710bb209d1647d0cbc6fc6bffc7938a983303 (patch)
tree6449fe7a41b2548816c300bd105e7cc00c887c2f
parent95feec2aa6f7898cf82c4ebb206e88f9c7abb033 (diff)
downloadscummvm-rg350-3e4710bb209d1647d0cbc6fc6bffc7938a983303.tar.gz
scummvm-rg350-3e4710bb209d1647d0cbc6fc6bffc7938a983303.tar.bz2
scummvm-rg350-3e4710bb209d1647d0cbc6fc6bffc7938a983303.zip
Revert "CRYO: Use cryo.dat for all game versions"
This reverts commit 6ff7ef95d73c29051a675d03bdccd42f0a5a215b.
-rw-r--r--engines/cryo/eden.cpp52
1 files changed, 24 insertions, 28 deletions
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index 214744f530..4ff18bf307 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -4729,30 +4729,29 @@ void EdenGame::convertMacToPC() {
}
void EdenGame::loadpermfiles() {
- Common::File f;
- const int kNumIcons = 136;
- const int kNumRooms = 424;
-
- if (f.open("cryo.dat")) {
- const int dataSize = f.size() - 8 - 1; // CRYODATA + version
- char headerId[9];
+ switch (_vm->getPlatform()) {
+ case Common::kPlatformDOS:
+ {
+ // Since PC version stores hotspots and rooms info in the executable, load them from premade resource file
+ Common::File f;
- f.read(headerId, 8);
- headerId[8] = '\0';
- if (strcmp(headerId, "CRYODATA"))
- error("Invalid aux data file");
+ if (f.open("cryo.dat")) {
+ const int kNumIcons = 136;
+ const int kNumRooms = 424;
+ const int dataSize = f.size() - 8 - 1; // CRYODATA + version
+ char headerId[9];
+
+ f.read(headerId, 8);
+ headerId[8] = '\0';
+ if (strcmp(headerId, "CRYODATA"))
+ error("Invalid aux data file");
- if (f.readByte() != CRYO_DAT_VER)
- error("Incorrect aux data version");
+ if (f.readByte() != CRYO_DAT_VER)
+ error("Incorrect aux data version");
- if (dataSize != kNumIcons * sizeof(Icon) + kNumRooms * sizeof(Room))
- error("Mismatching data in aux data file");
- } else
- error("Can not load aux data");
+ if (dataSize != kNumIcons * sizeof(Icon) + kNumRooms * sizeof(Room))
+ error("Mismatching data in aux data file");
- switch (_vm->getPlatform()) {
- case Common::kPlatformDOS:
- // Since PC version stores hotspots and rooms info in the executable, load them from premade resource file
for (int i = 0; i < kNumIcons; i++) {
_gameIcons[i].sx = f.readSint16LE();
_gameIcons[i].sy = f.readSint16LE();
@@ -4775,25 +4774,22 @@ void EdenGame::loadpermfiles() {
_gameRooms[i]._location = f.readByte();
_gameRooms[i]._backgroundBankNum = f.readByte();
}
+
+ f.close();
+ } else
+ error("Can not load aux data");
+ }
break;
case Common::kPlatformMacintosh:
loadIconFile(2498, _gameIcons);
loadRoomFile(2497, _gameRooms);
loadRawFile(2486, _gameLipsync);
convertMacToPC();
-
- // Skip the icons and rooms of the DOS version
- f.skip(kNumIcons * sizeof(Icon) + kNumRooms * sizeof(Room));
break;
default:
error("Unsupported platform");
}
- // Read the common static data
- // TODO
-
- f.close();
-
loadRawFile(0, _mainBankBuf);
loadRawFile(402, _gameFont);
loadRawFile(404, _gameDialogs);