This file implements -quayle mode for xtetris.  -- jwz

diff -cr xtetris-2.5.2/defs.h xtetris-quayle/defs.h
*** xtetris-2.5.2/defs.h	Mon Sep 30 22:50:48 1991
--- xtetris-quayle/defs.h	Sat Jan  9 13:41:11 1993
***************
*** 47,52 ****
--- 47,53 ----
    Dimension speed;
    String scorefile;
    String customization;
+   Boolean quayle;
  }
  resources;
  
***************
*** 81,87 ****
  
  shape_ptr grid[UWIDTH][UHEIGHT];
  
! extern shape_type shape[7];
  
  void    print_high_scores(), done_proc(), quit_proc(), start_proc(), pause_proc(), newgame_proc();
  void	resume_proc(), about_proc();
--- 82,88 ----
  
  shape_ptr grid[UWIDTH][UHEIGHT];
  
! extern shape_type shape[];
  
  void    print_high_scores(), done_proc(), quit_proc(), start_proc(), pause_proc(), newgame_proc();
  void	resume_proc(), about_proc();
diff -cr xtetris-2.5.2/main.c xtetris-quayle/main.c
*** xtetris-2.5.2/main.c	Mon Oct 19 11:29:04 1992
--- xtetris-quayle/main.c	Sat Jan  9 13:41:11 1993
***************
*** 61,66 ****
--- 61,68 ----
       offset(speed),             XtRImmediate,      (XtPointer)STANDARD_SPEED},
    {"scorefile",    "ScoreFile",   XtRString,      sizeof(String),
       offset(scorefile),         XtRString,      HIGH_SCORE_TABLE},
+   {"quayle",    "Boolean",   XtRBoolean,      sizeof(Boolean),
+      offset(quayle),         XtRImmediate,      (XtPointer)False},
  };
    
  static XrmOptionDescRec Options[] = {
***************
*** 70,75 ****
--- 72,78 ----
    {"-boxsize",  "boxSize",                    XrmoptionSepArg,  NULL },
    {"-color",	"customization",	      XrmoptionNoArg,	".c" },
    {"-bw",	"customization",	      XrmoptionNoArg,	".bw" },
+   {"-quayle",   "quayle",                     XrmoptionNoArg,   "TRUE" }
  };
  
  static XtResource ShapeResources[] = {
***************
*** 137,143 ****
    }
  
    db = XtDatabase(display);
!   XrmPutStringResource( db, "customization", resources.customization );
    
    toplevel = XtVaAppCreateShell( NULL, "Xtetris",
  				applicationShellWidgetClass,
--- 140,146 ----
    }
  
    db = XtDatabase(display);
!   XrmPutStringResource( &db, "customization", resources.customization );
    
    toplevel = XtVaAppCreateShell( NULL, "Xtetris",
  				applicationShellWidgetClass,
***************
*** 151,159 ****
  			    NULL, (Cardinal) 0);
    XtAppAddActions( context, actions, XtNumber(actions) );
    
!   for (i = 0; i < 7; i++) {
!     static char *names[7] = { "object0","object1","object2","object3","object4",
! 				"object5","object6" };
      XtGetSubresources( toplevel, (caddr_t) &shape[i], names[i], "Object",
  		      ShapeResources, XtNumber(ShapeResources),
  		      NULL, (Cardinal) 0 );
--- 154,164 ----
  			    NULL, (Cardinal) 0);
    XtAppAddActions( context, actions, XtNumber(actions) );
    
!   if (resources.quayle) resources.usescorefile = False;
! 
!   for (i = 0; i < 8; i++) {
!     static char *names[] = { "object0","object1","object2","object3","object4",
! 			     "object5","object6", "objectQ" };
      XtGetSubresources( toplevel, (caddr_t) &shape[i], names[i], "Object",
  		      ShapeResources, XtNumber(ShapeResources),
  		      NULL, (Cardinal) 0 );
diff -cr xtetris-2.5.2/shape.c xtetris-quayle/shape.c
*** xtetris-2.5.2/shape.c	Mon Oct 19 11:50:21 1992
--- xtetris-quayle/shape.c	Sat Jan  9 13:41:12 1993
***************
*** 3,9 ****
  # define random rand
  #endif
  
! shape_type shape[7] = {
  
  /*      bitmap    score X Y wid ht */
    { /* Shape 0 */
--- 3,9 ----
  # define random rand
  #endif
  
! shape_type shape[] = {
  
  /*      bitmap    score X Y wid ht */
    { /* Shape 0 */
***************
*** 53,58 ****
--- 53,65 ----
        { 0x000044c0, 7,  { {1,0,1,3}, {0,2,1,1} }, {{0,0,0,0},{0,0,0,0}}, 2,  0,2,  {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },   /*   #  */
        { 0x00008e00, 6,  { {0,1,3,1}, {0,0,1,1} }, {{0,0,0,0},{0,0,0,0}}, 2,  0,3,  {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },   /*      */
        { 0x0000c880, 7,  { {0,0,1,3}, {1,0,1,1} }, {{0,0,0,0},{0,0,0,0}}, 2,  0,2,  {0,0,0,0}, {0,0,0,0}, {0,0,0,0} } }, /*      */
+   },
+ 
+   { /* Quayle */
+     { { 0x00000400,  21, { {1,1,1,1}, {0,0,0,0} }, {{0,0,0,0},{0,0,0,0}}, 1,  1,1, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },   /*      */
+       { 0x00000400, 272, { {1,1,1,1}, {0,0,0,0} }, {{0,0,0,0},{0,0,0,0}}, 1,  1,1, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },   /*  #   */
+       { 0x00000400, 119, { {1,1,1,1}, {0,0,0,0} }, {{0,0,0,0},{0,0,0,0}}, 1,  1,1, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} },   /*      */
+       { 0x00000400, 645, { {1,1,1,1}, {0,0,0,0} }, {{0,0,0,0},{0,0,0,0}}, 1,  1,1, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} } }, /*      */
    }
  };
  
***************
*** 112,118 ****
    /* First set the highesty values (could have specified these statically, but the
       human cost is too high.  This is one-shot anyway). */
  
!   for (s = 0; s < 7; s++)
      {
        shape_ptr sh = &shape[s];
        XGCValues gcv;
--- 119,125 ----
    /* First set the highesty values (could have specified these statically, but the
       human cost is too high.  This is one-shot anyway). */
  
!   for (s = 0; s < XtNumber(shape); s++)
      {
        shape_ptr sh = &shape[s];
        XGCValues gcv;
***************
*** 206,212 ****
  {
    shape_no = next_no;
    rot = next_rot;
!   next_no = random() % 7;
    next_rot = random() % 4;
    xpos = (UWIDTH / 2) - 1;
    ypos = -4;
--- 213,222 ----
  {
    shape_no = next_no;
    rot = next_rot;
!   if (resources.quayle)
!     next_no = 7;
!   else
!     next_no = random() % 7;
    next_rot = random() % 4;
    xpos = (UWIDTH / 2) - 1;
    ypos = -4;
diff -cr xtetris-2.5.2/xtetris.man xtetris-quayle/xtetris.man
*** xtetris-2.5.2/xtetris.man	Thu Oct  3 11:30:01 1991
--- xtetris-quayle/xtetris.man	Sat Jan  9 13:41:12 1993
***************
*** 85,90 ****
--- 85,95 ----
  Determines whether to use the color or black-and-white
  application-defaults file.  This sets the new X11R5 "customization"
  resource to ".c" or ".bw", depending on your choice.
+ 
+ .TP 8
+ .B -quayle
+ Puts \fIxtetris\fP into Dan Quayle Mode.  "If we do not succeed, then 
+ we face the risk of failure."
  .SH FILES
  .IP /usr/lib/X11/tetris_scores
  .IP /usr/lib/X11/app-defaults/Xtetris
