From ea39214f7a252ad60d686a7dac44a50dc2cbad1d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 27 May 2019 04:24:17 +0300 Subject: ILLUSIONS: Fix MSVC warnings - Fix warnings about conversion between float and double - Initialize potentially uninitialized variables --- engines/illusions/bbdou/bbdou_bubble.cpp | 6 +++--- engines/illusions/bbdou/bbdou_inventory.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/illusions/bbdou/bbdou_bubble.cpp b/engines/illusions/bbdou/bbdou_bubble.cpp index fd2585f653..b2370f0004 100644 --- a/engines/illusions/bbdou/bbdou_bubble.cpp +++ b/engines/illusions/bbdou/bbdou_bubble.cpp @@ -241,16 +241,16 @@ void BbdouBubble::calcBubbleTrail(Common::Point &sourcePt, Common::Point &destPt if (!swapY) { if (destPt.y < sourcePt.y) { - currentAngle = M_PI * 0.5; + currentAngle = (float)M_PI * 0.5F; } else { - currentAngle = M_PI * 1.5; + currentAngle = (float)M_PI * 1.5F; partAngle = -partAngle; } if (destPt.x < sourcePt.x) partAngle = -partAngle; } else { if (destPt.x <= sourcePt.x) { - currentAngle = M_PI; + currentAngle = (float)M_PI; } else { currentAngle = 0.0; partAngle = -partAngle; diff --git a/engines/illusions/bbdou/bbdou_inventory.cpp b/engines/illusions/bbdou/bbdou_inventory.cpp index 88184b9807..b491c7701c 100644 --- a/engines/illusions/bbdou/bbdou_inventory.cpp +++ b/engines/illusions/bbdou/bbdou_inventory.cpp @@ -306,6 +306,7 @@ void BbdouInventory::cause0x1B0001(TriggerFunction *triggerFunction, uint32 call foundSceneId = _activeInventorySceneId; foundVerbId = triggerFunction->_verbId; + foundObjectId = 0; foundObjectId2 = 0; if (triggerFunction->_verbId == 0x1B0008) { -- cgit v1.2.3