|
|
@ -105,7 +105,7 @@ mw_draw_status ()
|
|
|
|
dest.x = x1 * 320;
|
|
|
|
dest.x = x1 * 320;
|
|
|
|
dest.y = y - 4;
|
|
|
|
dest.y = y - 4;
|
|
|
|
|
|
|
|
|
|
|
|
SDL_BlitSurface (bman.players[pnr].gfx->smal_image, &src, gfx.screen, &dest);
|
|
|
|
gfx_blit (bman.players[pnr].gfx->smal_image, &src, gfx.screen, &dest, 0xFFFF);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sprintf (text, " %10s %2d %2d", bman.players[pnr].name, bman.players[pnr].wins,
|
|
|
|
sprintf (text, " %10s %2d %2d", bman.players[pnr].name, bman.players[pnr].wins,
|
|
|
@ -151,17 +151,17 @@ mw_draw_gfxselect (int selgfx)
|
|
|
|
if (bman.players[bman.p_nr].gfx_nr == -1) {
|
|
|
|
if (bman.players[bman.p_nr].gfx_nr == -1) {
|
|
|
|
/* draw selection */
|
|
|
|
/* draw selection */
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
|
|
|
dest.w = src.w = gfx.players[i].size.x;
|
|
|
|
dest.w = src.w = gfx.players[i].ani.w;
|
|
|
|
dest.h = src.h = gfx.players[i].size.y;
|
|
|
|
dest.h = src.h = gfx.players[i].ani.h;
|
|
|
|
|
|
|
|
|
|
|
|
dest.x = i * xstep + (xstep >> 1) - (gfx.players[i].size.x >> 1);
|
|
|
|
dest.x = i * xstep + (xstep >> 1) - (gfx.players[i].ani.w >> 1);
|
|
|
|
dest.y = mw_player + 8;
|
|
|
|
dest.y = mw_player + 8;
|
|
|
|
|
|
|
|
|
|
|
|
redraw_logo (dest.x, dest.y, dest.w, dest.h);
|
|
|
|
redraw_logo (dest.x, dest.y, dest.w, dest.h);
|
|
|
|
|
|
|
|
|
|
|
|
src.x = 3 * gfx.players[i].size.x;
|
|
|
|
src.x = 3 * gfx.players[i].ani.w;
|
|
|
|
if (i == selgfx)
|
|
|
|
if (i == selgfx)
|
|
|
|
src.y = mw_frame * gfx.players[i].size.y;
|
|
|
|
src.y = mw_frame * gfx.players[i].ani.h;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
src.y = 0;
|
|
|
|
src.y = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -182,27 +182,27 @@ mw_draw_gfxselect (int selgfx)
|
|
|
|
mw_frame = 0;
|
|
|
|
mw_frame = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SDL_BlitSurface (gfx.players[i].ani.image, &src, gfx.screen, &dest);
|
|
|
|
gfx_blit (gfx.players[i].ani.image, &src, gfx.screen, &dest, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
SDL_BlitSurface (mw_plgfx[i], &src, gfx.screen, &dest);
|
|
|
|
gfx_blit (mw_plgfx[i], &src, gfx.screen, &dest, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
/* draw selected players */
|
|
|
|
/* draw selected players */
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++) {
|
|
|
|
dest.w = src.w = gfx.players[i].size.x;
|
|
|
|
dest.w = src.w = gfx.players[i].ani.w;
|
|
|
|
dest.h = src.h = gfx.players[i].size.y;
|
|
|
|
dest.h = src.h = gfx.players[i].ani.h;
|
|
|
|
|
|
|
|
|
|
|
|
dest.x = i * xstep + (xstep >> 1) - (gfx.players[i].size.x >> 1);
|
|
|
|
dest.x = i * xstep + (xstep >> 1) - (gfx.players[i].ani.w >> 1);
|
|
|
|
dest.y = mw_player + 8;
|
|
|
|
dest.y = mw_player + 8;
|
|
|
|
|
|
|
|
|
|
|
|
redraw_logo (dest.x, dest.y, dest.w, dest.h);
|
|
|
|
redraw_logo (dest.x, dest.y, dest.w, dest.h);
|
|
|
|
|
|
|
|
|
|
|
|
src.x = 3 * gfx.players[i].size.x;
|
|
|
|
src.x = 3 * gfx.players[i].ani.w;
|
|
|
|
if (i == selgfx)
|
|
|
|
if (i == selgfx)
|
|
|
|
src.y = mw_frame * gfx.players[i].size.y;
|
|
|
|
src.y = mw_frame * gfx.players[i].ani.h;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
src.y = 0;
|
|
|
|
src.y = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -211,9 +211,9 @@ mw_draw_gfxselect (int selgfx)
|
|
|
|
if (select < MAX_PLAYERS && select >= 0) {
|
|
|
|
if (select < MAX_PLAYERS && select >= 0) {
|
|
|
|
/* this player have been selected */
|
|
|
|
/* this player have been selected */
|
|
|
|
if (bman.players[bman.p_nr].gfx_nr == i)
|
|
|
|
if (bman.players[bman.p_nr].gfx_nr == i)
|
|
|
|
SDL_BlitSurface (gfx.players[i].ani.image, &src, gfx.screen, &dest);
|
|
|
|
gfx_blit (gfx.players[i].ani.image, &src, gfx.screen, &dest, 0);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
SDL_BlitSurface (mw_plgfx[i], &src, gfx.screen, &dest);
|
|
|
|
gfx_blit (mw_plgfx[i], &src, gfx.screen, &dest, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -221,10 +221,10 @@ mw_draw_gfxselect (int selgfx)
|
|
|
|
dest.x = 0;
|
|
|
|
dest.x = 0;
|
|
|
|
dest.y = mw_player;
|
|
|
|
dest.y = mw_player;
|
|
|
|
dest.w = gfx.res.x;
|
|
|
|
dest.w = gfx.res.x;
|
|
|
|
dest.h = 8 + gfx.players[0].size.y;
|
|
|
|
dest.h = 8 + gfx.players[0].ani.h;
|
|
|
|
gfx_blitupdaterectdraw (&dest);
|
|
|
|
gfx_blitupdaterectdraw (&dest);
|
|
|
|
|
|
|
|
|
|
|
|
mw_chat = mw_player + 8 + gfx.players[0].size.y;
|
|
|
|
mw_chat = mw_player + 8 + gfx.players[0].ani.h;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -294,6 +294,7 @@ wait_for_players ()
|
|
|
|
mw_draw_chat ();
|
|
|
|
mw_draw_chat ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gfx_blitdraw ();
|
|
|
|
gfx_blitupdaterectdraw ();
|
|
|
|
gfx_blitupdaterectdraw ();
|
|
|
|
|
|
|
|
|
|
|
|
/* do the keyboard handling */
|
|
|
|
/* do the keyboard handling */
|
|
|
|