home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / SPV061IB.MOD < prev    next >
Text File  |  1995-05-31  |  16KB  |  417 lines

  1. Papa Bear #1 @11579
  2. 7Sunday1, 7May 281, 71995 2106:251 am
  3. 0R 34 05/31 06:23 WWIVnet ->8339
  4. 0R 34 05/31 00:27 WWIVnet 8314->8304
  5. 0R 34 05/30 23:27 WWIVNET 4001->8314
  6. 0R 34 05/30 13:17 WWIVnet 4000->4001
  7. 0R 34 05/30 04:41 WWIVnet ->4000
  8. 0R 34 05/29 07:41 WWIVnet 4001->4000
  9. 0R 34 05/29 12:44 WWIVnet 11579->4001
  10. 0R 34 05/28 10:52 WWIVnet ->11579
  11. 4Msg. Status:9▄ 5Please reply!
  12. 9 ▀▀▀▀▀▀▀▀▀▀▀▀
  13. ┌────────────────────────────A CEREBRUM release!─────────────────────────────┐
  14. │ Mod Name: SPV061IB.MOD     Mod Authors: AquaMaestro, Pâpâ ßêâr (1@11579)   │
  15. │ Difficulty: ▓░░░░░░░░░     First ----- [12/25/93]                          │
  16. │ WWIV Version: 4.24         Last ------ [05/28/95]                          │
  17. │ Files Affected:  VARDEC.H VARS.H COM.C BBSUTL.C MSGBASE.C MMENU.C          │
  18. │                  UTILITY.C FCNS.H BBSOVL2.C XINIT.C NEWUSER.C              │
  19. │ Description: Give WWIV an additional 85 colors to work with. VERY, VERY    │
  20. │configurable from the main BBS prompt.                                      │
  21. ╞═────────────────────────────────────═╤═───────────────────────────────────═╡
  22. │ StarPort Valhalla [   ]   -     ASV 28.8kbps  Home of the SPV mod series!  │
  23. └─────────────────────────────────────═╧═────────────────────────────────────┘
  24.  
  25.                      >>> OFFICIAL WWIV SUPPORT SITE! <<<
  26.  
  27.  Word of Warning:  You installed it, you're responsible! Make back-ups BEFORE
  28.  attempting to install this modification!  Read all text before beginning.
  29. ─────────────────────────────────────────────────────────────────────────────
  30.  LEGEND:
  31.  ==  Original Code [use this to search on]
  32.  ++  Add this Line [mods ALWAYS add stuff, don't they?]
  33.  --  Delete this Line [or comment out, its not needed]
  34. ─────────────────────────────────────────────────────────────────────────────
  35.  LONG DESCRIPTION: This is the 4.24 release of the modification orginally
  36. written by AquaMaestro, and updated by me for 4.23 in Dec. of '93.  Adds a
  37. //COLOREDIT (//CLRE) that allows you to *very* easily set any of the colors
  38. on your BBS to anything you'd like.  //COLORINIT (//CLRI) sets things to a
  39. default.
  40.   Please, do not use any colors other than the stock 0-9 on the net.  Your
  41. color definitions will not be the same as mine, or any one else's, and
  42. sending those extended colors over the net is bad netiquette.
  43. ─────────────────────────────────────────────────────────────────────────────
  44. STEP 1:  Add this structure to VARDEC.H:
  45.  
  46. ==         char            res[29];                /* RESERVED */
  47. == } statusrec;
  48. ==
  49. ++ typedef struct {
  50. ++                   unsigned char   resx[240]; /* Includes padding */
  51. ++ } colorrec;
  52. ==
  53. == /* MESSAGE BASE INFORMATION */
  54. ─────────────────────────────────────────────────────────────────────────────
  55. STEP 2:  Add this line to VARS.H:
  56.  
  57. == __EXTRN__ smalrec huge *smallist;
  58. == __EXTRN__ subboardrec *subboards;
  59. ++ __EXTRN__ colorrec rescolor;                               // SPV061IB.MOD
  60. == __EXTRN__ directoryrec huge *directories;
  61. == __EXTRN__ usersubrec *usub, *udir;
  62. ─────────────────────────────────────────────────────────────────────────────
  63. STEP 3: Add this block of code to the end of UTILITY.C
  64.  
  65. // SPV061IB.MOD BLOCK START
  66. static int colorfile=-1;
  67.  
  68. void get_colordata(void)
  69. {
  70.   char s[81];
  71.  
  72.   if (colorfile<0) {
  73.     sprintf(s,"%sCOLOR.DAT",syscfg.datadir);
  74.     colorfile=sh_open1(s,O_RDWR | O_BINARY | O_CREAT);
  75.     read(colorfile,(void *)&rescolor,sizeof(colorrec));
  76.     colorfile=sh_close(colorfile);
  77.   }
  78. }
  79.  
  80. void save_colordata(void)
  81. {
  82.   char s[81];
  83.  
  84.   sprintf(s,"%sCOLOR.DAT",syscfg.datadir);
  85.   colorfile=sh_open1(s,O_RDWR | O_BINARY | O_CREAT);
  86.   sh_write(colorfile,(void *)&rescolor),sizeof(colorrec));
  87.   colorfile=sh_close(colorfile);
  88. }
  89.  
  90. void list_ext_colors(void)
  91. {
  92.   goxy(40,7);
  93.   pl("7┌─────────────────────────┐0");
  94.   goxy(40,8);
  95.   pl("7│        2COLOR LIST7       │0");
  96.   goxy(40,9);
  97.   pl("7├─────────────────────────┤0");
  98.   goxy(40,10);
  99.   pl("7│    !! \"\" ## $$ %% && '' (( )) ** ++7 │0");
  100.   goxy(40,11);
  101.   pl("7│ ,, -- .. // 00 11 22 33 44 55 66 77 │0");
  102.   goxy(40,12);
  103.   pl("7│ 88 99 :: ;; << == >> ?? @@ AA BB CC7 │0");
  104.   goxy(40,13);
  105.   pl("7│ DD EE FF GG HH II JJ KK LL MM NN OO7 │0");
  106.   goxy(40,14);
  107.   pl("7│ PP QQ RR SS TT UU VV WW XX YY ZZ [[7 │0");
  108.   goxy(40,15);
  109.   pl("7│ \\\\ ]] ^^ __ `` aa bb cc dd ee ff gg7 │0");
  110.   goxy(40,16);
  111.   pl("7│ hh ii jj kk ll mm nn oo pp qq rr ss7 │0");
  112.   goxy(40,17);
  113.   pl("7│ tt uu vv ww xx yy zz {{ || }} ~~ [[7 │0");
  114.   goxy(40,18);
  115.   pl("7├─────────────────────────┤0");
  116.   goxy(40,19);
  117.   pl("7│                         │0");
  118.   goxy(40,20);
  119.   pl("7└─────────────────────────┘0");
  120. }
  121.  
  122. void color_config(void)
  123. {
  124.   char s[81],ch,ch1;
  125.   unsigned c;
  126.   int i,done=0,n;
  127.  
  128.   strcpy(s,"      SAMPLE COLOR      ");
  129.   get_colordata();
  130.   do {
  131.     outchr(12);
  132.     npr("5Extended Color Configuration 2- 3Enter Choice,0");
  133.     pl("1^Z 3to Quit, 1^R 3to Relist0");
  134.     outstr(": ");
  135.     list_ext_colors();
  136.     goxy(2,2);
  137.     ch=getkey();
  138.     if (ch==26)
  139.       done=1;
  140.     if (ch==18) {
  141.       list_ext_colors();
  142.       goxy(2,2);
  143.     }
  144.     if (ch>=32) {
  145.       outchr(ch);
  146.       n=ch-48;
  147.       nln(2);
  148.       color_list();
  149.       ansic(0);
  150.       nl();
  151.       prt(2,get_string(430));
  152.       ch1=onek("01234567");
  153.       c=ch1-'0';
  154.       goxy(41,19);
  155.       setc(c);
  156.       outstr(s);
  157.       ansic(0);
  158.       goxy(1,16);
  159.       prt(2,get_string(431));
  160.       ch1=onek("01234567");
  161.       c=c | ((ch1-'0') << 4);
  162.       goxy(41,19);
  163.       setc(c);
  164.       outstr(s);
  165.       ansic(0);
  166.       goxy(1,17);
  167.       nl();
  168.       prt(5,get_string(434));
  169.       if (yn())
  170.         c |= 0x08;
  171.       goxy(41,19);
  172.       setc(c);
  173.       outstr(s);
  174.       ansic(0);
  175.       goxy(1,18);
  176.       nl();
  177.       prt(5,get_string(437));
  178.       if (yn())
  179.         c |= 0x80;
  180.       nl();
  181.       goxy(41,19);
  182.       setc(c);
  183.       outstr(s);
  184.       ansic(0);
  185.       goxy(1,21);
  186.       setc(c);
  187.       outstr(describe(c));
  188.       ansic(0);
  189.       nln(2);
  190.       prt(5,get_string(438));
  191.       if (yn()) {
  192.         nl();
  193.         pl(get_string(439));
  194.         nl();
  195.         if ((n<=-1) && (n>=-16))
  196.           rescolor.resx[207+abs(n)]=c;
  197.         else if ((n>=0) && (n<=9))
  198.           thisuser.colors[n]=c;
  199.         else
  200.           rescolor.resx[n-10]=c;
  201.       } else {
  202.         nl();
  203.         pl(get_string(440));
  204.         nl();
  205.       }
  206.     }
  207.   } while ((!done) && (!hangup));
  208.   nln(2);
  209.   npr("5Save changes? 0");
  210.   if (yn())
  211.     save_colordata();
  212.   else
  213.     get_colordata();
  214.   outchr(12);
  215.   nln(3);
  216. }
  217.  
  218. void buildcolorfile(void)
  219. {
  220.   int i,i1,colorfile;
  221.   char s[81],s1[81];
  222.  
  223.   sprintf(s1,"%sCOLOR.DAT",syscfg.datadir);
  224.   colorfile=sh_open1(s1,O_RDWR | O_BINARY | O_CREAT);
  225.   nl();
  226.   for (i=0; i<240; i++)
  227.     rescolor.resx[i]=i+1;
  228.   sh_write(colorfile, (void *)(&rescolor), sizeof(colorrec));
  229.   colorfile=sh_close(colorfile);
  230. }
  231. // SPV061IB.MOD BLOCK END
  232. ─────────────────────────────────────────────────────────────────────────────
  233. STEP 4: In COM.C, void outchr(unsigned char c), make these changes:
  234.  
  235. ==  } else if (change_color==1) {
  236. ==    change_color = 0;
  237. ++    if ((c>=32) && (c<=126))                            // SPV061IB.MOD add
  238. ++      ansic(c-48);                                      // SPV061IB.MOD add
  239. --    if ((c >= '0') && (c <= '9'))                    // SPV061IB.MOD remove
  240. --      ansic(c - '0');                                // SPV061IB.MOD remove
  241. ==    return;
  242. ==  }
  243. ─────────────────────────────────────────────────────────────────────────────
  244. STEP 5: Still in COM.C, replace void ansic(int n) with this one:
  245.  
  246. // SPV061IB.MOD start replacement block
  247. void ansic(int n)
  248. {
  249.   char c;
  250.   if ((n<=-1) && (n>=-16))
  251.     c=((thisuser.sysstatus & sysstatus_color) ?
  252.      rescolor.resx[207+abs(n)] : thisuser.bwcolors[0]);
  253.   if ((n>=0) && (n<=9))
  254.     c=((thisuser.sysstatus & sysstatus_color) ?
  255.      thisuser.colors[n] : thisuser.bwcolors[n]);
  256.   if ((n>=10) && (n<=207))
  257.     c=((thisuser.sysstatus & sysstatus_color) ?
  258.      rescolor.resx[n-10] : thisuser.bwcolors[0]);
  259.   if (c==curatr)
  260.     return;
  261.   setc(c);
  262.   makeansi((thisuser.sysstatus & sysstatus_color) ?
  263.        thisuser.colors[0] : thisuser.bwcolors[0],endofline,0);
  264. }
  265. // SPV061IB.MOD end replacement block
  266. ─────────────────────────────────────────────────────────────────────────────
  267. STEP 6: Make these changes in BBSUTL.C, int inli2(...), case 16:
  268.  
  269. ==          case 16: /* Ctrl-P */
  270. ==            if (cp<maxlen-1) {
  271. ==              ch=getkey();
  272. // SPV061IB START CHANGES
  273. --              if ((ch>='0') && (ch<='9')) {         // SPV061IB.MOD removed
  274. --                s[cp++]=3;                          // SPV061IB.MOD removed
  275. --                s[cp++]=ch;                         // SPV061IB.MOD removed
  276. --                ansic(ch-'0');                      // SPV061IB.MOD removed
  277. ++              if ((ch>=32) && (ch<=126)) {              // SPV061IB.MOD add
  278. ++                s[cp++]=3;                              // SPV061IB.MOD add
  279. ++                s[cp++]=ch;                             // SPV061IB.MOD add
  280. ++                ansic(ch-48);                           // SPV061IB.MOD add
  281. // SPV061IB END CHANGES
  282. ==              } else if ((ch==16) && (cp<maxlen-2)) {
  283. ==                ch=getkey();
  284. ==
  285. ==                if (ch != 16) {     // RIP font style code
  286. ─────────────────────────────────────────────────────────────────────────────
  287. STEP 7: In BBSOVL2.C, void two_way_chat(...), replace case 16:  with this
  288.         one:
  289.  
  290. // SPV061IB.MOD start replacement block
  291.           case 16: /* Ctrl-P */
  292.             if (side==0) {
  293.               if (cp0<maxlen-1) {
  294.                 ch=getkey();
  295.                 if ((ch>=32) && (ch<=126)) {
  296.                   side0[WhereY()][cp0++]=3;
  297.                   side0[WhereY()][cp0++]=ch;
  298.                   ansic(ch-48);
  299.                 }
  300.               }
  301.             } else {
  302.               if (cp1<maxlen-1) {
  303.                 ch=getkey();
  304.                 if ((ch>=32) && (ch<=126)) {
  305.                   side1[WhereY()-13][cp1++]=3;
  306.                   side1[WhereY()-13][cp1++]=ch;
  307.                   ansic(ch-48);
  308.                 }
  309.               }
  310.             }
  311.             break;
  312. // SPV061IB.MOD end replacement block
  313. ─────────────────────────────────────────────────────────────────────────────
  314. STEP 8: Make these changes in MSGBASE.C, void inmsg(...) :
  315.  
  316. ==    pln(maxli);
  317. ==    pl(get_string(628));
  318. ++    pl("Colors: ^P-0112233445566778899AABBCC0" // SPV061IB.MOD
  319. ++       "DDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSS0" // SPV061IB.MOD
  320. ++       "TTUUVVWWXXYYZZ0");                          // SPV061IB.MOD
  321. ++    nl();                                                   // SPV061IB.MOD
  322. ==    strcpy(s,get_string(629));
  323. ==    s[thisuser.screenchars]=0;
  324. ─────────────────────────────────────────────────────────────────────────────
  325. STEP 9: In MMENU.C, void mainmenu(void), add these two command blocks:
  326.  
  327. ==      chuser();
  328. ==    }
  329. ++    if ((strcmp(s,"COLOREDIT")==0) || (strcmp(s,"CLRE")==0)) //SPV061IB.MOD
  330. ++      color_config();                                        //SPV061IB.MOD
  331. ++    if ((strcmp(s,"COLORINIT")==0) || (strcmp(s,"CLRI")==0)) //SPV061IB.MOD
  332. ++      buildcolorfile();                                      //SPV061IB.MOD
  333. ==    if (strcmp(s,"CLOUT")==0) {
  334. ==      npr("\r\nNot Yet.\r\n");
  335. ─────────────────────────────────────────────────────────────────────────────
  336. STEP 10: Add the function prototypes to FCNS.H:
  337.  
  338. == char *stripfn(char *fn);
  339. == void stripfn1(char *fn);
  340. ++ void get_colordata(void);                                  // SPV061IB.MOD
  341. ++ void save_colordata(void);                                 // SPV061IB.MOD
  342. ++ void list_ext_colors(void);                                // SPV061IB.MOD
  343. ++ void color_config(void);                                   // SPV061IB.MOD
  344. ++ void buildcolorfile(void);                                 // SPV061IB.MOD
  345. ==
  346. == /* File: xfer.c */
  347. ─────────────────────────────────────────────────────────────────────────────
  348. STEP 11: Add this line to XINIT.C, void init(void)
  349.  
  350. ==   write_inst(INST_LOC_WFC,0,INST_FLAGS_NONE);
  351. ++   get_colordata();                                         // SPV061IB.MOD
  352. == }
  353. == /************************************************************************/
  354. ==
  355. == void gotcaller(unsigned int ms, unsigned int cs)
  356. ─────────────────────────────────────────────────────────────────────────────
  357. STEP 12: Add this line in NEWUSER.C, function void newuser(void)
  358.  
  359. == void newuser(void)
  360. == {
  361. ==   int i, ok;
  362. ==   char s[255],s1[81],ch;
  363. ==
  364. ++   get_colordata();                                         // SPV061IB.MOD
  365. ==   memset(&thisuser, 0, sizeof(userrec));
  366. ==   memset(qsc, 0, syscfg.qscn_len);
  367. ─────────────────────────────────────────────────────────────────────────────
  368. STEP 13: UUdecode this file, and place it in your DATA directory.
  369.  
  370. section 1 of uuencode 5.22 of file color.dat    by R.E.M.
  371.  
  372. begin 644 color.dat
  373. M`0(##P4&`@@*#0P/@82(B8J-A1D?*B\[/TQ/75]N;W]X(B,D!@LG"`H-#`^!
  374. MA(B)BHV%&1\J+SL_3$]=7VYO?WA"#6I%1D=(24I+3$U.3U!14E-4!E976%E:
  375. M6UQ=7E]@86)C9&5F9VAI:FML;6YO<'%R<W1U=G=X>7I[?'U^?X"!@H.$A8:'
  376. MB(F*BXR-CH^0D9*3E)66EYB9FIN<G9Z?H*&BHZ2EIJ>HJ:JKK*VNK["QLK.T
  377. MM;:WN+FZN[R]OK_`P<+#Q,7&Q\C)RLO,S<[/T-'2#M0,"@H)B@<%!`/>`>#A
  378. /XN/DY>;GZ.GJZ^SM[N_P
  379. `
  380. end
  381. sum -r/size 62576/358 section (from "begin" to "end")
  382. sum -r/size 14788/240 entire input file
  383. ─────────────────────────────────────────────────────────────────────────────
  384. STEP 14: Recompile the BBS.  Once recompiled successfully, enter the BBS,
  385.          and type //CLRE at the main prompt.
  386. ─────────────────────────────────────────────────────────────────────────────
  387. STEP 15: To enable all the new colors in WWIVEdit, make this change in the
  388.          *.DEF file that you want (LOCAL.DEF)
  389.  
  390. COLORS:   [#1-#126] Legal Color Range (See CONFIG.DOC for format)
  391. ─────────────────────────────────────────────────────────────────────────────
  392.   This is the working 4.24 release of this mod.  E-Mail me if ya like it.
  393. Better yet, E-Mail Random (Wayne Bell) if you do, then maybe he'll get more
  394. than 10 colors in WWIV 4.25!
  395.   Many, many thanks to AquaMaestro!  If it weren't for him, this mod wouldn't
  396. have been born.
  397.  
  398.    This mod is copyright 1993,1994 by Tracy Baker, aka Papa Bear, and is
  399. distributed as freeware.  Permission is granted to distribute and post this
  400.   mod on BBS systems and online services, provided no alterations are made
  401.  (removal of message headers/taglines allowed).  This mod may contain some
  402.  parts of WWIV source code, which is copyright 1988-1994 by Wayne Bell and
  403.    licensed only to registered users of WWIV.  Use of WWIV source without
  404.     registration constitutes a license violation and could lead to legal
  405.                        prosecution and certain doom.
  406.   Shareware distributors and CD-ROM publishers may not distribute this mod
  407. without express written permission of the Author or WWIV Software Services.
  408.  
  409. 7-9=1*6>2Pâpâ ßêâr6<1*9=7-0
  410.  
  411. 8311579.wwivnet1· 2 ╪╫9≡8║7⌐¬4¥5╓╥╖1·     ·     2▒1 ·   2▒       3(510)522-35831    ·
  412. 732.sexnet  1∙   6 ·0░░▒▒▓▓6∞0▓▒░6·2 StarPort   ▒   ▒ 2 ▒1  ·2▒   ▒ ▒1 ·2 ▒   ▒1  ·2▒     ▒ 1·
  413. 6315061.wwivlink    0 ████1 ·     .       2  ▒ ▒  ▒ ▒  ▒1 · 2▒▒▒  ▒ ▒  ▒   ▒    ▒ ▒
  414. 535079.icenet 1.  .  0 │└6·0└6· 1     ∙         2 ▒  ▒   ▒ ▒▒▒ ▒ ▒ ▒1 ·2 ▒ ▒▒▒ ▒▒▒ ▒1 ∙ 2▒
  415. ---
  416. 1And the trees were all kept equal, by hatchet, axe, and saw...
  417.