Created
September 27, 2014 13:54
-
-
Save Fortyseven/45e87aaea38f6bbe297c to your computer and use it in GitHub Desktop.
What is this? No idea. Didn't look to closely at it. Something to do with OmniQuote.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{$G+,A+,S-,R-,I-,D-,L-} | |
Uses CRT, UTILS, GFX; | |
{$I C:\DATE.} | |
Const | |
Speed :Byte=1; {for sinus, not used this time} | |
cSpeed :Byte=6; {color cycle speed, also not used this time} | |
donehere :boolean=false; {let's go, men!} | |
tagfile :String='TAGLINES.TAG'; {ho hum...relics...} | |
force :boolean=false; {use it} | |
Secs =10; {seconds between quote change} | |
fontwidth =6; {manual font settings...} | |
fontheight=6; {hohoho} | |
MaxLength =(320 div fontwidth)-2; {no nonsense -- heh} | |
var | |
x,y :word; | |
z,c :byte; | |
stab :array[0..255] of integer; | |
lst :longint; | |
{---------------------------------------------------------------} | |
Procedure BiteMe; External; {$L BITEME.OBJ} | |
{---------------------------------------------------------------} | |
Procedure HelpScreen; | |
Begin | |
clrscr; | |
textattr:=$19; | |
clreol; | |
writeln(centerstr('WAVETAG r2 -- Freeware -- Copyright (c)1996 Hacsoft Developments ')); | |
clreol; | |
writeln(centerstr('Compile date: '+compiledate)); | |
textattr:=$7; | |
writeln; | |
writeln('WAVETAG is a fun little suppliment to OmniQuote, although it is not'); | |
writeln('limited to working only with OmniQuote. WAVETAG will filter out "^M"'); | |
writeln('commands in your taglines, and thats IT. No word wrapping. No pipes.'); | |
writeln('As time goes on, I''ll add things to this...as always, user input is a must.'); | |
writeln; | |
writeln(' keys'); | |
writeln(' SPACE -- force next tagline'); | |
writeln(' ANYTHING ELSE -- exit'); | |
writeln('ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'); | |
writeln('usage: ',paramstr(0),' taglines.tag'); | |
halt; | |
End; | |
{---------------------------------------------------------------} | |
function filt(s:string):string; | |
Var | |
x:byte; | |
t:string; | |
begin | |
repeat | |
x:=pos('^M',upper(s)); {Any ^M's in there??} | |
if boolean(x) then begin delete(s,x,2); insert(' ',s,x); end; | |
{Yup! So erase 'em, and replace with a space!} | |
until x=0; {do it until they're ALL GONE. ERADICATED!} | |
filt:=s; {give back the nice string, honey...} | |
end; | |
{---------------------------------------------------------------} | |
Procedure WriteTag; | |
Var | |
s,ss :string; | |
z,c :byte; | |
ry :byte; | |
Begin | |
if not force then if not (timer-lst>=(18*secs)) then exit; {if forced, or time to go, then do so, else get the FUCK out!} | |
x:=63; while x>=20 do begin vsinc; pal(1,x,0,0); dec(x); end; | |
force:=false; {do, or do not...there is no try} | |
ry:=random(200-(6*fontheight)); {pick a random height based on font height} | |
s:=readline(tagfile, random(lines(tagfile))); {pickatag} | |
cls(0); {cls!} | |
for z:=0 to 6 do wString(fontwidth,ry+(z*fontheight), 1, filt(copy(s, z*MaxLength, MaxLength))); {write that tagline!} | |
lst:=timer; {reset timer} | |
x:=30; while x<=63 do begin vsinc; pal(1,x,0,x); inc(x,10); end; {quick fade to white} | |
x:=63; while x<>0 do begin vsinc; pal(1,63,0,x); dec(x); end; {not-so-quick fade to red!} | |
End; | |
{---------------------------------------------------------------} | |
Procedure Init; | |
Begin | |
if paramcount=0 then helpscreen; | |
if paramstr(1)<>'' then tagfile:=upper(paramstr(1)); {gimmiefile} | |
InitGFX(2); {eatme} | |
randomize; {popeye said to...} | |
for x:=0 to 255 do stab[x]:=round(sin(x/4)*2)+2; {establish sinus...not used this time 'round} | |
FillChar(buf[2]^, 64000,0); {cls!} | |
c:=0;{unused code is fun!} | |
z:=0; | |
page:=seg(buf[1]^); {point to the VGA, young unit!} | |
if not exist(tagfile) then quit('Where the hell is '+tagfile+'?!'); {h0h0h0} | |
zdc; | |
drawpcx(@biteme,false); {draw BITE ME} | |
pal(1,63,0,0); | |
pal(0,20,0,20); | |
lst:=timer; {lube up timer} | |
End; | |
{---------------------------------------------------------------} | |
Procedure MainLoop; | |
Begin | |
writetag; {keep trying to get a new tagline...you'll fail most of the time you idiot!} | |
vsinc; {keep sync!} | |
if keypressed then case readkey of {not really used 'cept for [ ] and else} | |
'+' :inc(speed); | |
'-' :dec(speed); | |
' ' :force:=true; | |
else donehere:=true; | |
end; {case} | |
inc(c,speed); {frt} | |
inc(z,cspeed); | |
End; | |
{---------------------------------------------------------------} | |
Begin | |
Init; | |
gStyle:=fSmall; {that nice little font} | |
Repeat | |
MainLoop; | |
Until DoneHere; | |
DeInitGFX; | |
End. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment