|
|
|
@ -224,7 +224,6 @@ wait_for_players ()
|
|
|
|
|
{
|
|
|
|
|
SDL_Event event;
|
|
|
|
|
Uint8 *keys;
|
|
|
|
|
Uint32 timeloop1 = SDL_GetTicks ();
|
|
|
|
|
int done = 0,
|
|
|
|
|
ready = 0,
|
|
|
|
|
keypressed = 0,
|
|
|
|
@ -255,16 +254,19 @@ wait_for_players ()
|
|
|
|
|
ready = 0;
|
|
|
|
|
|
|
|
|
|
/* draw the screeninformations */
|
|
|
|
|
if (bman.p_nr == -1) /* we have no connect yet */
|
|
|
|
|
if (bman.p_nr == -1) { /* we have no connect yet */
|
|
|
|
|
mw_wait_for_connect ();
|
|
|
|
|
SDL_Flip (gfx.screen);
|
|
|
|
|
}
|
|
|
|
|
else { /* we have a connect so draw status */
|
|
|
|
|
mw_draw_status ();
|
|
|
|
|
mw_draw_gfxselect (selgfx);
|
|
|
|
|
gfx_AddUpdateRect (0 ,0 ,gfx.res.x , mw_y);
|
|
|
|
|
mw_draw_chat ();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SDL_Flip (gfx.screen);
|
|
|
|
|
|
|
|
|
|
gfx_UpdateRects ();
|
|
|
|
|
|
|
|
|
|
/* do the keyboard handling */
|
|
|
|
|
if (SDL_PollEvent (&event) != 0)
|
|
|
|
|
switch (event.type) {
|
|
|
|
@ -348,14 +350,8 @@ wait_for_players ()
|
|
|
|
|
keypressed = 1;
|
|
|
|
|
|
|
|
|
|
/* calculate time sync. */
|
|
|
|
|
s_delay (1000);
|
|
|
|
|
timeloop1 = SDL_GetTicks ();
|
|
|
|
|
while (timeloop1 - timestamp >= 0 && timeloop1 - timestamp < 20) {
|
|
|
|
|
s_delay (timeloop1 - timestamp - 1);
|
|
|
|
|
timeloop1 = SDL_GetTicks ();
|
|
|
|
|
}
|
|
|
|
|
timestamp = timeloop1;
|
|
|
|
|
}
|
|
|
|
|
s_delay (50);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mw_shutdown ();
|
|
|
|
|
};
|
|
|
|
|