mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
Adapted various code parts to use Palette::fill.
svn-id: r41953
This commit is contained in:
parent
07cdbd273d
commit
179a822b93
@ -329,7 +329,7 @@ Common::Error KyraEngine_MR::go() {
|
||||
void KyraEngine_MR::initMainMenu() {
|
||||
_menuAnim = new WSAMovie_v2(this);
|
||||
_menuAnim->open("REVENGE.WSA", 1, &_screen->getPalette(0));
|
||||
memset(_screen->getPalette(0).getData(), 0, 3);
|
||||
_screen->getPalette(0).fill(0, 1, 0);
|
||||
|
||||
_menu = new MainMenu(this);
|
||||
MainMenu::StaticData data = {
|
||||
@ -391,7 +391,7 @@ void KyraEngine_MR::playVQA(const char *name) {
|
||||
_screen->showMouse();
|
||||
|
||||
// Taken from original, it used '1' here too
|
||||
memset(_screen->getPalette(0).getData(), 1, 768);
|
||||
_screen->getPalette(0).fill(0, 256, 1);
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
_screen->clearPage(0);
|
||||
_screen->copyPalette(0, 1);
|
||||
|
@ -778,17 +778,17 @@ int LoLEngine::mainMenu() {
|
||||
|
||||
void LoLEngine::startup() {
|
||||
_screen->clearPage(0);
|
||||
_screen->loadBitmap("PLAYFLD.CPS", 3, 3, &_screen->getPalette(0));
|
||||
|
||||
uint8 *tmpPal = new uint8[0x300];
|
||||
memcpy(tmpPal, _screen->getPalette(0).getData(), 0x300);
|
||||
memset(_screen->getPalette(0).getData(), 0x3f, 0x180);
|
||||
_screen->getPalette(0).copy(tmpPal, 1, 1);
|
||||
memset(_screen->getPalette(0).getData() + 0x240, 0x3f, 12);
|
||||
_screen->generateOverlay(_screen->getPalette(0), _screen->_paletteOverlay1, 1, 96);
|
||||
_screen->generateOverlay(_screen->getPalette(0), _screen->_paletteOverlay2, 144, 65);
|
||||
_screen->getPalette(0).copy(tmpPal, 0, 256);
|
||||
delete[] tmpPal;
|
||||
Palette &pal = _screen->getPalette(0);
|
||||
_screen->loadBitmap("PLAYFLD.CPS", 3, 3, &pal);
|
||||
|
||||
_screen->copyPalette(1, 0);
|
||||
pal.fill(0, 1, 0x3F);
|
||||
pal.fill(2, 126, 0x3F);
|
||||
pal.fill(192, 4, 0x3F);
|
||||
_screen->generateOverlay(pal, _screen->_paletteOverlay1, 1, 96);
|
||||
_screen->generateOverlay(pal, _screen->_paletteOverlay2, 144, 65);
|
||||
_screen->copyPalette(0, 1);
|
||||
|
||||
_screen->getPalette(1).clear();
|
||||
_screen->getPalette(2).clear();
|
||||
|
@ -403,7 +403,7 @@ void KyraEngine_HoF::loadScenePal() {
|
||||
strcat(filename, ".COL");
|
||||
_screen->loadBitmap(filename, 3, 3, 0);
|
||||
_screen->getPalette(1).copy(_screen->getCPagePtr(3), 0, 128);
|
||||
memset(_screen->getPalette(1).getData(), 0, 3);
|
||||
_screen->getPalette(1).fill(0, 1, 0);
|
||||
memcpy(_scenePal, _screen->getCPagePtr(3)+336, 432);
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ void KyraEngine_HoF::initSceneScreen(int unk1) {
|
||||
}
|
||||
|
||||
if (_noScriptEnter) {
|
||||
memset(_screen->getPalette(0).getData(), 0, 384);
|
||||
_screen->getPalette(0).fill(0, 128, 0);
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ void KyraEngine_MR::loadScenePal() {
|
||||
|
||||
_screen->loadBitmap(filename, 3, 3, 0);
|
||||
_screen->getPalette(2).copy(_screen->getCPagePtr(3), 0, 144);
|
||||
memset(_screen->getPalette(2).getData(), 0, 3);
|
||||
_screen->getPalette(2).fill(0, 1, 0);
|
||||
|
||||
for (int i = 144; i <= 167; ++i) {
|
||||
uint8 *palette = _screen->getPalette(2).getData() + i * 3;
|
||||
@ -607,7 +607,7 @@ void KyraEngine_MR::initSceneScreen(int unk1) {
|
||||
}
|
||||
|
||||
if (_noScriptEnter) {
|
||||
memset(_screen->getPalette(0).getData(), 0, 432);
|
||||
_screen->getPalette(0).fill(0, 144, 0);
|
||||
if (!_wasPlayingVQA)
|
||||
_screen->setScreenPalette(_screen->getPalette(0));
|
||||
}
|
||||
|
@ -2062,7 +2062,7 @@ void KyraEngine_HoF::seq_sequenceCommand(int command) {
|
||||
case 1:
|
||||
seq_playTalkText(_rnd.getRandomBit());
|
||||
|
||||
memset(_screen->getPalette(0).getData(), 0x3F, 0x300);
|
||||
_screen->getPalette(0).fill(0, 256, 0x3F);
|
||||
_screen->fadePalette(_screen->getPalette(0), 16);
|
||||
|
||||
_screen->copyPalette(1, 0);
|
||||
|
@ -855,7 +855,7 @@ void LoLEngine::showCredits() {
|
||||
_screen->_charWidth = 0;
|
||||
|
||||
_screen->loadBitmap("ROOM.CPS", 2, 2, &_screen->getPalette(0));
|
||||
memset(_screen->getPalette(0).getData() + 764, 0, 3);
|
||||
_screen->getPalette(0).fill(255, 1, 0);
|
||||
_screen->fadeToBlack(30);
|
||||
|
||||
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
|
||||
|
Loading…
Reference in New Issue
Block a user