aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-08 01:41:38 +0200
committerEugene Sandulenko2019-09-03 17:17:14 +0200
commit168ca5fc0d831ef8fbba8e697e5b4b3f5cdc204b (patch)
treedefb553c902b5ed02acd450bce8ab6d11b8ccf07 /engines
parent3851c2d9a6bd17c8dd4ca116711120f893167ab6 (diff)
downloadscummvm-rg350-168ca5fc0d831ef8fbba8e697e5b4b3f5cdc204b.tar.gz
scummvm-rg350-168ca5fc0d831ef8fbba8e697e5b4b3f5cdc204b.tar.bz2
scummvm-rg350-168ca5fc0d831ef8fbba8e697e5b4b3f5cdc204b.zip
HDB: Used transparent alpha blitting
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/ai-bots.cpp5
-rw-r--r--engines/hdb/ai-funcs.cpp3
-rw-r--r--engines/hdb/gfx.cpp8
-rw-r--r--engines/hdb/gfx.h4
4 files changed, 9 insertions, 11 deletions
diff --git a/engines/hdb/ai-bots.cpp b/engines/hdb/ai-bots.cpp
index fafeadc0d1..ec1cc6b6e7 100644
--- a/engines/hdb/ai-bots.cpp
+++ b/engines/hdb/ai-bots.cpp
@@ -1685,8 +1685,7 @@ void aiMeerkatInit2(AIEntity *e) {
void aiMeerkatDraw(AIEntity *e, int mx, int my) {
char word[3];
- debug(9, "FIXME: Replace MaskedBlitting with AlphaMaskedBlitting");
- g_hdb->_window->getGemGfx()->drawMasked(e->value1 - mx, e->value2 - my);
+ g_hdb->_window->getGemGfx()->drawMasked(e->value1 - mx, e->value2 - my, 255 - e->blinkFrames * 16);
g_hdb->_gfx->setCursor(e->value1 + 12 - mx, e->value2 - 8 - my);
word[2] = 0;
if (!e->special1Frames) {
@@ -1848,7 +1847,7 @@ void aiMeerkatLookAround(AIEntity *e) {
//-------------------------------------------------------------------
//
-// FATFROG : Just sits in place and blasts out his tongue if you're
+// FATFROG : Just sits in place and blasts out his tongue if you're
// within range.
//
//-------------------------------------------------------------------
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 1cd1b23255..87bcb90651 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -1714,8 +1714,7 @@ void AI::drawEnts(int x, int y, int w, int h) {
switch (e->type) {
case AI_VORTEXIAN:
if (e->draw)
- e->draw->drawMasked(e->x - x + e->drawXOff, e->y - y + e->drawYOff);
- debug(9, "STUB: AI::drawEnts: Replace Masked Blitting with Alpha Masked Blitting");
+ e->draw->drawMasked(e->x - x + e->drawXOff, e->y - y + e->drawYOff, e->value2 & 0xff);
break;
case AI_GUY: // Draw Player Last
break;
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index 191da100b9..a093389fa2 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -808,8 +808,8 @@ int Picture::draw(int x, int y) {
return 0;
}
-int Picture::drawMasked(int x, int y) {
- g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f);
+int Picture::drawMasked(int x, int y, int alpha) {
+ g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f, false, 0, alpha & 0xff);
Common::Rect clip(_surface.getBounds());
clip.moveTo(x, y);
@@ -866,8 +866,8 @@ int Tile::draw(int x, int y) {
return 0;
}
-int Tile::drawMasked(int x, int y) {
- g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f);
+int Tile::drawMasked(int x, int y, int alpha) {
+ g_hdb->_gfx->_globalSurface.transBlitFrom(_surface, Common::Point(x, y), 0xf81f, false, 0, alpha & 0xff);
Common::Rect clip(_surface.getBounds());
clip.moveTo(x, y);
diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h
index 88fb25063b..e49b0c56bf 100644
--- a/engines/hdb/gfx.h
+++ b/engines/hdb/gfx.h
@@ -221,7 +221,7 @@ public:
Graphics::Surface load(Common::SeekableReadStream *stream);
int draw(int x, int y);
- int drawMasked(int x, int y);
+ int drawMasked(int x, int y, int alpha = 0xff);
void free();
int _width, _height;
@@ -244,7 +244,7 @@ public:
Graphics::Surface load(Common::SeekableReadStream *stream);
int draw(int x, int y);
- int drawMasked(int x, int y);
+ int drawMasked(int x, int y, int alpha = 0xff);
void free();
uint32 _flags;