ASYLUM: fix background drawing in some of the puzzles

This commit is contained in:
alxpnv 2021-04-08 12:00:00 +03:00 committed by Eugene Sandulenko
parent f23be0119e
commit f94c11658a
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
6 changed files with 16 additions and 7 deletions

View File

@ -92,7 +92,8 @@ bool PuzzleFisherman::update(const AsylumEvent &) {
// Draw background
getScreen()->clearGraphicsInQueue();
getScreen()->draw(getWorld()->graphicResourceIds[38]);
getScreen()->fillRect(0, 0, 640, 480, 251);
getScreen()->draw(getWorld()->graphicResourceIds[38], 0, Common::Point(0, 0), kDrawFlagNone, true);
// Draw 7 graphics
for (uint32 i = 0; i < 6; i++) {

View File

@ -78,7 +78,8 @@ bool PuzzleLock::update(const AsylumEvent &) {
// Draw screen
getScreen()->clearGraphicsInQueue();
getScreen()->draw(getWorld()->graphicResourceIds[13]);
getScreen()->fillRect(0, 0, 640, 480, 252);
getScreen()->draw(getWorld()->graphicResourceIds[13], 0, Common::Point(0, 0), kDrawFlagNone, true);
if (_frameIndexes[0] != 32 || _frameIndexes[1] != 28 || _frameIndexes[2] != 0) {
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[15], (uint32)_frameIndexes[0], Common::Point(145, 292), kDrawFlagNone, 0, 1);

View File

@ -107,7 +107,9 @@ bool PuzzleMorgueDoor::update(const AsylumEvent &) {
// Draw elements
getScreen()->clearGraphicsInQueue();
getScreen()->draw(getWorld()->graphicResourceIds[19]);
getScreen()->fillRect(0, 0, 640, 480, 252);
getScreen()->draw(getWorld()->graphicResourceIds[19], 0, Common::Point(0, 0), kDrawFlagNone, true);
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[21], (uint32)_frameIndexes[kTopLever], Common::Point(47, 0), kDrawFlagNone, 0, 1);
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[22], (uint32)_frameIndexes[kBottomLever], Common::Point(51, 236), kDrawFlagNone, 0, 1);

View File

@ -132,7 +132,9 @@ bool PuzzleTimeMachine::update(const AsylumEvent &) {
// Draw screen elements
getScreen()->clearGraphicsInQueue();
getScreen()->draw(getWorld()->graphicResourceIds[34]);
getScreen()->fillRect(0, 0, 640, 480, 115);
getScreen()->draw(getWorld()->graphicResourceIds[34], 0, Common::Point(0, 0), kDrawFlagNone, true);
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[35], _frameIndexes[0], Common::Point( 23, 215), kDrawFlagNone, 0, 3);
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[36], _frameIndexes[1], Common::Point( 70, 217), kDrawFlagNone, 0, 3);
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[37], _frameIndexes[2], Common::Point(189, 217), kDrawFlagNone, 0, 3);

View File

@ -310,7 +310,8 @@ void PuzzleVCR::updateScreen(const AsylumEvent &) {
// Draw background
getScreen()->clearGraphicsInQueue();
getScreen()->draw(getWorld()->graphicResourceIds[0]);
getScreen()->fillRect(0, 0, 640, 480, 252);
getScreen()->draw(getWorld()->graphicResourceIds[0], 0, Common::Point(0, 0), kDrawFlagNone, true);
updateBlackJack();
updateRedJack();

View File

@ -68,7 +68,8 @@ bool PuzzleWritings::init(const AsylumEvent &) {
_textSurface.create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
// Draw background
getScreen()->draw(getWorld()->graphicResourceIds[5]);
getScreen()->fillRect(0, 0, 640, 480, 253);
getScreen()->draw(getWorld()->graphicResourceIds[5], 0, Common::Point(0, 0), kDrawFlagNone, true);
// Draw all lines of text
getText()->loadFont(getWorld()->graphicResourceIds[42]);
@ -126,7 +127,8 @@ bool PuzzleWritings::update(const AsylumEvent &) {
// Draw background
getScreen()->clearGraphicsInQueue();
getScreen()->draw(getWorld()->graphicResourceIds[4]);
getScreen()->fillRect(0, 0, 640, 480, 253);
getScreen()->draw(getWorld()->graphicResourceIds[4], 0, Common::Point(0, 0), kDrawFlagNone, true);
if (_hasGlassMagnifier) {
getScreen()->copyToBackBuffer(