Difference between revisions of "Action0/Canals"

From GRFSpecs
Jump to navigationJump to search
 
(18 intermediate revisions by 9 users not shown)
Line 1: Line 1:
  +
==Introduction==
 
'''''Action 0 - Properties for canals / rivers'''''
 
 
=Action 0 - Properties for canals / rivers=
 
   
 
Defining properties of canals / rivers.
 
Defining properties of canals / rivers.
   
{maketoc}
 
 
-=Properties=-
 
 
||Number|Version|Size|Description
 
 
08|a|B|Canals / Rivers Callback flags, see below|
 
 
09|b|B|Canals / Rivers Graphic flags||
 
 
(a) 2.6 r1560
 
 
(b) 2.6 r1573
 
 
-=Comments=-
 
 
==Canals callback (08)==
 
 
For canals and rivers, the following [[Callbacks|callbacks]] can be defined by setting the corresponding bit in property 08:
 
 
||Bit|Value|Variable 0C value|Callback
 
 
0|1|0x147|Enable add sprite offset callback*||
 
 
<nowiki><nowiki>*</nowiki></nowiki> Please note that not all feature ids support this callback
 
   
==Graphic flags (09)==
+
== Properties ==
   
  +
{| |-
For canals and rivers, describes the provided format and features in the sprite block
 
  +
!Number!![[GRFActionsDetailed|Size]]!!Version!!Description
  +
|-
 
|08||B||{{ottdp|1.1|2.6|ottdrev=r20353|ttdprev=r1560}}||Canals / Rivers Callback flags, see below
  +
|-
  +
|09||B||{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}}||Canals / Rivers Graphic flags
  +
|}
   
  +
== Description ==
If bit 0 of graphic flags is enabled, the way Sprites and the count of sprites will change.
 
   
 
=== Canals callback (08) ===
||'''ID'''|'''Description'''|'''Sprites'''|'''Sprites when Bit 0 is set'''
 
   
 
For canals and rivers, the following [[callbacks]] can be defined by setting the corresponding bit in property 08:
00|Watercliffs|4 slope sprites|1 flat ground sprite followed by 4 slope sprites
 
   
  +
{| |-
01|Locks|24|undefined
 
 
!Bit!!Value!!Variable 0C value!!Callback
  +
|-
 
|0||1||0x147||Enable add sprite offset callback<ref>Please note that not all feature ids support this callback</ref>
  +
|}
   
  +
<references />
02|Dikes|12|undefined
 
   
  +
=== Graphic flags (09) ===
03|Icons|1|undefined
 
   
  +
Various flags defining how the graphics are drawn.
04|Flat docks|4|undefined
 
   
  +
{| |-
05|River Slope|4|1 flat ground sprite followed by 4 slope sprites
 
 
!Bit!!Version!!Description
  +
|-
  +
|0||{{ottdp|1.1|2.6|ottdrev=r20352|ttdprev=r1573}}||Changes the arrangement of sprites. See [[Action3/Canals#id|Action3]] for details. It's not allowed to set this bit for undefined entries!
  +
|-
  +
|1..7|| || Reserved. Do not set.
  +
|}
   
  +
== Example ==
06|River waterside|12*5 (Last 4 for slopes)|undefined||
 
   
  +
To be written
<span style='color:#FF0000'>It's not allowed to set bit 0 for undefined entries!</span>
 

Latest revision as of 17:29, 1 September 2011

Introduction

Defining properties of canals / rivers.


Properties

Number Size Version Description
08 B Supported by OpenTTD 1.1 (r20353)1.1 Supported by TTDPatch 2.6 (r1560)2.6 Canals / Rivers Callback flags, see below
09 B Supported by OpenTTD 1.1 (r20352)1.1 Supported by TTDPatch 2.6 (r1573)2.6 Canals / Rivers Graphic flags

Description

Canals callback (08)

For canals and rivers, the following callbacks can be defined by setting the corresponding bit in property 08:

Bit Value Variable 0C value Callback
0 1 0x147 Enable add sprite offset callback[1]
  1. Please note that not all feature ids support this callback

Graphic flags (09)

Various flags defining how the graphics are drawn.

Bit Version Description
0 Supported by OpenTTD 1.1 (r20352)1.1 Supported by TTDPatch 2.6 (r1573)2.6 Changes the arrangement of sprites. See Action3 for details. It's not allowed to set this bit for undefined entries!
1..7 Reserved. Do not set.

Example

To be written