mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
GOB: Only draw text when coordinates are within the surface
svn-id: r55575
This commit is contained in:
parent
261a640a93
commit
03adf7fdf6
@ -1099,6 +1099,10 @@ bool Inter_v2::o2_printText(OpFuncParams ¶ms) {
|
||||
_vm->_draw->_textToPrint = buf;
|
||||
_vm->_draw->_transparency = 0;
|
||||
|
||||
SurfacePtr surface = _vm->_draw->_spritesArray[_vm->_draw->_destSurface];
|
||||
uint16 destWidth = surface ? surface->getWidth() : 0;
|
||||
uint16 destHeight = surface ? surface->getHeight() : 0;
|
||||
|
||||
if (_vm->_draw->_backColor == 16) {
|
||||
_vm->_draw->_backColor = 0;
|
||||
_vm->_draw->_transparency = 1;
|
||||
@ -1142,7 +1146,10 @@ bool Inter_v2::o2_printText(OpFuncParams ¶ms) {
|
||||
} else
|
||||
buf[i] = 0;
|
||||
|
||||
if ((_vm->_draw->_destSpriteX < destWidth) &&
|
||||
(_vm->_draw->_destSpriteY < destHeight))
|
||||
_vm->_draw->spriteOperation(DRAW_PRINTTEXT);
|
||||
|
||||
} while (_vm->_game->_script->peekByte() != 200);
|
||||
|
||||
_vm->_game->_script->skip(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user