/*                               writestring.c                          */
/*                                                                      */
/* I need this one to print various strings during the game: I want the */
/* string to be just in the bottom of the screen and I want it centered */
/* and shadowy too...                                                   */


writestring(rport, string, color)
   struct RastPort *rport;
   char string[];
   int color;
   {
   int length;
   int pixels;
   int xoffset;
   int baseline;

   baseline = rport -> TxBaseline;
   length = strlen(string);
   pixels = TextLength(rport, string, length);
   xoffset = (SCWIDTH - pixels) / 2;

/* First I want to draw the shadow */

   if (color == FALSE)
      SetAPen(rport, 6);
   else
      SetAPen(rport, 7);

   Move(rport, xoffset + 1, YOFFSET_SHADOW + baseline);
   Text(rport, string, length);

/* And now I can write the real string */

   if (color == FALSE)
      SetAPen(rport, 6);
   else
      SetAPen(rport, color);

   Move(rport, xoffset - 1, YOFFSET + baseline);
   Text(rport, string, length);
   return(0);
   }

