diff options
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kmath.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 2 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_resmgr.cpp | 2 | ||||
-rw-r--r-- | engines/sci/gfx/resource/sci_view_1.cpp | 2 |
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); |