aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Ad/AdObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Ad/AdObject.cpp')
-rw-r--r--engines/wintermute/Ad/AdObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/Ad/AdObject.cpp b/engines/wintermute/Ad/AdObject.cpp
index 816821568e..896bdfdaf5 100644
--- a/engines/wintermute/Ad/AdObject.cpp
+++ b/engines/wintermute/Ad/AdObject.cpp
@@ -1143,8 +1143,8 @@ HRESULT CAdObject::DisplaySpriteAttachment(CAdObject *Attachment) {
int OrigY = Attachment->_posY;
// inherit position from owner
- Attachment->_posX = this->_posX + Attachment->_posX * ScaleX / 100.0f;
- Attachment->_posY = this->_posY + Attachment->_posY * ScaleY / 100.0f;
+ Attachment->_posX = (int)(this->_posX + Attachment->_posX * ScaleX / 100.0f);
+ Attachment->_posY = (int)(this->_posY + Attachment->_posY * ScaleY / 100.0f);
// inherit other props
Attachment->_alphaColor = this->_alphaColor;
@@ -1194,8 +1194,8 @@ HRESULT CAdObject::UpdatePartEmitter() {
float ScaleX, ScaleY;
GetScale(&ScaleX, &ScaleY);
- _partEmitter->_posX = _posX + (ScaleX / 100.0f) * _partOffsetX;
- _partEmitter->_posY = _posY + (ScaleY / 100.0f) * _partOffsetY;
+ _partEmitter->_posX = (int)(_posX + (ScaleX / 100.0f) * _partOffsetX);
+ _partEmitter->_posY = (int)(_posY + (ScaleY / 100.0f) * _partOffsetY);
}
return _partEmitter->Update();
}