Difference between revisions of "Callback: Station sprite layout"

From GRFSpecs
Jump to navigationJump to search
m (Create a separate page for each callback)
 
 
Line 1: Line 1:
== Callback: Station sprite layout (14) ==
+
== Station sprite layout (14) ==
   
 
[[Callbacks#Station sprite layout (14)|Callback 14]] selects an entry from the sprite layout (set by [[Action0Stations#Sprite layout 09|prop. 09]] or the default if unset), and if its return value is invalid then the sprite layout given from the tile type will be used.  You can use this to have more than 4 different sprite sets to choose from.
 
[[Callbacks#Station sprite layout (14)|Callback 14]] selects an entry from the sprite layout (set by [[Action0Stations#Sprite layout 09|prop. 09]] or the default if unset), and if its return value is invalid then the sprite layout given from the tile type will be used.  You can use this to have more than 4 different sprite sets to choose from.

Latest revision as of 19:29, 16 June 2011

Station sprite layout (14)

Callback 14 selects an entry from the sprite layout (set by prop. 09 or the default if unset), and if its return value is invalid then the sprite layout given from the tile type will be used.  You can use this to have more than 4 different sprite sets to choose from.

Bit 0 (station orientation) of the return value is ignored, and instead set to bit 0 of the actual tile, so that you do not have to check the orientation explicitly and return the two corresponding values, instead just organize the layouts such that even numbers correspond to X orientation (NE-SW) and odd numbers corresponding to Y orientation (NW-SE).

The effect is like having additional tile types that are however not actually built, but only show different graphics depending on this callback.