home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / games / head.zip / CHROMA.PAS < prev    next >
Pascal/Delphi Source File  |  1986-07-22  |  5KB  |  130 lines

  1. {  CHROMA     by Robert Kemmetmueller }
  2.  
  3. {$C-}
  4. {
  5.  This is the Turbo Pascal include-file for the speech driver.  The
  6.  parameter S must be a character string containing valid phoneme codes:
  7.  
  8.    CODE   SOUND  (capitalized in sample word)
  9.    ----   -----
  10.     A     mAke   = m-A-k             AE    bAt    = b-AE-t
  11.     AH    cAr    = k-AH-r            AW    dOg    = d-AW-g
  12.     B     Bat    = B-ae-t            CH    CHeese = CH-ee-z
  13.     D     Dog    = D-aw-g            EE    bE     = b-EE
  14.     EH    bEt    = b-EH-t            F     raFt   = r-ae-F-t
  15.     G     Go     = G-oh              H     Hive   = H-i-v
  16.     I     tIme   = t-I-m             IH    sIt    = s-IH-t
  17.     J     Jet    = J-eh-t            K     Kill   = K-ih-l
  18.     L     Love   = L-uh-v            M     Map    = M-ae-p
  19.     N     Nab    = N-ae-b            OH    gO     = g-OH
  20.     OO    gOO    = g-OO              P     Pat    = P-ae-t
  21.     R     Rat    = R-ae-t            S     Sat    = S-ae-t
  22.     SH    SHe    = SH-ee             T     Tap    = T-ae-p
  23.     TH    THin   = TH-ih-n           TZ    THis   = TZ-ih-s
  24.     U     wOrd   = w-U-r-d           UH    bUt    = b-UH-t
  25.     V     Vat    = V-ae-t            W     With   = W-ih-th
  26.     WH    WHich  = WH-ih-ch          Y     Yes    = Y-eh-s
  27.     Z     Zap    = Z-ae-p            ZH    viSion = v-ih-ZH-eh-n
  28.     -     inter-phoneme separator    space  inter-word pause
  29. }
  30.  
  31. Type
  32.     SpeechString = String[255];
  33.     Line= Array[1..80] of Integer;
  34.     Screen= Array[1..17] of Line;
  35.     MouthData= Array[1..7] of Integer;
  36.     EyesData= Array[1..17] of Integer;
  37.     String7= String[7];
  38.  
  39. Var
  40.     Disk: File of Screen;
  41.     Scrn: Screen Absolute $B800:$0000;
  42.     I,J,K,L: Integer;
  43.     Mouth: Array[0..3] of MouthData;
  44.     Eyes: Array[0..3] of EyesData;
  45.     Mout: MouthData Absolute $B800:2154;
  46.     Eye: EyesData Absolute $B800:1184;
  47.  
  48. Procedure Speech(S: SpeechString);                     External 'SPEECH.BIN';
  49.  
  50. Procedure MakeMouth(I: Integer; St: String7);
  51.     Var J: Integer;
  52.     Begin
  53.         For J:=1 to 7 do
  54.             Mouth[I,J]:=116*256+Ord(St[J]);
  55.         end;
  56.  
  57. Procedure PutMouth(I: Integer);
  58.     Begin
  59.         Mout:=Mouth[I];
  60.         end;
  61.  
  62. Procedure PutEyes(I: Integer);
  63.     Begin
  64.         Eye:=Eyes[I];
  65.         end;
  66.  
  67. Procedure Wait;
  68.     Begin
  69.         end;
  70.  
  71. BEGIN
  72.     TextMode(C80); TextColor(15); TextBackground(0); ClrScr;
  73.     Assign(Disk,'CHROMA.PIC'); Reset(Disk);
  74.     Read(Disk,Scrn); Close(Disk);
  75.     MakeMouth(0,'─══─══─');
  76.     MakeMouth(1,'─▄█▄█▄─');
  77.     MakeMouth(2,'▄█████▄');
  78.     MakeMouth(3,' ─▄█▄─ ');
  79.     For I:=0 to 3 do Eyes[I]:=Eye;
  80.     For I:=0 to 3 do begin
  81.         Eyes[1,I+2]:=Eyes[0,I+3]; Eyes[1,I+12]:=Eyes[0,I+13];
  82.         Eyes[2,I+3]:=Eyes[0,I+2]; Eyes[2,I+13]:=Eyes[0,I+12];
  83.         end;
  84.     For I:=0 to 4 do begin
  85.         If (I=0) or (I=4) then begin Eyes[3,I+2]:=7*256+220; Eyes[3,I+12]:=7*256+220; end
  86.         Else begin Eyes[3,I+2]:=Eyes[0,I+2]+256*16*7; Eyes[3,I+12]:=Eyes[0,I+12]+256*16*7; end;
  87.         end;
  88.     GotoXY(32,20); Writeln('Welcome, Humanoid');
  89.     PutEyes(0); PutMouth(3); Speech('W');
  90.     PutEyes(3); PutMouth(1); Speech('eh-l');
  91.     PutEyes(0); PutMouth(2); Speech('k-uh');
  92.     PutEyes(1); PutMouth(0); Speech('m ');
  93.     PutEyes(3); PutMouth(2); Speech('H-ee');
  94.     PutEyes(0); PutMouth(3); Speech('oo');
  95.     PutMouth(0); Speech('m');
  96.     PutMouth(1); Speech('eh-n');
  97.     PutEyes(2); PutMouth(3); Speech('oh-i-d');
  98.     PutEyes(0); PutMouth(0); Speech('  ');
  99.     GotoXY(20,21); Write('I am Chroma, ');
  100.     PutMouth(2); Speech('I');
  101.     PutMouth(0); Speech(' ');
  102.     PutMouth(1); Speech('Eh-m');
  103.     PutMouth(0); Speech(' ');
  104.     PutMouth(1); Speech('K-r');
  105.     PutMouth(3); Speech('oh');
  106.     PutMouth(0); Speech('mm');
  107.     PutMouth(2); Speech('ah');
  108.     PutMouth(0); Speech('  ');
  109.     Write('your computer'#39's worst nightmare');
  110.     PutEyes(3); PutMouth(3); Speech('Y');
  111.     PutEyes(0); PutMouth(1); Speech('oh-r');
  112.     PutMouth(0); Speech(' ');
  113.     PutMouth(2); Speech('K-ah');
  114.     PutMouth(0); Speech('m');
  115.     PutEyes(3); PutMouth(1); Speech('p-ee');
  116.     PutEyes(0); PutMouth(3); Speech('oo');
  117.     PutEyes(1); PutMouth(2); Speech('t-u-r-z');
  118.     PutEyes(0); PutMouth(0); Speech(' ');
  119.     PutMouth(3); Speech('W');
  120.     PutMouth(2); Speech('u-r-s-t');
  121.     PutMouth(0); Speech(' ');
  122.     PutMouth(1); Speech('N-i-t');
  123.     PutMouth(0); Speech('m');
  124.     PutEyes(2); PutMouth(2); Speech('a-r');
  125.     PutEyes(0); PutMouth(0); Speech('   ');
  126.     GotoXY(36,23); Writeln('Ha-a-a-a-a!');
  127.     PutEyes(3); PutMouth(2); Speech('H-ah-ah-ah-ah-ah');
  128.     PutEyes(0); PutMouth(0);
  129.     ClrScr;
  130.     END.