NML:Alternative sprites: Difference between revisions

From GRFSpecs
Jump to navigation Jump to search
Content deleted Content added
No edit summary
Yexo (talk | contribs)
Name of block is "alternative_sprites", not "alt_sprites"
Line 1: Line 1:
{{NMLNavBlocksyntax}}
{{NMLNavBlocksyntax}}


A <code style="color:darkgreen">alt_sprites</code> block allows you to specify alternative 32bpp sprites that are drop-in replacements for some real sprites in your grf. The syntax is as follows:
A <code style="color:darkgreen">alternative_sprites</code> block allows you to specify alternative 32bpp sprites that are drop-in replacements for some real sprites in your grf. The syntax is as follows:


alt_sprites(block_name, zoom_level[, filename]) {
alternative_sprites(block_name, zoom_level[, filename]) {
[[NML:Realsprites|list of realsprites]]
[[NML:Realsprites|list of realsprites]]
}
}


block_name is the name of the replace/replace_new/fontglyph/spriteset-block for which you want to provide 32bpp sprites. zoom_level can be one of <code style="color:darkgreen">ZOOM_LEVEL_NORMAL, ZOOM_LEVEL_Z0, ZOOM_LEVEL_Z1 or ZOOM_LEVEL_Z2</code>. Please note that <code style="color:darkgreen">ZOOM_LEVEL_NORMAL</code> and <code style="color:darkgreen">ZOOM_LEVEL_Z2</code> are exactly the same, and that <code style="color:darkgreen">ZOOM_LEVEL_Z0</code> and <code style="color:darkgreen">ZOOM_LEVEL_Z1</code> are for the [http://wiki.openttd.org/32bpp_Extra_Zoom_Levels extra zoom project] only (3rd party project, not officially supported). Specifying a filename is optional, it's only useful if you have multiple sprites in the same file. If every sprite is in a separate file you'll have to specify the filename for each realsprite anyway, so you can leave it out of the alt_sprites-block.
block_name is the name of the replace/replace_new/fontglyph/spriteset-block for which you want to provide 32bpp sprites. zoom_level can be one of <code style="color:darkgreen">ZOOM_LEVEL_NORMAL, ZOOM_LEVEL_Z0, ZOOM_LEVEL_Z1 or ZOOM_LEVEL_Z2</code>. Please note that <code style="color:darkgreen">ZOOM_LEVEL_NORMAL</code> and <code style="color:darkgreen">ZOOM_LEVEL_Z2</code> are exactly the same, and that <code style="color:darkgreen">ZOOM_LEVEL_Z0</code> and <code style="color:darkgreen">ZOOM_LEVEL_Z1</code> are for the [http://wiki.openttd.org/32bpp_Extra_Zoom_Levels extra zoom project] only (3rd party project, not officially supported). Specifying a filename is optional, it's only useful if you have multiple sprites in the same file. If every sprite is in a separate file you'll have to specify the filename for each realsprite anyway, so you can leave it out of the alternative_sprites-block.

Revision as of 15:17, 3 October 2011

Block Syntax

A alternative_sprites block allows you to specify alternative 32bpp sprites that are drop-in replacements for some real sprites in your grf. The syntax is as follows:

alternative_sprites(block_name, zoom_level[, filename]) {
	list of realsprites
}

block_name is the name of the replace/replace_new/fontglyph/spriteset-block for which you want to provide 32bpp sprites. zoom_level can be one of ZOOM_LEVEL_NORMAL, ZOOM_LEVEL_Z0, ZOOM_LEVEL_Z1 or ZOOM_LEVEL_Z2. Please note that ZOOM_LEVEL_NORMAL and ZOOM_LEVEL_Z2 are exactly the same, and that ZOOM_LEVEL_Z0 and ZOOM_LEVEL_Z1 are for the extra zoom project only (3rd party project, not officially supported). Specifying a filename is optional, it's only useful if you have multiple sprites in the same file. If every sprite is in a separate file you'll have to specify the filename for each realsprite anyway, so you can leave it out of the alternative_sprites-block.