mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 17:03:13 +00:00
BBVS: Silence gcc conversion warnings
This commit is contained in:
parent
a83ce70467
commit
d5b5d4b545
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user