comparison linda.c @ 67:74c59d9abde3

*** empty log message ***
author gongo
date Thu, 09 Nov 2006 03:31:51 +0000
parents 4af6c92304bb
children c72f11630cb0
comparison
equal deleted inserted replaced
66:4af6c92304bb 67:74c59d9abde3
327 327
328 328
329 static Bool 329 static Bool
330 linda_sche_main_init0(int p) 330 linda_sche_main_init0(int p)
331 { 331 {
332 linda_set_schedule(linda_sche_main0, MODE_MAIN); 332 int i, flg, mode;
333 int id = game.play_id;
334 int connect = 1;
335
336 for (i=1; i<=CLIENT_MAX; i++) {
337 if (i == id) continue;
338 get_packet(i, &flg, &mode, NULL, NULL, NULL);
339 if (flg == 1 && mode == MODE_MAIN) {
340 connect++;
341 flg = 0;
342 }
343 }
344
345 if (p == 1 && connect == CLIENT_MAX) {
346 linda_set_schedule(linda_sche_main0, MODE_MAIN);
347 return TRUE;
348 } else {
349 return FALSE;
350 }
333 return TRUE; 351 return TRUE;
334 } 352 }
335 353
336 static Bool 354 static Bool
337 linda_sche_main_init1(int p) 355 linda_sche_main_init1(int p)
338 { 356 {
339 linda_set_schedule(linda_sche_main1, MODE_MAIN); 357 int mode;
340 return TRUE; 358
359 get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, NULL);
360
361 if (mode == MODE_MAIN) {
362 linda_set_schedule(linda_sche_main1, MODE_MAIN);
363 return TRUE;
364 } else {
365 return FALSE;
366 }
341 } 367 }
342 368
343 static Bool 369 static Bool
344 linda_sche_main0(int p) 370 linda_sche_main0(int p)
345 { 371 {