diff options
author | Bendegúz Nagy | 2016-08-09 11:54:04 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 7570844f5e08e3328282bb271292dfca5e61d2a2 (patch) | |
tree | 936777d4f1053e92cfa9b1af7d27790ea9e25d63 | |
parent | d69c2d12fa026a6c5fbea587376cf0ce8fba4fe9 (diff) | |
download | scummvm-rg350-7570844f5e08e3328282bb271292dfca5e61d2a2.tar.gz scummvm-rg350-7570844f5e08e3328282bb271292dfca5e61d2a2.tar.bz2 scummvm-rg350-7570844f5e08e3328282bb271292dfca5e61d2a2.zip |
DM: Fill stub method f438_STARTEND_OpenEntranceDoors
-rw-r--r-- | engines/dm/TODOs/todo.txt | 1 | ||||
-rw-r--r-- | engines/dm/dm.cpp | 36 | ||||
-rw-r--r-- | engines/dm/dm.h | 2 | ||||
-rw-r--r-- | engines/dm/gfx.cpp | 3 | ||||
-rw-r--r-- | engines/dm/gfx.h | 4 |
5 files changed, 40 insertions, 6 deletions
diff --git a/engines/dm/TODOs/todo.txt b/engines/dm/TODOs/todo.txt index 5017e48671..ea98c00dc1 100644 --- a/engines/dm/TODOs/todo.txt +++ b/engines/dm/TODOs/todo.txt @@ -4,6 +4,7 @@ Bugs: Gui is messed up by drawn spell area line on startup Spellcasting tabs are displayed inproperly, switching between them is possible tho When reordering a champions, the icons in the top right corner ar drawn twice under the cursor + No dugeon is shown during opening the entrance doors Logic: F0444_STARTEND_Endgame is broken diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index 33bd033c5b..945d739edd 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -696,4 +696,40 @@ void DMEngine::f439_drawEntrance() { _displayMan->f21_blitToScreen(_g562_entranceDoorAnimSteps[4], &closedDoorRightBox, k64_byteWidth, kM1_ColorNoTransparency, 161); _displayMan->f436_STARTEND_FadeToPalette(g20_PalEntrance); } + +void DMEngine::f438_STARTEND_OpenEntranceDoors() { + Box rightDoorBox(109, 231, 0 + 33, 160 + 33); + byte *rightDoorBitmap = _displayMan->f489_getNativeBitmapOrGraphic(k3_entranceRightDoorGraphicIndice); + Box leftDoorBox(0, 100, 0 + 33, 160 + 33); + uint16 leftDoorBlitFrom = 0; + byte *leftDoorBitmap = _displayMan->f489_getNativeBitmapOrGraphic(k2_entranceLeftDoorGraphicIndice); + + Box screenBox(0, 319, 0, 199); + byte *tmpScreen = new byte[320 * 200]; + memcpy(tmpScreen, _displayMan->_g348_bitmapScreen, 320 * 200); + + uint16 animStep = 1; + do { + if ((animStep % 3) == 1) { + // Strangerke: CHECKME: Earlier versions of the game were using G0565_puc_Graphic535_Sound02DoorRattle instead of k02_soundDOOR_RATTLE 2 + f060_SOUND_Play(k02_soundDOOR_RATTLE, 145, 0x40, 0x40); + } + + _displayMan->f21_blitToScreen(tmpScreen, &screenBox, 160, kM1_ColorNoTransparency, 200); + _displayMan->f132_blitToBitmap(leftDoorBitmap, _displayMan->_g348_bitmapScreen, leftDoorBox, leftDoorBlitFrom, 0, 64, k160_byteWidthScreen, kM1_ColorNoTransparency); + _displayMan->f132_blitToBitmap(rightDoorBitmap, _displayMan->_g348_bitmapScreen, rightDoorBox, 0, 0, 64, k160_byteWidthScreen, kM1_ColorNoTransparency); + _eventMan->f357_discardAllInput(); + _displayMan->updateScreen(); + + leftDoorBox._x2 -= 4; + leftDoorBlitFrom += 4; + rightDoorBox._x1 += 4; + + f22_delay(3); + } while (++animStep != 32); +} + + + + } // End of namespace DM diff --git a/engines/dm/dm.h b/engines/dm/dm.h index 529a768c22..7f40eae6c1 100644 --- a/engines/dm/dm.h +++ b/engines/dm/dm.h @@ -258,7 +258,7 @@ public: void f060_SOUND_Play(uint16 P0921_ui_SoundIndex, uint16 P0085_i_Period, uint8 leftVol, uint8 rightVol); // @ F0060_SOUND_Play void f65_playPendingSound(); // @ F0065_SOUND_PlayPendingSound_CPSD bool f505_soundGetVolume(int16 mapX, int16 mapY, uint8 *leftVolume, uint8 *rightVolume); // @ F0505_SOUND_GetVolume - void f438_STARTEND_OpenEntranceDoors() { warning(true, "STUB: f438_STARTEND_OpenEntranceDoors"); } // @ F0438_STARTEND_OpenEntranceDoors + void f438_STARTEND_OpenEntranceDoors(); // @ F0438_STARTEND_OpenEntranceDoors void f437_STARTEND_drawTittle() { warning(false, "STUB METHOD: f437_STARTEND_drawTittle"); }// @ F0437_STARTEND_DrawTitle void f442_SARTEND_processCommand202_entranceDrawCredits() { warning(false, "STUB METHOD: f442_SARTEND_processCommand202_entranceDrawCredits"); }// @ F0442_STARTEND_ProcessCommand202_EntranceDrawCredits diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 8d23784ed5..fa2b44278a 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -826,9 +826,6 @@ void DisplayMan::f460_initializeGraphicData() { _g709_bitmapWallSet_DoorFrameFront = new byte[32 * 123]; _g296_bitmapViewport = new byte[224 * 136]; - warning(false, "SKIPPED CODE: G0086_puc_Bitmap_ViewportBlackArea it is useless"); - warning(false, "SKIPPED CODE: G0087_puc_Bitmap_ViewportFloorArea it is useless"); - if (!_g639_derivedBitmapByteCount) _g639_derivedBitmapByteCount = new uint16[k730_DerivedBitmapMaximumCount]; if (!_g638_derivedBitmaps) { diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index e5f477dccd..9e66455226 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -677,8 +677,8 @@ public: void f20_blitToViewport(byte *bitmap, Box &box, int16 byteWidth, Color transparent, int16 height); // @ F0020_MAIN_BlitToViewport void f20_blitToViewport(byte *bitmap, int16 *box, int16 byteWidth, Color transparent, int16 height); // @ F0020_MAIN_BlitToViewport - void f21_blitToScreen(byte* bitmap, int16 *box, int16 viewDoorOrnIndex, Color transparent, int16 doorOrnOrdinal); // @ F0021_MAIN_BlitToScreen - void f21_blitToScreen(byte* bitmap, Box *box, int16 viewDoorOrnIndex, Color transparent, int16 doorOrnOrdinal); // @ F0021_MAIN_BlitToScreen + void f21_blitToScreen(byte *bitmap, int16* box, int16 byteWidth, Color transparent, int16 height); // @ F0021_MAIN_BlitToScreen + void f21_blitToScreen(byte* bitmap, Box* box, int16 byteWidth, Color transparent, int16 height); // @ F0021_MAIN_BlitToScreen /* srcHeight and destHeight are not necessary for blitting, only error checking, thus they are defaulted for existing code which |