[chocolate-doom] 64/79: Change the format of color commands. Reorganise the waiting dialog.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.

commit e3e4b061157c2a1c7cd17f74a35d7ae744378772
Author: Simon Howard <fraggle at gmail.com>
Date:   Sat Jan 14 00:10:54 2006 +0000

    Change the format of color commands. Reorganise the waiting dialog.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 292
---
 src/net_gui.c       | 24 +++++++++++++++++++-----
 textscreen/txt_io.c | 13 ++++++++-----
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/net_gui.c b/src/net_gui.c
index 7abdc68..c7f5edd 100644
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_gui.c 291 2006-01-13 23:56:00Z fraggle $
+// $Id: net_gui.c 292 2006-01-14 00:10:54Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.10  2006/01/14 00:10:54  fraggle
+// Change the format of color commands.  Reorganise the waiting dialog.
+//
 // Revision 1.9  2006/01/13 23:56:00  fraggle
 // Add text-mode I/O functions.
 // Use text-mode screen for the waiting screen.
@@ -88,6 +91,7 @@ static void ProcessEvents(void)
         {
             case 27:
             case 'q':
+                TXT_Shutdown();
                 I_Quit();
                 break;
 
@@ -114,10 +118,16 @@ static void DrawScreen(void)
                     WINDOW_W, WINDOW_H);
 
     TXT_BGColor(TXT_COLOR_BLUE, 0);
-    TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
 
     for (i=0; i<MAXPLAYERS; ++i)
     {
+        if (i == net_player_number)
+            TXT_FGColor(TXT_COLOR_YELLOW);
+        else if (i < net_clients_in_game)
+            TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
+        else
+            TXT_FGColor(TXT_COLOR_GREY);
+
         snprintf(buf, 39, "%i. ", i + 1);
         TXT_GotoXY(WINDOW_X + 2, WINDOW_Y + 4 + i);
         TXT_Puts(buf);
@@ -134,11 +144,15 @@ static void DrawScreen(void)
         }
     }
 
+    TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
     TXT_GotoXY(WINDOW_X + 2, WINDOW_Y + WINDOW_H - 2);
-    TXT_Puts("%brightgreen%SPACE%/%%brightcyan%=%/%Start game");
+    TXT_Puts("<brightgreen>ESC</><brightcyan>=</>Abort");
 
-    TXT_GotoXY(WINDOW_X + WINDOW_W - 11, WINDOW_Y + WINDOW_H - 2);
-    TXT_Puts("%brightgreen%ESC%/%%brightcyan%=%/%Abort");
+    if (net_client_controller)
+    {
+        TXT_GotoXY(WINDOW_X + WINDOW_W - 18, WINDOW_Y + WINDOW_H - 2);
+        TXT_Puts("<brightgreen>SPACE</><brightcyan>=</>Start game");
+    }
     
     TXT_DrawSeparator(WINDOW_X, WINDOW_Y + WINDOW_H - 3, WINDOW_W);
 
diff --git a/textscreen/txt_io.c b/textscreen/txt_io.c
index 910365e..e0fdae4 100644
--- a/textscreen/txt_io.c
+++ b/textscreen/txt_io.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: txt_io.c 291 2006-01-13 23:56:00Z fraggle $
+// $Id: txt_io.c 292 2006-01-14 00:10:54Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.2  2006/01/14 00:10:53  fraggle
+// Change the format of color commands.  Reorganise the waiting dialog.
+//
 // Revision 1.1  2006/01/13 23:56:00  fraggle
 // Add text-mode I/O functions.
 // Use text-mode screen for the waiting screen.
@@ -169,17 +172,17 @@ void TXT_Puts(char *s)
 
     for (p=s; *p != '\0'; ++p)
     {
-        if (*p == '%')
+        if (*p == '<')
         {
             ++p;
 
-            if (*p == '%')
+            if (*p == '<')
             {
-                PutChar(screen, '%');
+                PutChar(screen, '<');
             }
             else
             {
-                ending = strchr(p, '%');
+                ending = strchr(p, '>');
 
                 if (ending == NULL)
                 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list