aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-26 09:02:41 +0530
committerEugene Sandulenko2019-09-03 17:17:29 +0200
commit85b922895aee317631e07c5ece5ed908ee17952e (patch)
tree3e3037d70a4148c8ef6dc0db5b863b671863d08f /engines
parent1edab20e026c63d986aedc59e0baa7a860b94df6 (diff)
downloadscummvm-rg350-85b922895aee317631e07c5ece5ed908ee17952e.tar.gz
scummvm-rg350-85b922895aee317631e07c5ece5ed908ee17952e.tar.bz2
scummvm-rg350-85b922895aee317631e07c5ece5ed908ee17952e.zip
HDB: Fix Deliveries with no GFX
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/window.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp
index 5a1e673cce..6c2dcc8a73 100644
--- a/engines/hdb/window.cpp
+++ b/engines/hdb/window.cpp
@@ -1161,7 +1161,8 @@ void Window::drawDeliveries() {
if (_dlvsInfo.delay1 < g_hdb->getTimeSlice()) {
// Draw Item
_gfxIndent->draw(drawX, drawY);
- d->itemGfx->drawMasked(drawX, drawY);
+ if (d->itemGfx)
+ d->itemGfx->drawMasked(drawX, drawY);
g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength(d->itemTextName) / 2, kDlvItemTextY);
g_hdb->_gfx->drawText(d->itemTextName);
@@ -1190,7 +1191,8 @@ void Window::drawDeliveries() {
if (_dlvsInfo.delay3 < g_hdb->getTimeSlice()) {
// Draw Delivery
_gfxIndent->draw(drawX, drawY + kTileHeight + 16);
- d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);
+ if (d->destGfx)
+ d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);
g_hdb->_gfx->setCursor(centerX - (g_hdb->_gfx->stringLength(d->destTextName) + g_hdb->_gfx->stringLength("to")) / 2, kDlvItemTextY + 12);
g_hdb->_gfx->drawText("to ");
@@ -1204,10 +1206,12 @@ void Window::drawDeliveries() {
} else {
// Draw Item
_gfxIndent->draw(drawX, drawY);
- d->itemGfx->drawMasked(drawX, drawY);
+ if (d->itemGfx)
+ d->itemGfx->drawMasked(drawX, drawY);
// Draw Delivery
_gfxIndent->draw(drawX, drawY + kTileHeight + 16);
- d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);
+ if (d->destGfx)
+ d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);
if (!_dlvsInfo.animate && inv == _dlvsInfo.selected) {
g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength(d->itemTextName)/2, kDlvItemTextY);