diff options
-rw-r--r-- | engines/dm/dm.cpp | 5 | ||||
-rw-r--r-- | engines/dm/gfx.cpp | 7 | ||||
-rw-r--r-- | engines/dm/gfx.h | 2 | ||||
-rw-r--r-- | engines/dm/loadsave.cpp | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 59151a9a99..b6b71fc0d5 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -279,8 +279,10 @@ void DMEngine::f463_initializeGame() { void DMEngine::f448_initMemoryManager() { warning(false, "STUB METHOD: f448_initMemoryManager"); _displayMan->f508_buildPaletteChangeCopperList(gK57_PalSwoosh, gK57_PalSwoosh); - for (uint16 i = 0; i < 16; ++i) + for (uint16 i = 0; i < 16; ++i) { _displayMan->_g347_paletteTopAndBottomScreen[i] = g21_PalDungeonView[0][i]; + _displayMan->_g346_paletteMiddleScreen[i] = g21_PalDungeonView[0][i]; + } } void DMEngine::f462_startGame() { @@ -307,6 +309,7 @@ void DMEngine::f462_startGame() { f3_processNewPartyMap(_dungeonMan->_g309_partyMapIndex); if (!_g298_newGame) { + _displayMan->f436_STARTEND_FadeToPalette(_displayMan->_g347_paletteTopAndBottomScreen); _displayMan->_g578_useByteBoxCoordinates = false; f22_delay(1); _displayMan->D24_fillScreenBox(boxScreenTop, k0_ColorBlack); diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index f5ecadeb26..06781c8461 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -1201,10 +1201,10 @@ byte* DisplayMan::f114_getExplosionBitmap(uint16 explosionAspIndex, uint16 scale void DisplayMan::updateScreen() { // apply copper warning(false, "Top of the screen color is offset as well"); // loop should start from 320 * 30 - for (uint32 i = 0; i < 320 * 170; ++i) + for (uint32 i = 320 * 30; i < 320 * 170; ++i) _g348_bitmapScreen[i] += 16; _vm->_system->copyRectToScreen(_g348_bitmapScreen, _screenWidth, 0, 0, _screenWidth, _screenHeight); - for (uint32 i = 0; i < 320 * 170; ++i) // loop should start from 320 * 30 + for (uint32 i = 320 * 30; i < 320 * 170; ++i) // loop should start from 320 * 30 _g348_bitmapScreen[i] -= 16; _vm->_console->onFrame(); _vm->_system->updateScreen(); @@ -3740,8 +3740,7 @@ void DisplayMan::f436_STARTEND_FadeToPalette(uint16* P0849_pui_Palette) { } void DisplayMan::f508_buildPaletteChangeCopperList(uint16* middleScreen, uint16* topAndBottom) { - // memcpy(_g347_paletteTopAndBottomScreen, topAndBottom, sizeof(uint16) * 16); - // memcpy(_g346_paletteMiddleScreen, middleScreen, sizeof(uint16) * 16); + _gK17_paletteFadeFrom = topAndBottom; byte colorPalette[32 * 3]; for (int i = 0; i < 16; ++i) { colorPalette[i * 3] = (topAndBottom[i] >> 8) * (256 / 16); diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 091f40be38..e44709e628 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -750,8 +750,8 @@ public: void f493_addDerivedBitmap(int16 derivedBitmapIndex); // @ F0493_CACHE_AddDerivedBitmap void f480_releaseBlock(uint16 index); // @ F0480_CACHE_ReleaseBlock uint16 f431_getDarkenedColor(uint16 RGBcolor); - void f508_buildPaletteChangeCopperList(uint16* middleScreen, uint16* topAndBottom); void f436_STARTEND_FadeToPalette(uint16 *P0849_pui_Palette); // @ F0436_STARTEND_FadeToPalette + void f508_buildPaletteChangeCopperList(uint16* middleScreen, uint16* topAndBottom); // @ F0508_AMIGA_BuildPaletteChangeCopperList void f136_shadeScreenBox(Box* box, Color color) { warning(false, "STUB METHOD: f136_shadeScreenBox"); } // @ F0136_VIDEO_ShadeScreenBox }; diff --git a/engines/dm/loadsave.cpp b/engines/dm/loadsave.cpp index 3563fb58ae..806e226c19 100644 --- a/engines/dm/loadsave.cpp +++ b/engines/dm/loadsave.cpp @@ -45,6 +45,7 @@ namespace DM { #define C10_DUNGEON_DM 10 LoadgameResponse DMEngine::f435_loadgame(int16 slot) { + bool L1366_B_FadePalette = true; Common::String fileName; Common::SaveFileManager *saveFileManager = nullptr; Common::InSaveFile *file = nullptr; @@ -142,15 +143,12 @@ LoadgameResponse DMEngine::f435_loadgame(int16 slot) { _timeline->f233_initTimeline(); _groupMan->f196_initActiveGroups(); - warning(false, "Disabled code in f435_loadgame"); -#if 0 if (L1366_B_FadePalette) { _displayMan->f436_STARTEND_FadeToPalette(_displayMan->_g345_aui_BlankBuffer); - D26_WaitForVerticalBlank(); - D18_FillScreenBlack(); + f22_delay(1); + _displayMan->fillScreen(k0_ColorBlack); _displayMan->f436_STARTEND_FadeToPalette(_displayMan->_g347_paletteTopAndBottomScreen); } -#endif } else { _g528_saveFormat = dmSaveHeader._saveFormat; _g527_platform = dmSaveHeader._platform; |