diff options
author | Sven Hesse | 2008-12-16 23:27:35 +0000 |
---|---|---|
committer | Sven Hesse | 2008-12-16 23:27:35 +0000 |
commit | adae869c8a227b0da4abf2b2c30b97e7cf1ea7fb (patch) | |
tree | 3e051b835206ad1ea018ede0a73d227e506f5712 /engines/gob/inter_v6.cpp | |
parent | 98bbf9c417cc4bbd08907061fa2f14fd543f1447 (diff) | |
download | scummvm-rg350-adae869c8a227b0da4abf2b2c30b97e7cf1ea7fb.tar.gz scummvm-rg350-adae869c8a227b0da4abf2b2c30b97e7cf1ea7fb.tar.bz2 scummvm-rg350-adae869c8a227b0da4abf2b2c30b97e7cf1ea7fb.zip |
Experimental semi-transparency for fillRect, used in the green/red menu areas of Urban Runner
svn-id: r35406
Diffstat (limited to 'engines/gob/inter_v6.cpp')
-rw-r--r-- | engines/gob/inter_v6.cpp | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index a1ae180068..fa21e4d0ba 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -439,7 +439,7 @@ void Inter_v6::setupOpcodes() { OPCODE(o1_returnTo), OPCODE(o1_loadSpriteContent), OPCODE(o1_copySprite), - OPCODE(o1_fillRect), + OPCODE(o6_fillRect), /* 34 */ OPCODE(o1_drawLine), OPCODE(o1_strToLong), @@ -947,6 +947,45 @@ bool Inter_v6::o6_freeCollision(OpFuncParams ¶ms) { return false; } +bool Inter_v6::o6_fillRect(OpFuncParams ¶ms) { + int16 destSurf; + + _vm->_draw->_destSurface = destSurf = load16(); + + _vm->_draw->_destSpriteX = _vm->_parse->parseValExpr(); + _vm->_draw->_destSpriteY = _vm->_parse->parseValExpr(); + _vm->_draw->_spriteRight = _vm->_parse->parseValExpr(); + _vm->_draw->_spriteBottom = _vm->_parse->parseValExpr(); + + evalExpr(0); + + _vm->_draw->_backColor = _vm->_global->_inter_resVal & 0xFFFF; + uint16 word_63E64 = _vm->_global->_inter_resVal >> 16; + + if (word_63E64 != 0) + warning("Urban Stub: o6_fillRect(), word_63E64 = %d", word_63E64); + + if (_vm->_draw->_spriteRight < 0) { + _vm->_draw->_destSpriteX += _vm->_draw->_spriteRight - 1; + _vm->_draw->_spriteRight = -_vm->_draw->_spriteRight + 2; + } + if (_vm->_draw->_spriteBottom < 0) { + _vm->_draw->_destSpriteY += _vm->_draw->_spriteBottom - 1; + _vm->_draw->_spriteBottom = -_vm->_draw->_spriteBottom + 2; + } + + if (destSurf & 0x80) { + warning("Urban Stub: o6_fillRect(), destSurf & 0x80"); + return false; + } + + if (!_vm->_draw->_spritesArray[(destSurf > 100) ? (destSurf - 80) : destSurf]) + return false; + + _vm->_draw->spriteOperation(DRAW_FILLRECT); + return false; +} + void Inter_v6::probe16bitMusic(char *fileName) { int len = strlen(fileName); |