[Scummvm-cvs-logs] SF.net SVN: scummvm:[45046] scummvm/trunk/engines/kyra
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Tue Oct 13 21:48:42 CEST 2009
Revision: 45046
http://scummvm.svn.sourceforge.net/scummvm/?rev=45046&view=rev
Author: athrxx
Date: 2009-10-13 19:48:41 +0000 (Tue, 13 Oct 2009)
Log Message:
-----------
LOL/PC-98: fixed outro
Modified Paths:
--------------
scummvm/trunk/engines/kyra/lol.cpp
scummvm/trunk/engines/kyra/scene_lol.cpp
scummvm/trunk/engines/kyra/script_lol.cpp
scummvm/trunk/engines/kyra/script_tim.cpp
scummvm/trunk/engines/kyra/sequences_lol.cpp
Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp 2009-10-13 19:12:25 UTC (rev 45045)
+++ scummvm/trunk/engines/kyra/lol.cpp 2009-10-13 19:48:41 UTC (rev 45046)
@@ -1761,10 +1761,12 @@
Palette tpal(256);
if (_flags.use16ColorMode) {
static const uint8 colTbl[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F };
+ tpal.fill(0, 256, 0xff);
uint8 *p = _screen->getPalette(0).getData();
+ uint8 *d = tpal.getData();
- tpal.fill(0, 256, 0xff);
- uint8 *d = tpal.getData();
+ _res->loadFileToBuf("LOL.NOL", p, 48);
+
for (int i = 15; i >= 0; i--) {
d[colTbl[i] * 3 + 2] = p[i * 3 + 2];
d[colTbl[i] * 3 + 1] = p[i * 3 + 1];
@@ -1772,7 +1774,7 @@
}
_screen->generateTruelightTables(colTbl, 16, tpal, tpal, _trueLightTable1, _trueLightTable2, 80);
- _screen->loadPalette("lol.nol", _screen->getPalette(0));
+ _screen->loadPalette("LOL.NOL", _screen->getPalette(0));
} else {
_screen->loadPalette("fxpal.col", tpal);
_screen->loadBitmap("fxpal.shp", 3, 3, 0);
Modified: scummvm/trunk/engines/kyra/scene_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lol.cpp 2009-10-13 19:12:25 UTC (rev 45045)
+++ scummvm/trunk/engines/kyra/scene_lol.cpp 2009-10-13 19:48:41 UTC (rev 45046)
@@ -397,9 +397,7 @@
delete[] _vcnBlocks;
_vcnBlocks = new uint8[vcnLen];
- if (_flags.use16ColorMode) {
- _res->loadFileToBuf("LOL.NOL", _screen->getPalette(0).getData(), 48);
- } else {
+ if (!_flags.use16ColorMode) {
delete[] _vcnShift;
_vcnShift = new uint8[tlen];
@@ -453,16 +451,17 @@
_vmpPtr[i] = READ_LE_UINT16(&v[i << 1]);
Palette tpal(256);
- tpal.copy(_screen->getPalette(0));
if (_flags.use16ColorMode) {
- tpal.fill(16, 240, 0xff);
uint8 *dst = tpal.getData();
+ _res->loadFileToBuf("LOL.NOL", dst, 48);
for (int i = 1; i < 16; i++) {
int s = ((i << 4) | i) * 3;
SWAP(dst[s], dst[i * 3]);
SWAP(dst[s + 1], dst[i * 3 + 1]);
SWAP(dst[s + 2], dst[i * 3 + 2]);
}
+ } else {
+ tpal.copy(_screen->getPalette(0));
}
for (int i = 0; i < 7; i++) {
Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp 2009-10-13 19:12:25 UTC (rev 45045)
+++ scummvm/trunk/engines/kyra/script_lol.cpp 2009-10-13 19:48:41 UTC (rev 45046)
@@ -2599,28 +2599,36 @@
_screen->loadBitmap(filename, 7, 5, &_screen->getPalette(0));
- filename[0] = 0;
+ uint8 *overlay = 0;
+ if (!_flags.use16ColorMode) {
+ filename[0] = 0;
- if (_flags.isTalkie) {
- strcpy(filename, _languageExt[_lang]);
- strcat(filename, "/");
+ if (_flags.isTalkie) {
+ strcpy(filename, _languageExt[_lang]);
+ strcat(filename, "/");
+ }
+
+ strcat(filename, overlayFile);
+ overlay = _res->fileData(filename, 0);
+
+ for (int i = 0; i < 3; ++i) {
+ uint32 endTime = _system->getMillis() + 10 * _tickLength;
+ _screen->copyBlockAndApplyOverlayOutro(4, 2, overlay);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
+ _screen->updateScreen();
+ delayUntil(endTime);
+ }
}
- strcat(filename, overlayFile);
- uint8 *overlay = _res->fileData(filename, 0);
+ _screen->copyRegion(0, 0, 0, 0, 320, 200, 4, 0, Screen::CR_NO_P_CHECK);
- for (int i = 0; i < 3; ++i) {
- uint32 endTime = _system->getMillis() + 10 * _tickLength;
- _screen->copyBlockAndApplyOverlayOutro(4, 2, overlay);
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
+ if (_flags.use16ColorMode) {
+ _screen->fadePalette(_screen->getPalette(0), 5);
+ } else {
_screen->updateScreen();
- delayUntil(endTime);
+ delete[] overlay;
}
- _screen->copyRegion(0, 0, 0, 0, 320, 200, 4, 0, Screen::CR_NO_P_CHECK);
- _screen->updateScreen();
- delete[] overlay;
-
return 1;
}
@@ -2636,8 +2644,15 @@
Palette pal(_screen->getPalette(0).getNumColors());
_screen->loadBitmap(bitmap, 3, 3, &pal);
- _screen->fadePalette(pal, param[1]);
+ if (_flags.use16ColorMode) {
+ _screen->getPalette(0).clear();
+ _screen->setScreenPalette(_screen->getPalette(0));
+ _screen->copyPage(2, 0);
+ }
+
+ _screen->fadePalette(pal, param[1]);
+
return 1;
}
Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp 2009-10-13 19:12:25 UTC (rev 45045)
+++ scummvm/trunk/engines/kyra/script_tim.cpp 2009-10-13 19:48:41 UTC (rev 45046)
@@ -392,7 +392,8 @@
static const uint8 colorMap[] = { 0x00, 0xA0, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
_screen->setTextColorMap(colorMap);
_screen->_charWidth = 0;
- _screen->_charOffset = -4;
+ if (!_vm->gameFlags().use16ColorMode)
+ _screen->_charOffset = -4;
if (!flags)
_screen->copyRegionToBuffer(0, 0, 0, 320, 40, _textAreaBuffer);
@@ -401,6 +402,17 @@
char *str = text;
int y = 0;
+ if (_vm->gameFlags().use16ColorMode) {
+ if (color == 0xda)
+ color = 0xa1;
+ else if (color == 0xf2)
+ color = 0xe1;
+ else if (flags < 0)
+ color = 0xe1;
+ else
+ color = 0xc1;
+ }
+
while (str[0]) {
char *nextLine = strchr(str, '\r');
@@ -417,7 +429,7 @@
else
_screen->printText(str, 0, y, color, 0x00);
- y += _screen->getFontHeight() - 4;
+ y += (_vm->gameFlags().use16ColorMode ? 16 : (_screen->getFontHeight() - 4));
str += strlen(str);
if (backupChar) {
Modified: scummvm/trunk/engines/kyra/sequences_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_lol.cpp 2009-10-13 19:12:25 UTC (rev 45045)
+++ scummvm/trunk/engines/kyra/sequences_lol.cpp 2009-10-13 19:48:41 UTC (rev 45046)
@@ -1134,7 +1134,7 @@
}
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
- if (maxDifficulty)
+ if (maxDifficulty && !_flags.use16ColorMode)
_tim->displayText(0x8000, 0, 0xDC);
_screen->updateScreen();
_screen->fadePalette(_screen->getPalette(0), 30, 0);
@@ -1153,8 +1153,13 @@
void LoLEngine::showCredits() {
for (int i = 0; i < 255; ++i)
_outroShapeTable[i] = i;
- _outroShapeTable[255] = 0;
+ if (_flags.use16ColorMode)
+ for (int i = 1; i < 16; ++i)
+ _outroShapeTable[i] = (i << 4) | i;
+ else
+ _outroShapeTable[255] = 0;
+
_sound->haltTrack();
_sound->loadSoundFile("LOREFINL");
_sound->playTrack(4);
@@ -1162,11 +1167,15 @@
_screen->hideMouse();
static const uint8 colorMap[] = { 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x6F, 0x6F, 0x6D };
- _screen->setTextColorMap(colorMap);
_screen->_charWidth = 0;
_screen->loadBitmap("ROOM.CPS", 2, 2, &_screen->getPalette(0));
- _screen->getPalette(0).fill(255, 1, 0);
+
+ if (!_flags.use16ColorMode) {
+ _screen->setTextColorMap(colorMap);
+ _screen->getPalette(0).fill(_screen->getPalette(0).getNumColors() - 1, 1, 0);
+ }
+
_screen->fadeToBlack(30);
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
@@ -1212,10 +1221,16 @@
memset(shapes, 0, sizeof(shapes));
loadOutroShapes(curShapeFile++, shapes);
- uint8 *monsterPal = _res->fileData("MONSTERS.PAL", 0);
- assert(monsterPal);
+ uint8 *monsterPal = 0;
- _screen->getPalette(0).copy(monsterPal, 0, 40, 88);
+ if (_flags.use16ColorMode) {
+ _screen->loadPalette("LOL.NOL", _screen->getPalette(0));
+ } else {
+ monsterPal = _res->fileData("MONSTERS.PAL", 0);
+ assert(monsterPal);
+ _screen->getPalette(0).copy(monsterPal, 0, 40, 88);
+ }
+
_screen->fadePalette(_screen->getPalette(0), 30);
uint32 waitTimer = _system->getMillis();
@@ -1413,7 +1428,12 @@
if (y < _screen->_curDim->h) {
_screen->_curPage = page;
_screen->setFont(Screen::FID_6_FNT);
- _screen->printText(s.str, (_screen->_curDim->sx << 3) + x, _screen->_curDim->sy + y, 0xDC, 0x00);
+ if (_flags.use16ColorMode) {
+ _screen->printText(s.str, (_screen->_curDim->sx << 3) + x + 1, _screen->_curDim->sy + y + 1, 0x44, 0x00);
+ _screen->printText(s.str, (_screen->_curDim->sx << 3) + x, _screen->_curDim->sy + y, 0x33, 0x00);
+ } else {
+ _screen->printText(s.str, (_screen->_curDim->sx << 3) + x, _screen->_curDim->sy + y, 0xDC, 0x00);
+ }
_screen->_curPage = 0;
}
@@ -1438,8 +1458,11 @@
curShapeFile = curShapeFile % 28;
loadOutroShapes(curShapeFile, shapes);
- _screen->getPalette(0).copy(monsterPal, curShapeFile * 40, 40, 88);
- _screen->setScreenPalette(_screen->getPalette(0));
+
+ if (!_flags.use16ColorMode) {
+ _screen->getPalette(0).copy(monsterPal, curShapeFile * 40, 40, 88);
+ _screen->setScreenPalette(_screen->getPalette(0));
+ }
needNewShape = false;
}
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