Silenced more warnings

svn-id: r38230
This commit is contained in:
Filippos Karapetis 2009-02-15 12:23:16 +00:00
parent 8b38d0677a
commit 25ddb00436
5 changed files with 6 additions and 4 deletions

View file

@ -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;

View file

@ -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.

View file

@ -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;
}

View file

@ -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;

View file

@ -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);