'===========================================================================
' Subject: (TALKER) TEXT MANIPULATIONS        Date: 07-03-97 (12:01)       
'  Author: Brian Mahocker                     Code: QB, QBasic, PDS        
'  Origin: Kain121182@aol.com               Packet: TEXT.ABC
'===========================================================================
DECLARE SUB RandomIn (x, y, text$, pause, col)
DECLARE SUB BackwardsTalker (x, y, text$, col)
DECLARE SUB CoolPause (x, y, speed)
DECLARE SUB CaseColorTalker (x, y, text$, firstcase)
DECLARE SUB ColorTalker (x, y, text$)
DECLARE SUB CaseTalker (x, y, c, text$, firstcase)

'Go into the sub for information on it

CLS
COLOR 15: LOCATE 1, 1: PRINT "Case Talker"
CaseTalker 2, 10, 9, "Brian's da bomb", 1
COLOR 15: LOCATE 4, 1: PRINT "Color Talker"
ColorTalker 5, 10, "Who da man?"
COLOR 15: LOCATE 7, 1: PRINT "Case & Color Talker"
CaseColorTalker 8, 10, "do i rule? i think so", 1
COLOR 15: LOCATE 10, 1: PRINT "Backwards Talker"
BackwardsTalker 11, 10, "This iz cool!", 10
COLOR 15: LOCATE 13, 1: PRINT "Random In"
RandomIn 14, 10, "Real Programmers Use Q-Basic!!!!", 500, 9
COLOR 15: LOCATE 16, 1: PRINT "Cool Pause"
CoolPause 17, 10, 200

SUB BackwardsTalker (x, y, text$, col)

'Backwards Talker By: Brian Mahocker - Contact me at "Kain121182@AOL.COM
'What this does is print text$ in backwards
'Variables - X = Xpos on the screen, Y = Ypos on the screen
'            text$ = The text to be Backwarded, Col = The color of the text
COLOR col
FOR BW = LEN(text$) TO 1 STEP -1
   LET BWT$ = BWT$ + MID$(text$, BW, 1)
NEXT BW
LOCATE x, y: PRINT BWT$
END SUB

SUB CaseColorTalker (x, y, text$, firstcase)

'Case & Color Talker By: Brian Mahocker - Contact me at "Kain121182@AOL.COM
'What this does is print text$ in case like this, "BrIaN Is dA BoMb" and
'                                                     in different colors
'Variables - X = Xpos on the screen, Y = Ypos on the screen
'            text$ = The text to be CaseColorTalked
'            firstcase = if it is 1, the first letter will be lower case
'            firstcase = if it is 2, the first letter will be upper case

IF firstcase = 1 THEN LET cas = 1
IF firstcase = 2 THEN LET cas = 2
FOR CCT = 1 TO LEN(text$)
   LET c = INT(RND * 15) + 1
   IF cas = 1 THEN
      COLOR c: LOCATE x, y: PRINT LCASE$(MID$(text$, CCT, 1)): LET y = y + 1
   END IF
   IF cas = 2 THEN
      COLOR c: LOCATE x, y: PRINT UCASE$(MID$(text$, CCT, 1)): LET y = y + 1
   END IF
   IF cas = 2 THEN LET cas = 1: GOTO NextcCT
   IF cas = 1 THEN LET cas = 2: GOTO NextcCT
NextcCT:
NEXT CCT


END SUB

SUB CaseTalker (x, y, c, text$, firstcase)

'Case Talker By: Brian Mahocker - Contact me at "Kain121182@AOL.COM"
'Simply what this does is print text$ in case like this, "BrIaN Is dA BoMb"
'Variables - X = Xpos on the screen, Y = Ypos on the screen
'            c = Color of text, text$ = The text to be CaseTalked
'            firstcase = if it is 1, the first letter will be lower case
'            firstcase = if it is 2, the first letter will be upper case

IF firstcase = 1 THEN LET cas = 1
IF firstcase = 2 THEN LET cas = 2
FOR CT = 1 TO LEN(text$)
   IF cas = 1 THEN
      COLOR c: LOCATE x, y: PRINT LCASE$(MID$(text$, CT, 1)): LET y = y + 1
   END IF
   IF cas = 2 THEN
      COLOR c: LOCATE x, y: PRINT UCASE$(MID$(text$, CT, 1)): LET y = y + 1
   END IF
   IF cas = 2 THEN LET cas = 1: GOTO NextCT
   IF cas = 1 THEN LET cas = 2: GOTO NextCT
NextCT:
NEXT CT
END SUB

SUB ColorTalker (x, y, text$)

'Color Talker By: Brian Mahocker - Contact me at "Kain121182@AOL.COM"
'Simply what this does is print text$ in random colors, 1 letter at a time
'Variables - X = Xpos on the screen, Y = Ypos on the screen
'            text$ = the text to be printed

RANDOMIZE TIMER
FOR CT = 1 TO LEN(text$)
   LET c = INT(RND * 15) + 1
   COLOR c: LOCATE x, y: PRINT MID$(text$, CT, 1): LET y = y + 1
NEXT CT
END SUB

SUB CoolPause (x, y, speed)
 
'Cool Pause By: Brian Mahocker - Contact me at 'Kain121182@AOL.COM'
'This is a really cool pause sub
'Variables - X = Xpos on the screen, Y = Ypos on the screen
'            speed = how long the pasue is in between the movements of the ><'s
'            300 is a good setting for speed
DO
LET CoolPauseW$ = INKEY$
LOCATE x, y
COLOR 7: PRINT "..."; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 7: PRINT "..."
LET t = 0: DO: LET CoolPauseW$ = INKEY$
IF CoolPauseW$ <> "" THEN : EXIT SUB
LET t = t + 1: LOOP UNTIL t = speed
LOCATE x, y
COLOR 15: PRINT ">"; : COLOR 7: PRINT ".."; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 7: PRINT ".."; : COLOR 15: PRINT "<"
LET t = 0: DO: LET CoolPauseW$ = INKEY$
IF CoolPauseW$ <> "" THEN : EXIT SUB
LET t = t + 1: LOOP UNTIL t = speed
LOCATE x, y
COLOR 7: PRINT ">"; : COLOR 15: PRINT ">"; : COLOR 7: PRINT "."; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 7: PRINT "."; : COLOR 15: PRINT "<"; : COLOR 7: PRINT  _
"<"
LET t = 0: DO: LET CoolPauseW$ = INKEY$
IF CoolPauseW$ <> "" THEN : EXIT SUB
LET t = t + 1: LOOP UNTIL t = speed
LOCATE x, y
COLOR 8: PRINT ">"; : COLOR 7: PRINT ">"; : COLOR 15: PRINT ">"; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 15: PRINT "<"; : COLOR 7: PRINT "<"; : COLOR 8: PRINT  _
"<"
LET t = 0: DO: LET CoolPauseW$ = INKEY$
IF CoolPauseW$ <> "" THEN : EXIT SUB
LET t = t + 1: LOOP UNTIL t = speed
LOCATE x, y
COLOR 7: PRINT "."; : COLOR 8: PRINT ">"; : COLOR 7: PRINT ">"; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 7: PRINT "<"; : COLOR 8: PRINT "<"; : COLOR 7: PRINT  _
"."
LET t = 0: DO: LET CoolPauseW$ = INKEY$
IF CoolPauseW$ <> "" THEN : EXIT SUB
LET t = t + 1: LOOP UNTIL t = speed
LOCATE x, y
COLOR 7: PRINT ".."; : COLOR 8: PRINT ">"; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 8: PRINT "<"; : COLOR 7: PRINT ".."
LET t = 0: DO: LET CoolPauseW$ = INKEY$
IF CoolPauseW$ <> "" THEN : EXIT SUB
LET t = t + 1: LOOP UNTIL t = speed
LOCATE x, y
COLOR 7: PRINT "..."; : COLOR 8: PRINT "["; : COLOR 7: PRINT "-"; : COLOR 15: PRINT "Press a key!"; : COLOR 7: PRINT "-"; : COLOR 8: PRINT "]"; : COLOR 7: PRINT "..."
LOOP
AfterCoolPause:
END SUB

SUB RandomIn (x, y, text$, pause, col)

'RandonIn Talker By: Brian Mahocker - Contact me at "Kain121182@AOL.COM
'What this does is print text$ by printing 1 random letter at a time
'Variables - X = Xpos on the screen, Y = Ypos on the screen
'            text$ = The text to be RandomedIn, Pause = the pause between
'            Col = The color of the text                      each letter.
           
RANDOMIZE TIMER
COLOR col
DIM RI(LEN(text$))
FOR PRI = 1 TO LEN(text$)
GetLet:
   LET WL = INT(RND * LEN(text$)) + 1
   IF RI(WL) = 1 THEN GOTO GetLet
   LET RI(WL) = 1
   LET CurLet$ = MID$(text$, WL, 1)
   LOCATE x, y + WL - 1
   PRINT CurLet$
   FOR delay = 1 TO pause: NEXT delay
NEXT PRI
END SUB
