From f54f262bb56d251d131109a81cad7811e240ff4f Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Sat, 21 Jul 2012 21:17:08 +0200 Subject: WINTERMUTE: Fix a few signed/unsigned and float->int warnings. --- engines/wintermute/base/font/base_font_bitmap.cpp | 4 ++-- engines/wintermute/base/particles/part_emitter.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/wintermute/base') diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp index a913cc52ba..cb3468c4f3 100644 --- a/engines/wintermute/base/font/base_font_bitmap.cpp +++ b/engines/wintermute/base/font/base_font_bitmap.cpp @@ -97,8 +97,8 @@ int BaseFontBitmap::getTextWidth(byte *text, int maxLength) { //str.substr(0, maxLength); // TODO: Remove int textWidth = 0; - for (int i = 0; i < str.size(); i++) { - textWidth += getCharWidth(str[i]); + for (int i = 0; (uint32)i < str.size(); i++) { + textWidth += getCharWidth((byte)str[i]); } return textWidth; diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp index 212f11d2f6..54e612ff42 100644 --- a/engines/wintermute/base/particles/part_emitter.cpp +++ b/engines/wintermute/base/particles/part_emitter.cpp @@ -168,7 +168,7 @@ bool PartEmitter::initParticle(PartParticle *particle, uint32 currentTime, uint3 else scale = BaseUtils::randomFloat(_scale1, _scale2); int lifeTime; - if (_lifeTimeZBased) lifeTime = _lifeTime2 - posZ * (_lifeTime2 - _lifeTime1) / 100; + if (_lifeTimeZBased) lifeTime = (int)(_lifeTime2 - posZ * (_lifeTime2 - _lifeTime1) / 100); else lifeTime = BaseUtils::randomInt(_lifeTime1, _lifeTime2); float angle = BaseUtils::randomAngle(_angle1, _angle2); -- cgit v1.2.3