mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
DM: Fix dungon not drawn behind entrance doors
This commit is contained in:
parent
7570844f5e
commit
6428110da8
@ -4,7 +4,6 @@ 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
|
||||
|
@ -185,6 +185,7 @@ DMEngine::DMEngine(OSystem *syst) : Engine(syst), _console(nullptr) {
|
||||
_g313_gameTime = 0;
|
||||
_g353_stringBuildBuffer[0] = '\0';
|
||||
_g318_waitForInputMaxVerticalBlankCount = 0;
|
||||
_savedScreenForOpenEntranceDoors = nullptr;
|
||||
for (uint16 i = 0; i < 10; ++i)
|
||||
_g562_entranceDoorAnimSteps[i] = nullptr;
|
||||
_g564_interfaceCredits = nullptr;
|
||||
@ -214,6 +215,7 @@ DMEngine::~DMEngine() {
|
||||
for (uint16 i = 0; i < k34_D13_soundCount; ++i)
|
||||
delete[] _gK24_soundData[i]._firstSample;
|
||||
|
||||
delete[] _savedScreenForOpenEntranceDoors;
|
||||
// clear debug channels
|
||||
DebugMan.clearAllDebugChannels();
|
||||
}
|
||||
@ -689,6 +691,10 @@ void DMEngine::f439_drawEntrance() {
|
||||
_displayMan->f128_drawDungeon(kDirSouth, 2, 0);
|
||||
warning(false, "IGNORED CODE: G0324_B_DrawViewportRequested = false;");
|
||||
|
||||
if (!_savedScreenForOpenEntranceDoors)
|
||||
_savedScreenForOpenEntranceDoors = new byte[k200_heightScreen * k160_byteWidthScreen * 2];
|
||||
memcpy(_savedScreenForOpenEntranceDoors, _displayMan->_g348_bitmapScreen, 320 * 200);
|
||||
|
||||
_displayMan->_g578_useByteBoxCoordinates = false, _displayMan->f132_blitToBitmap(_displayMan->_g348_bitmapScreen, _g562_entranceDoorAnimSteps[8], doorsUpperHalfBox, 0, 30, k160_byteWidthScreen, k128_byteWidth, kM1_ColorNoTransparency, 200, 161);
|
||||
_displayMan->_g578_useByteBoxCoordinates = false, _displayMan->f132_blitToBitmap(_displayMan->_g348_bitmapScreen, _g562_entranceDoorAnimSteps[8], doorsLowerHalfBox, 0, 111, k160_byteWidthScreen, k128_byteWidth, kM1_ColorNoTransparency, 200, 161);
|
||||
|
||||
@ -698,24 +704,21 @@ void DMEngine::f439_drawEntrance() {
|
||||
}
|
||||
|
||||
void DMEngine::f438_STARTEND_OpenEntranceDoors() {
|
||||
Box rightDoorBox(109, 231, 0 + 33, 160 + 33);
|
||||
Box rightDoorBox(109, 231, 33, 193);
|
||||
byte *rightDoorBitmap = _displayMan->f489_getNativeBitmapOrGraphic(k3_entranceRightDoorGraphicIndice);
|
||||
Box leftDoorBox(0, 100, 0 + 33, 160 + 33);
|
||||
Box leftDoorBox(0, 100, 33, 193);
|
||||
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 {
|
||||
|
||||
for (uint16 animStep = 1; animStep < 32; ++animStep) {
|
||||
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->f21_blitToScreen(_savedScreenForOpenEntranceDoors, &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();
|
||||
@ -726,7 +729,8 @@ void DMEngine::f438_STARTEND_OpenEntranceDoors() {
|
||||
rightDoorBox._x1 += 4;
|
||||
|
||||
f22_delay(3);
|
||||
} while (++animStep != 32);
|
||||
}
|
||||
delete[] _savedScreenForOpenEntranceDoors;
|
||||
}
|
||||
|
||||
|
||||
|
@ -272,6 +272,7 @@ private:
|
||||
Common::RandomSource *_rnd;
|
||||
SoundData _gK24_soundData[k34_D13_soundCount]; // @ K0024_as_SoundData
|
||||
Common::Queue<PendingSound> _pendingSounds;
|
||||
byte *_savedScreenForOpenEntranceDoors; // ad-hoc HACK
|
||||
public:
|
||||
DisplayMan *_displayMan;
|
||||
DungeonMan *_dungeonMan;
|
||||
|
Loading…
x
Reference in New Issue
Block a user