{ 3D Motha Fuckin' Demonstration In Turbo Pascal 7.0 }
{  CopyRight 1995 (C) By TOMER SASSON - The Chronic  }

{ Fuck The KKK, Germany, Austria, & The Other Motha Fuckin' Nazies ! }
{ DR. DRE, EAZY E, MC REN, ICE CUBE, D.J. YELLA - Real Motha Fuckin' G'z }

{ Deeez Intro Iz Exactly Like The First 3D Intro, But In Deeez One }
{I'm Using Two Objects Az Fonts, Instead Of The OutPut Files.....  }

Uses Chronic;

Const

LObj3D : LObj =
        (((-5,0,-10),(0,-10,0)),((0,-10,0),(5,0,-10)),
        ((-5,0,-10),(0,10,0)),((0,10,0),(5,0,-10)),
        ((-5,0,10),(0,-10,0)),((0,-10,0),(5,0,10)),
        ((-5,0,10),(0,10,0)),((0,10,0),(5,0,10)),
        ((-5,0,-10),(-5,0,10)),((5,0,-10),(5,0,10)));

PObj3D : PObj =
        (((0,8,-10),(-8,0,-10),(0,-8,-10),(8,0,-10)),
        ((0,8,10),(-8,0,10),(0,-8,10),(8,0,10)),
        ((-10,0,-8),(-10,0,8),(10,0,8),(10,0,-8)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)),
        ((0,0,0),(0,0,0),(0,0,0),(0,0,0)));

Label
Start,Stop;

Var
Deg : Integer;
VAddr1, VAddr2 : VAddr;
Ptr1, Ptr2 : VirtPtr;
FPtr1, FPtr2 : FntPtr;
PP : Pallette;
M : Char;

{$L Big}
Procedure Fnt1; External;

{$L Lcd}
Procedure Fnt2; External;

Procedure Deg_LPoints;

Begin
Flip(VAddr2,VAddr1);
Deg:=(Deg+5) Mod 360;
RotateLinePoints(Deg,Deg,Deg,10);
DrawLinePoints(10,15,VAddr1);
Flip(VAddr1,VGA);
Cls(0,VAddr1);
End;

Procedure Deg_PPoints;

Begin
Flip(VAddr2,VAddr1);
Deg:=(Deg+5) Mod 360;
RotatePolyPoints(Deg,Deg,Deg,3);
DrawPolyPoints(3,120,VAddr1);
Flip(VAddr1,VGA);
Cls(0,VAddr1);
End;

Begin
ObjFont(Seg(Fnt1),Ofs(Fnt1),FPtr1);
ObjFont(Seg(Fnt2),Ofs(Fnt2),FPtr2);
InitVGA;
InitVirtual(Ptr1,Vaddr1);
InitVirtual(Ptr2,Vaddr2);
Cls(0,VAddr1);
Cls(0,VAddr2);
WriteFnt(FPtr1,40,150,'Use De Motha Fuckin'' Arrows',8,VAddr2);
WriteFnt(FPtr1,40,170,'(Left & Right), Esc To Exit',8,VAddr2);
WriteFnt(FPtr1,40,70,'The Chronic''s Unit Examples',10,VAddr2);
SetUp3DLines(10,LObj3D);
ZOff := -65;
YOff := 70;
Start:
Repeat
Deg_LPoints;
Until KeyPressed;
M := ReadKey;
Case M Of
#27 : Goto Stop;
#77 : Inc(XOff,3);
#75 : Dec(XOff,3);
End;
If XOff > 275 Then XOff := 275;
If XOff < 45 Then XOff := 45;
GoTo Start;
Stop :
Repeat
Deg_LPoints;
Inc(YOff,5);
Until YOff = 160;
Repeat
Deg_LPoints;
Dec(YOff,5);
Until YOff = -10;
GetPal(PP);
FadeOut(0);
Cls(0,VAddr2);
WriteFnt(FPtr1,80,80,'Niggaz Wit Attitude',7,VAddr2);
Flip(VAddr2,VGA);
FadeIn(PP,0);
ScrollMsg(FPtr2,130,'That Was The 3D-Line Procedures,  ',4,VGA);
ScrollMsg(FPtr2,130,'Now Ya''r ''bout To See The 3D Polygon Procedures.....                                       ',4,VGA);
WriteFnt(FPtr2,50,130,'Press Any Key To Exit...',9,VAddr2);
If KeyPressed Then ReadKey;
SetUpPoly(3,PObj3D);
ZOff := -600;
Repeat
Deg_PPoints;
Inc(ZOff,12);
Until ZOff > -65;
Repeat
Deg_PPoints;
Until KeyPressed;
ReadKey;
CloseVirtual(Ptr1);
CloseVirtual(Ptr2);
CloseVGA;
Cursor(0);
FunkyWrite(0,0,'Coded By TOMER SASSON - The Chronic',2,10,25);
WriteLn;
FunkyWrite(0,2,'Fuck The KKK, Germany, Austria & The Other Motha Fuckin'' Nazies !',7,8,0);
WriteLn;
FunkyWrite(0,3,'Deeez Intro Was Made By Using The Chronic''s Unit, Check Out The Source,',4,12,0);
WriteLn;
FunkyWrite(0,4,'And Ya''ll See How Simple Iz It.... (It''s In The Package TC_3D.ZIP).',4,12,0);
WriteLn;
FunkyWrite(15,7,'-= Born & Raised In Motha Fuckin'' Compton =-',2,10,20);
ScrollWrite(10,15,15,'The Chronic''s Unit Iz The Best Unit For Codin'' Intros');
ScrollWrite(10,15,15,'In Fact, Deeez Unit Contains Everything Ya Need To Code A Proffessional Intro');
ScrollWrite(10,15,15,'The Chronic''s Unit Iz Made Of 100% Pure Pascal & Asm, & It''s More Then Just Fast....');
ScrollWrite(10,15,15,'Call The Parental Advisory BBS, +972-233-2884 For More Details...');
Cursor(1);
WriteLn;
End.