home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / GAMEID.MOD < prev    next >
Text File  |  1990-08-29  |  3KB  |  83 lines

  1. Nowhere Fast #89 @7309
  2. Wed Aug 22 08:26:54 1990
  3. ----------------------------------------------------------------------------
  4. GAMEID.MOD by Nowhere Fast a.k.a. Hollie Satterfield
  5. 1@7310, Eldritch Boulevard BBS, 703-931-0431
  6.  
  7. Ever wonder who's on your BBS when you see a game being played?  This mod
  8. keeps the user name on the screen during a game so you can tell.
  9.  
  10. The mod displays the user name on the sysop screen (only), while the game
  11. program is being run.  It only works on games which (1) use DOS interrupts
  12. and (2) don't shrink the BBS to run: other games will not be affected.
  13.  
  14. It displays the user name on line 25, and prevents line 25 from scrolling
  15. off, so as long as a game does not address line 25 directly the user name
  16. will remain on the sysop screen.  I have not found any games that are
  17. adversely affected.
  18.  
  19. It is probably not well known (because it so rarely happens), but if a user
  20. has his lines-per-page flag set below 20, WWIV does not take the user status
  21. information off the top of the screen.  This mod doesn't try to lock the
  22. name on the screen if lines-per-page < 20, since ALL the user information
  23. is still at the top of the screen.  It also doesn't try to lock the name on
  24. the screen if you are playing locally.
  25. ----------------------------------------------------------------------------
  26.  
  27. Load up EXTRN.C and find:
  28.  
  29. int full_external(char *s, int ctc, int ccc)
  30.  
  31. Right after the { add this line:
  32.   char n[81]; int i;     /* GAMEID mod */
  33.  
  34. Now go down about 25 lines, you'll see a block of code that looks like:
  35.  
  36.   if ((screenlinest<=defscreenbottom) && (screenlinest>20)) {
  37.     screenbottom=screenlinest-1+topline;
  38.     cy=wherey();
  39.     cx=wherex();
  40.     xxx=cy-screenbottom+topline;
  41.     if (xxx>0) {
  42.       SCROLL_UP(topline,defscreenbottom,xxx);
  43.       movecsr(cx,screenbottom);
  44.     }
  45.   }
  46.  
  47. Add this code immediately afterward:
  48.  
  49. /* start GAMEID mod */
  50.   else if ((screenlinest>defscreenbottom-topline) && (incom)) {
  51.     screenbottom=23+topline;
  52.     cy=wherey();
  53.     cx=wherex();
  54.     xxx=cy-screenbottom+topline;
  55.     if (xxx>0) {
  56.       SCROLL_UP(topline,defscreenbottom,xxx);
  57.       movecsr(cx,screenbottom);
  58.     }
  59.   }
  60.  
  61.   n[0]=32;
  62.   n[1]=0x70;  /* 0x70 is the hexadecimal attribute for inverse, you can
  63.                  this to any other color that you like by changing it
  64.                  to another hex number between 0x00 and 0xFF. */
  65.   for (i=1; i<=strlen(thisuser.name); i++) {
  66.     n[i*2+1]=0x70; n[i*2]=thisuser.name[i-1];
  67.   }
  68.   n[strlen(thisuser.name)*2+2]=32;
  69.   n[strlen(thisuser.name)*2+3]=0x70;
  70.   puttext(1,25,strlen(thisuser.name)+2,25,n);
  71. /* end GAMEID mod */
  72.  
  73. ----------------------------------------------------------------------------
  74.  
  75. That's it, recompile/relink your BBS.EXE.  The next time a user plays one
  76. of your games that has DOS interrupts on and shrink off, you'll see his
  77. name in inverse down at the bottom of the screen.
  78.  
  79. License granted to freely distribute without compensation and to
  80. modify as needed "to get the job done."  Use at your own risk. 
  81. Distributed "as is".  No warranty or guarantee.
  82.    
  83. Any problems call Eldritch Boulevard BBS at 703-931-0431.