diff options
author | Einar Johan Trøan Sømåen | 2012-08-31 19:51:07 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-08-31 20:00:41 +0200 |
commit | 7027741de777f3d1f5e9e93f5a2dd8ade09b6599 (patch) | |
tree | fd56cde84561323e545e7b3792af20cf83f6156c /engines/wintermute/base | |
parent | 158a2060868eceff254460a89b67d78dc650bc94 (diff) | |
download | scummvm-rg350-7027741de777f3d1f5e9e93f5a2dd8ade09b6599.tar.gz scummvm-rg350-7027741de777f3d1f5e9e93f5a2dd8ade09b6599.tar.bz2 scummvm-rg350-7027741de777f3d1f5e9e93f5a2dd8ade09b6599.zip |
WINTERMUTE: Fix warnings
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/base_frame.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/base/base_surface_storage.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/base/font/base_font_bitmap.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/base/font/base_font_truetype.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/base/particles/part_emitter.cpp | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/base/base_frame.cpp b/engines/wintermute/base/base_frame.cpp index eb66661c62..ed2c7acaca 100644 --- a/engines/wintermute/base/base_frame.cpp +++ b/engines/wintermute/base/base_frame.cpp @@ -349,7 +349,7 @@ bool BaseFrame::getBoundingRect(Rect32 *rect, int x, int y, float scaleX, float Rect32 subRect;
- for (int i = 0; i < _subframes.size(); i++) {
+ for (uint32 i = 0; i < _subframes.size(); i++) {
_subframes[i]->getBoundingRect(&subRect, x, y, scaleX, scaleY);
BasePlatform::unionRect(rect, rect, &subRect);
}
@@ -469,7 +469,7 @@ bool BaseFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStac if (strcmp(name, "GetSubframe") == 0) {
stack->correctParams(1);
int index = stack->pop()->getInt(-1);
- if (index < 0 || index >= _subframes.size()) {
+ if (index < 0 || index >= (int32)_subframes.size()) {
script->runtimeError("Frame.GetSubframe: Subframe index %d is out of range.", index);
stack->pushNULL();
} else {
@@ -487,7 +487,7 @@ bool BaseFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStac ScValue *val = stack->pop();
if (val->isInt()) {
int index = val->getInt(-1);
- if (index < 0 || index >= _subframes.size()) {
+ if (index < 0 || index >= (int32)_subframes.size()) {
script->runtimeError("Frame.DeleteSubframe: Subframe index %d is out of range.", index);
}
} else {
@@ -563,7 +563,7 @@ bool BaseFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStac else if (strcmp(name, "GetSubframe") == 0) {
stack->correctParams(1);
int index = stack->pop()->getInt(-1);
- if (index < 0 || index >= _applyEvent.size()) {
+ if (index < 0 || index >= (int32)_applyEvent.size()) {
script->runtimeError("Frame.GetEvent: Event index %d is out of range.", index);
stack->pushNULL();
} else {
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp index 0e0976b838..c87da898db 100644 --- a/engines/wintermute/base/base_surface_storage.cpp +++ b/engines/wintermute/base/base_surface_storage.cpp @@ -176,8 +176,8 @@ bool BaseSurfaceStorage::sortSurfaces() { //////////////////////////////////////////////////////////////////////////
int BaseSurfaceStorage::surfaceSortCB(const void *arg1, const void *arg2) {
- const BaseSurface *s1 = *((BaseSurface **)arg1);
- const BaseSurface *s2 = *((BaseSurface **)arg2);
+ const BaseSurface *s1 = *((const BaseSurface *const *)arg1);
+ const BaseSurface *s2 = *((const BaseSurface *const *)arg2);
// sort by life time
if (s1->_lifeTime <= 0 && s2->_lifeTime > 0) {
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp index a9d71e0fa1..062f4801cf 100644 --- a/engines/wintermute/base/font/base_font_bitmap.cpp +++ b/engines/wintermute/base/font/base_font_bitmap.cpp @@ -118,10 +118,10 @@ int BaseFontBitmap::textHeightDraw(const byte *text, int x, int y, int width, TT AnsiString str;
if (_gameRef->_textEncoding == TEXT_UTF8) {
- WideString wstr = StringUtil::utf8ToWide(Utf8String((char *)text));
+ WideString wstr = StringUtil::utf8ToWide(Utf8String((const char *)text));
str = StringUtil::wideToAnsi(wstr);
} else {
- str = AnsiString((char *)text);
+ str = AnsiString((const char *)text);
}
if (str.empty()) {
return 0;
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp index 36703ed44f..171f33d8ab 100644 --- a/engines/wintermute/base/font/base_font_truetype.cpp +++ b/engines/wintermute/base/font/base_font_truetype.cpp @@ -153,11 +153,11 @@ int BaseFontTT::getTextHeight(byte *text, int width) { //////////////////////////////////////////////////////////////////////////
void BaseFontTT::drawText(const byte *text, int x, int y, int width, TTextAlign align, int maxHeight, int maxLength) {
- if (text == NULL || strcmp((char *)text, "") == 0) {
+ if (text == NULL || strcmp((const char *)text, "") == 0) {
return;
}
- WideString textStr = (char *)text;
+ WideString textStr = (const char *)text;
// TODO: Why do we still insist on Widestrings everywhere?
/* if (_gameRef->_textEncoding == TEXT_UTF8) text = StringUtil::Utf8ToWide((char *)Text);
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp index f52a1b8c82..7012bef86f 100644 --- a/engines/wintermute/base/particles/part_emitter.cpp +++ b/engines/wintermute/base/particles/part_emitter.cpp @@ -373,8 +373,8 @@ bool PartEmitter::sortParticlesByZ() { //////////////////////////////////////////////////////////////////////////
int PartEmitter::compareZ(const void *obj1, const void *obj2) {
- const PartParticle *p1 = *(PartParticle **)obj1;
- const PartParticle *p2 = *(PartParticle **)obj2;
+ const PartParticle *p1 = *(const PartParticle *const *)obj1;
+ const PartParticle *p2 = *(const PartParticle *const *)obj2;
if (p1->_posZ < p2->_posZ) {
return -1;
|