====== Map types ====== The ''VarID_map'' variable type in Zeolite may be initialised as several different //map types//. These map types are represented by a signed 32-bit integer (positive or negative) that is set in [[zeolite:functions:zmap_Init]], [[zeolite:functions:zmap_Init2]] or [[zeolite:functions:zmap_InitMosaic]], and retrieved using [[zeolite:functions:zmap_GetMapType]]. For readability, tokens are defined in 'Zeolite_defines.h' that may be used instead of the integer values (e.g. MAP_BYTE). These tokens are listed below, along with the corresponding integer value, pixel type, and bytes-per pixel (BPP) value. ^ Token ^ Map ID ^ Pixel type ^ BPP ^ Description ^ | MAP_BYTE | 1 | BYTE | 1 | Generic 1-byte/pixel map, commonly used for mask maps. | | MAP_WORD | 2 | WORD | 2 | Generic 2-bytes/pixel map. | | MAP_RGB | 3 | [[zeolite:types:ColourPixel]] | 3 | Default map type for image data such as light maps and textures. | | MAP_RGBA | 4 | BYTE[4] | 4 | RGBA colour value. | | MAP_DWORD | 4 | DWORD | 4 | Generic 4-bytes/pixel map. | | MAP_DesignMap | 10 | [[zeolite:types:DesignMapPixel]] | 12 | See [[l3dt:reference:maps:DM|Design map description]]. | | MAP_Heightfield | 20 | float | 4 | See [[l3dt:reference:maps:HF|Heightfield description]]. | | MAP_TerrainNormals | 30 | [[zeolite:types:vector3c]] | 3 | See [[l3dt:reference:maps:TN|Terrain normals description]]. | | MAP_WaterMap | 40 | [[zeolite:types:WaterMapPixel]] | 10 | See [[l3dt:reference:maps:WM|Water map description]]. | Future versions of //Zeolite// will allow user-defined map types, and these map type IDs will be //negative// numbers. Hence, when using map IDs it is //mandatory// to use a signed long integer (32-bit).