|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: game.c,v 1.107 2005/02/14 20:09:19 stpohle Exp $
|
|
|
|
/* $Id: game.c,v 1.108 2005/04/06 21:17:48 stpohle Exp $
|
|
|
|
game.c - procedures for the game. */
|
|
|
|
game.c - procedures for the game. */
|
|
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <string.h>
|
|
|
@ -629,8 +629,8 @@ void game_showresultteam (int pos_x, int pos_y, int pos_w, int pos_h) {
|
|
|
|
for (t_nr = 0; t_nr < t_count; t_nr++) {
|
|
|
|
for (t_nr = 0; t_nr < t_count; t_nr++) {
|
|
|
|
sprintf (text, "%s Victorys %d (%d)", tdata[t_nr].team->name, tdata[t_nr].team->wins, tdata[t_nr].team->points);
|
|
|
|
sprintf (text, "%s Victorys %d (%d)", tdata[t_nr].team->name, tdata[t_nr].team->wins, tdata[t_nr].team->points);
|
|
|
|
sx = (pos_w - strlen (text) * font[0].size.x) / 2;
|
|
|
|
sx = (pos_w - strlen (text) * font[0].size.x) / 2;
|
|
|
|
font_gfxdrawbold (pos_x + sx, pos_y + sy+3, text, 0, COLOR_brown, 1, 1);
|
|
|
|
font_gfxdrawbold (10+ pos_x + sx, pos_y + sy+3, text, 0, COLOR_brown, 1, 1);
|
|
|
|
font_gfxdraw (pos_x + sx, pos_y + sy+3, text, 0, COLOR_yellow, 2);
|
|
|
|
font_gfxdraw (10+ pos_x + sx, pos_y + sy+3, text, 0, COLOR_yellow, 2);
|
|
|
|
sy += SHOWRESULT_TEAMHEAD;
|
|
|
|
sy += SHOWRESULT_TEAMHEAD;
|
|
|
|
dx = pos_w / p_x;
|
|
|
|
dx = pos_w / p_x;
|
|
|
|
sx = (dx - SHOWRESULT_TEAMPLAYERWIDTH)/2;
|
|
|
|
sx = (dx - SHOWRESULT_TEAMPLAYERWIDTH)/2;
|
|
|
@ -651,8 +651,17 @@ void game_showresultteam (int pos_x, int pos_y, int pos_w, int pos_h) {
|
|
|
|
src.y = 0;
|
|
|
|
src.y = 0;
|
|
|
|
gfx_blit (tdata[t_nr].pl[p_nr]->gfx->small_image, &src, gfx.screen, &dest, 1);
|
|
|
|
gfx_blit (tdata[t_nr].pl[p_nr]->gfx->small_image, &src, gfx.screen, &dest, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
dest.x = pos_x + x;
|
|
|
|
|
|
|
|
dest.y = pos_y + sy;
|
|
|
|
|
|
|
|
src.w = dest.w = gfx.ghost_small->w;
|
|
|
|
|
|
|
|
src.h = dest.h = gfx.ghost_small->h;
|
|
|
|
|
|
|
|
src.x = 0;
|
|
|
|
|
|
|
|
src.y = 0;
|
|
|
|
|
|
|
|
gfx_blit (gfx.ghost_small, &src, gfx.screen, &dest, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
sprintf (text, "%s(%d/%d)", tdata[t_nr].pl[p_nr]->name, tdata[t_nr].pl[p_nr]->wins, tdata[t_nr].pl[p_nr]->points);
|
|
|
|
sprintf (text, "%s(%d/%d)", tdata[t_nr].pl[p_nr]->name, tdata[t_nr].pl[p_nr]->wins, tdata[t_nr].pl[p_nr]->points);
|
|
|
|
font_gfxdraw (pos_x + x + GFX_SMALLPLAYERIMGSIZE_X*2, pos_y + sy + 2, text, 0, 0, 2);
|
|
|
|
font_gfxdraw (10+ pos_x + x + GFX_SMALLPLAYERIMGSIZE_X*2, pos_y + sy + 2, text, 0, 0, 2);
|
|
|
|
x += dx;
|
|
|
|
x += dx;
|
|
|
|
col++;
|
|
|
|
col++;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -718,14 +727,14 @@ void game_showresultnormal (int pos_x, int pos_y, int pos_w, int pos_h) {
|
|
|
|
for (i = 1, p = 0; p < pl_cnt; p++) {
|
|
|
|
for (i = 1, p = 0; p < pl_cnt; p++) {
|
|
|
|
if (PS_IS_used (pl[p]->state)) {
|
|
|
|
if (PS_IS_used (pl[p]->state)) {
|
|
|
|
if (PS_IS_alife (pl[p]->state)) {
|
|
|
|
if (PS_IS_alife (pl[p]->state)) {
|
|
|
|
font_gfxdrawbold (pos_x + x + GFX_MENUPLAYERIMGSIZE_X + 8, pos_y + y - 10, pl[p]->name, 0, COLOR_brown, 1, 1);
|
|
|
|
font_gfxdrawbold (10+ pos_x + x + GFX_MENUPLAYERIMGSIZE_X + 8, pos_y + y - 10, pl[p]->name, 0, COLOR_brown, 1, 1);
|
|
|
|
font_gfxdraw (pos_x + x + GFX_MENUPLAYERIMGSIZE_X + 8,pos_y + y - 10, pl[p]->name, 0, COLOR_yellow, 1);
|
|
|
|
font_gfxdraw (10+ pos_x + x + GFX_MENUPLAYERIMGSIZE_X + 8,pos_y + y - 10, pl[p]->name, 0, COLOR_yellow, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
font_gfxdraw (pos_x + x + GFX_MENUPLAYERIMGSIZE_X,pos_y + y - 10, pl[p]->name, 0, COLOR_gray, 1);
|
|
|
|
font_gfxdraw (10+ pos_x + x + GFX_MENUPLAYERIMGSIZE_X,pos_y + y - 10, pl[p]->name, 0, COLOR_gray, 1);
|
|
|
|
|
|
|
|
|
|
|
|
sprintf (text, "%3d (%3d)", pl[p]->wins, pl[p]->points);
|
|
|
|
sprintf (text, "%3d (%3d)", pl[p]->wins, pl[p]->points);
|
|
|
|
font_gfxdraw (pos_x + x + GFX_MENUPLAYERIMGSIZE_X, pos_y + y + 6, text, 0, 0, 1);
|
|
|
|
font_gfxdraw (10+ pos_x + x + GFX_MENUPLAYERIMGSIZE_X, pos_y + y + 6, text, 0, 0, 1);
|
|
|
|
|
|
|
|
|
|
|
|
if (pl[p]->gfx != NULL) {
|
|
|
|
if (pl[p]->gfx != NULL) {
|
|
|
|
dest.x = pos_x + x;
|
|
|
|
dest.x = pos_x + x;
|
|
|
@ -736,6 +745,15 @@ void game_showresultnormal (int pos_x, int pos_y, int pos_w, int pos_h) {
|
|
|
|
src.y = 0;
|
|
|
|
src.y = 0;
|
|
|
|
gfx_blit (pl[p]->gfx->menu_image, &src, gfx.screen, &dest, 1);
|
|
|
|
gfx_blit (pl[p]->gfx->menu_image, &src, gfx.screen, &dest, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
dest.x = pos_x + x;
|
|
|
|
|
|
|
|
dest.y = pos_y + y - 16;
|
|
|
|
|
|
|
|
src.w = dest.w = gfx.ghost->w;
|
|
|
|
|
|
|
|
src.h = dest.h = gfx.ghost->h;
|
|
|
|
|
|
|
|
src.x = 0;
|
|
|
|
|
|
|
|
src.y = 0;
|
|
|
|
|
|
|
|
gfx_blit (gfx.ghost, &src, gfx.screen, &dest, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
/* setup the new position */
|
|
|
|
/* setup the new position */
|
|
|
|
y += (dy / pl_x);
|
|
|
|
y += (dy / pl_x);
|
|
|
|
x += dx;
|
|
|
|
x += dx;
|
|
|
|