/************************************ Height.h ************************************/ #include "make_tmd.h" #include "3dgraph.h" #include //defines //------- #define TILE_WIDTH (1000) #define TILE_LENGTH (1000) // STRUCTS //-------- typedef struct { VERTEX vert[4]; COLOUR col[4]; TEXTURE txt[1]; } TileStruct; typedef struct { u_long NuTextures; u_long MapLength; u_long MapWidth; u_long MapArea; //world constraints long GRAVITY; // change gravity for strange other world effects long FRICTION; // change friction for icy places long WIND; // change weather conditions //Dynamically allocated arrays ! u_long **DYNAMIC_TMD; //the Addresses ObjectStruct *tileModel; //the actual models TileStruct *tile; //the TMDs long **heightFields; //height field u_long **TEXTURE_MAPS; //Texture addresses long **texturePosition; //tile position of textures } MAP; // GLOBALS //--------- MAP map1; MAP *currentMap; // PROTOTYPES //------------ u_long CreateTileTMD(long h1, long h2, long h3, long h4); void CreateTileModel(); void RotateMap(long x, long y, long z); void SetupMap(); void DrawMap(); void SetCurrentMap(MAP *theMap); void SetDimensions(MAP *theMap,u_long NuTx,u_long ML, u_long MW); void SetDemoMap(); long FindHeight(long rx,long rz); long FindRotation(long height1, long height2); void SetAttributes(MAP * theMap,long grav,long fric, long wind); long getWind(); long getFriction(); long getGravity(); void DestroyMap(MAP *theMap);