home *** CD-ROM | disk | FTP | other *** search
- Uses Crt,ModeXLib,var_3d;
-
- Const
- worldlen=8*3; {tableau des points }
- Worldconst:Array[0..worldlen-1] of Integer =
- (-200,-200,-200,
- -200,-200,200,
- -200,200,-200,
- -200,200,200,
- 200,-200,-200,
- 200,-200,200,
- 200,200,-200,
- 200,200,200);
- surfclen=38; {tableau des faces }
- surfcconst:Array[0..surfclen-1] of Word=
- (01,4, 0,2,6,4,
- 02,4, 0,1,3,2,
- 03,4, 4,6,7,5,
- 04,4, 1,5,7,3,
- 05,4, 2,3,7,6,
- 06,4, 0,4,5,1,0,0);
-
- Var
- i,j:Word;
-
-
- procedure drawworld;external; {dessine l'espace des objets dans la page d'écran courante }
- {$l c:\edition\prog\fr\asm\3dasm.obj}
- {$l c:\edition\prog\fr\asm\poly.obj}
- {$l c:\edition\prog\fr\asm\bres.obj}
- {$l c:\edition\prog\fr\asm\racine.obj}
-
- Begin
- vz:=1000; {profondeur de l'objet }
- vpage:=0; {commence en page 0}
- init_modex; {active le mode X }
- rotx:=0; {rotation initiale }
- roty:=0;
- rotz:=0;
- Remplir:=True; {remplissage }
- su_sort:=True; {de tri des faces}
- su_cacher:=True; {traitement des faces cachées }
- verre:=False; {pas de face en verre }
- repeat
- clrx($0f); {efface l'écran }
- DrawWorld; {dessine l'espace des objets }
- switch; {active l'écran }
- WaitRetrace; {attend le prochain retour de balayage }
- Inc(rotx); {poursuit la rotation ... }
- If rotx=120 Then rotx:=0;
- Inc(rotz);
- If rotz=120 Then rotz:=0;
- inc(roty);
- if roty=120 Then roty:=0;
- Until KeyPressed; { ... jusqu'à frappe de touche }
- TextMode(3);
- End.
-
-