aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Base/PartParticle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Base/PartParticle.cpp')
-rw-r--r--engines/wintermute/Base/PartParticle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/Base/PartParticle.cpp b/engines/wintermute/Base/PartParticle.cpp
index 85966eb510..b348521808 100644
--- a/engines/wintermute/Base/PartParticle.cpp
+++ b/engines/wintermute/Base/PartParticle.cpp
@@ -125,16 +125,16 @@ HRESULT CPartParticle::update(CPartEmitter *Emitter, uint32 CurrentTime, uint32
// particle hit the border
if (!_isDead && !CBPlatform::IsRectEmpty(&_border)) {
POINT p;
- p.x = _pos.x;
- p.y = _pos.y;
+ p.x = (int32)_pos.x;
+ p.y = (int32)_pos.y;
if (!CBPlatform::PtInRect(&_border, p)) fadeOut(CurrentTime, Emitter->_fadeOutTime);
}
if (_state != PARTICLE_NORMAL) return S_OK;
// update alpha
if (_lifeTime > 0) {
- int Age = CurrentTime - _creationTime;
- int AlphaDelta = _alpha2 - _alpha1;
+ int Age = (int)(CurrentTime - _creationTime);
+ int AlphaDelta = (int)(_alpha2 - _alpha1);
_currentAlpha = _alpha1 + ((float)AlphaDelta / (float)_lifeTime * (float)Age);
}