diff options
Diffstat (limited to 'engines/gob/draw.cpp')
| -rw-r--r-- | engines/gob/draw.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 66f046339f..f0a84bbdcc 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -390,8 +390,9 @@ void Draw::printTextCentered(int16 id, int16 left, int16 top, int16 right, adjustCoords(1, &left, &top); adjustCoords(1, &right, &bottom); - if (_vm->_game->_script->getCenterOffset() != 0) { - _vm->_game->_script->call(_vm->_game->_script->getCenterOffset()); + uint16 centerOffset = _vm->_game->_script->getFunctionOffset(Script::kFunctionCenter); + if (centerOffset != 0) { + _vm->_game->_script->call(centerOffset); WRITE_VAR(17, (uint32) id); WRITE_VAR(18, (uint32) left); |
