############################################################ POLYGON HANDLING : GPOLY LIB ########################################################### How to use it : put prgmGPOLY in the header of your program READ ReadMe-GCORE FIRST !!!! ########################################################### #GLOBAL VARS -- GPOLY LIB# GPoly : the type of poly. Could be °GQUADRI or °GTRIANG GTxtrAdr : the texture adresse (used in GTxtrTriangle) #ENVIRONNEMENTS VARS -- GPOLY LIB# °GGrey : the greyscale level 2:Black and white 3:3 Grey lvl 4:4 Grey lvl Default : 2 °GTexturing : enable or not texturing 0:off,1:on default : off °GPixelX : decrease or increase precision in the texture drawing 1 mean the more precision, a higher numbers mean less precision default : 1 #COMMANDS -- GPOLY LIB# ########################################################### GPolyInit(NUMBER_OF_VERTEX,MODE) replace the GInit command from GCORE NUMBER_OF_VERTEX is the number of vertex you want use (make sure GVStr can have all this vertices) MODE is the poygons type °GQUADRI : quadrilatrial polygons (4 vertex) °GTRIANG : (3 vertex) return : none ########################################################### GVAcess(ID_VERTEX) Look in GVStr if the vertex as already been process. If not, process the vertex according to GVAdr Data return : adresse of the calculated vertex ########################################################### GDrawArray(NB_OF_POLY,ADRESSE_POLY) Draw n polygons, according to the data in ADRESSE_POLY, and the polygons MODE pls go to DATA STRUCTURE to have details on the polygons data's. ########################################################### GTriangle(°DATA) draw a cliped triangle, according to data ########################################################### GTxtrTriangle(°DATA) draw aa textured triangle, according to data The teexture adresse is in GTxtrAdr ############################################################ #DATA STRUCTURE -- GPOLY# Polygons structure: general : Data(°GFILLED) Data(°GCOLOR1,°GCOLOR2) Data(v1,v2,v3,[v4] °GCOLOR : °GGREY,°GBLACK,°GWIRED,°GGREY33,°GGREY66,°GTGREY °GHIDE : hide the face (no processing) v1...v4 is the vertices ID (stored in GVAdr) textured: Data(°GTEXTURED) Data(GTEXTURE_ADR^^r) // 2 bytes value Data(v1,U1^^r,V1^^r) //U1 and V1 are 2-bytes values, it's the coordiante of the texture in the texture space Data(v2,U2^^r,V2^^r) Data(v3,U3^^r,V3^^r) [Data(v4,U4^^r,V4^^r)] triangle data: Data(X,Y,X2,Y2,X3,Y3) this is 2-bytes values textured triangle data: Data(X,Y,U,V,X2,Y2,U2,V2,X3,Y3,U3,V3) this is two bytes-values ############################################################ END LIB -- GPOLY ############################################################ =)