aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2006-09-18 17:30:51 +0000
committerJohannes Schickel2006-09-18 17:30:51 +0000
commitf9d1a82cc0011c4db8745d51af30ca8b73c2b1d1 (patch)
tree88b56e9991a75fccd0335bb6ded1a30076fd6389 /engines
parent99016886ba0d31f9ccb310c3974b409f884c294d (diff)
downloadscummvm-rg350-f9d1a82cc0011c4db8745d51af30ca8b73c2b1d1.tar.gz
scummvm-rg350-f9d1a82cc0011c4db8745d51af30ca8b73c2b1d1.tar.bz2
scummvm-rg350-f9d1a82cc0011c4db8745d51af30ca8b73c2b1d1.zip
Fixes the Macintosh related problems Krest mentioned on the IRC channel.
(the user has to set the game platform to Macintosh though, since it's atm detected as DOS version) svn-id: r23929
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/plugin.cpp8
-rw-r--r--engines/kyra/seqplayer.cpp28
-rw-r--r--engines/kyra/sequences_v1.cpp34
-rw-r--r--engines/kyra/staticres.cpp4
4 files changed, 60 insertions, 14 deletions
diff --git a/engines/kyra/plugin.cpp b/engines/kyra/plugin.cpp
index 787a756cc7..6ee4585788 100644
--- a/engines/kyra/plugin.cpp
+++ b/engines/kyra/plugin.cpp
@@ -310,6 +310,14 @@ int KyraEngine_v1::setupGameFlags() {
return -1;
}
+
+ // if the user says we got a macintosh version, then we assume to have one
+ // since it's currently not possible to detect the macintosh version
+ // because of limitations of the current detector code
+ if (Common::parsePlatform(ConfMan.get("platform")) == Common::kPlatformMacintosh) {
+ _flags.platform = Common::kPlatformMacintosh;
+ }
+
return 0;
}
diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp
index a3dbf63665..8fe98ca72e 100644
--- a/engines/kyra/seqplayer.cpp
+++ b/engines/kyra/seqplayer.cpp
@@ -83,9 +83,8 @@ uint8 *SeqPlayer::setPanPages(int pageNum, int shape) {
data += offs;
uint16 sz = READ_LE_UINT16(data + 6);
panPage = new uint8[sz];
- if (panPage) {
- memcpy(panPage, data, sz);
- }
+ assert(panPage);
+ memcpy(panPage, data, sz);
}
}
return panPage;
@@ -94,10 +93,25 @@ uint8 *SeqPlayer::setPanPages(int pageNum, int shape) {
void SeqPlayer::makeHandShapes() {
debugC(9, kDebugLevelSequence, "SeqPlayer::makeHandShapes()");
_screen->loadBitmap("WRITING.CPS", 3, 3, 0);
- for (int i = 0; i < ARRAYSIZE(_handShapes); ++i) {
- if (_handShapes[i])
- delete [] _handShapes[i];
- _handShapes[i] = setPanPages(3, i);
+ if (_vm->gameFlags().platform == Common::kPlatformMacintosh) {
+ freeHandShapes();
+
+ int pageBackUp = _screen->_curPage;
+ _screen->_curPage = 2;
+ _handShapes[0] = _screen->encodeShape(0, 0, 88, 122, 0);
+ assert(_handShapes[0]);
+ _handShapes[1] = _screen->encodeShape(88, 0, 80, 117, 0);
+ assert(_handShapes[1]);
+ _handShapes[2] = _screen->encodeShape(168, 0, 117, 124, 0);
+ assert(_handShapes[2]);
+ _screen->_curPage = pageBackUp;
+ } else {
+ for (int i = 0; i < ARRAYSIZE(_handShapes); ++i) {
+ if (_handShapes[i])
+ delete [] _handShapes[i];
+ _handShapes[i] = setPanPages(3, i);
+ assert(_handShapes[i]);
+ }
}
}
diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp
index ed53396482..6e76b95347 100644
--- a/engines/kyra/sequences_v1.cpp
+++ b/engines/kyra/sequences_v1.cpp
@@ -196,8 +196,10 @@ void KyraEngine::seq_introStory() {
_screen->clearPage(0);
if (_flags.isTalkie) {
return;
- } else if (_flags.lang == Common::EN_ANY) {
+ } else if (_flags.lang == Common::EN_ANY && _flags.platform != Common::kPlatformMacintosh) {
_screen->loadBitmap("TEXT.CPS", 3, 3, 0);
+ } else if (_flags.lang == Common::EN_ANY && _flags.platform == Common::kPlatformMacintosh) {
+ _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, 0);
} else if (_flags.lang == Common::DE_DEU) {
_screen->loadBitmap("TEXT_GER.CPS", 3, 3, 0);
} else if (_flags.lang == Common::FR_FRA) {
@@ -1065,7 +1067,8 @@ void KyraEngine::seq_playCredits() {
_screen->setTextColorMap(colorMap);
_screen->_charWidth = -1;
// we don't need that one for midi or adlib
- //snd_playWanderScoreViaMap(53, 1);
+ if (_flags.hasAudioCD)
+ snd_playWanderScoreViaMap(53, 1);
uint8 *buffer = 0;
uint32 size;
@@ -1643,8 +1646,29 @@ int KyraEngine::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) {
void KyraEngine::setupPanPages() {
debugC(9, kDebugLevelMain, "KyraEngine::setupPanPages()");
_screen->loadBitmap("BEAD.CPS", 3, 3, 0);
- for (int i = 0; i <= 19; ++i) {
- _panPagesTable[i] = _seq->setPanPages(3, i);
+ if (_flags.platform == Common::kPlatformMacintosh) {
+ int pageBackUp = _screen->_curPage;
+ _screen->_curPage = 2;
+
+ delete [] _panPagesTable[19];
+ _panPagesTable[19] = _screen->encodeShape(0, 0, 16, 9, 0);
+ assert(_panPagesTable[19]);
+
+ int curX = 16;
+ for (int i = 0; i < 19; ++i) {
+ delete [] _panPagesTable[i];
+ _panPagesTable[i] = _screen->encodeShape(curX, 0, 8, 5, 0);
+ assert(_panPagesTable[i]);
+ curX += 8;
+ }
+
+ _screen->_curPage = pageBackUp;
+ } else {
+ for (int i = 0; i <= 19; ++i) {
+ delete [] _panPagesTable[i];
+ _panPagesTable[i] = _seq->setPanPages(3, i);
+ assert(_panPagesTable[i]);
+ }
}
}
@@ -1654,7 +1678,7 @@ void KyraEngine::freePanPages() {
_endSequenceBackUpRect = 0;
for (int i = 0; i <= 19; ++i) {
delete [] _panPagesTable[i];
- _panPagesTable[i] = NULL;
+ _panPagesTable[i] = 0;
}
}
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index b749f5f056..bd24a9bb40 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -813,9 +813,9 @@ void KyraEngine::loadButtonShapes() {
void KyraEngine::loadMainScreen(int page) {
_screen->clearPage(page);
- if (_flags.lang == Common::EN_ANY && !_flags.isTalkie)
+ if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && _flags.platform != Common::kPlatformMacintosh)
_screen->loadBitmap("MAIN15.CPS", page, page, 0);
- else if (_flags.lang == Common::EN_ANY && _flags.isTalkie)
+ else if (_flags.lang == Common::EN_ANY && (_flags.isTalkie || _flags.platform == Common::kPlatformMacintosh))
_screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
else if (_flags.lang == Common::FR_FRA)
_screen->loadBitmap("MAIN_FRE.CPS", page, page, 0);