diff --git a/src/debug.c b/src/debug.c index b22fbdf..3dac129 100644 --- a/src/debug.c +++ b/src/debug.c @@ -74,10 +74,17 @@ void debug_ingameinfo() { for (i = 0; i < map.size.x; i++) stonelist_add (i, map.size.y-1); - redraw_logo (0, gfx.res.y-font[0].size.y, gfx.res.y, gfx.res.x); + redraw_logo (0, gfx.res.y-font[0].size.y * 2, gfx.res.y, gfx.res.x); sprintf (text, "TDiff: %2.3f TFactor: %2.3f", timediff, timefactor); font_gfxdraw (0, gfx.res.y-font[0].size.y, text, 0, 0, (map.size.y*256)+10); + + sprintf (text, "P:"); + for (i = 0; i < MAX_PLAYERS; i++) + if (PS_IS_playing (players[i].state)) + sprintf (text, "%s %2.2f,%2.2f[%2.2f]", text, players[i].pos.x, players[i].pos.y, players[i].frame); + font_gfxdraw (0, gfx.res.y-font[0].size.y*2, text, 0, 0, (map.size.y*256)+10); + if (bman.p_nr >= 0 && bman.p_nr < MAX_PLAYERS) { sprintf (text, "Pos: %2.3f,%2.3f", players[bman.p_nr].pos.x, players[bman.p_nr].pos.y); font_gfxdraw (350, gfx.res.y-font[0].size.y, text, 0, 0, (map.size.y*256)+10); diff --git a/src/player.c b/src/player.c index 4644d9e..3cc9245 100644 --- a/src/player.c +++ b/src/player.c @@ -1,4 +1,4 @@ -/* $Id: player.c,v 1.58 2004/01/03 04:39:21 stpohle Exp $ +/* $Id: player.c,v 1.59 2004/01/04 21:14:17 stpohle Exp $ * player.c - everything what have to do with the player */ #include @@ -22,6 +22,9 @@ draw_player (_player * player) if (PS_IS_alife (player->state)) { /* player is alife */ + while (player->frame >= player->gfx->ani.frames) + player->frame -= player->gfx->ani.frames; + dest.w = src.w = player->gfx->ani.w; dest.h = src.h = player->gfx->ani.h; dest.x = @@ -536,8 +539,10 @@ player_animation (_player * player) if (PS_IS_alife (player->state)) { player->frame += (timefactor * ANI_PLAYERTIMEOUT * 15 * player->speed); - if ((int)player->frame >= player->gfx->ani.frames) - player->frame = 0.0f; + while ((int)player->frame >= player->gfx->ani.frames) + player->frame -= player->gfx->ani.frames; + while ((int)player->frame < 0) + player->frame += player->gfx->ani.frames; } if (PS_IS_dead (player->state)) { @@ -643,7 +648,7 @@ player_ilness_loop (int pl_nr) if (p->ill[type].to <= 0.0f) player_clear_ilness (p, type); else { - p->illframe += timediff; + p->illframe += timefactor; if (p->illframe < 0 || p->illframe >= gfx.ill.frames) p->illframe = 0.0f;