From bee506131504a430de35c279e00070a379b3c317 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 2 Mar 2005 23:08:16 +0000 Subject: [PATCH] Automagically switch from/to the playfield on game end/start. --- TODO | 1 - tetrinet.c | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index ab2667a..26a1644 100644 --- a/TODO +++ b/TODO @@ -9,5 +9,4 @@ If gmsg input window is open and we switch to Partyline mode, things get -) Next block and stats are displayed during a game even in Partyline mode -) really hide the cursor on the playfield completely --) automatic switch to playfield on game start, switch to partyline on end -) pause / unpause key in playfield diff --git a/tetrinet.c b/tetrinet.c index 0c0c0a9..c142859 100644 --- a/tetrinet.c +++ b/tetrinet.c @@ -315,6 +315,10 @@ void parse(char *buf) playing_game = 1; game_paused = 0; msg_text(BUFFER_PLINE, "*** The Game Has Started"); + if (dispmode != MODE_FIELDS) { + dispmode = MODE_FIELDS; + io->setup_fields(); + } } else if (strcmp(cmd, "ingame") == 0) { /* Sent when a player connects in the middle of a game */ @@ -359,6 +363,10 @@ void parse(char *buf) io->draw_other_field(i); } } + if (dispmode != MODE_PARTYLINE) { + dispmode = MODE_PARTYLINE; + io->setup_partyline(); + } } else if (strcmp(cmd, "playerwon") == 0) { /* Syntax: playerwon # -- sent when all but one player lose */ -- 2.11.4.GIT