aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-02-15 12:23:16 +0000
committerFilippos Karapetis2009-02-15 12:23:16 +0000
commit25ddb004360a332ee1d362e5b34286d97242bc68 (patch)
tree78e5c5df6a91e2c4d05926ec22610ca7d21c793d /engines
parent8b38d0677ad3f2e1239f5a0acc1485176a9c61ac (diff)
downloadscummvm-rg350-25ddb004360a332ee1d362e5b34286d97242bc68.tar.gz
scummvm-rg350-25ddb004360a332ee1d362e5b34286d97242bc68.tar.bz2
scummvm-rg350-25ddb004360a332ee1d362e5b34286d97242bc68.zip
Silenced more warnings
svn-id: r38230
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kmath.cpp2
-rw-r--r--engines/sci/engine/kmovement.cpp2
-rw-r--r--engines/sci/engine/scriptdebug.cpp2
-rw-r--r--engines/sci/gfx/resource/sci_resmgr.cpp2
-rw-r--r--engines/sci/gfx/resource/sci_view_1.cpp2
5 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 4c8ebb8ec5..aa4d390cc2 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -59,7 +59,7 @@ get_angle(int xrel, int yrel)
if ((xrel == 0) && (yrel == 0))
return 0;
else {
- int val = (int) (180.0/PI * atan2(xrel, -yrel));
+ int val = (int) (180.0/PI * atan2((float)xrel, (float)-yrel));
if (val < 0)
val += 360;
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 1234a9028a..90e44a2ace 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -140,7 +140,7 @@ kSetJump(state_t *s, int funct_nr, int argc, reg_t *argv)
// FIXME: This choice of vy makes t roughly (2+sqrt(2))/gy * sqrt(dy);
// so if gy==3, then t is roughly sqrt(dy)...
- vy = (int)sqrt(gy * abs(2 * dy)) + 1;
+ vy = (int)sqrt((float)gy * (float)abs(2 * dy)) + 1;
} else {
// As stated above, the vertical direction is correlated to the horizontal by the
// (non-zero) factor c.
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index a2a1d2427d..d260fa3d49 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -3277,6 +3277,7 @@ c_type(state_t *s)
}
sciprintf("%s\n", invalid ? " (invalid)" : "");
+ return 0;
}
int
@@ -3403,6 +3404,7 @@ c_gc_list_reachable(state_t *s)
apply_to_reg_t_hash_map(use_map, NULL, print_all_of_them);
free_reg_t_hash_map (use_map);
+ return 0;
}
diff --git a/engines/sci/gfx/resource/sci_resmgr.cpp b/engines/sci/gfx/resource/sci_resmgr.cpp
index fce577f8c5..f0a64dd260 100644
--- a/engines/sci/gfx/resource/sci_resmgr.cpp
+++ b/engines/sci/gfx/resource/sci_resmgr.cpp
@@ -175,7 +175,7 @@ gfxr_interpreter_get_view(gfx_resstate_t *state, int nr, void *internal, int pal
resource_mgr_t *resmgr = (resource_mgr_t *) state->misc_payload;
resource_t *res = scir_find_resource(resmgr, sci_view, nr, 0);
int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr);
- gfxr_view_t *result;
+ gfxr_view_t *result = 0;
if (!res || !res->data)
return NULL;
diff --git a/engines/sci/gfx/resource/sci_view_1.cpp b/engines/sci/gfx/resource/sci_view_1.cpp
index d747545331..8302b4a0fa 100644
--- a/engines/sci/gfx/resource/sci_view_1.cpp
+++ b/engines/sci/gfx/resource/sci_view_1.cpp
@@ -62,7 +62,7 @@ decompress_sci_view(int id, int loop, int cel, byte *resource, byte *dest, int m
int op = resource[runlength_pos];
int bytes;
int readbytes = 0;
- int color;
+ int color = 0;
NEXT_RUNLENGTH_BYTE(1);