TOON: Fix Uninitialized scalar variable CID 1003172, 1003173, 1003175, 1003176

This commit is contained in:
Strangerke 2013-04-27 01:54:08 +02:00
parent f8593e8ecb
commit 34ded75f40

View File

@ -2882,7 +2882,7 @@ void ToonEngine::getTextPosition(int32 characterId, int32 *retX, int32 *retY) {
if (character && !_gameState->_inCutaway) {
if (character->getAnimationInstance()) {
if (character->getX() >= _gameState->_currentScrollValue && character->getX() <= _gameState->_currentScrollValue + TOON_SCREEN_WIDTH) {
int16 x1, y1, x2, y2;
int16 x1= 0, y1 = 0, x2 = 0, y2 = 0;
character->getAnimationInstance()->getRect(&x1, &y1, &x2, &y2);
*retX = (x1 + x2) / 2;
*retY = y1;