DOSSEG
.MODEL SMALL
.STACK 40000
.486

INCLUDE INCLUDE\FLAT.INC
INCLUDE INCLUDE\FREE_OVE.FNC
INCLUDE INCLUDE\HIMEM.INC
INCLUDE INCLUDE\VESA.INC
INCLUDE INCLUDE\CLAVIER.INC
INCLUDE FONCTION\Graph16v.fNC
INCLUDE FONCTION\BMP.fNC
INCLUDE FONCTION\TABP3D.fNC
INCLUDE FONCTION\OBJET3D.fNC
INCLUDE FONCTION\Polygone.fNC
INCLUDE FONCTION\INITG16.fNC

.DATA
 OBJ1 DD 0
 OBJ2 DD 0
 anglex dd 0

.CODE              
START:
 MOV AX,@DATA
 MOV DS,AX
 FLAT_MODE                        ;Passe en mode flat
 NEW_KEY                          ;Installe le nouveau clavier
 GET_HIMEM_ADRESSE                ;Recup‚re adresse driver HIMEM
 ACTIVE_A20                       ;Active la ligne d'adresse A20
 CHECK_BEST_MODE16
 INIT_GRAPHIQUE_MODE





 charge_objet3D "police.obj"
 MOV obj1,EAX
 charge_objet3D "fond.obj"
 MOV obj2,EAX


 ee:
 INIT_GRAPHIQUE



    OBJET3D_FORME_OFS32_TABP3D obj1,0
    PUSH EAX
    OBJET3D_FORME_OFS32_TABP2D obj1,0
    MOV EBX,EAX
    POP EAX
    ROTATE_P3D_AXEZ anglex,1,EAX,EBX

    OBJET3D_FORME_OFS32_TABP2D obj1,0
    ROTATE_P3D_AXEY angleX,2,EAX,EAX


    OBJET3D_FORME_OFS32_TABP3D obj2,0
    PUSH EAX
    OBJET3D_FORME_OFS32_TABP2D obj2,0
    MOV EBX,EAX
    POP EAX
    TRANSLATE_P3D 0,0,50,EAX,EBX

    add anglex,1
   AJOUTE_OBJET3D_BUFFERZ obj1,moniteur,BUFFERG
   AJOUTE_OBJET3D_BUFFERZ obj2,moniteur,BUFFERG
   AFFICHE_POLYGONE_BUFFERZ BufferG,BufferZmin,BufferZmax,Moniteur,MaskG

   SWAP_GRAPHIQUE
   KEY 1
   JNE ee






 LIBERE_OBJET3D Obj1
 LIBERE_OBJET3D Obj2
 LIBERE_EMB MaskG
 LIBERE_EMB Moniteur
 LIBERE_EMB MoniteurBuffer
 LIBERE_EMB BufferG


 MOV AX,0003H            ;Repasse en mode texte
 INT 10H                 ;
 DESACTIVE_A20           ;Desactive la ligne d'adresse A20
 HOLD_KEY                ;Restaure le clavier
 MOV AX,4C00H            ;Retourne au dos
 INT 21H                 ;
END START

