mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 08:25:35 +00:00
Changed Screen::loadBitmap and Movie::open to take an optional Palette pointer instead of an optional array pointer.
svn-id: r41744
This commit is contained in:
parent
73ea378dee
commit
d2e5166dae
@ -328,7 +328,7 @@ Common::Error KyraEngine_MR::go() {
|
||||
|
||||
void KyraEngine_MR::initMainMenu() {
|
||||
_menuAnim = new WSAMovie_v2(this);
|
||||
_menuAnim->open("REVENGE.WSA", 1, _screen->getPalette(0).getData());
|
||||
_menuAnim->open("REVENGE.WSA", 1, &_screen->getPalette(0));
|
||||
memset(_screen->getPalette(0).getData(), 0, 3);
|
||||
|
||||
_menu = new MainMenu(this);
|
||||
|
@ -778,7 +778,7 @@ int LoLEngine::mainMenu() {
|
||||
|
||||
void LoLEngine::startup() {
|
||||
_screen->clearPage(0);
|
||||
_screen->loadBitmap("PLAYFLD.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("PLAYFLD.CPS", 3, 3, &_screen->getPalette(0));
|
||||
|
||||
uint8 *tmpPal = new uint8[0x300];
|
||||
memcpy(tmpPal, _screen->getPalette(0).getData(), 0x300);
|
||||
@ -3842,7 +3842,7 @@ void LoLEngine::displayAutomap() {
|
||||
uint8 *tmpWll = new uint8[80];
|
||||
memcpy(tmpWll, _wllBuffer4, 80);
|
||||
|
||||
_screen->loadBitmap("parch.cps", 2, 2, _screen->getPalette(3).getData());
|
||||
_screen->loadBitmap("parch.cps", 2, 2, &_screen->getPalette(3));
|
||||
_screen->loadBitmap("autobut.shp", 3, 5, 0);
|
||||
const uint8 *shp = _screen->getCPagePtr(5);
|
||||
|
||||
@ -4010,7 +4010,7 @@ void LoLEngine::loadMapLegendData(int level) {
|
||||
|
||||
void LoLEngine::drawMapPage(int pageNum) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
_screen->loadBitmap("parch.cps", pageNum, pageNum, _screen->getPalette(3).getData());
|
||||
_screen->loadBitmap("parch.cps", pageNum, pageNum, &_screen->getPalette(3));
|
||||
|
||||
int cp = _screen->setCurPage(pageNum);
|
||||
Screen::FontId of = _screen->setFont(Screen::FID_9_FNT);
|
||||
|
@ -406,7 +406,7 @@ void KyraEngine_LoK::startSceneScript(int brandonAlive) {
|
||||
_screen->clearPage(3);
|
||||
_res->exists(fileNameBuffer, true);
|
||||
// FIXME: check this hack for amiga version
|
||||
_screen->loadBitmap(fileNameBuffer, 3, 3, (_flags.platform == Common::kPlatformAmiga ? _screen->getPalette(0).getData() : 0));
|
||||
_screen->loadBitmap(fileNameBuffer, 3, 3, (_flags.platform == Common::kPlatformAmiga ? &_screen->getPalette(0) : 0));
|
||||
_sprites->loadSceneShapes();
|
||||
_exitListPtr = 0;
|
||||
|
||||
|
@ -2767,7 +2767,7 @@ void Screen::shakeScreen(int times) {
|
||||
}
|
||||
}
|
||||
|
||||
void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData, bool skip) {
|
||||
void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, Palette *pal, bool skip) {
|
||||
uint32 fileSize;
|
||||
uint8 *srcData = _vm->resource()->fileData(filename, &fileSize);
|
||||
|
||||
@ -2784,9 +2784,8 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *
|
||||
uint32 imgSize = scumm_stricmp(ext, "CMP") ? READ_LE_UINT32(srcData + 4) : READ_LE_UINT16(srcData);
|
||||
uint16 palSize = READ_LE_UINT16(srcData + 8);
|
||||
|
||||
if (palData && palSize) {
|
||||
loadPalette(srcData + 10, palData, palSize);
|
||||
}
|
||||
if (pal && palSize)
|
||||
loadPalette(srcData + 10, pal->getData(), palSize);
|
||||
|
||||
uint8 *srcPtr = srcData + 10 + palSize;
|
||||
uint8 *dstData = getPagePtr(dstPage);
|
||||
|
@ -284,7 +284,7 @@ public:
|
||||
void rectClip(int &x, int &y, int w, int h);
|
||||
|
||||
// misc
|
||||
void loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData, bool skip=false);
|
||||
void loadBitmap(const char *filename, int tempPage, int dstPage, Palette *pal, bool skip=false);
|
||||
|
||||
bool loadPalette(const char *filename, uint8 *palData);
|
||||
void loadPalette(const byte *data, uint8 *palData, int bytes);
|
||||
|
@ -609,7 +609,7 @@ int LoLEngine::olol_fadePalette(EMCState *script) {
|
||||
|
||||
int LoLEngine::olol_loadBitmap(EMCState *script) {
|
||||
debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_clearDialogueField(%p) (%s, %d)", (const void *)script, stackPosString(0), stackPos(1));
|
||||
_screen->loadBitmap(stackPosString(0), 3, 3, _screen->getPalette(3).getData());
|
||||
_screen->loadBitmap(stackPosString(0), 3, 3, &_screen->getPalette(3));
|
||||
if (stackPos(1) != 2)
|
||||
_screen->copyPage(3, stackPos(1));
|
||||
return 1;
|
||||
@ -2525,7 +2525,7 @@ int LoLEngine::tlol_fadeInScene(const TIM *tim, const uint16 *param) {
|
||||
strcpy(filename, sceneFile);
|
||||
strcat(filename, ".CPS");
|
||||
|
||||
_screen->loadBitmap(filename, 7, 5, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap(filename, 7, 5, &_screen->getPalette(0));
|
||||
|
||||
filename[0] = 0;
|
||||
|
||||
@ -2563,7 +2563,7 @@ int LoLEngine::tlol_fadeInPalette(const TIM *tim, const uint16 *param) {
|
||||
const char *bitmap = (const char *)(tim->text + READ_LE_UINT16(tim->text + (param[0]<<1)));
|
||||
|
||||
Palette pal(_screen->getPalette(0).getNumColors());
|
||||
_screen->loadBitmap(bitmap, 3, 3, pal.getData());
|
||||
_screen->loadBitmap(bitmap, 3, 3, &pal);
|
||||
_screen->fadePalette(pal, param[1]);
|
||||
|
||||
return 1;
|
||||
|
@ -478,7 +478,7 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
|
||||
anim->wsa = new WSAMovie_v2(_vm);
|
||||
assert(anim->wsa);
|
||||
|
||||
anim->wsa->open(file, wsaOpenFlags, (index == 1) ? _screen->getPalette(0).getData() : 0);
|
||||
anim->wsa->open(file, wsaOpenFlags, (index == 1) ? &_screen->getPalette(0) : 0);
|
||||
}
|
||||
|
||||
if (anim->wsa && anim->wsa->opened()) {
|
||||
@ -515,7 +515,7 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
|
||||
snprintf(file, 32, "%s.CPS", filename);
|
||||
|
||||
if (_vm->resource()->exists(file)) {
|
||||
_screen->loadBitmap(file, 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap(file, 3, 3, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, _drawPage2, Screen::CR_NO_P_CHECK);
|
||||
if (_drawPage2)
|
||||
_screen->checkedPageUpdate(8, 4);
|
||||
@ -539,7 +539,7 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
|
||||
snprintf(file, 32, "%s.CPS", filename);
|
||||
|
||||
if (_vm->resource()->exists(file)) {
|
||||
_screen->loadBitmap(file, 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap(file, 3, 3, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, _drawPage2, Screen::CR_NO_P_CHECK);
|
||||
if (_drawPage2)
|
||||
_screen->checkedPageUpdate(8, 4);
|
||||
@ -947,7 +947,7 @@ TIMInterpreter::Animation *TIMInterpreter_LoL::initAnimStruct(int index, const c
|
||||
if (_vm->resource()->exists(file)) {
|
||||
anim->wsa = new WSAMovie_v2(_vm);
|
||||
assert(anim->wsa);
|
||||
anim->wsa->open(file, wsaOpenFlags, _screen->getPalette(3).getData());
|
||||
anim->wsa->open(file, wsaOpenFlags, &_screen->getPalette(3));
|
||||
}
|
||||
|
||||
if (wsaFlags & 1) {
|
||||
|
@ -92,7 +92,7 @@ uint8 *SeqPlayer::setPanPages(int pageNum, int shape) {
|
||||
}
|
||||
|
||||
void SeqPlayer::makeHandShapes() {
|
||||
_screen->loadBitmap("WRITING.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("WRITING.CPS", 3, 3, &_screen->getPalette(0));
|
||||
if (_vm->gameFlags().platform == Common::kPlatformMacintosh || _vm->gameFlags().platform == Common::kPlatformAmiga) {
|
||||
freeHandShapes();
|
||||
|
||||
@ -259,7 +259,7 @@ void SeqPlayer::s1_loadPalette() {
|
||||
|
||||
void SeqPlayer::s1_loadBitmap() {
|
||||
uint8 cpsNum = *_seqData++;
|
||||
_screen->loadBitmap(_vm->seqCPSTable()[cpsNum], 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap(_vm->seqCPSTable()[cpsNum], 3, 3, &_screen->getPalette(0));
|
||||
}
|
||||
|
||||
void SeqPlayer::s1_fadeToBlack() {
|
||||
|
@ -87,7 +87,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
|
||||
SeqProc cb = _callbackS[seqNum];
|
||||
|
||||
if (cseq.flags & 2) {
|
||||
_screen->loadBitmap(cseq.cpsFile, 2, 2, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap(cseq.cpsFile, 2, 2, &_screen->getPalette(0));
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
} else {
|
||||
_screen->setCurPage(2);
|
||||
@ -100,7 +100,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
|
||||
|
||||
if (cseq.flags & 1) {
|
||||
_seqWsa->close();
|
||||
_seqWsa->open(cseq.wsaFile, 0, _screen->getPalette(0).getData());
|
||||
_seqWsa->open(cseq.wsaFile, 0, &_screen->getPalette(0));
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
_seqWsa->displayFrame(0, 2, cseq.xPos, cseq.yPos, 0, 0, 0);
|
||||
}
|
||||
@ -1501,7 +1501,7 @@ void KyraEngine_HoF::seq_finaleActorScreen() {
|
||||
static const uint8 colormap[] = {0, 0, 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
static const ScreenDim d = { 0x00, 0x0C, 0x28, 0xB4, 0xFF, 0x00, 0x00, 0x00 };
|
||||
|
||||
_screen->loadBitmap("finale.cps", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("finale.cps", 3, 3, &_screen->getPalette(0));
|
||||
_screen->setFont(Screen::FID_GOLDFONT_FNT);
|
||||
|
||||
int talkieCreditsSize, talkieCreditsSpecialSize;
|
||||
@ -2726,7 +2726,7 @@ void KyraEngine_HoF::seq_showStarcraftLogo() {
|
||||
assert(ci);
|
||||
_screen->clearPage(2);
|
||||
_res->loadPakFile("INTROGEN.PAK");
|
||||
int endframe = ci->open("ci.wsa", 0, _screen->getPalette(0).getData());
|
||||
int endframe = ci->open("ci.wsa", 0, &_screen->getPalette(0));
|
||||
_res->unloadPakFile("INTROGEN.PAK");
|
||||
if (!ci->opened()) {
|
||||
delete ci;
|
||||
|
@ -42,7 +42,7 @@ namespace Kyra {
|
||||
void KyraEngine_LoK::seq_demo() {
|
||||
snd_playTheme(0, 2);
|
||||
|
||||
_screen->loadBitmap("START.CPS", 7, 7, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("START.CPS", 7, 7, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 6, 0, Screen::CR_NO_P_CHECK);
|
||||
_screen->updateScreen();
|
||||
_screen->fadeFromBlack();
|
||||
@ -50,8 +50,8 @@ void KyraEngine_LoK::seq_demo() {
|
||||
_screen->fadeToBlack();
|
||||
|
||||
_screen->clearPage(0);
|
||||
_screen->loadBitmap("TOP.CPS", 7, 7, NULL);
|
||||
_screen->loadBitmap("BOTTOM.CPS", 5, 5, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TOP.CPS", 7, 7, 0);
|
||||
_screen->loadBitmap("BOTTOM.CPS", 5, 5, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 0);
|
||||
_screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0);
|
||||
_screen->updateScreen();
|
||||
@ -77,7 +77,7 @@ void KyraEngine_LoK::seq_demo() {
|
||||
_seq->playSequence(_seq_Demo4, true);
|
||||
|
||||
_screen->clearPage(0);
|
||||
_screen->loadBitmap("FINAL.CPS", 7, 7, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("FINAL.CPS", 7, 7, &_screen->getPalette(0));
|
||||
_screen->_curPage = 0;
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 6, 0);
|
||||
_screen->updateScreen();
|
||||
@ -128,7 +128,7 @@ void KyraEngine_LoK::seq_intro() {
|
||||
|
||||
void KyraEngine_LoK::seq_introLogos() {
|
||||
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
|
||||
_screen->loadBitmap("LOGO.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("LOGO.CPS", 3, 3, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0);
|
||||
_screen->updateScreen();
|
||||
_screen->fadeFromBlack();
|
||||
@ -149,7 +149,7 @@ void KyraEngine_LoK::seq_introLogos() {
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 190, 0, 2);
|
||||
} else {
|
||||
_screen->loadBitmap("TOP.CPS", 7, 7, 0);
|
||||
_screen->loadBitmap("BOTTOM.CPS", 5, 5, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("BOTTOM.CPS", 5, 5, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 0);
|
||||
_screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0);
|
||||
}
|
||||
@ -236,19 +236,19 @@ void KyraEngine_LoK::seq_introStory() {
|
||||
return;
|
||||
|
||||
if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga))
|
||||
_screen->loadBitmap("TEXT.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN)
|
||||
_screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT_ENG.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::DE_DEU)
|
||||
_screen->loadBitmap("TEXT_GER.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT_GER.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::FR_FRA)
|
||||
_screen->loadBitmap("TEXT_FRE.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT_FRE.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::ES_ESP)
|
||||
_screen->loadBitmap("TEXT_SPA.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT_SPA.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::IT_ITA && !_flags.isTalkie)
|
||||
_screen->loadBitmap("TEXT_ITA.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT_ITA.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::IT_ITA && _flags.isTalkie)
|
||||
_screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TEXT_ENG.CPS", 3, 3, &_screen->getPalette(0));
|
||||
else
|
||||
warning("no story graphics file found");
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
@ -947,7 +947,7 @@ int KyraEngine_LoK::seq_playEnd() {
|
||||
_screen->hideMouse();
|
||||
_screen->fadeSpecialPalette(32, 228, 20, 60);
|
||||
delay(60 * _tickLength);
|
||||
_screen->loadBitmap("GEMHEAL.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("GEMHEAL.CPS", 3, 3, &_screen->getPalette(0));
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
_screen->shuffleScreen(8, 8, 304, 128, 2, 0, 1, 0);
|
||||
uint32 nextTime = _system->getMillis() + 120 * _tickLength;
|
||||
@ -1001,7 +1001,7 @@ void KyraEngine_LoK::seq_playEnding() {
|
||||
_screen->hideMouse();
|
||||
_screen->_curPage = 0;
|
||||
_screen->fadeToBlack();
|
||||
_screen->loadBitmap("REUNION.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("REUNION.CPS", 3, 3, &_screen->getPalette(0));
|
||||
_screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0);
|
||||
_screen->_curPage = 0;
|
||||
// XXX
|
||||
@ -1042,7 +1042,7 @@ void KyraEngine_LoK::seq_playCredits() {
|
||||
} else
|
||||
_screen->setFont(Screen::FID_8_FNT);
|
||||
|
||||
_screen->loadBitmap("CHALET.CPS", 4, 4, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("CHALET.CPS", 4, 4, &_screen->getPalette(0));
|
||||
|
||||
_screen->setCurPage(0);
|
||||
_screen->clearCurPage();
|
||||
|
@ -43,7 +43,7 @@ int LoLEngine::processPrologue() {
|
||||
|
||||
if (_flags.isDemo) {
|
||||
_screen->fadePalette(_screen->getPalette(1), 30, 0);
|
||||
_screen->loadBitmap("FINAL.CPS", 2, 2, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("FINAL.CPS", 2, 2, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
|
||||
_screen->fadePalette(_screen->getPalette(0), 30, 0);
|
||||
delayWithTicks(300);
|
||||
@ -57,7 +57,7 @@ int LoLEngine::processPrologue() {
|
||||
|
||||
int processSelection = -1;
|
||||
while (!shouldQuit() && processSelection == -1) {
|
||||
_screen->loadBitmap("TITLE.CPS", 2, 2, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("TITLE.CPS", 2, 2, &_screen->getPalette(0));
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
|
||||
|
||||
_screen->setFont(Screen::FID_6_FNT);
|
||||
@ -276,8 +276,8 @@ int LoLEngine::chooseCharacter() {
|
||||
while (!_screen->isMouseVisible())
|
||||
_screen->showMouse();
|
||||
|
||||
_screen->loadBitmap("CHAR.CPS", 2, 2, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("BACKGRND.CPS", 4, 4, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("CHAR.CPS", 2, 2, &_screen->getPalette(0));
|
||||
_screen->loadBitmap("BACKGRND.CPS", 4, 4, &_screen->getPalette(0));
|
||||
|
||||
if (!_chargenWSA->open("CHARGEN.WSA", 1, 0))
|
||||
error("Couldn't load CHARGEN.WSA");
|
||||
@ -649,7 +649,7 @@ void LoLEngine::showStarcraftLogo() {
|
||||
_screen->clearPage(0);
|
||||
_screen->clearPage(2);
|
||||
|
||||
int endframe = ci->open("ci01.wsa", 0, _screen->getPalette(0).getData());
|
||||
int endframe = ci->open("ci01.wsa", 0, &_screen->getPalette(0));
|
||||
if (!ci->opened()) {
|
||||
delete ci;
|
||||
return;
|
||||
@ -803,19 +803,19 @@ void LoLEngine::showOutro(int character, bool maxDifficulty) {
|
||||
|
||||
switch (character) {
|
||||
case 0:
|
||||
_screen->loadBitmap("KIERAN.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("KIERAN.CPS", 3, 3, &_screen->getPalette(0));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
_screen->loadBitmap("AK'SHEL.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("AK'SHEL.CPS", 3, 3, &_screen->getPalette(0));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
_screen->loadBitmap("MICHAEL.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("MICHAEL.CPS", 3, 3, &_screen->getPalette(0));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
_screen->loadBitmap("CONRAD.CPS", 3, 3, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("CONRAD.CPS", 3, 3, &_screen->getPalette(0));
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -856,7 +856,7 @@ void LoLEngine::showCredits() {
|
||||
_screen->setTextColorMap(colorMap);
|
||||
_screen->_charWidth = 0;
|
||||
|
||||
_screen->loadBitmap("ROOM.CPS", 2, 2, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("ROOM.CPS", 2, 2, &_screen->getPalette(0));
|
||||
memset(_screen->getPalette(0).getData() + 764, 0, 3);
|
||||
_screen->fadeToBlack(30);
|
||||
|
||||
|
@ -1584,7 +1584,7 @@ void KyraEngine_LoK::loadMainScreen(int page) {
|
||||
_screen->clearPage(page);
|
||||
|
||||
if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga))
|
||||
_screen->loadBitmap("MAIN15.CPS", page, page, _screen->getPalette(0).getData());
|
||||
_screen->loadBitmap("MAIN15.CPS", page, page, &_screen->getPalette(0));
|
||||
else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN || (_flags.isTalkie && _flags.lang == Common::IT_ITA))
|
||||
_screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
|
||||
else if (_flags.lang == Common::FR_FRA)
|
||||
|
@ -38,7 +38,7 @@ namespace Kyra {
|
||||
WSAMovie_v1::WSAMovie_v1(KyraEngine_v1 *vm) : Movie(vm) {}
|
||||
WSAMovie_v1::~WSAMovie_v1() { close(); }
|
||||
|
||||
int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf) {
|
||||
int WSAMovie_v1::open(const char *filename, int offscreenDecode, Palette *palBuf) {
|
||||
close();
|
||||
|
||||
uint32 flags = 0;
|
||||
@ -64,7 +64,7 @@ int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf)
|
||||
offsPal = 0x300;
|
||||
_flags |= WF_HAS_PALETTE;
|
||||
if (palBuf)
|
||||
memcpy(palBuf, wsaData + 8 + (_numFrames << 2), 0x300);
|
||||
memcpy(palBuf->getData(), wsaData + 8 + (_numFrames << 2), 0x300);
|
||||
}
|
||||
|
||||
if (offscreenDecode) {
|
||||
@ -228,7 +228,7 @@ void WSAMovie_v1::processFrame(int frameNum, uint8 *dst) {
|
||||
|
||||
WSAMovieAmiga::WSAMovieAmiga(KyraEngine_v1 *vm) : WSAMovie_v1(vm), _buffer(0) {}
|
||||
|
||||
int WSAMovieAmiga::open(const char *filename, int offscreenDecode, uint8 *palBuf) {
|
||||
int WSAMovieAmiga::open(const char *filename, int offscreenDecode, Palette *palBuf) {
|
||||
int res = WSAMovie_v1::open(filename, offscreenDecode, palBuf);
|
||||
|
||||
if (!res)
|
||||
@ -365,7 +365,7 @@ void WSAMovieAmiga::processFrame(int frameNum, uint8 *dst) {
|
||||
|
||||
WSAMovie_v2::WSAMovie_v2(KyraEngine_v1 *vm) : WSAMovie_v1(vm), _xAdd(0), _yAdd(0) {}
|
||||
|
||||
int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) {
|
||||
int WSAMovie_v2::open(const char *filename, int unk1, Palette *palBuf) {
|
||||
close();
|
||||
|
||||
uint32 flags = 0;
|
||||
@ -392,7 +392,7 @@ int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) {
|
||||
offsPal = 0x300;
|
||||
_flags |= WF_HAS_PALETTE;
|
||||
if (palBuf)
|
||||
_screen->loadPalette(wsaData + 8 + ((_numFrames << 2) & 0xFFFF), palBuf, 0x300);
|
||||
_screen->loadPalette(wsaData + 8 + ((_numFrames << 2) & 0xFFFF), palBuf->getData(), 0x300);
|
||||
}
|
||||
|
||||
if (flags & 2) {
|
||||
@ -400,7 +400,7 @@ int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) {
|
||||
offsPal = 0x30;
|
||||
_flags |= WF_HAS_PALETTE;
|
||||
if (palBuf)
|
||||
_screen->loadPalette(wsaData + 8 + ((_numFrames << 2) & 0xFFFF), palBuf, 0x30);
|
||||
_screen->loadPalette(wsaData + 8 + ((_numFrames << 2) & 0xFFFF), palBuf->getData(), 0x30);
|
||||
}
|
||||
|
||||
_flags |= WF_XOR;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#ifndef KYRA_WSAMOVIE_H
|
||||
#define KYRA_WSAMOVIE_H
|
||||
|
||||
|
||||
namespace Audio {
|
||||
class AppendableAudioStream;
|
||||
class SoundHandle;
|
||||
@ -34,6 +35,7 @@ class SoundHandle;
|
||||
namespace Kyra {
|
||||
class KyraEngine_v1;
|
||||
class Screen_v2;
|
||||
class Palette;
|
||||
|
||||
class Movie {
|
||||
public:
|
||||
@ -48,7 +50,7 @@ public:
|
||||
virtual int width() const = 0;
|
||||
virtual int height() const = 0;
|
||||
|
||||
virtual int open(const char *filename, int offscreen, uint8 *palette) = 0;
|
||||
virtual int open(const char *filename, int offscreen, Palette *palette) = 0;
|
||||
virtual void close() = 0;
|
||||
|
||||
virtual int frames() = 0;
|
||||
@ -72,7 +74,7 @@ public:
|
||||
int width() const { return _width; }
|
||||
int height() const { return _height; }
|
||||
|
||||
virtual int open(const char *filename, int offscreen, uint8 *palette);
|
||||
virtual int open(const char *filename, int offscreen, Palette *palette);
|
||||
virtual void close();
|
||||
|
||||
virtual int frames() { return _opened ? _numFrames : -1; }
|
||||
@ -105,7 +107,7 @@ protected:
|
||||
class WSAMovieAmiga : public WSAMovie_v1 {
|
||||
public:
|
||||
WSAMovieAmiga(KyraEngine_v1 *vm);
|
||||
int open(const char *filename, int offscreen, uint8 *palette);
|
||||
int open(const char *filename, int offscreen, Palette *palette);
|
||||
void close();
|
||||
|
||||
void displayFrame(int frameNum, int pageNum, int x, int y, uint16 flags, const uint8 *table1, const uint8 *table2);
|
||||
@ -119,7 +121,7 @@ class WSAMovie_v2 : public WSAMovie_v1 {
|
||||
public:
|
||||
WSAMovie_v2(KyraEngine_v1 *vm);
|
||||
|
||||
int open(const char *filename, int unk1, uint8 *palette);
|
||||
int open(const char *filename, int unk1, Palette *palette);
|
||||
virtual void displayFrame(int frameNum, int pageNum, int x, int y, uint16 flags, const uint8 *table1, const uint8 *table2) {
|
||||
WSAMovie_v1::displayFrame(frameNum, pageNum, x + _xAdd, y + _yAdd, flags, table1, table2);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user