diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/gfx.cpp | 18 | ||||
-rw-r--r-- | engines/fullpipe/gfx.h | 4 | ||||
-rw-r--r-- | engines/fullpipe/statics.cpp | 50 |
3 files changed, 72 insertions, 0 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index df48a1cb7d..e5cbac31ac 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -798,6 +798,24 @@ Bitmap *Bitmap::reverseImage() { return this; } +Bitmap *Bitmap::flipVertical() { + warning("STUB: Bitmap::flipVertical()"); + + return this; +} + + void Bitmap::drawShaded(int type, int x, int y, byte *palette) { + warning("STUB: Bitmap::drawShaded(%d, %d, %d)", type, x, y); + + putDib(x, y, (int32 *)palette); +} + + void Bitmap::drawRotated(int x, int y, int angle, byte *palette) { + warning("STUB: Bitmap::drawShaded(%d, %d, %d)", x, y, angle); + + putDib(x, y, (int32 *)palette); +} + bool BigPicture::load(MfcArchive &file) { debug(5, "BigPicture::load()"); Picture::load(file); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index a47596c1f4..7cc18adc7a 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -52,6 +52,10 @@ struct Bitmap { void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format); Bitmap *reverseImage(); + Bitmap *flipVertical(); + + void drawShaded(int type, int x, int y, byte *palette); + void drawRotated(int x, int y, int angle, byte *palette); }; class Picture : public MemoryObject { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 168ec90e27..0bb580fc53 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -313,6 +313,56 @@ Movement *StaticANIObject::getMovementByName(char *name) { void Movement::draw(bool flipFlag, int angle) { warning("STUB: Movement::draw(%d, %d)", flipFlag, angle); + + Common::Point point; + + getCurrDynamicPhaseXY(point); + + int x = _ox - point.x; + int y = _oy - point.y; + + if (_currDynamicPhase->getPaletteData()) + g_fullpipe->_globalPalette = _currDynamicPhase->getPaletteData(); + + if (_currDynamicPhase->getAlpha() < 0xFF) { + warning("Movement::draw: alpha < 0xff: %d", _currDynamicPhase->getAlpha()); + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, _currDynamicPhase->getAlpha()); + } + + Bitmap *bmp; + if (_currMovement) { + bmp = _currDynamicPhase->getPixelData()->reverseImage(); + } else { + bmp = _currDynamicPhase->getPixelData(); + } + + if (flipFlag) { + bmp->flipVertical()->drawShaded(1, x, y + 30 + _currDynamicPhase->_rect->bottom, _currDynamicPhase->_paletteData); + } if (angle) { + bmp->drawRotated(x, y, angle, _currDynamicPhase->_paletteData); + } else { + bmp->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData); + } + + if (_currDynamicPhase->_rect->top) { + if (!_currDynamicPhase->_convertedBitmap) { + //v12 = Picture_getPixelData(v5); + //v13 = Bitmap_convertTo16Bit565(v12, (unsigned int *)&_currDynamicPhase->rect); + //_currDynamicPhase->convertedBitmap = v13; + } + + if (_currDynamicPhase->_convertedBitmap) { + if (_currMovement) { + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, LOBYTE(_currDynamicPhase->rect.top)); + _currDynamicPhase->_convertedBitmap->reverseImage()->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData); + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255); + } else { + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, LOBYTE(_currDynamicPhase->rect.top)); + _currDynamicPhase->_convertedBitmap->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData); + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255); + } + } + } } |