Difference between revisions of "NML:Canals"

From GRFSpecs
Jump to navigationJump to search
(ids should get a separate section)
(add variables and callbacks)
Line 16: Line 16:
   
 
=== graphic_flags ===
 
=== graphic_flags ===
the <code style="color:darkgreen">WATERFEATURE_ALTERNATIVE_SPRITES</code> defines the type of spritesets used by the single <code style="color:darkgreen">ids</code> of canals (compare also [[Action3/Canals#id| nfo specs]]):
+
the <code style="color:darkgreen">WATERFEATURE_ALTERNATIVE_SPRITES</code> defines the type of spritesets used by the single <code style="color:darkgreen">ids</code> of canals (compare also [[Action3/Canals#id| nfo specs]])
   
  +
== Canal variables ==
  +
  +
{| class="t"
  +
! name
  +
! value range
  +
! comment
  +
|-
  +
|tile_height
  +
|0 .. 128
  +
|tile height in steps of 8
  +
|-
  +
|terrain_type
  +
| TILETYPE_XX
  +
| TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW
  +
|-
  +
|random_bits
  +
|0 .. 255
  +
|random bits of that tile
  +
|}
  +
  +
== Canal callbacks ==
  +
  +
{| class="t"
  +
! callback
  +
! return value
  +
! comment
  +
|-
  +
|default
  +
|spriteset
  +
|graphics for the canal id
  +
|-
  +
|sprite_offset
  +
|
  +
|numeric offset into the spriteset for the canal id
  +
|}
   
 
== Canal ids ==
 
== Canal ids ==

Revision as of 21:21, 14 October 2011

Props, Vars and CBs

Canal properties

 item (FEAT_CANAL, item_name, id) { ... }
name value range comment
graphic_flags bitmask(flags) only possible value other than undefined: WATERFEATURE_ALTERNATIVE_SPRITES

graphic_flags

the WATERFEATURE_ALTERNATIVE_SPRITES defines the type of spritesets used by the single ids of canals (compare also nfo specs)

Canal variables

name value range comment
tile_height 0 .. 128 tile height in steps of 8
terrain_type TILETYPE_XX TILETYPE_NORMAL, TILETYPE_DESERT, TILETYPE_RAIN_FOREST, TILETYPE_SNOW
random_bits 0 .. 255 random bits of that tile

Canal callbacks

callback return value comment
default spriteset graphics for the canal id
sprite_offset numeric offset into the spriteset for the canal id

Canal ids

name use normal sprites alternative sprites
WF_WATERCLIFFS Supported by OpenTTD 1.1 (r20352)1.1 Supported by TTDPatch 2.6 (r1573)2.6 water for rivers 4 slope sprites 1 flat ground sprite followed by 4 slope sprites
WF_LOCKS Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.52.5 Locks 24 undefined
WF_DIKES Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.52.5 Dikes 12 undefined
WF_CANAL_GUI Not supported by OpenTTD Supported by TTDPatch 2.52.5 Canal GUI 1 undefined
WF_FLAT_DOCKS Not supported by OpenTTD Supported by TTDPatch 2.52.5 Flat docks 4 undefined
WF_RIVER_SLOPE Supported by OpenTTD 1.1 (r20352)1.1 Supported by TTDPatch 2.6 (r1573)2.6 River Slope 4 1 flat ground sprite followed by 4 slope sprites
WF_RIVERBANKS Supported by OpenTTD 0.60.6 Supported by TTDPatch 2.62.6 Riverbanks 12*5 (Last 4 for slopes) undefined
WF_RIVER_GUI Not supported by OpenTTD Supported by TTDPatch 2.62.6 River GUI 2 undefined
WF_BUOY Supported by OpenTTD 1.2 (r22973)1.2 Not supported by TTDPatch Buoy 1 undefined