[Scummvm-cvs-logs] SF.net SVN: scummvm: [23929] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Sep 18 19:30:58 CEST 2006
Revision: 23929
http://svn.sourceforge.net/scummvm/?rev=23929&view=rev
Author: lordhoto
Date: 2006-09-18 10:30:51 -0700 (Mon, 18 Sep 2006)
Log Message:
-----------
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)
Modified Paths:
--------------
scummvm/trunk/engines/kyra/plugin.cpp
scummvm/trunk/engines/kyra/seqplayer.cpp
scummvm/trunk/engines/kyra/sequences_v1.cpp
scummvm/trunk/engines/kyra/staticres.cpp
Modified: scummvm/trunk/engines/kyra/plugin.cpp
===================================================================
--- scummvm/trunk/engines/kyra/plugin.cpp 2006-09-18 12:01:18 UTC (rev 23928)
+++ scummvm/trunk/engines/kyra/plugin.cpp 2006-09-18 17:30:51 UTC (rev 23929)
@@ -310,6 +310,14 @@
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;
}
Modified: scummvm/trunk/engines/kyra/seqplayer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/seqplayer.cpp 2006-09-18 12:01:18 UTC (rev 23928)
+++ scummvm/trunk/engines/kyra/seqplayer.cpp 2006-09-18 17:30:51 UTC (rev 23929)
@@ -83,9 +83,8 @@
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 @@
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]);
+ }
}
}
Modified: scummvm/trunk/engines/kyra/sequences_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v1.cpp 2006-09-18 12:01:18 UTC (rev 23928)
+++ scummvm/trunk/engines/kyra/sequences_v1.cpp 2006-09-18 17:30:51 UTC (rev 23929)
@@ -196,8 +196,10 @@
_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 @@
_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 @@
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 @@
_endSequenceBackUpRect = 0;
for (int i = 0; i <= 19; ++i) {
delete [] _panPagesTable[i];
- _panPagesTable[i] = NULL;
+ _panPagesTable[i] = 0;
}
}
Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp 2006-09-18 12:01:18 UTC (rev 23928)
+++ scummvm/trunk/engines/kyra/staticres.cpp 2006-09-18 17:30:51 UTC (rev 23929)
@@ -813,9 +813,9 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list