home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
MODSUNKN.ZIP
/
SPINCUR.C
< prev
next >
Wrap
Text File
|
1990-10-12
|
4KB
|
152 lines
-------
Load up FCNS.H and search for "void main". Then add:
= void main (...);
+ void hangon(int x);
+ void spin_c(int l);
STEP #2
-------
Load up BBS.C, and right after the #includes, do this:
= #include <alloc.h>
= #include <time.h>
+ char spin[10], spin1[10], spin2[10], spin3[10];
+ int spini=0; /* Fixed line */
= unsigned _stklen=15360;
STEP #3
-------
At the end of BBS.C, block read in this code:
/* START Spinning_Cursor Code */
void hangon(int x) {
int i;
switch(x) {
case 2400:
x=1000;
break;
case 1200:
x=500;
break;
case 300:
x=75;
break;
default:
x=1500;
break;
}
for (i=0; i<x; i++);
}
void spin_c(int l) {
/* l = strlen(s) */
int i;
int j;
if(!spini) {
strcpy(spin,"|");
strcpy(spin1,"\\");
strcpy(spin2,"-");
strcpy(spin3,"/");
}
delay(50);
ansic(7); /* Change this number to change the color of the cursor */
for (i=l; i>0; i--) {
for (j=0; j<9; j++) {
hangon(atoi(curspeed));
hangon(0);
switch(j) {
case 0:
outstr(spin);
break;
case 3:
outstr(spin1);
break;
case 5:
outstr(spin2);
break;
case 7:
outstr(spin3);
break;
case 9:
outstr("\b");
break;
default:
outstr("\b \b");
break;
}
}
}
}
/* END Spinning_Cursor Code */
STEP #4
-------
Now, in BBS.C still, go to void mainmenu and block read the following code
after the existing code...
if (strcmp(s,"/N")==0) /* Existing lines */
nscan(cursub); /* Existing lines */
/* START Spinning_Cursor Mod */
if (strcmp(s,"/S")==0) {
if(!spini) {
strcpy(spin,"|");
strcpy(spin1,"\\");
strcpy(spin2,"-");
strcpy(spin3,"/");
}
prt(4,"Spinning Cursor!"); nl(); nl();
sprintf(s,"Current setting: %s %s %s %s",spin,spin1,spin2,spin3);
prt(1,s);
nl();
prt(5,"Change it? ");
if(yn()) {
spini=1;
prt(1,"Enter first character ");
mpl(1);
inputl(spin,1); nl();
if(spin[0]) nl();
else strcpy(spin,"|");
prt(1,"Enter second character ");
mpl(1);
inputl(spin1,1); nl();
if(spin1[0]) nl();
else strcpy(spin1,"\\");
prt(1,"Enter third character ");
mpl(1);
inputl(spin2,1); nl();
if(spin2[0]) nl();
else strcpy(spin2,"-");
prt(1,"Enter fourth character ");
mpl(1);
inputl(spin3,1); nl();
if(spin3[0]) nl();
else strcpy(spin3,"/");
nl();
}
nl();
prt (3,"And away we go!"); spin_c(15);
}
/* END Spinning_Cursor Mod */
/****************************************************************************/
6Finis!
All you have to do now is add spin_c(x) to where ever you want it! A good
place to start is in MSGBASE.C, where it says "Saving...". Just put spin_c
right after it...
= outstr("Saving...");
+ spin_c(9);
= if (fsed) {
= i5=open(fnx,O_RDONLY | O_BINARY);
Other good places are to delete over the [WAIT], quotes, random messages,
prompts, etc...virually anywhere! Make sure it's put after commands like
prt(...) and outstr(...), where a newline command isn't given. Also, be sure
to send the correct length of the text to be deleted to the function, or else
parts of it will still be left onscreen.