diff options
author | Matthew Hoops | 2014-06-01 17:28:11 -0400 |
---|---|---|
committer | Matthew Hoops | 2014-06-01 17:28:34 -0400 |
commit | d5b5d4b5454d52de32f9e1fecf6e3fa47aa798c0 (patch) | |
tree | d9e2787c22c24f510bc88290951cf3c81b9b83ed /engines | |
parent | a83ce70467bf25ebb9637ae80f134bdb9c0733bb (diff) | |
download | scummvm-rg350-d5b5d4b5454d52de32f9e1fecf6e3fa47aa798c0.tar.gz scummvm-rg350-d5b5d4b5454d52de32f9e1fecf6e3fa47aa798c0.tar.bz2 scummvm-rg350-d5b5d4b5454d52de32f9e1fecf6e3fa47aa798c0.zip |
BBVS: Silence gcc conversion warnings
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bbvs/minigames/bbtennis.cpp | 8 | ||||
-rw-r--r-- | engines/bbvs/walk.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/bbvs/minigames/bbtennis.cpp b/engines/bbvs/minigames/bbtennis.cpp index 926642cc5f..6f680d0f95 100644 --- a/engines/bbvs/minigames/bbtennis.cpp +++ b/engines/bbvs/minigames/bbtennis.cpp @@ -594,9 +594,9 @@ void MinigameBbTennis::updateTennisBall(int objIndex) { } obj->fltX = obj->fltX - obj->fltStepX; - obj->x = obj->fltX; + obj->x = (int)obj->fltX; obj->fltY = obj->fltY - obj->fltStepY; - obj->y = obj->fltY; + obj->y = (int)obj->fltY; } @@ -1100,9 +1100,9 @@ void MinigameBbTennis::updateEnemyTennisBall(int objIndex) { } obj->fltX = obj->fltX - obj->fltStepX; - obj->x = obj->fltX; + obj->x = (int)obj->fltX; obj->fltY = obj->fltY - obj->fltStepY; - obj->y = obj->fltY; + obj->y = (int)obj->fltY; } diff --git a/engines/bbvs/walk.cpp b/engines/bbvs/walk.cpp index cf8942e525..4d71d95fc0 100644 --- a/engines/bbvs/walk.cpp +++ b/engines/bbvs/walk.cpp @@ -112,9 +112,9 @@ void BbvsEngine::walkObject(SceneObject *sceneObject, const Common::Point &destP float distance = sqrt((double)(deltaX * deltaX + deltaY * deltaY)); // NOTE The original doesn't have this check but without it the whole pathfinding breaks if (distance > 0.0) { - sceneObject->walkCount = distance / ((((float)ABS(deltaX) / distance) + 1.0) * ((float)walkSpeed / 120)); - sceneObject->xIncr = ((float)deltaX / sceneObject->walkCount) * 65536.0; - sceneObject->yIncr = ((float)deltaY / sceneObject->walkCount) * 65536.0; + sceneObject->walkCount = (int)(distance / ((((float)ABS(deltaX) / distance) + 1.0) * ((float)walkSpeed / 120))); + sceneObject->xIncr = (int)(((float)deltaX / sceneObject->walkCount) * 65536.0); + sceneObject->yIncr = (int)(((float)deltaY / sceneObject->walkCount) * 65536.0); sceneObject->x = (sceneObject->x & 0xFFFF0000) | 0x8000; sceneObject->y = (sceneObject->y & 0xFFFF0000) | 0x8000; } else |