27 int x,
y, z, saveType;
31 int tileX, tileY, tileZ, typeIntern, typeIntern2;
32 int tileXsave, tileYsave, tileZsave, nx, ny, nz;
36 DCELL_TYPE : FCELL_TYPE);
61 tileSize = tileX * tileY * tileZ;
63 for (z = 0; z < nz; z++)
64 for (y = 0; y < ny; y++)
65 for (x = 0; x < nx; x++) {
int G3d_writeTile(G3D_Map *map, int tileIndex, const void *tile, int type)
Writes tile with index tileIndex to the file corresponding to map. It is assumed that the cells in ti...
void * G3d_allocTiles(G3D_Map *map, int nofTiles)
Is equivalent to G3d_allocTilesType (map, nofTiles, G3d_fileTypeMap (map)).
void G3d_setFileType(int type)
set G3d file type
void G3d_copyValues(const void *src, int offsSrc, int typeSrc, void *dst, int offsDst, int typeDst, int nElts)
void G3d_getTileDimension(int *tileX, int *tileY, int *tileZ)
get Tile Dimension
void G3d_changeType(void *map, const char *nameOut)
Makes a copy of map with name nameOut in which the cells are of type FCELL_TYPE if they are DCELL_TYP...
int G3d_closeCell(G3D_Map *map)
Closes g3d-file. If map is new and cache-mode is used for map then every tile which is not flushed be...
void G3d_freeTiles(void *tiles)
Is equivalent to G3d_free (tiles);
void G3d_setTileDimension(int tileX, int tileY, int tileZ)
set Tile Dimension
int G3d_readTile(G3D_Map *map, int tileIndex, void *tile, int type)
Reads tile with index tileIndex into the tile buffer. The cells are stored with type type which must ...
int G3d_tile2tileIndex(G3D_Map *map, int xTile, int yTile, int zTile)
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile).
void G3d_fatalError(const char *,...)
This function prints the error message msg, and terminates the program with an error status...
void * G3d_openCellNew(const char *name, int typeIntern, int cache, G3D_Region *region)
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must b...
int G3d_getFileType()
get G3d file type