diff options
author | Einar Johan Trøan Sømåen | 2012-07-21 21:17:08 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-21 21:17:08 +0200 |
commit | f54f262bb56d251d131109a81cad7811e240ff4f (patch) | |
tree | 653da85c970e74d6236e05a42a7e4ce60e260e2b /engines/wintermute | |
parent | b5a07fef8ebf29f7f44b15d9b34799c7e115fdad (diff) | |
download | scummvm-rg350-f54f262bb56d251d131109a81cad7811e240ff4f.tar.gz scummvm-rg350-f54f262bb56d251d131109a81cad7811e240ff4f.tar.bz2 scummvm-rg350-f54f262bb56d251d131109a81cad7811e240ff4f.zip |
WINTERMUTE: Fix a few signed/unsigned and float->int warnings.
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/base/font/base_font_bitmap.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/base/particles/part_emitter.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
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);
|