NML:Template: Difference between revisions

From GRFSpecs
Jump to navigation Jump to search
Content deleted Content added
FooBar (talk | contribs)
content of nml r1625
 
FooBar (talk | contribs)
add nav template
Line 1: Line 1:
{{NMLNavBlocksyntax}}

NML allows to define templates to avoid repetitive declaration of the same sprite alignment (e.g. when coding different train wagons of the same size). The may be used in any place where a real sprite would be used. Templates may also be nested. Parameters may be numbers or strings (for the filename).
NML allows to define templates to avoid repetitive declaration of the same sprite alignment (e.g. when coding different train wagons of the same size). The may be used in any place where a real sprite would be used. Templates may also be nested. Parameters may be numbers or strings (for the filename).



Revision as of 16:31, 21 August 2011

Block Syntax

NML allows to define templates to avoid repetitive declaration of the same sprite alignment (e.g. when coding different train wagons of the same size). The may be used in any place where a real sprite would be used. Templates may also be nested. Parameters may be numbers or strings (for the filename).


template templatename([param [, param [, param...]]]) {
	list of realsprites
	...
}

For an example see the spritegroup.