|
|
|
@ -43,7 +43,7 @@ mw_init ()
|
|
|
|
|
network_loop ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -54,7 +54,7 @@ mw_shutdown ()
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
chat_show (-1, -1, -1, -1);
|
|
|
|
|
|
|
|
|
|
chat_cleanup();
|
|
|
|
|
gfx_free_players ();
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++)
|
|
|
|
@ -87,11 +87,11 @@ mw_draw_status ()
|
|
|
|
|
x = (gfx.res.x - px * 320) / 2;
|
|
|
|
|
|
|
|
|
|
for (pnr = 0; pnr < px; pnr++) {
|
|
|
|
|
font_setcolor (128,128,128,0);
|
|
|
|
|
font_setcolor (128, 128, 128, 0);
|
|
|
|
|
font_draw (pnr * 320 + x - 2, 22, " Wins Points", 0);
|
|
|
|
|
font_setcolor (192,192,255,0);
|
|
|
|
|
font_setcolor (192, 192, 255, 0);
|
|
|
|
|
font_draw (pnr * 320 + x, 24, " Wins Points", 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 2. the names with points */
|
|
|
|
|
for (x1 = pnr = 0, y = 48; pnr < MAX_PLAYERS; pnr++) {
|
|
|
|
@ -113,9 +113,9 @@ mw_draw_status ()
|
|
|
|
|
if (PS_IS_used (bman.players[pnr].state)) {
|
|
|
|
|
|
|
|
|
|
if (bman.lastwinner == pnr)
|
|
|
|
|
font_setcolor (255,255,192,0);
|
|
|
|
|
else
|
|
|
|
|
font_setcolor (192,192,192,0);
|
|
|
|
|
font_setcolor (255, 255, 192, 0);
|
|
|
|
|
else
|
|
|
|
|
font_setcolor (192, 192, 192, 0);
|
|
|
|
|
font_draw (x + x1 * 320, y, text, 0);
|
|
|
|
|
}
|
|
|
|
|
x1++;
|
|
|
|
@ -221,9 +221,11 @@ mw_draw_chat ()
|
|
|
|
|
{
|
|
|
|
|
if (chat.visible == 0) {
|
|
|
|
|
chat_show (16, mw_chat + 16, gfx.res.x - 16, gfx.res.y - 32);
|
|
|
|
|
chat_addline ("Press [STRG] or [CTRL] - to select a player");
|
|
|
|
|
if (GT_MP_PTPM)
|
|
|
|
|
chat_addline ("F4 - to start the game");
|
|
|
|
|
chat_addstatusline ("Press [STRG] or [CTRL] - to select a player");
|
|
|
|
|
if (GT_MP_PTPM) {
|
|
|
|
|
chat_addstatusline ("F4 - to start the game");
|
|
|
|
|
chat_addstatusline ("F5 - to change map settings");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -269,11 +271,11 @@ wait_for_players ()
|
|
|
|
|
SDL_Flip (gfx.screen);
|
|
|
|
|
}
|
|
|
|
|
else { /* we have a connect so draw status */
|
|
|
|
|
if (bman.updatestatusbar) {
|
|
|
|
|
mw_draw_status ();
|
|
|
|
|
gfx_AddUpdateRect (0, 0, gfx.res.x, mw_player);
|
|
|
|
|
bman.updatestatusbar = 0;
|
|
|
|
|
}
|
|
|
|
|
if (bman.updatestatusbar) {
|
|
|
|
|
mw_draw_status ();
|
|
|
|
|
gfx_AddUpdateRect (0, 0, gfx.res.x, mw_player);
|
|
|
|
|
bman.updatestatusbar = 0;
|
|
|
|
|
}
|
|
|
|
|
mw_draw_gfxselect (selgfx);
|
|
|
|
|
gfx_AddUpdateRect (0, mw_player, gfx.res.x, mw_chat);
|
|
|
|
|
mw_draw_chat ();
|
|
|
|
@ -343,27 +345,27 @@ wait_for_players ()
|
|
|
|
|
bman.players[bman.p_nr].gfx_nr = -1;
|
|
|
|
|
}
|
|
|
|
|
net_change_playerid (bman.p_nr, 1);
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((GT_MP_PTPM) && ready && keys[SDLK_F4] && (!keypressed)) {
|
|
|
|
|
done = 1;
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
bman.updatestatusbar = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((GT_MP_PTPM) && keys[SDLK_F5] && (!keypressed)) {
|
|
|
|
|
/* Map modification */
|
|
|
|
|
mapmenu ();
|
|
|
|
|
draw_logo();
|
|
|
|
|
mw_draw_status ();
|
|
|
|
|
mw_draw_gfxselect (selgfx);
|
|
|
|
|
UpdateRects_nr = 0;
|
|
|
|
|
gfx_AddUpdateRect (0, 0, gfx.res.x, gfx.res.y);
|
|
|
|
|
chat.changed = 1;
|
|
|
|
|
chat.lineschanged = 1;
|
|
|
|
|
chat_drawbox ();
|
|
|
|
|
mw_draw_chat ();
|
|
|
|
|
gfx_UpdateRects ();
|
|
|
|
|
mapmenu ();
|
|
|
|
|
draw_logo ();
|
|
|
|
|
mw_draw_status ();
|
|
|
|
|
mw_draw_gfxselect (selgfx);
|
|
|
|
|
UpdateRects_nr = 0;
|
|
|
|
|
gfx_AddUpdateRect (0, 0, gfx.res.x, gfx.res.y);
|
|
|
|
|
chat.changed = 1;
|
|
|
|
|
chat.lineschanged = 1;
|
|
|
|
|
chat_drawbox ();
|
|
|
|
|
mw_draw_chat ();
|
|
|
|
|
gfx_UpdateRects ();
|
|
|
|
|
}
|
|
|
|
|
chat_loop (&event);
|
|
|
|
|
}
|
|
|
|
|