Difference between revisions of "NML:Deprecated syntax"

From GRFSpecs
Jump to navigationJump to search
(General improvement, make clear that usage is not recommended)
m (Add main nav bar)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
  +
<div style="float:right; padding-left:12px; background:none;">{{NMLNavMain}}</div>
 
== Direct variable access ==
 
== Direct variable access ==
 
NML allows a syntax to directly access (unnamed) variables in a switch-block by their NFO number:
 
NML allows a syntax to directly access (unnamed) variables in a switch-block by their NFO number:
Line 7: Line 8:
   
 
This syntax should only be used when the required variable is not implemented in NML. Unless the variable is added by an unofficial patch (which will not be supported by NML), it's highly recommended to instead file a feature request at the NML tracker to implement the variable there.
 
This syntax should only be used when the required variable is not implemented in NML. Unless the variable is added by an unofficial patch (which will not be supported by NML), it's highly recommended to instead file a feature request at the NML tracker to implement the variable there.
  +
  +
== Old-style callbacks ==
  +
NML allows to specify the used callbacks in the switch chain instead of the graphics block.
  +
See the [[NML:Old style callbacks|description]] for details

Latest revision as of 13:28, 27 May 2013

Direct variable access

NML allows a syntax to directly access (unnamed) variables in a switch-block by their NFO number:

var[<num>, <shift>, <mask>, <param>]

where <num> is the NFO variable number, which is shifted <shift> bits to the right and then and-masked with <mask>. <param> is only present for those variables (0x60-0x7F) which require a parameter.

This syntax should only be used when the required variable is not implemented in NML. Unless the variable is added by an unofficial patch (which will not be supported by NML), it's highly recommended to instead file a feature request at the NML tracker to implement the variable there.

Old-style callbacks

NML allows to specify the used callbacks in the switch chain instead of the graphics block. See the description for details