====== format_Create ====== ===== Description ===== Create an instance of a file format handler for a particular project map. This function, or [[zeolite:functions:format_CreateGeneric]], must be called at least once by a [[zeolite:plugins:file_io|file input/output plugin]] before it can be used to save or load map files. ===== Function prototype ===== ZFORMAT CExtAPI::format_Create(const char* lpMapName, const char* lpLongName, const char* lpFileExt, const char* lpNativeProgramName); ===== Arguments ===== ^ Name ^ Type ^ Comment ^ | lpMapName | const char* | A pointer to a C-style string, containing a valid map name (see comments). | | lpLongName| const char* | A pointer to a C-style string, containing the full display name of the format (e.g. "L3DT Design map File"). | | lpFileExt| const char* | A pointer to a C-style string, containing the file extension (e.g. "dmf"). | | lpFileExt| const char* | A pointer to a C-style string, containing the nameof the program to which this format is considered native (e.g. "L3DT"). | ===== Return value ===== Null if an error occurred or the format already existed, and otherwise a valid [[zeolite:types:ZFORMAT]] handle. ===== Comments ===== Valid project map names currently include: * "Design map" * "Heightfield" * "Water map" * "Salinity map" * "Attributes map" * "Terrain normals" * "Light map" * "Texture map" More will be added in future. ===== Example ===== // create my format ZFORMAT hFormat = theAPI.format_Create("Design map", "L3DT Design Map File", "dmf", "L3DT"); if(!hFormat) { // do nothing; this probably means the format already exists. } else { // set the flags theAPI.format_SetFlags(hFormat, true, false); // native I/O, but not mosaic }