home *** CD-ROM | disk | FTP | other *** search
- //En-tete realise par WALTER & PATRICE / wiSdom
-
- /* ----------------INCLUSION DES BIBLIOTHEQUES ------------- */
-
- #ifndef vga_head
- #define vga_head
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <dos.h>
- #include <io.h>
- #include <fcntl.h>
- #include <sys\stat.h>
-
- /* ---------------- DECLARATION DES CONSTANTES ------------- */
-
- #define MAXX 320 //Largeur de l'ecran
- #define MAXY 200 //Hauteur de l'ecran
- #define OX 160 //Abscisse du centre de l'ecran
- #define OY 100 //Ordonnee du centre de l'ecran
-
- /* ------------------ DECLARATION DES MACROS --------------- */
-
- #define VBL asm \
- { \
- mov dx,0x3da; \
- in al,dx; \
- test al,8; \
- jz $-3 \
- }
- //Role : Attend un retour vertical du balayage ecran (Vertical BLank)
-
- #define HBL asm \
- { \
- mov dx,0x3da; \
- in al,dx; \
- test al,1; \
- jz $-3 \
- }
- //Role : Attend un retour horizontal du balayage ecran (Horizontal BLank)
-
- /* ------------------REDEFINITION DES TYPES ---------------- */
-
- typedef unsigned char byte;
- typedef unsigned short word;
- typedef unsigned long dword;
- typedef unsigned char far bytef;
- typedef unsigned short far wordf;
- typedef unsigned long far dwordf;
-
- /* ----------------DECLARATION DES PROTOTYPES -------------- */
-
- void InitVGA(void);
- //Role : initialise le mode VGA standard 320x200x256
-
- void InitTexte(void);
- //Role : initialise le mode texte 80x25
-
- byte LoadPCX(char *path,bytef *scr,byte *pal);
- //Role : charge une image PCX (compression RLE) , 320x200x256
- //Entree : chemin, page, palette
- //Sortie : 0 (echec) ou 1 (succes)
-
- void SetAllPal(byte *pal);
- //Role : initialise toute la palette de couleurs internes
- //Entree : palette
-
-
- void CpyBlk2(short xs,short ys,word l,word h,short xd,short yd,bytef *src,bytef *dst);
- //Role : copie un bloc (mot par mot)
- //Entree : x source, y source, largeur multiple de 2, hauteur, x destination,
- // y destination, page source, page destination
-
- void CpyBnd(short ys,word h,short yd,bytef *src,bytef *dst);
- //Role : copie une bande de 320 pixels
- //Entree : y source, hauteur, y destination, page source, page destination
-
- void read_buf_pcx(int handle,byte *tampon,word *comp);
- #endif //vga_head
-