Page principale | Structures de données | Liste des fichiers | Champs de donnée | Portée globale

gxlib10.h

Aller à la documentation de ce fichier.
00001 /*#################################################################################### 00002 # This Code is part of the libg100 library : http://libg100.sf.net # 00003 # # 00004 # THIS LIBRARY IS DISTRIBUTED "AS IS". # 00005 # NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. # 00006 # YOU USE AT YOUR OWN RISK. # 00007 # THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, # 00008 # LOSS OF PROFITS OR ANY OTHER KIND OF LOSS # 00009 # WHILE USING OR MISUSING THIS LIBRARY. # 00010 # # 00011 # This library is Distributed in LGPL License, read lgpl.txt or go to : # 00012 # http://opensource.org/licenses/lgpl-license.php # #/ 00013 ####################################################################################*/ 00014 00023 #ifndef GX_LIB 00024 #define GX_LIB 00025 00026 // screen 1 1 10 01 10 0 (facteur 1) 00027 // screen 2 1 11 10 00 0 (facteur 2) 00028 // screen 3 1 01 01 01 0 (facteur 1) 00029 // | \/ \/ \/ | 00030 // intensite 4 3 2 1 0 /4 00031 // couleur B DG MG LG W 00032 00033 // idealement la combinaison '100' devrait etre aussi utilisee pour le gris clair, mais elle 00034 // servira plutot pour le masque dans les fonctions gxSpr_M_C et gxSpr_M_noC. 00035 00037 // Compilateurs 00038 00039 typedef unsigned char uchar; 00040 typedef unsigned int uint; 00041 00042 #ifdef __TURBOC__ // compilation avec TurboC 3.0 00043 typedef uchar bool; 00044 #define true 1 00045 #define false 0 00046 #define LBL(a) } a: asm { 00047 00048 #elif __DMC__ // compilation avec Digital Mars 00049 #define interrupt _interrupt 00050 #ifndef __cplusplus 00051 typedef uchar bool; 00052 #define true 1 00053 #define false 0 00054 #endif 00055 #define LBL(a) } a: asm { 00056 00057 //#elif __WATCOMC__ // compilation avec Open Watcom 00058 //typedef uchar bool; 00059 //#define true 1 00060 //#define false 0 00061 //#define asm __asm 00062 //#define LBL(a) a: 00063 #endif 00064 00066 // Constantes des couleurs (ne pas modifier ces valeurs) 00067 00068 #define GX_WHITE 0 00069 #define GX_LIGHTGRAY 1 00070 #define GX_MIDGRAY 2 00071 #define GX_DARKGRAY 3 00072 #define GX_BLACK 4 00073 #define GX_INVERSE 5 00074 00076 // Mode d'affichage des sprites (ne pas modifier ces valeurs) 00077 00078 #define GX_SPR_MASK_CLIP 0 00079 #define GX_SPR_NOMASK_CLIP 1 00080 #define GX_SPR_MASK_NOCLIP 2 00081 #define GX_SPR_NOMASK_NOCLIP 3 00082 00084 // Contraste par defaut et cadre de clipping 00085 00086 #define GX_CONT_G100 20 00087 #define GX_CONT_G100PLUS 21 00088 00089 #define GX_CLIPG 0 // (0 <= x <= 127) 00090 #define GX_CLIPD 128 // (1 <= x <= 128) 00091 #define GX_CLIPH 0 // (0 <= x <= 63) 00092 #define GX_CLIPB 64 // (1 <= x <= 64) 00093 00095 // Choix des fonctions a compiler dans le projet 00096 00097 #define FUNC_GX_REFRESH 00098 #define FUNC_GX_DRAWBMP 00099 00100 #define FUNC_GX_PIXEL 00101 #define FUNC_GX_PIXW 00102 #define FUNC_GX_PIXLG 00103 #define FUNC_GX_PIXMG 00104 #define FUNC_GX_PIXDG 00105 #define FUNC_GX_PIXB 00106 #define FUNC_GX_PIXINV 00107 #define FUNC_GX_PIXTEST 00108 00109 #define FUNC_GX_VLINE 00110 #define FUNC_GX_VLINEW 00111 #define FUNC_GX_VLINELG 00112 #define FUNC_GX_VLINEMG 00113 #define FUNC_GX_VLINEDG 00114 #define FUNC_GX_VLINEB 00115 #define FUNC_GX_VLINEINV 00116 00117 #define FUNC_GX_HLINE 00118 #define FUNC_GX_HLINEW 00119 #define FUNC_GX_HLINELG 00120 #define FUNC_GX_HLINEMG 00121 #define FUNC_GX_HLINEDG 00122 #define FUNC_GX_HLINEB 00123 #define FUNC_GX_HLINEINV 00124 00125 #define FUNC_GX_FILL 00126 #define FUNC_GX_FILLW 00127 #define FUNC_GX_FILLLG 00128 #define FUNC_GX_FILLMG 00129 #define FUNC_GX_FILLDG 00130 #define FUNC_GX_FILLB 00131 #define FUNC_GX_INVERSE 00132 00133 #define FUNC_GX_SPRITE 00134 #define FUNC_GX_SPR_M_C 00135 #define FUNC_GX_SPR_NOM_C 00136 #define FUNC_GX_SPR_M_NOC 00137 #define FUNC_GX_SPR_NOM_NOC 00138 00140 // Declarations 00141 00142 #ifdef __cplusplus 00143 extern "C" { 00144 #endif 00145 00146 void gxSetMode(bool enabled); 00147 #define gxClearBuff gxFillW 00148 void gxRefresh(); 00149 void gxDrawBmp(void far* bmp); 00150 00151 void gxPixel (uint x, uint y, uchar coul); 00152 void gxPixB (uint x, uint y); 00153 void gxPixW (uint x, uint y); 00154 void gxPixLG (uint x, uint y); 00155 void gxPixMG (uint x, uint y); 00156 void gxPixDG (uint x, uint y); 00157 void gxPixInv (uint x,uint y); 00158 uchar gxPixTest (uint x,uint y); 00159 00160 void gxVLine (uint x, uint ymin, uint ymax, uchar coul); 00161 void gxVLineB (uint x, uint ymin, uint ymax); 00162 void gxVLineW (uint x, uint ymin, uint ymax); 00163 void gxVLineLG (uint x, uint ymin, uint ymax); 00164 void gxVLineMG (uint x, uint ymin, uint ymax); 00165 void gxVLineDG (uint x, uint ymin, uint ymax); 00166 void gxVLineInv (uint x, uint ymin, uint ymax); 00167 00168 void gxHLine (uint xmin, uint xmax, uint y, uchar coul); 00169 void gxHLineB (uint xmin, uint xmax, uint y); 00170 void gxHLineW (uint xmin, uint xmax, uint y); 00171 void gxHLineLG (uint xmin, uint xmax, uint y); 00172 void gxHLineMG (uint xmin, uint xmax, uint y); 00173 void gxHLineDG (uint xmin, uint xmax, uint y); 00174 void gxHLineInv (uint xmin, uint xmax, uint y); 00175 00176 void gxFill (uchar coul); 00177 void gxFillW (); 00178 void gxFillLG (); 00179 void gxFillMG (); 00180 void gxFillDG (); 00181 void gxFillB (); 00182 void gxInverse (); 00183 00184 void gxSprite (int x, int y, void far* spr, uchar mode); 00185 void gxSpr_M_C (int x, int y, void far* spr); 00186 void gxSpr_noM_C (int x, int y, void far* spr); 00187 void gxSpr_M_noC (int x, int y, void far* spr); 00188 void gxSpr_noM_noC (int x, int y, void far* spr); 00189 00190 #ifdef __cplusplus 00191 } 00192 #endif 00193 00195 // Pointeurs vers les segments de l'ecran et du buffer 00196 00197 extern const void far* gxScreen1; 00198 extern const void far* gxScreen2; 00199 extern const void far* gxScreen3; 00200 extern const void far* gxBuffer1; 00201 extern const void far* gxBuffer2; 00202 extern const void far* gxBuffer3; 00203 00205 00206 #endif
Copyright 2004 The Libg100 Team
Sourceforge Project - LGPL Licensing