home *** CD-ROM | disk | FTP | other *** search
- {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X-}
- {$M 16384,0,655360}
- (*===================================================================*)
- (* TEWILOG0.PAS *)
- (* (C) 1993 te-wi Verlag, München *)
- (*===================================================================*)
-
- PROGRAM tewiLogo;
-
- USES
- Crt, DOS, Graph, Drivers;
-
- VAR
- MaxX, MaxY,
- x, y, gd, gm, i : INTEGER;
- p1, p2, p3 : Pointer;
- size : WORD;
- ComplexFont,
- TriplexScriptFont: INTEGER;
- ch : CHAR;
- Hour, Minute,
- Second, Sec100 : WORD;
-
- PROCEDURE SmallFontProc; EXTERNAL; {$L LITT}
- PROCEDURE TriplexScriptFontProc; EXTERNAL; {$L TSCR}
- PROCEDURE ComplexFontProc; EXTERNAL; {$L LCOM}
-
- PROCEDURE MoveLogo;
- BEGIN
- y := MaxY DIV 2 - 35;
- x := MaxX;
- REPEAT
- IF KeyPressed THEN BEGIN
- PutImage(x, y, p2^, NormalPut);
- Exit;
- END;
- PutImage(x, y, p1^, NormalPut);
- Dec(x, 1)
- UNTIL x <= 1;
- PutImage(x, y, p2^, NormalPut);
- END;
-
- BEGIN
- CheckBreak := FALSE;
- TriplexScriptFont := RegisterBGIFont(@SmallFontProc);
- ComplexFont := RegisterBGIFont(@ComplexFontProc);
- TriplexScriptFont := RegisterBGIFont(@TriplexScriptFontProc);
- DetectGraph(gd, gm);
- InitGraph(gd, gm, '');
- DirectVideo := TRUE;
- SetTextJustify(LeftText, BottomText);
- SetFillStyle(SolidFill, Cyan);
- SetLineStyle(SolidLn, 0, ThickWidth);
- Bar(2, 2, 218, 68);
- SetColor(Cyan);
- Rectangle(1, 1, 219, 69);
- SetColor(Red);
- Rectangle(4, 4, 216, 66);
- SetTextStyle(TriplexScriptFont, 0, 4);
- x := 10;
- y := 36;
- CASE gd OF
- EGA, VGA, EGA64: SetColor(White);
- ELSE SetColor(Black);
- END;
- OutTextXY(x + 60, y, 'tewi');
- OutTextXY(x + 61, y, 'tewi');
- SetColor(Black);
- y := y + TextHeight('Pp') DIV 2 + 5;
- SetTextStyle(SmallFont, 0, 4);
- OutTextXY(x + 15, y, 'Die etwas bessere PC-Literatur');
- size := ImageSize(0, 0, 231, 70);
- GetMem(p1, Size);
- GetMem(p2, Size);
- GetMem(p3, Size);
- GetImage(0, 0, 231, 70, p1^);
- SetFillStyle(SolidFill, Black);
- Bar(0, 0, 250, 70);
- GetImage(0, 0, 231, 70, p2^);
- SetFillStyle(SolidFill, Red);
- Bar(2, 2, 218, 68);
- SetColor(LightRed);
- Rectangle(4, 4, 216, 66);
- SetColor(White);
- SetTextStyle(ComplexFont, 0, 3);
- OutTextXY(x + 18, y - 10, 'Falsche Taste');
- GetImage(0, 0, 231, 70, p3^);
- PutImage(0, 0, p2^, NormalPut);
- ch := #0;
- MaxX := GetMaxX;
- MaxY := GetMaxY;
- REPEAT
- GetTime(Hour, Minute, Second, Sec100);
- IF Minute MOD 2 = 0 THEN BEGIN
- Randomize;
- x := Random(MaxX - 221);
- y := Random(MaxY - 71);
- PutImage(x, y, p1^, NormalPut);
- Randomize;
- Delay(Random(1500) + 500);
- PutImage(x, y, p2^, NormalPut);
- END ELSE MoveLogo;
- IF KeyPressed THEN BEGIN
- ch := ReadKey;
- IF ch <> ^F THEN BEGIN
- PutImage(x, y, p3^, NormalPut);
- FOR i := 30 TO 900 DO BEGIN
- Sound(i * 10); Delay(1);
- END;
- FOR i := 900 DOWNTO 30 DO BEGIN
- Sound(i * 10); Delay(1);
- END;
- NoSound;
- PutImage(x, y, p2^, NormalPut);
- END;
- END;
- UNTIL ch = ^F;
- FreeMem(p1, Size);
- FreeMem(p2, Size);
- CloseGraph;
- END.
-
- (*===================================================================*)