Lemmings DS

Mathew Carr

Lemmings DS Texture Archiver - June 2007

Texture archives are files containing a series of 16 and 256 colour images ready for use in rendering a level. The texture_archive_using field within each Lemmings DS level indicates what texture archive must be present to render the level.

When a texture archive is 'linked' it is loaded into memory and used as the 'standard' texture source for drawing level scenery. (The 'custom' texture source is the appended texture bunch that appears at the end of the level file after the texture object placement data.)

Both the editor and the game ROM both try to open the specified texture archive from the 'custom' texture archive directory first. If the specified texture archive is not present, then it will search for a standard texture archive of the same name.

If neither are present then this will result in a crash.

The tool for creating texture archives is called lemmings_texture_archiver and takes the following parameters:

      lemmings_texture_archiver SOURCE-DIRECTORY ARCHIVE_OUTPUT_NAME.LTA [F]

      SOURCE-DIRECTORY is a directory containing 16 and 256 colour PNGs numbered from 0.png ascending
      containing the 16 or 256 colour textures to be added to the archive. All of the textures
      must contain the same palette in the same order.
      
      ARCHIVE_OUTPUT_NAME.LTA is the name of the archive to create.
      
      If the F flag is specified, then all of the loaded textures will be truncated to 16 colours.
      (This is useful if you have a series of 256 colour texture files that only use the first 16
      colours and you wish them to be used as 16 colour textures.)
   

The texture archive also contains the palette from 0.png, so that when it is loaded into the editor, the textures will appear in the preview windows using a viewable palette. (The palette used when rendering the level is specified in the level file, and can be completely different to the one contained in the texture archive. The palette contained in the texture archive is not consulted by the Lemmings DS ROM)