########################################################### GLIB A 3D AXE LIBRAIRY -- GCORE LIB ########################################################## DEVELLOPERS: TheMachine02 Pimathbrainiac Matrefeytontias ########################################################## How to use it : put prgmGCORE in the header of your program. This is the main librairy. warning : don't use L1 ########################################################## MAIN LIB : GCORE LIB ########################################################### #GLOBAL VARS -- GCORE LIB# GVAdr : this is the adresse of your liste of vertex GVStr : free area to store the rotate vertex. Make sure it's a 6*NB_VERTEX weight area #ENVIRONNENMENT VARS -- GCORE LIB# environnements vars is some constants who change the effect of some routine. Make sure you put this before the line :prgmGCORE °GCamera :camera mode 0:fps mode 1:object visualisation mode, distance camera-object can change 2:same as above, but with constant distance D=128 Default : 0 °GNear : distance of the clipping plane and the camera Can take all value. Default : 8 (8 is a good valu to eliminate most of rendering error. °GhlSpac2Scr : value that the GSpac2Scr commands should return, more explanation in the GSpac2Scr command field defaukt : 6 °GJumpXY,°GJumpZ : angle the camera should rotate. XY is for "horizontal roation", Z for the "vertical" Default : depend on the camera mode #ONLY IN GCAMERA=1# °GDMin, °GDMax : the maximun and the minimum distance in wich the camera can move. #COMMANDS -- GCORE LIB# ########################################################### GInit() initialisation of the 3d processing return : none ########################################################### GGetkey() handle all the good getkey, corresponding with the °GCamera mode directionnals keys: rotation, deplacement mode/del : Z rotation F1/F5 : zoom/dezoom, camera distance return : none ########################################################### GSpac2Spac(°FREE,X,Z,Y process the 3d rotation and store the rotated point in °FREE format : {°FREE}^^r=X {°FREE+2}^^r=Y {°FREE+4}^^r=Z return : °FREE+4 adresse ########################################################### GSpac2Scr(°FREE,X,Z,Y) process the 3d rotation, and calculate the 2D position on screen. Store it in °FREE format : {°FREE}^^r=X ;2D position {°FREE+2}^^r=Y ;2D position {°FREE+4}^^r=Z ;3D distance camera-point return : °FREE+°GhlSpac2Scr you can choose if the command return °FREE+0, °FREE+2... ############################################################# G3dTo2D(°FREE) caculate the 2d coordinate of a 3d point. format : input : {°FREE}^^r=X {°FREE+2}^^r=Y {°FREE+4}^^r=Z output : {°FREE}^^r=X ;2D coordinate {°FREE+2}^^r=Y ;2D coordinate {°FREE+4}^^r=Z ;the same value ############################################################## GCLine(X,Y,X2,Y2 Draw a cliped line beetwen X,Y and X2,Y2 return : none ############################################################## GClipLine(VERTEX_ID,VERTEX2_ID) draw a complete cliped line against the °GNear plane and the screen Vertex should be store at GVStr, and GVAdr make sure vertex are store each 6 bytes in GVStr ############################################################## GCode(X,Y) compute the outccode for the X,Y coordinate (subroutine, don't actually use it) ############################################################### #DATA STRUCTURE -- GCORE LIB# GVAdr structure: Data(X,Z,Y)->GVADr X,Y,Z are 1 byte value GVStr structure : Store the rotated vertex each 6 bytes, in correpondance with their position in GVAdr ############################################################### END LIB -- GCORE ############################################################### Enjoy and thanks for all support !!!!!